Abstract
A good conjurer will not disclose how the tricks are done. In the exposition of the programs that we have encountered before, we have been pretty good conjurers: we did argue the correctness of our programs but we never explained where they came from — like rabbits, they were pulled out of the magician’s hat. But a professional programmer is not a conjurer. A programmer should be able to explain how the program was derived, because program design is at the heart of computer science. In this chapter, we discuss a number of heuristics that often, but not always, lead to nice, efficient programs for solving programming problems. The heuristics are illustrated by example, but my real interest is in how heuristics help in designing algorithms. The emphasis is, therefore, on trying to avoid interpreting the formulae but to look at their structure and see what this tells us. Our goal is not to prove the correctness of given programs, the goal is to determine how to construct a program that will do the job, and will do it efficiently. It turns out that thinking about the correctness argument gives clues about what the program might look like. As a result, we discuss the proofs and the programs at the same time. We concentrate on simple programs first, that is, programs that consist of only one loop.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 1993 Springer-Verlag New York, Inc.
About this chapter
Cite this chapter
van de Snepscheut, J.L.A. (1993). Some Programming Heuristics. In: What Computing Is All About. Text and Monographs in Computer Science. Springer, New York, NY. https://doi.org/10.1007/978-1-4612-2710-6_8
Download citation
DOI: https://doi.org/10.1007/978-1-4612-2710-6_8
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4612-7639-5
Online ISBN: 978-1-4612-2710-6
eBook Packages: Springer Book Archive