The Idea Factory

Home > Other > The Idea Factory > Page 25
The Idea Factory Page 25

by Pepper White


  Time for wishful thinking. But first, translate key words in the problem statement. This is what the people in the artificial intelligence lab make their LISP machines do when they feed them "word problems" from high school algebra textbooks (e.g., "John is one-fourth as old as his father. In ten years John will be onethird the age of his father. How old will John be when he's half as old as his father?").

  The key words are argument and return. An argument is what other computer programming classes would call an input-for example, x in cos (x). Return is what the rest of the world would call "output." But this is MIT and we have our own terms here, and our terms are better than anyone else's.

  So the problem statement means (1) take any three numbers; (2) figure out which are the two bigger ones; (3) multiply each of the bigger ones by itself; (4) add together the results of (3).

  Now it's time for wishful thinking. Wouldn't it be nice if I had a magic box that figured out the larger two of any three numbers? Wouldn't it be nice if I had another magic box that would make the sum of the squares of whatever two numbers I put into it? Wouldn't it be nice? Maybe then ... I couldn't remember the rest of the words to the Beach Boys' song.

  I knew what I didn't know, if you know what I mean. If you precisely know what you don't know you can draw a box and call that a procedure and invent the details of it. The idea that Siebert stressed was legibility, communication to my colleagues now and myself later. They allow you to make the names of the boxes as long as you want, so I called one of the boxes "Makesum-of-squares." I called the other box "Find-bigger-two-ofthree." I called the spirits by name and had power over them.

  I'd learned functions in high school, such as cos(x), "cosine of x," and LISP empowered me to invent functions with more than one argument. Awesome concept, dude. Powerful. Elegant. Clever. These are words that floated around the Chipmunk room. What I'd done on the Apple was cool, it was iterative, but it was really clumsy compared to this language-if I could ever become fluent in it. And as if that weren't awesome enough, LISP enables you to make functions of functions of functions of functions ad infin- itum. It almost brought higher mathematics to earth.

  My job, having named the spirits, was to tame them, to bring them into submission, to grab them by the hollow of the thigh as the angel did to Jacob.

  To tame them is the same as inventing them, or programming them. So time to move the cursor.

  DEFINE FIND-BIGGER-TWO-OF-THREE (A B C)

  a, b, c, were symbols for the arbitrary numbers the program could take as input. I fished through the notes, through the manuals, through the solved problems from the year before to try to capture the pattern of how to write a solution.

  The approach is to find a similar problem for which you have the answer and try to mimic it, try to change it a little bit, and maybe luck out and reach an answer. If the answer is like the one in the book you can fool yourself into thinking you're learning something. However, this is and was suboptimal (Course Six evidently had not heard Professor Wilson's definition of suboptimization as rearranging the deck chairs on the Titanic; their definition of suboptimal was "less than optimal"), suboptimal because the only thing you learn when you mimic surface patterns and how to change them is what they look like and how to sleaze some partial credit points out of the grader of the problem set or the test.

  But the only way really to learn, to internalize the knowledge, is to concentrate, to focus, and to break the problem down into its simplest pieces and then build the solution up out of the problem's pieces. It's hard to focus, but if you can do that, the rest is easy. It's like the answer is a walnut and you have a walnut pick and you're trying to pull the walnut out of the shell. You can either scratch at the surface and pull little pieces off the top of the nut, bit by bit, and mix other little pieces of the shell with it, or you can work around the edge of the nut, looking for places to loosen it whole from the shell like an overripe fruit. Maybe this is what Professor Noam Chomsky meant by "surface" structure and "deep" structure.

  I asked the mealymouthed sophomore for help again.

  "I'm trying to define this procedure that will return the bigger two numbers by using 'greater than' signs," I said.

  "The machine won't return two numbers like that," he said rapid-fire. "Well, actually it can, but we won't be telling you how. It would only confuse you. Why don't you try using the procedures 'min' or 'max'? They're in chapter three."

  There I'd gone along with that narrow, limited, sequential way of looking at things and wrongly assumed that since the problem was in chapter one, all the material I would need to solve it would also be in chapter one. Not so at MIT. This is their way of tricking you into reading ahead.

  And so I applied "max" once, then applied "max" to the remaining two numbers, squared the two resulting numbers and added them together.

  It took several tries, though, and a paragraph in the Chipmunk manual was characteristically understated:

  "Debugging: It will become apparent to you many times during a program's evolution that the program is not entirely right. Instead of blaming the program for these faults, strange creatures called bugs are blamed (back before the transistor, when computers were huge, when 'tubes' amplified signals, problems were caused by real bugs caught in the wires). In this way the programmer remains free of guilt. Debugging, like programming, is an acquired skill and an art."

  Everything's easy once you know how to do it.

  July 21

  Siebert: "The mantra for today is 'recursion.' "

  The way to think of recursion is that you have a set of dolls that they make in Eastern Europe, where one doll looks like the other one but is smaller and fits inside it. Now suppose there's something on the innermost doll that you want. Suppose further that each doll has a key to open up the next inner layer, and suppose further that your boss said to you, not only do you want the thing that's on the innermost doll, but also you want the dolls to be the same after you're done. So you use your key to open up doll number one, use doll number one's key to open up doll number two, then use doll number two's key to open up doll number three, et cetera, until you reach the innermost doll. Then you come back the way you went in until you have your result and a fully assembled doll set again. The beauty of recursion is that you structure the computer's solution to the problem in a way that lets you see the problem as nested subproblems of a similar nature.

  Siebert said that when you want to write your programs, one useful technique is to write down all the steps in solving the problem by hand and look for the pattern in the solution. When you capture that pattern, try to say in English what you want the program to do. Then try to program it. Eventually you'll become fluent enough that you can just sit down at the machine and compose code without going through the intermediate steps. But it may save debugging time if you approach it as suggested.

  I remembered the Belgian mathematics professor's saying that what a mathematician does is write something out with all the steps and then condense it into a form that no one else can understand. Maybe that's why math majors find six double oh one easy.

  Siebert went on to an example of a "sort" routine. A sort routine is useful in doing things like putting lists in alphabetical order. Say you're trying to put some order in your filing system. Say you have one thousand items to categorize. First you pick ten or so categories, and go through the pile and put things in each of the piles. Then you go through the ten piles and make up subcategories for them, and so on, until you have everything in easily findable files.

  Knowledge is power, information is power, but speedy access to knowledge and information is real power.

  "We're helping you with techniques to manage complexity," he continued.

  He said that these are simple techniques, but when you link them, your programs may begin to take on a life of their own. You'll input something and the output will surprise you but it will be real. Then you'll input something else and you'll be surprised again. You build so much complexity int
