Coding best practices - Part 2

Coding best practices Published Version: 1.0 To check the 1st part click the below link; Coding best practices - Part 1 Avoid Obvious Comments Commenting your code is fantastic; however, it can be overdone or just be plain redundant . Take this example: Fig 1: Incorrect example with Avoid Obvious Comments When the text is that obvious , it's really not productive to repeat it within comments. If you must comment on that code, you can simply combine it to a single line instead: Fig 2: Correct example with Avoid Obvious Comments Note: If you have to write more than a one-line comment to explain what the code is doing, you should consider rewriting the code to be more readable.