Beautiful Code vs Profitable Code

We all love writing beautiful code. Sometimes a project is like a big puzzle where all the pieces have clear edges that fit perfectly together, where you can stand back and see the big picture that the puzzle creates when fully assembled. Sometimes a project can be a thing of beauty.

But beauty doesn’t pay the bills.

Imagine, if you will, a software shop where at every step of the way they dotted every I and crossed every T. This is a place where TDD and refactoring code into perfection takes priority over adding features or fixing bugs. Every time a new feature is discussed, developer response is along the lines of “If I can spend another week refactoring Module X, then implementing this feature would be much easier.” Taken to an extreme (and I have seen this happen) the system becomes more maintainable and beautiful but is not making any money. This situation leads to a rapid loss in feature parity with competitors, which in turn leads to the collapse of the business because it is literally impossible to add features or fix bugs as quickly as competitors.

Imagine another extreme. Imagine a software shop where things like modular design, software best practices, testing, etc, are not in management’s vocabulary. There is no developer bandwidth allocated to write tests, to refactor, to remove duplicate code. Every minute of developer time is pushed towards nothing but writing code and shipping it as quickly as possible. Taken to an extreme (and I have seen this happen) the system over time becomes less and less unmaintainable. This situation leads to a rapid rise in cost to make any changes at all, which in turn leads to the collapse of the business because it is literally impossible to add features or fix bugs at the same cost as competitors.

Somewhere between these two worlds there is a balance between perfection and profitability. How do you decide where you are on this continuum? When should you spend more time cranking out code so you can make money now, and when should you spend more time beautifying your code so you can make money later? Or is this a false dichotomy? We’ll delve into the answer in the next post…

Advertisements

Leave a comment

Filed under Software Engineering

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s