Best Coding Practices - Goal of The Code

Goal of The Code

Another good practice is to know the goal of the code. Never begin coding without understanding why the code is being written and what is it being written for.

Questions to ask yourself while coding:

  1. Is this a small function which will never be replaced ?
  2. Will there be any modifications to this function ?

Mostly, there are functions that fetch dates from the system and display it to the users on their web pages, such functions usually don't need replacement or modifications. However in complex projects, there are a lot of things that may need alteration or addition or even removal. Therefore always document the code as it is being modified so that the goal of the code is clear at all the steps.

Read more about this topic:  Best Coding Practices

Famous quotes containing the words goal of, goal and/or code:

    “Oh yet we trust that somehow good
    Will be the final goal of ill,
    To pangs of nature, sins of will,
    Defects of doubt, and taints of blood;”
    —Alfred Tennyson (1809–1892)

    “To enumerate the different trades by which the women in New York are endeavoring—not to live—that for many of them is as utterly unattainable a goal as the end of the rainbow—but simply to postpone as long as possible their appearance at the morgue or the cemetery—to attempt to do this would be useless.”
    —Katharine Pearson Woods (1853–1923)

    “Motion or change, and identity or rest, are the first and second secrets of nature: Motion and Rest. The whole code of her laws may be written on the thumbnail, or the signet of a ring.”
    —Ralph Waldo Emerson (1803–1882)