o a system that you cannot understand what is happening. And so any sufficiently advanced technology becomes indistinguishable from magic.

  Yes, but the magician controls the magic, and I want to be a magician.

  July 28

  "Where are you from?" I asked the foreign-looking man seated in the Sloan Lab classroom, while we waited for the defense to begin.

  "Building 32."

  Ari had finished his Ph.D. research and had delivered the completed manuscript to his review committee. As is the custom dating from medieval Oxford, he would present his research in a public defense. His committee would then confer privately, decide whether the research were MIT-quality, and make him a doctor.

  Ari's presentation was polished, affirmative, convincing. Chet, Scott, Ben, the foreigner from Building 32, and the rest of the audience left the room for the deliberations. Five short minutes later the door opened and the committee chairman said, "Congratulations, Doctor Solomon."

  July 30. I helped Ari load the boxes into his car. It felt as if the older brother I never had were going away to college.

  "You know what they did to me?" he said. "All the figures in my thesis, the ones I thought surely the grant would pay for, the bill from the Graphic Arts department here came to $6,800. And I have to pay it or I don't get the degree and I wasted three years of my life."

  "Well, An, you know what they call that."

  "What, my friend?"

  "The Institute Screw."

  "I will miss you, my friend."

  "And I you, An. And I you."

  Schedule:

  Fall '83: 2.31 Strength of Materials (Ghandi)

  6.111 Digital Electronics Lab (Troxel) (audit)

  2.996 Thesis

  Hardware

  September 10

  "Hello Goodbye"

  -JOHN LENNON-PAUL MCCARTNEY

  Six one eleven. Course Six's version of two seventy, only a hundred times harder. This is the course wherein the first video game was invented in the early 1970s. I'd seen kids at Senior House at all hours of the night, every night, Friday and Saturday included, poring over their nerd kits, the briefcase-size boxes, poking wires into them next to the chips. I wanted to find out what they were up to.

  The underground guide to course Six said, "6.111 is a practical 'hands-on' lab course on the design and debugging of digital electronic circuits. How well you do in this course depends greatly on being able to get the various labs to work. Consequently, the ability to debug, though never specifically taught, is of prime importance. ... The difficulty of the material and the associated labs increases rapidly as the course progresses; so rapidly, in fact, that the lectures tend to fall behind [understatement].... Unfortunately, TAs are in high demand, so waits of over an hour are common just to be checked off, to say nothing of getting help [you're on your own, kid].... Of course, the final third of the course is devoted to the infamous final project, which usually grows to fill all available free time [understatement]. Take 6.111 with nothing else." Six one eleven is the ultimate fire hose course.

  I walked past a classroom on the way to the lecture. The professor had drawn an electric field on the blackboard and had set up circuitry to generate that electric field in the front of the room. He had a transistor radio tuned to noise, as Tim did with the perpetual motion machine, and traced the outline of the field, whose shape was as in the diagram on the blackboard. The invisible made visible. Mens et Manus-Mind and Hand.

  Professor Troxel was erasing the blackboard as everyone went to his or her seat. It must be sort of humiliating, I thought, to have tenure at MIT and still have to erase the blackboard from the class before. Of course, the professor from the class before could have erased his blackboard notes from his lecture, but he had to erase the ones from before him and dammit one stint of blackboard erasing is enough.

  I was just auditing the class, and it was kind of a nice gesture that he allowed me to sit in, and I was a graduate student from another department and no way could I be accused of brownnosing if I helped him, so I took care of half of the boards.

  The lecture began. "There's no text for the class, because none covers everything we'll be covering," he said. "Today's lecture is partly on Boolean algebra, partly on laying out the combinational logic for the first lab."

  Boolean algebra is the language of combinational logic. George Boole was an English mathemetician, who, around the time Rudolph Diesel was in Kimbies, developed logic operators that could receive two statements, true or false, and output a third statement, true or false. The simplest was an "and" gate, which said, "If a is true and b is true, then c (the output) is also true. If either a or b or both a and b are false, the output is false."

  Boole had no idea that the system he developed over a century ago would become the bread and butter of electronics designers. And so the advanced mathematics of today may be the bread and butter of whatever designers a century from now. And so it recurs. But then Dr. Bardeen (Princeton, Ph.D. 1936 [sorry, MIT]) discovered the semiconductor. I'd seen his lab notes on display at the microprocessor exhibit at the Science Museum in London. They were fully as messy as my notes in the RCM cell, but they won him a Nobel Prize.

  The semiconductor is the heart of a transistor. My first association with transistors was with the transistor radio my mother's father gave me when I was seven; its black plastic-smelling case came out of the box and I asked my father why Lloyd, the manufacturer, had two 1's.

  A transistor is like a light switch. Turning on a light switch completes a circuit and lets electricity go to the light. A transistor does the same thing, only instead of putting your finger on a switch, a teensy tinesy bit of electricity is like your finger, and it switches the transistor on when it goes to the transistor. But unlike a light switch, where, no matter how dextrous you are, you can only turn it on and off three or four times per second, you can turn a transistor on and off about a million times per second. That much I'd managed to pick up in my summer electronics class, even though the jerk gave me a C.

  If you can turn on and off, you can say yes and no, if you define yes as on and no as off or no as on and yes as off. And if you say yes and no fast enough and are clever in the logic you link, you can create a machine with "intelligence."

  Troxel blasted through all of Boolean algebra in the first halfhour of the lecture (lesser schools spend entire semesters on this subject), at which point a pizza delivery person opened the door to the lecture hall. "Pizza for a Mr. John Doe," the guy said.

  Troxel stopped dead in his tracks for a few thousandths of a second, a long time in his world of trillionths, and said after the laughter died down and the kid in the top row paid the deliverer, "That'll teach us to schedule lectures during lunchtime."

  He ended the lecture with an overview of the course. "You'll find that in logic design, as in any design, there's more than one way to state a logical relation; i.e., there are synonyms. These synonyms have subtle differences in meaning, as in English. English is expressive but not exact, which is why lawyers make so much money. Using the logic that says closest to what you want to say will help you communicate with your lab partner now and with yourself later."

  That sounded familiar. Siebert had said that in the summer. I wondered whether there were some kind of conspiracy in the department.

  "But this isn't law school, and it isn't medical school. We won't have you memorizing what certain chips do. You can look that up in the TTL Data Book, the way every digital designer in Silicon Valley does. A lot has been put into chips already, and you'll have to discover what chip to use by looking through the data book. And as you go along, you'll gain experience and develop intuition about what's going to work. You'll develop your personal Book of Tricks, to which I'll add a few of my own during the lectures.

  "And I strongly encourage you to work through the first three labs as quickly as possible, so that you will have time to complete lab four, which will take up your entire nerd kit, if your design is not suboptimal. Significantly s
