per hour of programming. If you crack the whip and force people to move more quickly, Humphreys notes, things get even worse. “[The industry] can’t survive with this level of quality,” he adds. As long as we’re being prosaic, let’s go all the way and define a typo. The American Heritage Dictionary (third edition) merely states, “A typographical error” (which is accurate but just a bit too prosaic for our liking). So we’ll just say that you’ve made a typo when the characters that come out on the screen are not the ones that you intended to type. A program containing a typo can still be correct syntactically, even if not semantically, as the legions of typists who rely on the squiggly lines under spelling errors in Microsoft Word have discovered to their chagrin.[2] [2] And don’t expect the squiggly lines made under a clause it considers grammatically incorrect to save you either: Word 97 has no problem with the sentence, “Aye fought eyesore a putty cat.” Syntax simply refers to whether the program obeys the grammar the parser expects; semantics refers to what the program means. A move in a game of chess could be syntactically invalid (such as moving a pawn forward six spaces), or syntactically valid but semantically stupid (such as a castling that puts you a move away from being checkmated). 8.1 Typo Pathologies Later we’ll tackle the more complex issues of errors committed when you typed exactly what you intended to type, but the program still fails to work. This chapter discusses the humble typo: if you could see it, you’d know it was a mistake, and how to fix it. The trick is to find the typo in the first place. We will unfurl an array of techniques for zeroing in on the miscreant. Fortunately, the scope of the typo is not unlimited; seldom does someone type a word entirely different from the one they were thinking of, for instance. The following quote from the Cambridge doctoral thesis of Stephen Moss appositely states the possible choices, although he was referring to the effect of channel errors on textual transmission: 1. Deletion: “The Prime Minister spent the weekend in the country shooting peasants.” 2. Insertion: “The walkway across the trout hatchery was supported on concrete breams.” 3. Alteration: “Say it with glowers”; “For sale: Volvo 144 with overdrive, fuel infection, etc.” 4. Transposition: “Yet, down the road, you will still find the corner shop where the lady behind the counter will lovingly warp your presents.” Let’s consider examples of each category of typo, and we’ll show the strategy we followed to hunt them down and destroy them. 8.1.1 Deletion The most common example of deletion must be the failure to place a semicolon between two statements. (Perl requires semicolons as statement separators, not statement terminators; the difference is that the last statement in a block does not require a trailing semicolon. We present this piece of wisdom to help you understand programs you may inherit that were
Note: If you are looking for good and affordable webspace to host and run your servlet application check Virtualwebstudio servlet hosting services