97 Things Every Programmer Should Know
Copyright 2010 Kevlin Henney
O'Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (.
The O'Reilly logo is a registered trademark of O'Reilly Media, Inc. 97 Things Every Programmer Should Know and related trade dress are trademarks of O'Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are clarified as trademarks. Where those designations appear in this book, and O'Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors and omissions, or for damages resulting from the use of the information contained herein.
O'Reilly Media
Dedication
To absent friends
Preface
The newest computer can merely compound, at speed, the oldest problem in the relations between human beings, and in the end the communicator will be confronted with the old problem, of what to say and how to say it .
Edward R. Murrow
PROGRAMMERS HAVE A LOT ON THEIR MINDS . Programming languages, programming techniques, development environments, coding style, tools, development process, deadlines, meetings, software architecture, design patterns, team dynamics, code, requirements, bugs, code quality. And more. A lot.
There is an art, craft, and science to programming that extends far beyond the program. The act of programming marries the discrete world of computers with the fluid world of human affairs. Programmers mediate between the negotiated and uncertain truths of business and the crisp, uncompromising domain of bits and bytes and higher constructed types.
With so much to know, so much to do, and so many ways of doing so, no single person or single source can lay claim to "the one true way." Instead, 97 Things Every Programmer Should Know draws on the wisdom of crowds and the voices of experience to offer not so much a coordinated big picture as a crowdsourced mosaic of what every programmer should know. This ranges from code-focused advice to culture, from algorithm usage to agile thinking, from implementation know-how to professionalism, from style to substance.
The contributions do not dovetail like modular parts, and there is no intent that they shouldif anything, the opposite is true. The value of each contribution comes from its distinctiveness. The value of the collection lies in how the contributions complement, confirm, and even contradict one another. There is no overarching narrative: it is for you to respond to, reflect on, and connect together what you read, weighing it against your own context, knowledge, and experience.
Permissions
The licensing of each contribution follows a nonrestrictive, open source model. Every contribution is freely available online and licensed under a Creative Commons Attribution 3.0 License, which means that you can use the individual contributions in your own work, as long as you give credit to the original author:
http://creativecommons.org/licenses/by/3.0/us/ |
How to Contact Us
Please address comments and questions concerning this book to the publisher:
O'Reilly Media, Inc. |
1005 Gravenstein Highway North |
Sebastopol, CA 95472 |
800-998-9938 (in the United States or Canada) |
707-829-0515 (international or local) |
707-829-0104 (fax) |
On the web page for this book, we list errata and any additional information. You can access this page at:
http://www.oreilly.com/catalog/9780596809485/ |
The companion website for this book, where you can find all the contributions, contributor biographies, and more, is at:
http://programmer.97things.oreilly.com |
You can also follow news and updates about this book and the website on Twitter:
http://twitter.com/97TEPSK |
To comment or ask technical questions about this book, send email to:
For more information about our books, conferences, Resource Centers, and the O'Reilly Network, see our website at:
Safari Books Online
Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.
With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.
O'Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O'Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.
Acknowledgments
Many people have contributed their time and their insight, both directly and indirectly, to the 97 Things Every Programmer Should Know project. They all deserve credit.
Richard Monson-Haefel is the 97 Things series editor and also the editor of the first book in the series, 97 Things Every Software Architect Should Know , to which I contributed. I would like to thank Richard for trailblazing the series concept and its open contribution approach, and for enthusiastically supporting my proposal for this book.
I would like to thank all those who devoted the time and effort to contribute items to this project: both the contributors whose items are published in this book and the others whose items were not selected, but whose items are also published on the website. The high quantity and quality of contributions made the final selection process very difficultthe hardcoded number in the book's title unfortunately meant there was no slack to accommodate just a few more. I am also grateful for the additional feedback, comments, and suggestions provided by Giovanni Asproni, Paul Colin Gloster, and Michael Hunger.
Thanks to O'Reilly for the support they have provided this project, from hosting the wiki that made it possible to seeing it all the way through to publication in book form. People at O'Reilly I would like to thank specifically are Mike Loukides, Laurel Ackerman, Edie Freedman, Ed Stephenson, and Rachel Monaghan.
It is not simply the case that the book's content was developed on the Web: the project was also publicized and popularized on the Web. I would like to thank all those who have tweeted, retweeted, blogged, and otherwise spread the word.
I would also like to thank my wife, Carolyn, for bringing order to my chaos, and to my two sons, Stefan and Yannick, for reclaiming some of the chaos.
I hope this book will provide you with information, insight, and inspiration.
Enjoy!
Kevlin Henney