3 ms·
"The worse the developer, the more tests he'll write." no.... please..... no..... let's not go down this path. Why does everything have to be extreme? No tes
by swalsh 9y ago
"The worse the developer, the more tests he'll write."
no.... please..... no..... let's not go down this path. Why does everything have to be extreme? No tests, 100% tests... it's all bollocks.
The most robust code I've ever written was 100% because of unit tests. It was a little engine that approved the prior authorization for medications. The unit tests didn't cover 100% of the application. In fact the only bit it did cover was the various use cases in the approval logic. The tests were invaluable in writing the logic, and continued to be invaluable for the maintenance of the project.
Tests are a tool. You don't need to use the tool for EVERYTHING, but sometimes it's the best tool for the job. Using it doesn't make you a bad developer, using it badly makes you a bad developer.
- fireflash38 9y agoEverytime I've seen these arguments it's been the same: * Bad coding practices lead to bad tests * Bad test practices make development very difficult, since you're constantly chasing your tail They're invariably intertwined. Bad tests can be re-written. Bad code can be rewritten/refactored too, but it tends to have a larger impact on the product (you know, the thing that actually makes you money). However, it seems that a lot of posters see bad tests and say that it's the problem, and therefore most tests are bad. They neglect that bad tests are a smell that what they're testing is probably shit. They're treating (condemning) the symptom, not the cause.