How to differentiate good code vs bad code


To differentiate between good code and bad code you must have basic knowledge of programming. If you don’t have it the following is list of things you should read about.

  1. Variable
  2. Function
  3. Class and Object
  4. Loops

Once you have idea what they are you need to check for following:

  1. Are name used for variables, functions and classes describes what they contain or how they work? If answer is yes, the code is good.
  2. is code formatting is quite consistent? If answer is yes, the code is good.
  3. is there commented code? If answer is yes, the code is bad.
  4. is file names are meaningful and folder name describes what it contains? If answer is yes, the code is good.

Above are very basic checks if you would like to differential with more details you should read programming best practice books and should learn programming language.

Advertisements

Author: yogs174

I am programmer and entrepreneur and love innovative stuff. I like to work on different technologies with new tools.

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