Beautiful Code

The code which is understandable, maintainable, robust, decoupled and neat can be called as beautiful code. Many may definitely argue with me, for the justification of the definition. The bigger questions here is not what the definition of Beautiful Code, it’s about how do we learn to take our code in direction of Beautiful Code.

A simple human nature is when we understand a concept we embrace it without conflict. For instance every programmer understands conditional “if“. So when it is in your code you don’t feel alienated but when you find it spread all over the code block you feel so frustrated. We may conclude a stage of beautiful code looks like, code must be easy to understand and easy to change. See I mentioned the word easy.

Here are few tactics to sharpen our skills, understand our code and embrace to change.

  1. Learn & Practice Test Driven Development period
  2. Create the written one page goal of beautiful code standard your team considers to be good enough. Thus creating clarity in achievable goal.
  3. Make a list of coding style changes you want to see in your teams code e.g: No single letter variable or Code should read like English. Compile a list of 10 items. You can use any method to conclude but make sure everyone contributes to the list.
  4. Learn new technical skills every week. This could be as simple as using a keyboard shortcuts, implementing new language feature, or implementing design patterns. The key is that it must go into production code. Make it a part of daily routine.
  5. Give a small token of appreciation on daily achivements thus creating a growth culture. It could be as simple as clapping in a stand up meeting for a team member.

Happy Coding!

Advertisements

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