[comp.lang.c] Telephone Test

scs@adam.pika.mit.edu (Steve Summit) (04/29/89)

In article <4402@goofy.megatest.UUCP> djones@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@adam.pika.mit.edu