4 ms·
That's what unit testing is for? True, and do you understand the trade-offs? Unit testing is far more time consuming than assertions. Moreover, you're forced to
by ellyagg 18y ago
That's what unit testing is for? True, and do you understand the trade-offs? Unit testing is far more time consuming than assertions. Moreover, you're forced to write artificially short routines, routines of a length that research has shown to have a higher defect ratio. For myself, I've not yet been convinced that the costs/benefits of unit testing surpass the costs/benefits of assertions, at least when you're a small team working on end user software.
- rimantas 18y ago"Moreover, you're forced to write artificially short routines, routines of a length that research has shown to have a higher defect ratio" [citation needed] So far I've only seen advice to write shorter routines.
- ramchip 18y agoIndeed, I don't see how smaller, more manageable pieces would be more likely to be defective.
- jibiki 18y agoSomebody posted a study which showed, IIRC, that ~150 lines was the optimum length for subroutines. I really should bookmark these things... EDIT: Hooray for searchyc: http://news.ycombinator.com/item?id=509978 http://news.ycombinator.com/item?id=509978
- scott_s 18y agoIf you upmodded it, it's bookmarked under the "saved" section of your profile.