On Refactoring

Software that works is rarely software that lasts. Software also decays, largely due to changes shipped in service of short-terms goals, without a full understanding of the architecture. Tech debt inflation is incurred in service of shipping faster. Code initially shipped is rarely pre-optimized or abstracted to make future changes; as the codebase grows, it becomes harder to add new things or diagnose bugs. Owners of a particular part of the codebase leave.

Below are principles and engineering habits pulled from Martin Fowler’s book, Refactoring, to combat the above:

Especially in this new era of vibe-coding and code co-written by LLMs, exercising a healthy habit of refactoring becomes more critical.

Related quotes and sentiments not from the book:

Last updated: 2025-05-20