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:

    Consider what effects which might conceivably have practical bearings we conceive the object of our conception to have. Then our conception of these effects is the whole of our conception of the object.
    Charles Sanders Peirce (1839–1914)

    War-making is one of the few activities that people are not supposed to view “realistically”; that is, with an eye to expense and practical outcome. In all-out war, expenditure is all-out, unprudent—war being defined as an emergency in which no sacrifice is excessive.
    Susan Sontag (b. 1933)