Short-term profit or long-term prosperity

David Maister asks, in a business turndown, do you respond with cost-cutting measures, such as layoffs of junior personnel, or do you reduce the profitability at the top, redirecting the efforts of your top people to long-term growth while the junior people attend to the reduced amount of immediate work? As he says,

As always, I have to stress that this is not a moral issue but one of pragmatics.

As I read through the comments on this post, I came across one that noted this was a case of

The classic fight between short-term “success” and long-term prosperity.

Suddenly I was struck by the parallels between this dilemma faced by business owners and those faced by software developers.

Imagine it’s getting late, and you’re tired from a long day’s work. A feature you’re implementing has exceeded your estimation. It should have been done by now, but there were some unexpected complications and you’re still working on it. You just want to get it done and go home, right?

Do you

  1. make it pass the test, check it in, and go home, or
  2. think about how this code fits into the bigger picture, and why you ran into those unexpected complications, make this code clearly reflect this code’s role in that bigger picture (perhaps extracting a class to explicitly acknowledge a secondary responsibility), as well as making it pass the test.

Which is better for long-term prosperity of the code?

Have you faced this dilemma before in this code base? Are those unexpected complications a consequence of code that was left a little less than clear in the past?

3 Replies to “Short-term profit or long-term prosperity”

  1. (3) Bin the code and go home. If I’m tired, anything I do now is suspect. Tomorrow I’ll have the advantage of knowing what I learned today.

    Probably a Much Better Approach will leap into my mind half-way to the station …

  2. Chris, that’s a very good suggestion. I have to admit I’ve never been brave enough to do that, but I have left the code on my machine (not checked in) overnight and deleted it in the morning–when I already had the Much Better Approach in mind. (Or, when with a clear head, the muddle of the previous day was totally obvious.)

  3. Yeah, I have to agree with Chris that “Imagine it’s getting late, and you’re tired from a long day’s work” implies “don’t do anything important”. You know you’ll be smarter in the morning (or, in my case, noon the next day).

    Not sure why he recommends throwing the code out, though — like George[1], I’d probably leave it around for Smarter Future Me to examine.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.