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:

    “Whenever you pray, make sure you do it at school assemblies and football games, like the demonstrative creatures who pray before large television audiences. That is the real goal of the thing. But do not, I urge you, pray all alone in your home where no one can see. That does not get you ratings.”
    —Garry Wills (b. 1934)

    “Work, as we usually think of it, is energy expended for a further end in view; play is energy expended for its own sake, as with children’s play, or as manifestation of the end or goal of work, as in “playing” chess or the piano. Play in this sense, then, is the fulfillment of work, the exhibition of what the work has been done for.”
    —Northrop Frye (1912–1991)

    “The pace of science forces the pace of technique. Theoretical physics forces atomic energy on us; the successful production of the fission bomb forces upon us the manufacture of the hydrogen bomb. We do not choose our problems, we do not choose our products; we are pushed, we are forced—by what? By a system which has no purpose and goal transcending it, and which makes man its appendix.”
    —Erich Fromm (1900–1980)

    “... 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–?)