• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

What Is a Bug?

The short scripts that you've dealt with so far in this book are the kind that cause few headaches among programmers. But as your scripts grow larger and more complex, it's inevitable that errors will seep into the code. In programming lingo, an error that causes a script to run incorrectly or to not run at all is called a bug, and the process of removing such errors is called debugging.

Note

There's a popular and appealing tale of how the word bug came about. Apparently, an early computer pioneer named Grace Hopper was working on a machine called the Mark II in 1947. While investigating a glitch, she found a moth among the vacuum tubes, so from then on glitches were called bugs. Appealing, yes, but true? Not quite. In fact, engineers had already been referring to mechanical defects as "bugs" for at least 60 years before Ms. Hopper's discovery. As proof, the Oxford English Dictionary offers the following quotation from an 1889 edition of the Pall Mall Gazette:

"Mr. Edison, I was informed, had been up the two previous nights discovering 'a bug'in his phonograph—an expression for solving a difficulty, and implying that some imaginary insect has secreted itself inside and is causing all the trouble."



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint