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:

    In the years of the Roman Republic, before the Christian era, Roman education was meant to produce those character traits that would make the ideal family man. Children were taught primarily to be good to their families. To revere gods, one’s parents, and the laws of the state were the primary lessons for Roman boys. Cicero described the goal of their child rearing as “self- control, combined with dutiful affection to parents, and kindliness to kindred.”
    C. John Sommerville (20th century)

    It is the goal of the American university to be the brains of the republic.
    Johan Huizinga (1872–1945)

    Religion means goal and way, politics implies end and means. The political end is recognizable by the fact that it may be attained—in success—and its attainment is historically recorded. The religious goal remains, even in man’s highest experiences, that which simply provides direction on the mortal way; it never enters into historical consummation.
    Martin Buber (1878–1965)

    Acknowledge your will and speak to us all, “This alone is what I will to be!” Hang your own penal code up above you: we want to be its enforcers!
    Friedrich Nietzsche (1844–1900)