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