当前位置:首页 > 报告详情

今天就构建面向未来的传承代码.pdf

上传人: 竿*** 编号:981533 2025-11-29 67页 6.28MB

1、Building Tomorrows Legacy Code,TodayShawna MartellCarta,IncQCon San Francisco 2024Im the problem.Its me.Shawna MartellSr Staff EngineerCarta IncHow do we reason about tech debt&legacy code?What do we do about them?How do we build for the future?AgendaWere building the legacy code of tomorrow.Carta m

2、anages captablesNew hires and terminations are importantCarta integrates with HR systems to power automationCase Study-HR IntegrationsCouldnt support new business linesInconsistent data contractLack of expertise in existing codebaseCase Study-HR IntegrationsExcept,this onlyworked for some providers.

3、And the data exposed here was wildly inconsistent by provider.Touching any of this was scary because we didnt reallyknow how it worked.Updating Legacy CodeRewritein placeSwitchoverGradualreplacementSwitchoverGradualreplacementUpdating Legacy CodeRewritein placeSwitchoverGradualreplacementUpdating Le

4、gacy CodeGradualreplacementRewritein placeSwitchover Justin Sheehy,used with permissionTech DebtReductionBusinessNeedBuild code that ages well.ActorTriviaEncapsulationTestsLintersCommentsCode that Ages Wellhttps:/ componentsAdd wrappersIntroduce abstractionsAdding SeamsData Syncing ScheduleDunder Mi

5、fflinStark IndustriesBuy n LargeWorkdayNamelyNamelyCustomerProviderNext RunTime3pm4pm5pmBeforeAfterCode that doesnt exist can never break.def get_employees(*args,*kwargs):customer_id=kwargscustomer_id .def get_employees(customer_id:uuid)-ListEmployee:.Code is easier to write than read.ProgrammerHumor.io#Do not touch the next line.You WILL be fired.#Powers the bespoke flow for Provider X.#Think long and hard before using it for anything else.#See#Always returns truedef health_check():return FalseActorTriviaWere building the legacy code of tomorrow.vintageQ&A

word格式文档无特别注明外均可编辑修改,预览文件经过压缩,下载原文更清晰!
三个皮匠报告文库所有资源均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
根据《Building Tomorrow’s Legacy Code, Today》的内容,以下是全文关键点的概括: 1. **作者与背景**:Shawna Martell,Carta Inc. 的 Sr Staff Engineer,在 QCon San Francisco 2024 上分享关于技术债务和遗留代码的见解。 2. **问题与挑战**: - 如何处理技术债务和遗留代码? - 如何构建面向未来的代码? 3. **案例研究**: - Carta 在处理人力资源系统集成时遇到的问题,包括不支持新的业务线、数据合同不一致和缺乏现有代码库的专长。 4. **解决方案**: - 更新遗留代码的方法:原地重写、逐步切换和渐进式重写。 - 技术债务减少:编写易于维护和扩展的代码。 5. **构建长期耐用的代码**: - 隔离组件、添加包装器、引入抽象。 - 数据同步计划、代码注释和文档。 6. **代码示例**: - 代码重构示例,展示如何改进代码的可读性和可维护性。 7. **总结**: - 我们正在构建明天的遗留代码,需要关注代码的质量和可维护性。
"如何构建未来遗留代码?" "技术债务与遗留代码,如何应对?" "代码如何永葆青春?"
客服
商务合作
小程序
服务号
折叠