October 9, 2011
Programmers Who Don't Need To Write Tests. Yeah, Right. Pull The Other One!Every so often in debates about code quality and the practices that lead to better quality code, I'll hear someone claim that they've worked with programmers who were so darned good they didn't need to write automated tests for their software.
I call bullshit on this. I've met and worked with programmers working on everything from safety-critical flight control systems to online takeaway ordering systems, and I've seen some truly great programmers at work in my time. And guess what? We all make mistakes! If anything, the more capable the programmer, the less likely they are to trust entirely in their own inherent greatness to ensure the code works.
And there's a point being missed here, too. Let's imagine for a moment that there really are programmers out there who really can economically deliver 99.99% correct code without writing tests for it. What happens when another programmer comes along and tries to change their code? How will they know they haven't broken it?
Of course, I could be wrong. Maybe there really are teams out there who can produce reliable, maintainable code, and do it without large amounts of expensive rework, without writing tests.
But, you know what? I'm not sure the onus is on me to disprove that. One, because it can't be disproved. Just like flying saucers can't be disproved. And secondly because all the evidence I've seen in 30 years of programming has never once thrown up a single programmer who was even close to being that good. And I think I've met a big enough and diverse enough cross section of programmers to take from that what I do.
It's like those people who, it's claimed, can live on sunlight alone. They don't eat. They don't drink. But somehow they continue to live for decades. Poppycock, say I. Such a person defies the known laws of physics. And they never stand up to rigorous empirical scrutiny.
Similarly, if you try to convince me that there are teams out there who either retest all their code manually, or don't retest their code at all, that are somehow able to sustain a decent pace of innovation for an extended period, I'll say that they defy the known laws of software, and I'll challenge you to produce one of these teams so they can be submitted to rigorous empirical scrutiny.
Or, to quote Tom Cruise, show me the money.
Posted 7 years, 7 months ago on October 9, 2011