uboptimal designs for lab four simply won't fit on your circuit boards.

  "And then, of course, there is The Project. You should start thinking about a lab partner now; the maximum group size is three, and two is probably ideal. More than three and it becomes a management project, not an engineering project. Choose your partner carefully, though.

  "I encourage you to do well in this class and on the project. If I were to make a hiring decision based only on this course, I'd hire you immediately without an interview if your grade is an A. If you had a B, I'd interview you and ask you about your six one eleven project. And if you had a C you wouldn't get in the door. Good luck."

  This is a good course just to audit, rather than to take for a grade, I thought. I don't need any more C's.

  C H A P T E R

  18

  Results

  11 . . . most real-life problems are for killing people . . . ...

  -Anonymous comment overheard in MIT corridor

  October 20

  Meanwhile, back in the engine lab ...

  "Film loaded," I said.

  "Check," Scott my lab partner said.

  "Camera focused."

  "Check."

  "Fuel injector armed."

  "Check."

  "Computer data acquisition system initiated."

  "Check."

  "Oscilloscope initiated."

  "Check."

  "Lab lights out."

  "Check."

  "Flashlight on."

  "Check."

  "Raise tank pressure."

  "Fifty psi, 60 ... 70 ... 80 ... 90 ..."

  The cell door opened unexpectedly, suddenly, caught me off guard, made me jump. "Who the hell is that? Can't you see we're doing a test?" I barked.

  It was Nick.

  "Uh, g'momin', uh, Cap'n," he said, taken aback at my outburst. He looked hurt, as if he'd lost a friend. He looked the way I must have just before I broke into tears in Gyftopoulos's office two years before. But he held it at that; twenty years at MIT had toughened him. "There wasn't any sign on the lab door'n all so I figured I'd sotta check in on you an' see how you were doin'. Sorry if I messed up the experiment."

 

‹ Prev