Code Presentation Practice

This is a paper I wrote during the graduate course Software Engineering at GWU.

The paper tries to propose a light-weighted source code documentation method called the Code Presentation Practice(CPP). The big idea behind CPP is to view the process as not how to document source code thoroughly, but how to present the source code in a way that is friendly to human brains. Thus the name is called code presentation. Another highlight of CPP is that it is largely based on researches and conclusions from cognitive psychology and only uses human nature to enhance the understanding process.

The core of this paper is three rules;

CPP #1: For declaration, use comment lines to separate symbols into different chunks, with a brief description following each line.

CPP #2: For implementation, use numbered comment to separate steps into different chunks, with a brief description of the goal following the number.

CPP #3 Inside each chunk, use indents to format symbols into tree structure.

An idealized source code with CPP rules are as follow:

Without further knowledge, you can make out the bones of this class.

For the full article, please see here.