in reply to Reviewing bad books.
Schwern used to have a great checklist online called the
Perl Book Litmus Test. While rather unscientific, it was
an easily taught test which manages to catch a frightening
fraction of bad books. Since the site he had it on is now
dead, hopefully he won't object to my posting it here.
Just open the index and answer the following questions:
- localtime Does it state that it returns the number of years since 1900? Does it mention that when used in scalar context it returns a nicely formated date?
- srand Check how it uses srand(). Does it warn you to call it only once in a given program? (If srand is never mentioned, that's okay)
- Number of elements in an array Does it say that an array will return its number of elements in scalar context, or does it use $num = $#array + 1;
- flock Does it discuss and use flock instead of lockfiles? (ie. setting some .lock file instead of using flock()) Its okay if file locking is never discussed at all.
For a more involved discussion on how to tell good from bad I would recommend reading Choosing a Perl Book by Simon Cozens.
|
---|
Replies are listed 'Best First'. | |
---|---|
The Triumphant Return Of The Perl Book Litmus Test
by schwern (Scribe) on Jan 14, 2003 at 00:18 UTC | |
Re: Re (tilly) 1: Reviewing bad books.
by gmax (Abbot) on Jan 04, 2002 at 13:53 UTC | |
Re: Re (tilly) 1: Reviewing bad books.
by Corion (Patriarch) on Jan 04, 2002 at 17:26 UTC |
In Section
Perl Monks Discussion