A lucid primer on the philosophy of computer programming from a systems engineer in San Francisco. With the phrase ""moth in the machine"" Kohanski refers to an engineering anomaly experienced on a pioneering wartime computer, the Mark I. Circuitry began behaving erratically; after running exhaustive tests, the engineers discovered why: a moth had crawled into a relay, preventing contact. Thus was born the bug in the computer and the necessity to debug, which, Kohanski points out, programmers spend more time doing than they spend programming. Juxtaposing the human capacity for ambivalence with the machine's complete incapacity for it, Kohanski argues for ever more intuitive programs: ones that will announce ""radiation overdose,"" for instance, rather than ""Malfunction 54."" (Kohanski describes an actual case in which several patients were killed because the computer operator didn't know what ""Malfunction 54"" meant.) Kohanski explains clearly the differences between analog and digital computers by using cuckoo clocks (primitive analog computers) as a metaphor; explains the binary code and demonstrates how memory accretes in machines; and is at pains to explain the necessity for precise, elegant, and even esthetically pleasing programming. He then discusses the moths in the machine that challenge programmers: ever more complex programs, demanding an almost inhuman precision; the failure of programmers to translate their own mathematical shorthand into real-world terms (""Malfunction 54""); and, perhaps most important, the failure to design programs that really do the job, that won't create more problems than they solve. The greatest challenge to programmers, he says, lies in unlocking their imaginations. Good reading for anyone interested in how programs come into existence, and particularly good reading for those thinking of entering the programming profession.