Colophon
ruzkuku.com
ruzkuku.com
Next on the chopping block: the cult of useless unit tests!
[edit]
If it is sarcasm, I should point out that the copyright on the AWK scripts linked predate subversion so for "burdensome to manage VCS" think more CVS and less git.
You usually get much more bang for your buck with integration and e2e tests than unit tests. Tests have the most power when it is significantly harder to write a correct implementation than it is to write a correct test. As a system grows it becomes harder to reason about its correctness, so testing at the smallest level seems backwards.
On top of that, unless you are exporting a public API, most units are free to change, so you really only care that the software as integrated in your program is correct. In my experience, the overwhelming majority (as in well over 99%) of unit tests are changed because the unit's expected behavior is changed before they ever detect a bug.
There are some things that would be units for which it's easier to write a test than a correct implementation. Besides the obvious examples (e.g. it's easier to test if something is sorted than to sort something), if you have code that must be hand-optimized for performance reasons, then you can run a battle-tested suboptimal version and compare the outputs to get a unit test for free.