Skip to content

Guidelines for Good Quaility Code

December 27, 2007

Following are the guidelines i have learned from my experience and from some big gurus’ recommendations.

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

From → Programming

Leave a Comment

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

%d bloggers like this: