Tinkering with Perl

Jonathan's Corner (Search & Sitemap) > Writing > Miscellaneous Nonfiction > Tinkering with Perl
Skip Back  Previous  52  53  54  55  56  57  58  59  60  61  Next  Skip Forward
Printer-Friendly Version

Scientific Debugging

How does the scientific method work?

In a nutshell, there's something a scientist doesn't understand, so he makes a guess, and then makes a way to show if the guess is wrong. After a lot of testing, a guess that hasn't been shown wrong may become part of science.

When you don't understand something, making guesses and then testing them ("If my program's miscalculating, then the variables before this part will have the right values, but the variables after will have wrong values. I know! I'll put print statements before and after to tell me the variables' values") can help you see why your program's not functioning.

If you have a science teacher who programs computers, it would be very helpful to approach him sometime when he's not busy and ask, "How can the scientific method help me debug computer programs?"

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  52  53  54  55  56  57  58  59  60  61  Next  Skip Forward
Printer-Friendly Version