Telephone Test (was: Re: case sensitivity)

Steve Summit scs at adam.pika.mit.edu
Sat Apr 29 11:44:58 AEST 1989


In article <4402 at goofy.megatest.UUCP> djones at megatest.UUCP (Dave Jones) writes:
>Somewhere or another I heard of the "telephone test" for programs.
>I'm sorry I can't credit the author.

I haven't seen the answer mentioned, so if anyone is still
curious, the idea appears in Kernighan and Plaugher's Elements of
Programming Style.

I agree it seems like an extreme test, but my opinion of that
book is that it's so deeply correct that any disagreement is
probably due to imperfect sophistication on the part of the
reader, so I'm not prepared to say I won't be wholeheartedly
advocating the telephone test at some later date.

I _h_a_v_e had the experience, many times, while trying to explicate
some code of mine to someone else, in a code review or something,
of realizing that what I had thought was a justifiable, neat
trick was actually incomprehensible and indefensible.  Generally
it's best to err on the side of simplicity and readability.

                                            Steve Summit
                                            scs at adam.pika.mit.edu



More information about the Comp.lang.c mailing list