HOME | Blog | YouTube | LinkedIn | About Me         || Calculators    | SoftEng/Tech Posts    | Code/Scripts

Thursday, April 18, 2013

Keep It Simple - Writing clean code - How clean can it be?

Keep it simple.

I am talking about writing simple code. You may ask what "simple" code is.

Let me first explain what simple code is NOT:

  • It is NOT about hard-coding
  • It is NOT about writing complex code and then commenting so much to compensate for its complexity.

Keeping it simple means:

  • Writing code that is self-explanatory and minimal comments to understand the concept. Overdoing the comments puts you at risk that the comments become obsolete as the code below changes.
  • Writing code that is configurable, but not over-configurable. If you find your self writing extensive documents to explain how the configuration works, then you are doing something wrong. You are either over-configuring it, OR you need a configuration tool that will manage your configurations in a presentable fashion.
  • Writing code that you can understand 6 months from now and more importantly that new software developers can understand when they join your team.
  • Writing code that is flexible enough that you can soft-launch any day to production without impacting the behavior in production. Depending on the build methodologies in your company, this type of approach can save you incredible time and resources.
  • Writing code that uses technologies and methodologies that are best to solve your problems and best for implementing functional and business requirements, and NOT using technologies/methodologies that are a trend and you find a way to utilize it in your code to meet the functional/business requirements. Do the right thing.

Keywords: #software #softwareengineering #coding #code #coding101 #keepitsimple

No comments:

Post a Comment