Wanted: advice on a good C textbook
Steve Summit
scs at adam.pika.mit.edu
Sat Jul 15 12:12:40 AEST 1989
In article <1900 at prune.bbn.com> rsalz at bbn.com (Rich Salz) writes:
>>I *highly* recommend _The C Puzzle Book_.
>
>Ick. I highly disrecommend this book. It teaches you to debug code that
>only a psychopath would write, and warps you into looking for things that
>are almost never there. Stay as far away from such code as possible!
I'll emphatically second Rich's motion. The more subtle problem
is that computer languages are learned in part by imitation, just
as are natural ones. One reason that so many people write horrid
code is because that's all they saw when they were learning. The
C Puzzle Book is chock-full of code that people should neither
have to know how to understand or to write.
"But wait," you say, "surely, having seen how hard to understand
ugly code is, one would be inclined to shun it in one's own
work." 'Fraid not. For one thing, since there's so little good
code around, people figure that, as ugly as ugly code is, it's
just a necessary part of computer programming. Then there's the
"macho" attitude -- "I can understand this glop now, so I'll
impress everyone with my erudition by writing some for myself."
(I have talked to intermediate programmers who believed that they
should start writing more cryptic code in order to be "advanced.")
Finally, there's all sorts of paradoxical human psychology
involved -- people are often drawn to that which they dread,
especially if it's all they know. (Read Poe's "The Imp of the
Perverse" sometime.)
Steve Summit
scs at adam.pika.mit.edu
More information about the Comp.lang.c
mailing list