next up previous contents
Next: Discussion Points Up: Tips and Tricks Previous: Versioning   Contents

Line grouping and commenting

Try to group lines of code in small groups (less-than 20 lines per group) and identify the groups with comments to aid in readability. Separate groups by at least one blank line.

Here is a piece of code showing grouping.


46#46

Even though you have no idea what the function is supposed to do, you can generally figure out what it is doing just by quickly scanning the line groups and comments. You can quickly scan the comments to find the section of code that you want to find. Once found, you can more closely examine the lines of code.



Falko Kuester 2001-08-24