Unit tests are a tool. Just like any other tool they need to be used appropriately. You’re articles point out they’ve become a hammer and every software project is a nail. I retired before TDD came into vogue. But I’ve picked up the capability and use it where appropriate. IMO it is more a regression testing tool than a development, per se, tool.

I see it that way because of how I’ve always developed successful software. Write some code, write some code that exercises the code, fix the original, the exercise, or, often, both to make things work. Early on that exercise code got tossed often to be recreated for testing when something broke.

Now I write that exercise code in a unit test framework so it is preserved. Hence, my consideration a regression testing. If an exercise fails I changed something that may need to be fixed.

I am a semi-retired software engineer with decades of experience with embedded systems and have used C++ since the early 90s.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store