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.
- Class and Object
Once you have idea what they are you need to check for following:
- Are name used for variables, functions and classes describes what they contain or how they work? If answer is yes, the code is good.
- is code formatting is quite consistent? If answer is yes, the code is good.
- is there commented code? If answer is yes, the code is bad.
- 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.