Beautiful code was conceived by greg wilson in 2006 as a way to elicit insights from leading software developers and computer scientists. Together, he and his co-editor, Andy Oram, approached experts with diverse backgrounds from all over the world. They received a flood of responses, partly because royalties from the book are being donated to Amnesty International. The results of the project appear in this volume.
As wide-ranging as this book is, it represents just a small fraction of what is happening in this most exciting of fields. Thousand of other projects, equally interesting and educational, are being moved forward every day by other programmers whom we did not contact. Furthermore, many excellent practitioners who were asked for chapters do not appear in this book because they were too busy at the time, preferred not to contribute to Amnesty International, or had conflicting obligations. To benefit from the insights of all these people, we hope to do further books along similar lines in the future.
How This Book Is Organized
, A Regular Expression Matcher , by Brian Kernighan, shows how deep insight into a language and a problem can lead to a concise and elegant solution.
, Subversion's Delta Editor: Interface As Ontology , by Karl Fogel, starts with a well-chosen abstraction and demonstrates its unifying effects on the system's further development.
, The Most Beautiful Code I Never Wrote , by Jon Bentley, suggests how to measure a procedure without actually executing it.
, Finding Things , by Tim Bray, draws together many strands in Computer Science in an exploration of a problem that is fundamental to many computing tasks.
, Correct, Beautiful, Fast (in That Order): Lessons from Designing XML Verifiers , by Elliotte Rusty Harold, reconciles the often conflicting goals of thoroughness and good performance.
, Framework for Integrated Test: Beauty Through Fragility , by Michael Feathers, presents an example that breaks the rules and achieves its own elegant solution.
, Beautiful Tests , by Alberto Savoia, shows how a broad, creative approach to testing can not only eliminate bugs but turn you into a better programmer.
, On-the-Fly Code Generation for Image Processing , by Charles Petzold, drops down a level to improve performance while maintaining portability.
, Top Down Operator Precedence , by Douglas Crockford, revives an almost forgotten parsing technique and shows its new relevance to the popular JavaScript language.
, The Quest for an Accelerated Population Count , by Henry S. Warren, Jr., reveals the impact that some clever algorithms can have on even a seemingly simple problem.
, Secure Communication: The Technology Of Freedom , by Ashish Gulhati, discusses the directed evolution of a secure messaging application that was designed to make sophisticated but often confusing cryptographic technology intuitively accessible to users.
, Growing Beautiful Code in BioPerl , by Lincoln Stein, shows how the combination of a flexible language and a custom-designed module can make it easy for people with modest programming skills to create powerful visualizations for their data.
, The Design of the Gene Sorter , by Jim Kent, combines simple building blocks to produce a robust and valuable tool for gene researchers.
, How Elegant Code Evolves with Hardware: The Case of Gaussian Elimination , by Jack Dongarra and Piotr Luszczek, surveys the history of LINPACK and related major software packages to show how assumptions must constantly be re-evaluated in the face of new computing architectures.
, The Long-Term Benefits of Beautiful Design , by Adam Kolawa, explains how attention to good design principles many decades ago helped CERN's widely used mathematical library (the predecessor of LINPACK) stand the test of time.
, The Linux Kernel Driver Model: The Benefits of Working Together , by Greg Kroah-Hartman, explains how many efforts by different collaborators to solve different problems led to the successful evolution of a complex, multithreaded system.
, Another Level of Indirection , by Diomidis Spinellis, shows how the flexibility and maintainability of the FreeBSD kernel is promoted by abstracting operations done in common by many drivers and filesystem modules.
, Python's Dictionary Implementation: Being All Things to All People , by Andrew Kuchling, explains how a careful design combined with accommodations for a few special cases allows a language feature to support many different uses.