In a recent thread there was a discussion about when it makes sense to "cut corners" in software development and wether XP would allow for doing so (partly motivated by me overstating that XP does not "allow" duplicating code, if I remember correctly). As it happens, some days ago Kent Beck posted a small article to the XP mailing list, where he reports how he wasted valuable time while trying to write a complicated test. He concludes: "Shipping software is the goal, and the practices are a means to an end. The focus on shipping is not an excuse for cutting corners, but perfect adherence to the practices is no excuse for not shipping." (For the full article look out for "just ship.pdf" at http://groups.yahoo.com/group/extremeprogramming/files/ ) There started a short discussion, from which I found a post of Robert C. Martin to be quite thought provoking, so I want to share that with you, too (I tried to trim it down, but couldn't decide on which part to delete - so here is a full quote...):
There are always trade-offs, always considerations, always possibilities. Sometimes we abandon a complex test case because we need to finish the task, and visual inspection or manual testing is sufficient. Sometimes we fail to write an acceptance test because it's complicated, and the bang-for-buck is low. Sometimes we don't program in pairs, because -- well -- we don't have a partner nearby, or we're sick of programming with someone else, or the current task is mechanical. Sometimes we keep a module checked out for more than a couple of hours. Sometimes (damned rarely!) we check in code that fails to pass all the acceptance tests, or all the unit tests. They're just rules, and rules are made to be broken. Blindly following rules is a fools errand. We have enough grey matter to discern when the rules are helpful and when they are not. We have the responsibility to continuously measure whether the rules are helpful, or whether they are not. But then -- there's something else. Something that is cold and hard, and yet simultaneously hot and blazing. Something, amidst all the compromise and ambiguity, that is neither compromised nor ambiguous. Something that spawns and respawns the rules we follow, and yet challenges those rules at every turn. The still small voice; the angel's trumpet, the grim determination, the joyous declaration: "I WILL NOT SHIP SHIT." - "I am a professional -- a craftsman!" -- "No matter what pressures are on me." -- "No matter how I've had to bend the rules." -- "No matter what shortcuts I've had to take." -- "No matter what the gods, or managers, have done or may do." -- -- "I WILL DO THE BEST WORK I CAN POSSIBLY DO." -- -- "Anything short of my best is shit." -- -- "I _ WILL _ NOT _ SHIP _ SHIT." For me, at least, this is what it all comes down to. I find that the rules of XP help me to achieve this most of the time -- more of the time than any other set of rules I have followed. But rules are rules, and when they get in the way of this goal, they get set aside. I do not set the rules aside lightly. Indeed, when in doubt, I follow them. When the pressure is on, I follow them. When the deadline looms, I follow them. I try hard not to let fear drive me. Fear is the mind killer. It breeds idiocies like: "We don't have time to write tests." "We don't have time to program in pairs." "We don't have time to integrate continuously." "We don't have time to automate our acceptance tests." These idiocies are a siren's song. Their lure is strong. Look in their direction and The Despair begins. All the rules will fall away. Our core of professional pride is the cure. That something that is both cold and hard, yet hot and blazing. It won't set aside a rule out of fear. It sets aside a rule when *the rule* will cause you to ship shit.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus