Monday, August 27, 2007

Smart Enough to be Dumb

I've longed complained that so-called "dummies" books are often not geared to dummies. You can tell this kind of book within a chapter or so. The author tries to be hip, making some cultural references. "Wardrobe malfunction!". We're supposed to laugh and say "Ha, that humor is helping me to learn already".

While spending an interminable time waiting for my car to get routine maintenance, I was reading a book on Ruby for sys admins. This seems like a peculiar topic for a book, but given that Perl is used for sys admins, why not Ruby?

Oddly enough, the book doesn't start off with a clear explanation of why someone would use Ruby over Perl, nor does it attempt to characterize what typical sys admins do, and why Ruby would be well-suited to the task. Many sys-admins don't think of themselves as deep programmers. They aren't planning to write complex data structures. They typically need to do some common user tasks, and then worry about security.

This book, nevertheless, starts delving into Ruby, with no reassuring words why this would be at all useful.

Often, when "dummies" authors (bad ones I mean) start explaining a language, they mix cute phrases, with technical ones, thus, telling you this is an instance variable, and that is a class variable, and not explaining what either is, or why either is important. This is much like explaining parts of a frog, but not explaining what function it serves.

Many people who teach programming fall in the trap of explaning syntax, because frankly, explaining syntax is easy. Explaining how to program? Not so easy. Explaining how to program is fundamentally explaining how to solve problems, and solving problems is such a general problem, that it's difficult to explain.

Furthermore, bad authors seem to "explain" stuff without making sure the readers are doing something to learn it. This is much like an expert telling you how to play basketball by telling you the rules, the names of the various positions, how scoring is done, but leaving out strategy, and leaving out useful comments about how different people have different skills, and finally, leaving out anything you can do to learn the stuff on your own.

Sometimes I wonder how these books manage to get past an editor, whether they even bother to try the book on real sysadmins (oh, that would be too much work, don't you know?).

Writing books for dummies requires that you understand why some people struggle with the topic you're talking about. This Ruby book (the real title is: Practical Ruby for System Administration by André Ben Hamou) illustrates a common problem for authors: explaing OO programming. Inevitably, they start using terms like methods, objects, messages, inheritance, subclassing, and so forth. Often, in the struggle to make sure they don't say anything technically wrong, they use the terms as if people already knew what they meant, because explaining these concepts would be really hard.

Maybe, in time, such books will improve. In the meanwhile, I'm sure many books will start off with good intentions, but end up helping few dummies, because the authors weren't smart enough to know what a dummy needs.

No comments: