just ship, baby
kent beck, three rivers institute
abstract: one of the beauties of the practices of extreme programming is that they provide a stable strap to hang onto when everything around you is swaying. the attraction of the practices can also become a trap, though. shipping software is the goal, and the practices are a means to an end. the focus on shipping is no excuse for cutting corners, but perfect adherence to the practices is no excuse for not shipping.
al davis, the slick-haired general manager of the oakland raiders american football team, coined the phrase, “just win, baby!” he wanted his teams to do whatever it took to win. if your game wasn’t pretty but you won, that was a whole lot better than losing beautifully.
taken as a shallow statement, “just win, baby,” is stupid and counter-productive. if a player says, “i don’t need to to train hard, i’m winning,” losing is not far in the future. cheating, also, may enhance winning in the short term but is actually a losing strategy. what if al davis, though, whatever you might think of his coiffure and business practices, is not actually a shallow man? what if, “just win, baby,” isn’t a shallow statement?
in american football, as in many endeavors, there are many factors competing for attention. a player has to prepare physically and mentally, prepare to play with his team, lead other players when necessary, and handle what is often a complicated personal and financial life. coaches and general managers, too, have a host of problems to solve. “just win, baby,” is a beautiful statement in the midst of such a complicated swirl. it reminds each individual that they need to focus complicated swirl. it reminds each individual that they need to focus their efforts on what they can control, directed towards winning games. it reminds the organization as a whole that even in the middle of the inevitable conflicts and disagreements that everybody actually wants the same thing—to win.
i’ve been frustrated by my inability to capitalize on the success of junit. since erich and i wrote junit, it has been clear that folks using it to write and run tests could (and have) created tremendous value by reducing debugging time and improving design. until my recent test-driven development book, though, i had not booked a dime in junit-related revenue.
finally, a series of intellectual and emotional prods gave me the germ of an idea for how to simultaneously make junit testing more valuable, encourage even more testing, and create a revenue stream. armed with my comprehensive knowledge of extreme programming, i immediately started by writing a handful of stories, then created a test package to write the first test for the first story.
i would begin with an eclipse plug-in. for six or eight hours spread over the next few weeks i struggled to get the first test written and running. writing tests for eclipse plug-ins is not trivial, so it’s not surprising i had some trouble. i just kept bashing at the problems, trying to get that first test to run cleanly. it is also not surprising that i got discouraged and found other things to do.
so, the situation was perfectly understandable, but how to make money doing reviews for amazon . as with any speculative idea, the chances that this one will actually work out are slim, but without having anything running, the chances are zero. in six or eight hours of solid programming time, i can still make significant progress. if i’d just written some stuff and verified it by hand, i would probably have the final answer to whether my idea is actually worth money by now. instead, all i have is a complicated test that doesn’t work, a pile of frustration, eight fewer hours in my life, and the motivation to write another essay.
reflecting on my emotional state while i was stuck i can see clearly now that a big part of my problem was that i was afraid of the answer i would receive upon getting something done. what if, after seven years of struggle with trying to create a junit business, i finally had the best junit business idea i’d ever have and it still wasn’t good enough? i didn’t (still don’t) want to consider that possibility. the choice between having to confront my own fallibility and following da roolz was easy—make that dang test work because after all that’s the best way to write software.
i’ve sneering dubbed this philosophy “rules-first programming.” i hope by naming this demon i’ll have power over him the next time he comes to sit on my shoulder. when doing things right becomes more important than doing things at all, i hope to recognize his peculiar smell, an acrid mixture of frustration, sanctimony, cowardice. “rules first programming,” i will say, “you better go sit on some other fool’s shoulder today because today i am going to ship.”
i had an idea for another little tool yesterday. i wrote it without any tests, just to remind myself that i could still program without a net if i had to. i really didn’t like the feeling of not having any tests, especially when the algorithm got hairy. i’m not sure my code works in all cases. but you know what? i shipped. turns out it isn’t that cool of an idea, and i’ll drop it. total cost for that answer—3 hours.
my fear in writing this is that folks will take this as
not to skip the hard practices in xp (you know, the ones about having
the courage to reveal your own weaknesses and relating to other people
as people). those skills meet real social and technical needs in
development. better skills are insurance for when development gets
hard. but lack of skills is no excuse for lack of progress. you get
paid to write programs. there are better ways and worse ways to write
programs. if right now isn't a good time to apply the better ways, you
are still getting paid to write programs.
feeling grumpy? test suite takes an hour? can’t find a customer? keep going. just ship, baby. today. tomorrow, get some rest, tune your tests, and find a customer who’ll trade some scope decisions for a good lunch. today, though, just ship, baby.