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 the, goal of, goal and/or code:

    The preservation of life seems to be rather a slogan than a genuine goal of the anti-abortion forces; what they want is control. Control over behavior: power over women. Women in the anti-choice movement want to share in male power over women, and do so by denying their own womanhood, their own rights and responsibilities.
    Ursula K. Le Guin (b. 1929)

    Beauty is the sole ambition, the exclusive goal of Taste.
    Charles Baudelaire (1821–1867)

    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)

    ... the self respect of individuals ought to make them demand of their leaders conformity with an agreed-upon code of ethics and moral conduct.
    Mary Barnett Gilson (1877–?)