Why do we want clean code?

Good code is important, but why is it important?

Here are a few of my observations from my time as a developer.

It’s important as it allows to work faster in the long run, to, to adapt to change. As code becomes messier, productivity lowers, as productivity lowers, management interferes by increasing resources to the project. With Brook’s law in mind, “adding manpower to a late software project makes it later”, this doesn’t bode well in meaning the deadline.

Or hat happens is management promises a new system that will replace the old system, this system promises the sun, the moon, bells and whistles AND even cools you breakfast.
This green field project at first is a pleasure to work on. It doesn’t have broken glasses everywhere, developers are able to add features easily.

However, as management want feature parity with the old version, the green field project could spend years in development just to catch up, all the while the old system is also mutating and being “improved”. The business end up running two systems concurrently, systems that achieve similar goals.

Systems are not developed in a vacuum, where developed once and never touched again. One eponymous law in Software development, “Requirements always change”. With that in mind, one of the reasons(there are many) we want clean is that when code is too brittle we are afraid of changing it, in the fear that we may break the system. Our job as professional developers is to create code that is as clean possible, code which is adaptable, tested and solves the problem elegantly.




Leave a Reply

Please log in using one of these methods to post your comment:

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