Friday, March 21, 2014

CODING Standards

This could be most briefed post in my blog but one of the most important posts.

We are going to talk about most generic and important topic so called "Standards" (which i think to be considered for writing).

In my view, there are no coding standards that to be followed unless you like it. If you ask me write me standards i will write hell of standards. The most important point in developer world should be, the code written by one has to be understandable and able to change by others and the code should be able to evolve with the changes and shouldn't be obsolete in near future atleast .

Few points to consider while coding any kind of program/project.

  • We are capable of doing of miracles with the flexibility and feasibility given by the programming language, IDEs, frameworks, APIs but cleverness lies in how readable is it. So focus on readability.
  • Read the standards provided by the developers. For example Sun/Oracle/etc provided some standards to be followed while writing Java.  The one i like the most is Google java style
  • Every code works unless you find problems in it. Robustness lies in the way it works and how easy to find the issues and fix it.
  • Know what to write where (Read the pros or cons of any standard/usage before applying it otherwise it may go weird.)
  • Configuration v/s Performance. There is a trade of between configuration and performance. If it is too configurable, then it will be less performance and vice versa. (This is not true in all cases).
  • Judge between different ways. There can be different ways to do the same task. Analyze before implementing it. 
  • Time to Live. we heard the time to live only in messaging but developers has to think what is the life time of the code that is being written. Because after some days it may be obsolete because of the evolution of the programming languages and techniques. 
  • Research, research and research. According to me, there should enough research and reason before development, don't develop and research for problem solving. Reason enough to develop. 
Most important point i want to conclude is 
"Read, Research, Understand, Justify and write standard, re-usable and readable code which can evolve with the changing world.".

When you think about most successful frameworks and programs thats the only secret.