Comment Programming - Practical Uses

Practical Uses

This programming process can be used for prototyping a new design pattern. This is done by creating a new structure of classes without any implementation, and then you can add the implementation later.

Pseudocode Example:

function onClick { // This is where we handle mouse click. // The result of this function is that a button will be highlighted. }

As you can see in the example, there is a structure around a click event handler. However, comment programming is used instead of a real implementation. The idea is that many functions can be written like this, and then the design can be reworked and revisited without having to refactor a lot of source code.

Read more about this topic:  Comment Programming

Famous quotes containing the word practical:

    The English masses are lovable: they are kind, decent, tolerant, practical and not stupid. The tragedy is that there are too many of them, and that they are aimless, having outgrown the servile functions for which they were encouraged to multiply. One day these huge crowds will have to seize power because there will be nothing else for them to do, and yet they neither demand power nor are ready to make use of it; they will learn only to be bored in a new way.
    Cyril Connolly (1903–1974)

    The idealists dream and the dream is told, and the practical men listen and ponder and bring back the truth and apply it to human life, and progress and growth and higher human ideals come into being and so the world moves ever on.
    Anna Howard Shaw (1847–1919)