Tinkering with Perl

Jonathan's Corner (Search & Sitemap) > Writing > Miscellaneous Nonfiction > Tinkering with Perl
Skip Back  Previous  46  47  48  49  50  51  52  53  54  55  Next  Skip Forward
Printer-Friendly Version

Debugging

Do you have a little brother or sister? If you don't, pretend you do--a brother, Fred, who's just barely old enough to walk.

Imagine that your mother tells your brother to go to the bathroom. So your brother walks to the bathroom, stands there a while, and then asks why he was sent there. Or imagine that you have a potted plant in the house, and your parents come home and find that your brother dug out dirt from the tree and is playing in the dirt. They clean up the mess and explain, very plainly, that he is not to play in dirt. So your brother tries to find something better, and pulls all the leaves off the plant and plays in the leaves.

Computers are like that. They don't understand what you mean--only the literal sense of what you said. If you say almost exactly what you mean, the computer will almost do what you mean, and the 'almost' can be very annoying. In this chapter, I'll explain how to fix common bugs, and close with how science can help you debug.

Tinkering with Perl is a free book that provides an introduction to programming in Perl, as well as a basic reference for things like foreach in Perl, if-then, and if-then-else, in addition to providing a glossary where you can find definitions for concatenate and other terms.

Tinkering with Perl may be one of the most popular offerings on this site, but it's not the only attraction. You can read a tongue-in-cheek Game Review: Meatspace, read an even more offbeat customer service survey (whether or not you actually fill it out), and spend a few minutes wishing your boss would read, The Administrator Who Cried, "Important!" (Not to mention that there are other things you can read here besides tech stuff, from Janra Ball: The Headache to The Spectacles.)

Read more...

Top

Jonathan's Corner (Search & Sitemap) > Writing > Miscellaneous Nonfiction > Tinkering with Perl
Skip Back  Previous  46  47  48  49  50  51  52  53  54  55  Next  Skip Forward
Printer-Friendly Version