Contents in Detail
THE SECRET LIFE OF PROGRAMS
Understand Computers Craft Better Code
by Jonathan E. Steinhart
San Francisco
THE SECRET LIFE OF PROGRAMS. Copyright 2019 by Jonathan E. Steinhart.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN-10: 1-59327-970-1
ISBN-13: 978-1-59327-970-7
Publisher: William Pollock
Production Editor: Janelle Ludowise
Cover Illustration: Josh Ellingson
Interior Design: Octopod Studios
Developmental Editors: Corbin Collins and Annie Choi
Technical Reviewer: Aubrey Anderson
Copyeditor: Rachel Monaghan
Compositor: Happenstance Type-O-Rama
Proofreader: Paula L. Fleming
Indexer: JoAnne Burek
The following images are attributed as follows: Composition in from The Rocky Horror Picture Show (1975).
For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900;
www.nostarch.com
Library of Congress Cataloging-in-Publication Data
Names: Steinhart, Jonathan E., author.
Title: The Secret Life of Programs / Jonathan E. Steinhart.
Description: San Francisco : No Starch Press, Inc., [2019]
Identifiers: LCCN 2019018295 (print) | LCCN 2019021631 (ebook) | ISBN
9781593279714 (epub) | ISBN 159327971X (epub) | ISBN 9781593279707 (print)
| ISBN 1593279701 (print)
Subjects: LCSH: Computer programming. | Programming languages (Electronic
computers) | Browsers (Computer programs)
Classification: LCC QA76.6 (ebook) | LCC QA76.6 .S735 2019 (print) | DDC
005.1--dc23
LC record available at https://lccn.loc.gov/2019018295
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The information in this book is distributed on an As Is basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
To Julie and Hanalei for making me learn how to explain complex technologies to laypeople.
To the amazing place that was Bell Telephone Laboratories and all the people who worked there, especially to Carl for making a place for me there when I was a teenager.
About the Author
Jonathan E. Steinhart has been involved in engineering since the 1960s. He started designing hardware in middle school and software in high school, which led to summer jobs at Bell Telephone Laboratories. He received his BSEE in Electrical Engineering and Computer Science from Clarkson University in 1977. After graduation, he worked for Tektronix before trying his hand at startup companies. He became a consultant in 1987, focused on safety-critical systems engineering. He cut back a bit starting in the 1990s to start Four Winds Vineyard.
About the Technical Reviewer
Aubrey Anderson has a BSEE in Electrical Engineering and Computer Science from Tufts University. While there, he was a Teaching Fellow and helped to improve curricula for introductory computer science courses. He started programming at 14 and since then has worked on a variety of robotics, system design, and web programming projects. Aubrey currently works as a Software Engineer at Google.
BRIEF CONTENTS
ACKNOWLEDGMENTS
There are a lot of influences that contributed to making this book possible. That starts with my parents Robert and Rosalyn Steinhart for making me possible and then encouraging my interest in science, at least up to the point at which it started to scare them. Many awesome teachers took it from there including Beatrice Seagal, William Mulvahill, and Miller Bugliari. Much thanks to Paul Rubenfield for telling me about both Civil Defense and the Bell Labs Explorer Scout post.
Its impossible to give enough credit to my Explorer Scout advisors Carl Christiansen and Heinz Lycklama. They changed my life. Through them I met many amazing people at Bell Telephone Laboratories including Joe Condon, Sandy Fraser, Dave Hagelbarger, Dick Hause, Jim Kaiser, Hank McDonald, Max Mathews, Dennis Ritchie, Ken Thompson, and Dave Weller. I learned a lot from each of them.
Thanks to Aubrey Anderson, Clem Cole, Lee Jalovec, A.C. Mendiones, Ed Post, and Betsy Zeller for making it through the whole thing at least once. And especially to Aubrey for technical editing.
Thanks also to Matt Blaze, Adam Cecchetti, Sandy Clark, Tom Duff, Natalie Freed, Frank Heidt, DV Henkel-Wallace (a.k.a Gumby), Lou Katz, Sara-Jaye Terp, Talin, and Paul Vixie for providing feedback on particular chapters.
And thanks to all of the people who answered the phone when I called with general questions including Ward Cunningham, John Gilmore, Evelyn Mast, Mike Perry, Alex Polvi, Alan Wirfs-Brock, and Mike Zuhl. And of course, Rakel Hellberg, the girl on the ski lift, for providing one of the nudges that motivated me finish this project.
This book would not have been possible without the support and encouragement of people in various geek communities including AMW, Hackers, and TUHS.
Thanks to Hanalei Steinhart for the composition in .
Thanks to Tony Cat for allowing me to use his image and for keeping my keyboard full of fur.
PREFACE
I was born a geek. According to my father, I used an imaginary switch to turn on the swings before using them, and I would turn them off when I was done. Machinery just spoke to me about its inner workings. I resembled C-3PO understanding the binary language of moisture vaporators. I was fortunate to grow up in a time in which one could examine the workings of most things without a microscope.
In hindsight, I had a very surreal childhood growing up in New Jersey. I tinkered with everything, often to the detriment of my moms nervous system. My parents gave me lots of 50-in-one project kits but became uncomfortable when I started hooking them together for projects that werent in the books. This culminated with the Pillow Burglar Alarm, which caught the tooth fairy in actiona poor economic choice that was nevertheless emotionally satisfying. I collected broken televisions and other appliances that people would leave out on garbage day so that I could take them apart, learn how they worked, and build things out of the parts. One of my favorite toys was my dads 1929 Erector Set. The space program made it a great time to be interested technology; I remember standing in our front yard with my father one night watching Echo 1 fly over.