Skip to content

Smart People write Smart Code

April 25, 2010

Everyone can write code with little understanding of programming and logic. However, writing smart code is never an easy job and requires lots of efforts and thoughts. I had compiled a list of guideline around two years back, about how to write smart code? If anyone can follow and implement these guidelines i am quite sure they can get top positions in all quality coding competitions.

  1. Write as simple code as you can.
  2. Write as less code as you can.
  3. Write as much documentation as you can.
  4. Write as many test cases as you can.
  5. Wrap your code with try/catch, and display useful messages to user.
  6. Log all the possible errors, warnings and useful messages.
  7. Never give too much responsibility to any class or method
  8. Code should always be reviewed by more than one person.
  9. Always think about the environment in which your code will run and take care of all possible errors of that environment.

From → Programming

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: