Friday, December 22, 2006

Tips for reading other person's code

Tips for reading other person's code

More from a maintenance guy's experience.

1. Concentrate on code and take the comments with a pinch of salt. Often you will encounter comments that were not updated when code got updated.
2. Try writing down your understanding of the code, taking one chunk at a time. A chunk typically consists of a program construct like if...else block, or a loop or a function. This way you can reconstruct the algorithm, especially if the code wasn't structured.

No comments:

Earlier Posts