In my previous post “Why Software Developers Shouldn’t Run for Congress” I poked fun at the idea, proposed by a pie-in-the-sky, government-would-work-well-if-only-it-were-run-by-my-kind-of-people type, that an influx of software developers would noticeably improve the quality of our laws.
During a subsequent Facebook discussion, I came up with an additional “reason” why developers might enjoy Congress: developers hate testing their code, and Congress never tests before shipping. Of course I was being flip, but the idea has since gotten stuck in my head.
In software, when you want to make changes to code, you test them. You change small pieces and use unit tests to make sure they don’t break existing functionality. You develop a spec outlining what the code is supposed to do, and then you check that it does those things before you ship it. You have code reviews so that other coders can inspect your code looking for possible unintended consequences. You let normal users try to break the code before it ships. You try using the code yourself for a while before you inflict it on your customers. When you know that people will try to “game” your final product, you model their behavior and try to account for it in your design.
In particular, if you want to stay in business you don’t show up the night before release with thousands of pages of unreviewed, untested, hodge-podge code written by the very people hoping to hack your systems, full of hidden side effects, functionality that wasn’t in the spec, backdoors, and billion-dollar bugs. Unless you’re Congress, of course, in which case you stay in business no matter how sloppy your “coding” habits are.
So while I still don’t think Congress would be particularly improved by the addition of software developers, it sure as hell could benefit from some testers.