3 ms·
Unit tests would be highly unlikely to catch most of those. "a formula written on paper in pencil was improperly transcribed", "neglect to properly "seed" the
by Retric 11y ago
Unit tests would be highly unlikely to catch most of those.
"a formula written on paper in pencil was improperly transcribed", "neglect to properly "seed" the program's random number generator, A HW bug that's not close to obvious numbers to check, intentionally inserted bugs, input outside of the intended design, etc.
- zalzane 11y ago>"a formula written on paper in pencil was improperly transcribed" offtopic, but a unit type would have prevented that. i had no idea how many errors i was making in my math programs before i started using F#'s type checker to make sure all the types lined up properly.
- GFK_of_xmaspast 11y agoI don't know the actual transcription error, but how's it going to find a 5 being made a 6 or something?
- zalzane 11y agoit wont, but the vast majority of errors with math formulas are along the lines of adding velocities with positions, raising something to the wrong power, using a multiply instead of an add, putting a parenthesis in the wrong spot, performing equations in the wrong order, etc. all of those can get caught with type checking, but it isn't perfect
- HeyLaughingBoy 11y agoCorrect. A unit test is a defect removal mechanism. What these faults needed was a defect prevention mechanism. One of those mechanisms is Design/Code reviews. With all the emphasis on testing and TDD, etc, I get the feeling that reviews are getting the shaft. They are both important, for different reasons.