3 ms·
> once that little script grows into a massive beast you will be glad you can rely on the compiler doing a basic unit test of your program. Not if I bother to
by pekk 10y ago
> once that little script grows into a massive beast you will be glad you can rely on the compiler doing a basic unit test of your program.
Not if I bother to write a few suitable unit tests, which I should really be doing anyway. Typechecking is absurdly far from substituting for checks that my code actually does what I intended it to do.
- hackits 10y agoTend not to write unit tests as most evidence show they have little or no impact (http://neverworkintheory.org/2016/10/05/test-driven-development.html http://neverworkintheory.org/2016/10/05/test-driven-developm...)
- AstralStorm 10y agoTreat unit tests as a form of documentation in an executable format. It is invaluable in long running or larger projects. (As opposed to automated functional tests or pure regression tests.) Also that evidence was comparing test driven against test later, not against no test. That project tested was small enough and short enough to be ran by a single dev.
- flukus 10y agoThat is about TDD and not unit testing in general. And there sample population was graduates and undergraduates. I'd say 90% of developers, which includes a lot of good ones too, never learned to write good unit tests. Poorly written unit tests are worse for productivity and no better for correctness than no unit tests.