3 ms·
Speaking as someone who has fielded many reliable bits of software at least a decade or more before unit testing became a thing, I can't agree unit testing is a
by MattPalmer1086 7y ago
Speaking as someone who has fielded many reliable bits of software at least a decade or more before unit testing became a thing, I can't agree unit testing is a sign of bad engineering.
Tests add real value for me. They are now usually the first "user" of my code. I often find design issues when writing tests. They also catch bugs (rarely but often enough to be useful) and make it easier to refactor with confidence. YMMV!
- crimsonalucard 7y agoIt's a sign that your programming methodology is so error prone that you need unit tests to catch errors. Most of the code I write doesn't need unit tests (automated or manual) because the way I programmed it reduces the complexity of the program to the point where my intuition and the type checker alone will cover correctness. Basically another way to put is... the code doesn't have any errors in the first place so any form of unit testing isn't really needed. Note that I am talking only about unit tests or tests that cover pure internal logic. Anything that touches IO or anything external becomes an integration test and That is not what I'm talking about.
- bobm_kite9 7y agoCan you point us to some code that demonstrates how you do this?
- crimsonalucard 7y agoHaskell code. I would try coding some solution in haskell with minimal IO. You should only need the type checker to verify correctness.