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)

    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)

    Too many existing classrooms for young children have this overriding goal: To get the children ready for first grade. This goal is unworthy. It is hurtful. This goal has had the most distorting impact on five-year-olds. It causes kindergartens to be merely the handmaidens of first grade.... Kindergarten teachers cannot look at their own children and plan for their present needs as five-year-olds.
    James L. Hymes, Jr. (20th century)

    Wise Draco comes, deep in the midnight roll
    Of black artillery; he comes, though late;
    In code corroborating Calvin’s creed
    And cynic tyrannies of honest kings;
    He comes, nor parlies; and the Town, redeemed,
    Gives thanks devout; nor, being thankful, heeds
    The grimy slur on the Republic’s faith implied,
    Which holds that Man is naturally good,
    And—more—is Nature’s Roman, never to be
    scourged.
    Herman Melville (1819–1891)