Myths - why you should not follow Coding Guidelines

We all would agree to the fact that Following Coding Guidelines makes one's life quite easy whether it is writing code or reading some one else's code. Not only does it increase your application's durability, it also eases the pain of transitioning the code to new developers joining the team. But, as they say all good things comes with a price tag. Following Guidelines like adding proper documentation consumes a lot of time, and many times myths start filling up the workplace. Here we will bust few common myths related to why you should not follow coding guidelines.

  • Increase in code size  
Adding extra braces, whitespaces, lines, comments adds to the file size and in turn increases the size of code to compile. This argument might look valid at first glance, but it isn't in reality. Most of the compilers remove whitespaces and other extra formatting while generating the machine / binary code which actually runs on the system. So, whatever extra formatting only makes code more readable and less prone to errors and doesn't actually affect the code size.

  • Impacts Parsing time
This argument stands valid to some extent as extra text means extra work needs to be done by parser to generate the machine code. But, if one goes on to measure the performance implication - it will be very minimal. In fact, all the modern days parsers have the ability to cache the opcodes they generate, which means that parsing a file subsequent number of times is going to pick most of the stuff from cache instead of parsing it again. Thus the price paid for parser performance is only for the first parsing attempt which is nothing compared to the endless hours spent in debugging issues introduced due to improper code formatting.

  • Writing complex statements is Cool
Many developers believe that writing complex code is cool and it will gain respect from fellow developers. But, in reality they only get scornful looks from fellow community members. Complicated code which is unreadable is very difficult to maintain in future when the original author is no more working on it.  So, if you are planning to write complex code - make sure you don't share it with someone else or be ready to feel the heat.

In conclusion, I would like to mention that no matter what, make sure to follow coding guidelines as it will help you grow professionally and personally. In case you want to know in detail about many such programming practices to follow, grab a copy of my book - "Hello World: Student to Software Professional " published by Partridge (A Penguin Random House Company). Now available worldwide on all the MAJOR ONLINE Stores - Amazon, Google Play, Flipkart, Barnes & Noble and many others.
comments powered by Disqus