3 ms·
I've heard the same argument against unit testing and strong typing.
by xupybd 3y ago
I've heard the same argument against unit testing and strong typing.
- pessimizer 3y agoI've heard the same argument against not using heroin. It's a generic pretend argument: You say doing(or not doing) this thing will be risky. So that means you're saying that people who don't do(or do) the thing have perfect lives with no risks and free ice cream? You're strangling innovation/A coward!
- brookst 3y agoAnd app sandboxing, and masks during covid, and seatbelts, and gun control, and … The relative merits differ, and any given thing is debatable, but “it doesn’t solve everything so it’s no better than nothing” is a nakedly dishonest argument.
- phkahler 3y agoIf I recall correctly, even NASA found unit testing to be of limited value, finding a small fraction of software bugs. That's not to say "don't do it" but my stance is that the developer should do some ad-hoc testing for everything they write, just don't formalize and document it or you'll land on the wrong end of cost/benefit. I can point to some subtle logic bugs that no sane unit test would have caught.
- sitkack 3y agoBecause their development process before a unit test would ever run is so rigorous!
- koprulusector 3y agoIsn’t unit testing redundant when also using formal verification (e.g., coq)?
- hgsgm 3y ago"limited value" does not mean "net negatives value".
- xupybd 3y agoYeah, it comes down to cost benefit. Different situations require different qc strategies. But the fact that something is not 100% effective is not. Good argument against it.
- sam_bristow 3y agoFor safety critical software NASA still require 100% MC/DC coverage (NASA-STD-8739.8B, 2022)
- flaminHotSpeedo 3y ago"even NASA" implies that NASA is the objective paragon of software development. There are many ways to develop software, and while I have never worked for NASA I can virtually guarantee that their development process is not the same as some random web service. I've found that it's better to think of unit tests as a contract. You don't write them to check your code for bugs, you write them to declare an explicit (though incomplete) contact that's checked in to source control.
- phkahler 3y ago>> "even NASA" implies that NASA is the objective paragon of software development. Sure. They have some of the highest costs of failure post-deployment of anyone, and they have some solid development practices. I'll cite NASA in this context any time. Feel free to pull in other sources if you don't like them though.
- flaminHotSpeedo 3y agoI never said or implied they have poor development practices. But the constraints, requirements, and priorities for a given project at NASA won't even be the same as every other project there, let alone projects at pretty companies in different fields. By extension, I would argue that the concept of universally superior development best practices as a whole doesn't make sense.
- postalrat 3y agoI've heard the same argument against manual when unit tests exist.