Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I don't buy the authors testing argument for a couple of reasons:
1. Verification is automated - From my perspective, tests predominantly serve to document AND verify the behavior of code. You don't have to follow TDD to buy into the idea that tests serve to verify behavior of the code that was written. Some applies to formal verification of software.
2. Documentation stays in sync with tests - I'd imagine that any snippet of code is read 2-10x more than it ever changes and tests help with that reading process. Writing tests means you're optimizing for the thing that happens most often AND you are somewhat guaranteed that your testing "documentation" stays up-to-date because as software evolves the tests will need to evolve as well there is an immediate penalty for not updating the tests; there is no corresponding immediate penalty for forgetting to update a specification document. The older a piece of software is the harder it will become to understand: the original developers stop working on it, the documentation becomes stale, context and initial reasoning for certain decisions is lost. In such an environment it's, in my experience, generally easier to make changes to old code bases with lots of testing because generally tests will tell you if there is something you don't understand with nearly instantaneous feedback: write some code, run the tests and it either works or it doesn't.
Similarly, I don't get the authors argument that code is more illegible than it has been in the past. More modern languages make this as easy as possible to get correct. Take something like Flask [1] written in Python and generally considered to be well-written and compare that to the C code in SQLite [2] which is generally considered to be well-written C and tell me which is easier to understand without any prior knowledge.
[1] https://github.com/pallets/flask