Tuesday, August 7, 2012

Is Your Code a Sherman or a Panzer Tank?




Sherman Tank
Sherman Tank (Wikimedia Commons)

The History Channel produced an insightful documentary comparing the American Sherman tank with the German Panzer tank in WWII combat. The lesson that follows is valuable for any professional software engineer.

Sherman vs Panzer


The Panzer was a tank to be feared by the Americans: it was designed to high German engineering standards, had nearly impenetrable front armor and fired a canon with such velocity that it could easily annihilate the Sherman tank. Stacked up next to the Sherman, the Panzer was the clear victor.

The Sherman, though, had one overwhelming advantage that the Panzer did not: ease of production. The United States was able to out-manufacture the Germans by a ratio of 2 Sherman tanks to each Panzer.  This singular advantage turned out to be decisive for the Allies.
The Germans engineered a superior machine at the cost of taking longer to manufacture. This ensured defeat when outnumbered by the more plentiful Allied Sherman tanks.

Implications for Software Development


What does this have to do with software development? Ask yourself: How much time am I spending engineering the perfect piece of code? I bet it is too much.  If you aren't careful, the increased time to market will allow a competitor to manufacture a Sherman that will make you irrelevant in your market.

This isn't an argument for sloppy design. We should follow best practices like coding to interfaces, using abstractions sparingly, separation of concerns, etc. There's a point, though, where your design is good enough and time to market is more valuable than a technically superior piece of code that is late due to over-engineering.

So I ask, is your code more like a Sherman or is it more like a Panzer tank?

3 comments:

  1. Nice analogy! Being a programmer who is also a WW2 history buff, I very much agree with the points you made here.

    In real world scenarios, Sherman camp outnumber the Panzers. The emphasis on meeting deadlines, so we focus on producing tanks that can hit the target and move forward. But then again, there are cases where you have to have your Panzers. Think about the software running on Mars Curiosity Rover. I bet it's a Tiger!

    ReplyDelete
    Replies
    1. Great comment! You are totally right, sometimes you do need a Panzer and the Mars Curioisity Rover certainly was more Panzer than Sherman!

      Delete
  2. Germans (I am of German descent, I drive a German car and work for a very large German corporation) tend to over-engineer "stuff" too. By "over-engineer" I mean an item can be overly complex.

    The Soviets had a saying (IIRC); quantity has a quality all its own that is maybe more relevant to this comparison with regards to tanks (and airplanes) of WWII. But yes, logistics was a major reason the US and Soviets won the war.

    Conversely, in the wars between Iraq and the US, one of the major factors was the fact that the US had far superior technology, in tanks, aircraft, comms, bombs and so on (not to mention better plans).

    Most analogies fall apart when you look at them in detail.

    ReplyDelete