Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Logic Lessons That Last Generations

Logic Lessons That Last Generations

In the 1980s, my grandfather reached onto the bookshelves of his cigar-smoke-seasoned garage laboratory and pulled down a three-ring binder that would change my life. Come hear how a 50-year-old introduction to binary logic has managed to stay relevant after all these decades, and what it means for our own efforts to teach and document technical subjects.

Erin Dees

June 30, 2012
Tweet

More Decks by Erin Dees

Other Decks in Technology

Transcript

  1. Logic Lessons That Last Generations Ian Dees • @undees Open

    Source Bridge 2012 This is the story of a book. To paraphrase Douglas Adams, it’s the story of “a wholly remarkable book.” A book that turned a writer from the 1960s into a time traveller, an old engineer into a teacher, and a young boy into an engineer. A book with lessons for all of us, should we choose to listen, about how we explain, how we document, and how we build a legacy, both individually and as a programming community.
  2. The story of that wonderful, beautiful Thursday, (channeling Adams again)

    “the story of its extraordinary consequences, and the story of how those consequences are inextricably intertwined with this remarkable book begins very simply. It begins with a house.”
  3. Before we get to that, do any of you have

    an important person in your lives who had a lot to do with your getting into technology? A parent, teacher, or friend? What memories do you have of your path to technology?
  4. This my grandparents’ house in East Texas where my family

    would descend several times a year to ride horses, chase dogs around, and so on.
  5. That’s me among all my cousins. One of my favorite

    things to do during these visits was watch my grandfather work in his garage laboratory.
  6. By day, my grandfather was an engineer. By night, he

    restored and operated radios. To his friends, he was Pete.
  7. To me, he was Grampy. I don’t know why he

    put up with my hanging around in his lab. Perhaps he saw my interest in engineering even before I did.
  8. flickr.com/photos/ilex/150588521 The building of things scratches an essential itch for

    engineers. It’s why they became engineers in the first place. —Michael Lopp The Twinge Rands continues: “When they were six, their Dad handed them two boards, a nail, and a hammer and they started whacking. BLAM BLAM BLAM. Even with the nail awkwardly bent in half, the wood was suddenly and magically bound together: a thing was built. At that moment, this junior engineer’s brain excreted a chemical that instantly convinced them of the disproportionate value of this construction. This is the best wood thing in the world because I built it. And then they looked up from their creation and pleaded, ‘Dad, I really need more nails.’”
  9. One day, Grampy presented me with a plain black three-ring

    binder. It looked ancient. It had long-abandoned spider nests in the binding. It was dusty and greasy.
  10. When I opened it, I saw yellowed pages bearing the

    words, “Binary Logic,” by William S. Bennett.
  11. ...followed by a simple puzzle. I’m sure you know the

    answer to this question. But just for fun, let’s follow one of the incorrect answers.
  12. Immediately, we’re asked to apply what we’ve learned. Which circuit

    implements the AND gate we’ve just read about?
  13. (drink if Markus mentioned any theorems) If Markus Roberts is

    in the audience, he will cite DeMorgan’s Theorem and point out that the answer depends on whether you count a lit light bulb as on or off.
  14. What is this thing? The book continues in the same

    style from there. Let’s take a step back for a sec. What on earth is this thing?
  15. The page footer gives us a clue. This was a

    series of columns that ran in Product Engineering magazine from 1962-3, and again in 1965.
  16. flickr.com/photos/knowprose/5863873076 As near as I can tell, Product Engineering ran

    from the ‘40s to the ‘60s. It seemed to be kind of like Popular Mechanics for design engineers. Geek-speak meets “the flying car of tomorrow.”
  17. This particular column on binary logic was basically a Choose

    Your Own Adventure book for grown-ups. The editor referred to it as a “teaching machine” or “scrambled book.”
  18. flickr.com/photos/mpieracci/2273915342 Before we get too excited about the possibilities, observe

    that the phrase “teaching machine” reminds us of interfaces that use the customer as a peripheral. As we’ll see, this book demands much more active involvement than that.
  19. 1. Tailored to the reader 2. Immediate feedback Frank Hall,

    the editor of the magazine, cited research that the “scrambled book” teaching method lets diverse audiences gain the same skill set at their own pace, and that reinforcement and feedback are crucial parts of the process.
  20. Inventing on Principle Bret Victor vimeo.com/36579366 This emphasis on rapid

    feedback reminds me of Bret Victor’s excellent talk “Inventing on Principle,” in which he builds extremely interactive user interfaces in the service of a larger point about having a life's mission.
  21. First things we notice: Let’s go back and look at

    the puzzle we just solved, and see the way Bennett is already teaching us not just how to understand binary logic, but also how to teach. First, he starts with one easy achievement—an early success to hook the reader.
  22. He leaves easy navigation markers: we always know where we

    came from and where to go if we get lost.
  23. 1.Rush to an early victory 2.Reward exploration So, these are

    the first two lessons from diving into this work: get your reader to an early success, and don’t punish them for veering off the path.
  24. bit.ly/dreyfus-skill Dreyfus model of skill acquisition Incidentally, this notion of

    setting up early obstacles that are just the right difficulty level is related to the Dreyfus model cited by just about everyone these days.
  25. 1. Novice 2. Competence 3. Proficiency 4. Expertise 5. Mastery

    In this model, you adapt your teaching style to the audience. This implies that the tips we’re talking about today are not universal. Bennett’s audience was engineers who knew other disciplines, but were novices at binary logic.
  26. The next thing the book does is present us with

    an analogy to familiar items.
  27. In one clever setup, the author even makes his hypothetical

    mechanical device physically resemble the old schematic symbol for an OR gate.
  28. The devices get more elaborate; here’s another OR gate. Since

    this device is a series of tubes, it may be a mechanical precursor to the internet. ;-)
  29. 1.Rush to an early victory 2.Reward exploration 3.Start where your

    reader is In other words, Bennett is meeting the reader on their terms.
  30. After we’ve mastered the basics, Bennett introduces some humor. This

    went over my head at the time; I thought he was saying the measurements were intolerable!
  31. YES +---------------+ NO /--------| Does It Work? |--------\ | +---------------+

    | | | \ / \ / +-------------+ +----------+ | Don't Mess | YES | Did You | NO /---| With It | /----------| Mess |------\ | +-------------+ | | With It? | | | | +----------+ | | \ / | | /------------\ | | | You IDIOT! | \ / | \------------/ +-------------+ | +--------+ | YES | Will You | | NO | Does |<---------/ /------------| Pay For It? | | ----| Anyone | | +-------------+ | | | Know ? |--------------\ | | NO | | +--------+ YES | | \ / | | \ / \ / +-----------+ | | /---------------\ YES | Will You | | | /----->| You Poor Fool |<------| Be Fired? | | | /---------\ | \---------------/ +-----------+ | -->| Hide It | | | | NO | \---------/ | \ / | | | | NO +---------------+ \ / | | \------| Can You Blame | /----------\ | | | Someone Else? | | Trash It | | | +---------------+ \----------/ | \-------------\ | YES | | | | | | \ / \ / | | +-----------------------+ | \---------------------->| N O P R O B L E M !! |<--------/ +-----------------------+ anon. The schematic resembles that famous Usenet gag about a universal flowchart for diagnosing engineering problems.
  32. 1.Rush to an early victory 2.Reward exploration 3.Start where your

    reader is 4.Apply dirty tricks in moderation Going for the cheap laugh is of course fine; just do so in moderation.
  33. Here, Bennett introduces what he says is a labor-saving device:

    algebraic notation for simplifying logic diagrams.
  34. But it turns out it was just a backdoor way

    of preparing us for DeMorgan’s theorem...
  35. ...which basically says you can reverse the meanings of AND,

    OR, and NOT in a circuit and still get the same result. This is a huge deal in logic design; you can build an entire design out of one kind of component.
  36. 1.Rush to an early victory 2.Reward exploration 3.Start where your

    reader is 4.Apply dirty tricks in moderation 5.Use the head fake This teaching by misdirection was dubbed a “head fake” by Randy Pausch,...
  37. The best way to teach somebody something is to have

    them think they’re learning something else. —Randy Pausch, The Last Lecture ...in his famous Last Lecture.
  38. 1 0 1 1 0 0 0 0 Next, Bennett

    has us putting building blocks together in bigger combinations. Consider this circuit that folds in on itself.
  39. 1 0 1 1 0 0 0 1 As you

    toggle one of the inputs at the bottom,...
  40. 0 0 1 0 0 1 1 1 ...both outputs

    at the top change state and stay in their new configuration.
  41. Flip-flop This kind of circuit is known as a flip-flop.

    It’s the foundation of electronic memory.
  42. Memory If you don’t want the inconvenience of two inputs,

    you can combine them into a single “toggle” input.
  43. Comparator Once you have one-bit memory cells, you can assemble

    them into four-bit numbers and compare them.
  44. Counter You can also chain them one to the next,

    building a circuit that can count numbers.
  45. These are the parts of a computer flickr.com/photos/fimbrethil/137042644 These are

    the building blocks of a computer! By the end of the course, you’ve essentially seen the most important pieces of a CPU.
  46. 1.Rush to an early victory 2.Reward exploration 3.Start where your

    reader is 4.Apply dirty tricks in moderation 5.Use the head fake 6.Forge something of value Bennett has brought us from “this is an AND” to “go design your own computer.” He has given us the power to create value.
  47. Then, just to drive the point home, he spends another

    advanced lesson showing us more analogies. Here’s a flip-flop made of pulleys.
  48. Here’s another flip-flop; this one’s made of moving air! The

    research to create thin sandwiches of transparent material was new at the time. Bennett was using his column to give us sneak peeks at emerging technologies.
  49. 1.Rush to an early victory 2.Reward exploration 3.Start where your

    reader is 4.Apply dirty tricks in moderation 5.Use the head fake 6.Forge something of value 7.Build bridges to other worlds These analogies started out as a warm, fuzzy way to introduce the core teaching concepts, and now they’re being used to go the opposite direction: to branch out into new territories.
  50. If you send in your correct answers and 50 cents

    handling, you get your very own diploma.
  51. We talk a good (ahem) game about gamification these days,

    but Bennett beat us to the punch by about 40 years.
  52. Tricked into designing a computer By engaging us in this

    quest, Bennett has basically tricked us into designing a computer. We’ve fought our way through obstacle after obstacle, including a final boss.
  53. 1.Rush to an early victory 2.Reward exploration 3.Start where your

    reader is 4.Apply dirty tricks in moderation 5.Use the head fake 6.Forge something of value 7.Build bridges to other worlds 8.Support the hero’s quest This whole journey through the book, culminating in slaying the final dragon and collecting riches, supports the idea of the reader as a hero.
  54. A good technical book has a narrative flow. In many

    of our books, we try to make it explicit, starting the books with a story showing the reader as hero. —Dave Thomas, So You Want To Be A Writer The Pragmatic Programmers talk about this a lot. In fact, the Author’s Guide they distribute to everyone who writes for them contains a whole chapter on the idea.
  55. My open questions: As we move into the final phase

    of this talk, I’d like to talk about a couple of the many questions I’ve asked about Bennett’s remarkable book.
  56. How do we preserve Bennett’s legacy? First, as delightful as

    it is that this book is still engaging and relevant, how to we preserve it?
  57. One answer is translating into other media. McGraw Hill did

    republish the work in paperback form in the ‘70s. I’ve written them to ask permission to go further, and translate the work into hypertext.
  58. >KILL TROLL WITH FLIP-FLOP YOU CAN'T SEE ANY FLIP-FLOP HERE!

    Perhaps an even better venue would be an interactive story; for more on how to build those, see Bart’s talk on Thursday at 10:00.
  59. Oral cultures are not just, or even primarily, about quality

    assurance in transmission. They are primarily about quality assurance in composition, and training in the basic moves of exposition and condensation. —Venkatesh Rao The thing about casting things as stories like this is that they have as big of a beneficial impact on the storyteller and the material itself as they do on the listener.
  60. How did he do it? The other big question is,

    how did Bennett manage to create this enduring work in the first place? Did he even know how significant his creation would be?
  61. 1.Rush to an early victory 2.Reward exploration 3.Start where your

    reader is 4.Apply dirty tricks in moderation 5.Use the head fake 6.Forge something of value 7.Build bridges to other worlds 8.Support the hero’s quest That brings us back around to the lessons we’ve gleaned from looking at this work.
  62. Speaking of the hero’s journey, here’s a eulogy written by

    one of my Grampy’s fans. I found it among the family photos I was scouring for material for this talk.
  63. In particular, see how Grampy taught more people than just

    me. His passion for engineering is still rippling throughout the universe.
  64. I don’t think Grampy was worried about trying to preserve

    his legacy. I think he was just doing what he loved, and encouraging others to do the same.
  65. This means we don’t have to sweat this, either. Any

    one in this room could build something that people are still talking about generations from now. Any one of you could teach one person a skill and see that knowledge spread to thousands. I am standing in a room full of conquerors and heroes, with any luck I’ll be around long enough to see the impact of your deeds far and wide. Cheers.