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:

    The goal of every culture is to decay through over-civilization; the factors of decadence,—luxury, scepticism, weariness and superstition,—are constant. The civilization of one epoch becomes the manure of the next.
    Cyril Connolly (1903–1974)

    The goal in raising one’s child is to enable him, first, to discover who he wants to be, and then to become a person who can be satisfied with himself and his way of life. Eventually he ought to be able to do in his life whatever seems important, desirable, and worthwhile to him to do; to develop relations with other people that are constructive, satisfying, mutually enriching; and to bear up well under the stresses and hardships he will unavoidably encounter during his life.
    Bruno Bettelheim (20th century)

    Many people will say to working mothers, in effect, “I don’t think you can have it all.” The phrase for “have it all” is code for “have your cake and eat it too.” What these people really mean is that achievement in the workplace has always come at a price—usually a significant personal price; conversely, women who stayed home with their children were seen as having sacrificed a great deal of their own ambition for their families.
    Anne C. Weisberg (20th century)