Chapter 2Dev: Technical Debt Is Now Your Problem
All developers know the feeling of sitting behind the screen and opening another developer's code. Or maybe you work in IT Ops and are reviewing a system administrator's automations, or a data scientist examining your colleague's machine learning model, or a product owner trying to understand a website's information architecture.
On the first inspection, it looks like a pile of spaghetti with three different sauces on top. One function calls another function that calls a third function of poorly structured code, with no consistent naming conventions, zero unit tests, and almost no documentation. You open five or more tabs to trace through the flow, reverse engineer the business logic, and hope that the modifications you need to make don't cause defects or introduce new issues.
Spaghetti code often happens when a developer, engineer, data scientist, or designer tries to get something done in too little time or with insufficient expertise. In some cases, it's written with zero care about what happens when the next person must review or improve on it. Other times, the code has been modified several times by different people, each imprinting their coding methods and style without cleaning up their predecessor's crafty work, again, often because management doesn't allocate sufficient time, direction, or priority to maintain and improve the code.
When you encounter spaghetti code, it's almost always because something of importance ...
Get Digital Trailblazer now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.