All code is buggy until tested innocent

Here's an amusing tool: Guantanamo is a tool that can delete all code lines that are not covered by tests. It can also delete code that is not covered by the application itself.

(Via Andrew Birkett)

Posted on October 18, 2004 11:50 AM
More testing articles

Comments

Heh. You could combine this with the idea that Ben keeps throwing out, of a bot to check in random mutations to the codebase (his idea is that there's too much code we don't look at; this would force us to look at it when it breaks). The result: a bot that randomly mutates code that isn't tested. Then, if it doesn't get noticed and changed back within a couple of months, it obviously wasn't important, so the bot deletes it.

Personally, of course, I've seen too many compiler errors to have that much faith in code coverage. When gcc tells me that a function reaches the end without returning a value, and I can see it's wrong, why should I believe a coverage checker when it makes the much more difficult claim that a line of code is never used? I could take it as a guideline, but not as proof.

Posted by: John Stracke at October 19, 2004 09:04 PM
Post a comment









Remember info?




Prove you're human. Type "human":