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:

    [Girls] study under the paralyzing idea that their acquirements cannot be brought into practical use. They may subserve the purposes of promoting individual domestic pleasure and social enjoyment in conversation, but what are they in comparison with the grand stimulation of independence and self- reliance, of the capability of contributing to the comfort and happiness of those whom they love as their own souls?
    Sarah M. Grimke (1792–1873)

    Missionaries, whether of philosophy or religion, rarely make rapid way, unless their preachings fall in with the prepossessions of the multitude of shallow thinkers, or can be made to serve as a stalking-horse for the promotion of the practical aims of the still larger multitude, who do not profess to think much, but are quite certain they want a great deal.
    Thomas Henry Huxley (1825–95)