Brilliant article. Testing for testings sake is wrong. Testing for 100% coverage sake is wrong. Write just enough tests at the level where it catches most of your regressions. Drill down into unit tests for complex logic, because you can test that more extensively and much faster than an integration test. Then leave a case or two for an integration test to make sure things are hooked up right. Don't be afraid to unit…
Write just enough tests at the level where it catches most of your regressions...make sure you didn't make a stupid off-by-one mistake. One thing that I've seen in inexperienced coders (including myself in the past) is that they tend to think of every bug as a fluke one-off mistake in an otherwise mostly flawless and awesome record. New coders tend to want to just fix a bug, then pretend it didn't happen. This is exa…
Also the way you quoted me above, "make sure you didn't make a stupid off-by-one mistake" looks like it's talking about writing just enough tests. However, in context, I'm actually referring to writing unit tests for small items where you might make a stupid off-by-one mistake.
So I was never referring to "one-off mistakes", as in mistakes that are flukes.
Your points are all good otherwise! Never rest on your laurels and always think about what you can do to catch your mistakes.