4 ms·
Maybe I'm off base, but in this day and age I can not imagine writing a new compiler and runtime without at least 100% branch coverage and automated fuzz testin
by bazookajoes 12y ago
Maybe I'm off base, but in this day and age I can not imagine writing a new compiler and runtime without at least 100% branch coverage and automated fuzz testing and actually asking people to use it.
It is a gut wrenching feeling when code crashes in production and it is my compiler to blame. It seems so much more shameful to me then if a library or service of mine crashed, not that that isn't shameful as well.
Do I need to loosen up?
- lmm 12y agoYou need to be loose enough that you'll actually write and release a compiler, imperfect as it is. Shame can be a powerful motivator but it can also be paralyzing. As I've used more modern languages with better type systems I've moved away from high test coverage and towards writing code that simply can't go wrong (or at least, that is exceedingly limited in the ways it can go wrong); http://spin.atomicobject.com/2014/12/09/typed-language-tdd-part1/ http://spin.atomicobject.com/2014/12/09/typed-language-tdd-p... is a well-written explanation of something very close to my current approach. So I wouldn't put the emphasis on branch coverage or fuzz testing that you do. But I absolutely agree that you should have a very high level of confidence in a compiler before you ask people to use it, substantially higher than the level of confidence required of a library or service.