O'Reilly logo
  • Randy West thinks this is interesting:

Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.


Cover of Working Effectively with Legacy Code, First Edition


Agreed. To "know if our code is getting better or worse" when a known defect has been fixed, at least a sub-set of related application/system-level regression tests should be performed. However, due to lack of planning/budget/staff/gumption, this is often not done immediately. Code incurs technical debt if it's not regression tested, if only because its goodness is uncertain. That accumulation of debt, which may not be paid down for generations, will most likely be minimized by optimists since the code works. Pragmatists and stuckees extract payment over the lifetime of our code base to keep code limping along until it or they are replaced. There has to ...