Chapter 5. Maintainability
In this chapter
In this second chapter of part 2 we turn our attention from the readability of test code toward its maintainability.
Many of us have heard the quip that code is read much more often than it’s written. That was the case with punch cards and it’s still the case today. That is why readability is so crucially important. When we go beyond merely looking at code, we step into the world of writing code—and most often “writing” really means modifying or extending an existing code base. Sometimes we call that maintenance and sometimes we call it development. In any case, something probably needs to be changed about the code.
What makes code such a fascinating medium to work with and programming such a difficult skill to master is that the nature of code is to be both extremely flexible and extremely fragile. Code is flexible because there are few things that can’t be done with software—it’s without physical constraints. It’s fragile because even the smallest of changes can break it down completely. Code doesn’t degrade slowly. It crashes.