[ Books Index | Silicon Valley | Metroactive Home | Archives ]
The Debugger
(In this excerpt, senior programmer Ethan Levin's bug, a.k.a. UI-1017, has remained stubbornly unfixed for 91 days, and the heat is on. Two venture capitalists (VCs as dangerous as Viet Cong)--Marshall Toulsen and Tom Knightbridge--have shown up at Telligentsia to meet with Ethan and his boss, Harry Minor, about the prospects for extirpating the bug and meeting the company's delivery schedule for its database software. After the meeting, Ethan, plagued by thoughts of his cheating girlfriend, Joanna, returns to his office and tries again to find the elusive bug.)
Days Open: 91
The two venture capitalists were waiting for him.
"Am I late?" Ethan asked as he stepped into Harry Minor's office and closed the door behind him.
Both visitors looked down at their watches impatiently.
"Oh, no, no," said Ethan's boss, directing himself to the VCs as he stood up from behind his desk. "Meeting times at Telligentsia are always a little, uh, fluid. Ethan Levin, Marshall Toulsen and Tom Knightbridge. Marshall and Tom, Ethan."
The two men made no move to shake hands. "Well, just so we're clear that schedules aren't, uh, fluid at Telligentsia," said the one to Harry's right. (Was it Marshall, Ethan thought, like a sheriff?)
"Heh-heh," went Harry in his nervous little laugh.
Ethan wasn't sure what to do with himself. He was clearly late. Sunday night had been like Saturday: He'd lain awake for hours, eventually falling into a black, thick sleep that kept him unconscious through his alarm. Now he stood awkwardly leaning his back against the door. The VCs had taken the two chairs in front of Harry's desk, and there were only two other places people generally sat in Harry's office: on the floor, which Ethan instantly ruled out as inappropriate for this situation, and on the ball. The ball in question was a two-and-a-half-foot-high, bright orange exercise ball that Harry's wife had brought from an aerobics class, one of the many toys left around for amusement during meetings. There was the purple water gun. The red plastic scooter. The bow-and-arrow set with rubber-cup-tipped arrows. The mechanical dog that begged and barked when you wound it up (required if you got caught in a mistake). A miniature basketball and hoop. A harmonica. A ukelele. And the orange ball itself, upon which one squatted and skuttled, balancing with a peculiarly suggestive rolling motion of the pelvis.
Ethan hesitated then did what he had to: He sat on the ball.
"Oh, that's a standard seat here," Harry said to his visitors with a grin. "Keeps us on the ball, if you know what I mean."
The capitalists did not grin back. "I see," said one.
"Let's begin," said the other. And as the VC sat back comfortably--leg crossed ankle over knee, hands made into a steeple--Ethan realized he'd completely forgotten his name now. What did Harry say it was? And the other one--was he Night-something? Joanna had tried to teach him how to remember people's names. Repeat them right away when you're introduced, she'd said. Pick out an identifying characteristic and match it to the name as you're saying it. But how was he supposed to do that while he was wondering how it would look for him to be sitting on a bright orange exercise ball? He looked from one man to the other and tried to concentrate. Both in dark suits. Both in red ties with diagonal stripes. Cuff links--God, who wore cuff links anymore? Loafers, the kind with a fringe. Mid- to late thirties, no facial hair, not much to distinguish them in a crowd. One was handsomer, Ethan decided, the other one balding.
". . . and so we're talking to all the people identified as key personnel," Handsomer was saying, "and we were told you're one of them."
"Key to the front-end product," said Balding.
"Thank you," said Ethan. "I'm happy to--"
"Where'd you go to school, Levin?" Handsomer broke in.
"Berkeley," Ethan answered.
"Good man, good man!" Handsomer said heartily. "I'm a Cal man, too. Good school.
Graduate work there, too?"
"I did some coursework toward a doctorate, but no degree."
"You didn't get a Ph.D. or just not there?"
"No. No degree."
"No master's?"
"No. No degree."
"I see. That's right. I remember now. Any particular reason why not?"
Ethan was about to answer when he felt the ball go wobbly under him. He rolled himself slightly forward to compensate, then found himself too close to the two VCs and skuttled back. "Unstable," he said, meaning the ball.
The two men stared at him.
"No degree, why not," Ethan muttered, steadying himself. "Well, I was offered a good job, then another one. It seemed that the opportunities outside school were too interesting to pass up."
The men smiled; a good answer, apparently. One was supposed to want opportunity, adventure, ventures.
But immediately Ethan was terrified: Was that what he'd told Harry? He thought back to his job interview: Didn't he tell Harry about his father dying and having to drop out of school? He wanted to turn around, look at Harry, see if anything registered on his face. But there was the problem of the ball. If he moved abruptly, he'd get the ball unbalanced, so he'd have to hedge, tell everything, cover his bases.
"And," Ethan hurried to add, "my father passed away." He put his head down, waved a hand vaguely. "There were . . . you know . . . responsibilities. To the family. Things . . . You have to take care of things at times like that."
"Of course," said Handsomer.
"Very sorry," said Balding, though he looked not sorry at all.
Handsomer then reached into a briefcase he'd kept at his feet, rifled through some papers, and came up with what Ethan recognized as his résumé. Now what? thought Ethan. What would they make of his experience? Would they see a solid programmer with twelve years of delivering finished projects, or a corporate coder, a drone, someone unworthy of options to buy forty thousand shares of their stock? He braced his legs, determined that whatever happened, he would not lose his balance on the ball.
But something went odd immediately. Did Ethan know Tom Binerd at Unitek, Balding wanted to know, his old school buddy? No? Strange. Balding was sure Tom was there when Ethan was. How about John Simms, Balding's old frat brother? Not him either? Handsomer's uncle had worked at Insuracorp; did Ethan remember Charles Whiting? What about Wo Len Chan? No? Or Stuart Chalmers at Macy's? Also no? Really? But how could that be?
"I was just a programmer" was all Ethan could offer.
As they went on to question his projects--their scope, size of the team, his place in it, schedules, completion times--Ethan had the horrible sense that these men were trying to catch him in a lie. Would they see that he'd exaggerated about that job at Unitek? That period of "consulting"--would they see through that, too? Ethan had a sudden vision of himself through the eyes of these venture capitalists: A graduate-school dropout. A kid with an ordinary résumé. A programmer who didn't know any of the key people where he worked. Someone sitting on top of a big orange ball, forgodsakes.
"I'm very much involved with research into artificial life," Ethan supplied in his own defense.
Handsomer and Balding dropped their little steeples, sat back, blinked at him.
"Artificial life," Ethan went on. "Are you familiar with The Game of Life developed by the mathematician John Conway? No? Well, it's a universe of two-dimensional cellular automata. Imagine them as squares in a grid, or cells, each cell having eight neighbors, one at each of the four sides and one at each corner. Anyway, Conway devised three simple rules that decide if the cell gets born, survives, or dies, depending only on how many neighbors it has. For example, if a cell is either too crowded or too isolated, it dies. Anyway, what's interesting about all this is that from those simple rules came patterns of great complexity. Really amazing, actually, very complex. Which leads to the idea that maybe life--ha-ha, the real thing, small l--maybe life . . ."
He watched the eyes of the two venture capitalists grow wide with alarm. He knew he should stop himself, but since graduate school, he hadn't talked in detail about the Game to anyone, except to Joanna, who'd reacted with sarcasm--Don't think about her now! he ordered himself--and so here was his mouth running on without him--stop! he thought--but where?
". . . anyway, to the idea that maybe the complex patterns of life came from the same source. You know, in the operation of many, many small, simple rules. You see, there's a discontinuity between the domain of the rules and the actual resultant phenomena--you can't predict the phenomena from the rules--so maybe this means--"
"Look, Levin," Handsomer broke in finally, "let's just get down to it."
Ethan was aware of relief: they'd stopped him.
"We're talking to you because we're trying to gauge our confidence level for a Q2 85 FCS."
"Cue two eight five eff see ess," Ethan repeated without understanding what he was saying.
"First customer ship," supplied Balding. "By April eighty-five. June the latest."
Customers. Ship something to them. In a year from now, thought Ethan. Soon.
"How comfortable are you with that date?" asked Handsomer.
Ethan looked over to see Harry's reaction. But--oh no!--the sudden motion of his shoulders set the ball moving under him again, and Ethan had to roll his pelvis forward, then back, then forward again, to compensate. "Well, we've been right on schedule," he said, still rolling around, "or I've been on schedule, that is."
"Yeah," said Harry, "but you're the only one on time, and anyway, that schedule has us done about ten months later. March eighty-six. Or maybe April."
The two programmers looked at each other.
"So we're accelerating?" Ethan asked.
"Accelerating," Harry replied flatly.
No one spoke for a moment.
"And that bug we saw," Handsomer went on. "We're assuming that's a fluke?"
The bug at the demo. The system freezing up in front of everyone. The bug Harry said he'd better fix. "Just a bug," said Ethan, with a thrust forward of his pelvis.
"Not a problem," said Harry.
"I'll fix it," said Ethan in a confident voice.
But by then Ethan was skuttling left and right, back and forth, to keep himself from falling off the ball. For some reason, turning to look at Harry had set off not only a roll but some kind of bouncing motion, and now Ethan's every attempt to counter it was only adding energy to the ball. He felt himself start to sweat, as the simple problem of staying seated had become real exercise. "I'll fix it," Ethan repeated absently as he teetered around, left, right, left again. "Just a bug." When suddenly he lost it. The ball took a lurch, Ethan tried to counter it, and the big orange blob shot out from under him.
"Damn!" he said, jumping to his feet.
But luckily for Ethan, the venture capitalists also decided it was time to stand up. They never mentioned the ball. They simply stood there quietly as Ethan kicked it into a corner and Harry came out from behind his desk. They'd decided, evidently, that they'd learned what they had come to learn, and it was time for the meeting to be over. They shook hands with Harry and Ethan, said they'd be hearing from them, and then they were gone, leaving the door open behind them.
"Close it," said Harry.
Ethan closed the door.
"Shit," Harry said.
They sat down in the chairs the VCs had occupied.
"Let's meet tomorrow and look at the schedule," Harry said.
"Yeah," said Ethan. "What'll we take out?"
"They don't want us to take anything out."
"You mean they want the same work in like half the time?"
"Yep."
"Shit," said Ethan.
Harry reached down to pick up the little mechanical dog, which had lodged itself under his desk. Slowly, breathing heavily from the effort of bending over, Harry wound its key. Then he released the dog to make its way across the floor. Until the spring wound down, Harry and Ethan stretched out their legs and watched it: its little mouth yapping silently, its furry plastic legs pawing at the air.
A cyborg experience: On one side of Ethan was the large graphics monitor that would run his program, a test version of the user interface, with its freeze-up waiting to happen. In front of him was another monitor, but this one a plain green-on-black character terminal, on which he would run the debugger, a monitor program, under whose observing eye the front end would run. The debugger and the graphics terminal could not share a screen; they lived in two different computing universes, one as old as teletype (the debugger) and one just coming into being (the bit-mapped graphics screen). And if all this hardware weren't enough, there were also two workstations involved: one to run the front end and the debugger, and another running the database, the back end, to which Ethan's front-end machine was connected by a long network cable that stretched down the hall. Ethan was therefore surrounded: two monitors, two keyboards, a mouse, manuals, cables, connectors, a tangle of cords.
He turned to the character terminal and typed:
dbx ui-levintest
In response, the system started the debugger, loaded his user-interface test program into memory, and replied:
dbx version 1.2
Type 'help' for help.
reading symbolic information . . .
(dbx)_
Where it stopped, the cursor blinking after the prompt (dbx), as the debugger waited for Ethan to issue his next command.
Ethan had his ideas where the bug might be hiding. All the certainties he'd considered and abandoned when he last decided that the bug was fixed--the lines of reasoning he'd been following before he swept them all away into the slop bucket of "library inconsistency"--all this came back to him. The freeze-up had occurred on two different screens, two different menus. It was probably not a factor, then, of a particular screen or menu. It would have to be the underlying code for any menu.
So at the waiting prompt, he entered:
(dbx) stop in CreateMenu
Which would cause the user interface to stop running when it entered the function named CreateMenu. He did the same for PutMenu and GetMenu, and he now had three "breakpoints," three places that would cause the user interface to pause, wait for further instructions, and let him look around.
Then on the debugger keyboard he typed:
(dbx) run
On the big graphics monitor at his side, the front-end program began running. The screen cleared, becoming an all-over middle-gray tone, in preparation for putting up the first window. Then it stopped.
On the debugger monitor, a line of code was displayed:
int CreateMenu(curr_window, curr_menu)
His first breakpoint. The front-end program, as it was running, had come to the first of Ethan's stopping places and, under the control of the debugger, had duly stopped. After which Ethan entered:
(dbx) step
Which told the user interface to go on and step its way through the code, one programming statement at a time. The program resumed execution--for a single code line--then stopped again:
if (curr_window == NULL)
ui_err(CR_MENU, "null win pointer");
Ethan looked at the line of code--a standard check at the top of a function for a valid incoming value. Okay, fine. Nothing wrong here. And again he typed:
(dbx) step
And again the program ran for one more line of code, the debugger screen then showing:
if ((curr_menu =
Again the code looked fine, and again he was ready to go on. Step, he wrote. Line of code, the debugger answered. Step, line of code; step, line of code. Step, step, step. Now and then he would check the values of some of the variables, this time the width of the newly created menu in pixels:
(dbx) print curr_menu->menu_region->width
Which looked right for the screen he was using, and again he stepped, and again he asked for some values, until he had gotten all the way through CreateMenu without seeing any problems. Now it was time to let the user interface continue running, and at the debugger keyboard he typed:
(dbx) cont
On the graphics terminal, as the program continued execution, the initial window of the user interface appeared. Ethan looked at it carefully, at all the text and icons and buttons the program had just painted on the screen. Okay, he decided. Everything fine. Then he took the mouse in hand, waved it around for a while, and clicked on a menu button. This would take the program to Ethan's next breakpoint, and instead of displaying the drop-down menu, the program paused as it was supposed to. Ethan turned back to the debugger screen, which showed:
int PutMenu(curr_menu)
The start of the function responsible for showing the menu. And again he stepped his way through the code. And again he checked the values of variables. And so on: step, look at a line of code, check some values, step again. On through all of PutMenu. Step, step, step. Into the functions called by PutMenu--step, step, step--and then into the functions they called. Down and down into the layers of code calling code. Step. Check some values. Looks okay. Step. Ethan went walking through the code one statement at a time, watching his program run not in the nanosecond world of the machine but at the paltry, moment-by-moment speed of human attention. The debugger showing him not the program as he had imagined it while coding--when his mind had been ablaze with details and procedures, and he'd been struggling to get it down, line by line--but the actual program, its operation, its functioning, its effects in the "real" world of chips and hard drives and main memory.
Step. Check some values. Looks all right. Step.
And so began his most sustained (and strained) relationship with the debugger. His daily, repetitive, compulsive--almost addictive--conversation with this electronic guide through the minefield of bugs. His digital companion, algorithmic pal, one of the two programmatic assistants with whom a programmer comes to pass more time than with a friend, or a parent, or a lover, or a spouse.
First comes the compiler. Between the programmer speaking code, and the chip speaking zeroes and ones, stands the compiler, translator of code into chip-speak. The chip's humorless factotum, who verifies that everything written by the programmer--every comma, every dot--is syntactically legal; who checks that if one is supposed to be speaking C or Pascal or COBOL or BASIC, one is indeed speaking proper C or Pascal or COBOL or BASIC. But merely proper. The compiler doesn't know if your instructions will actually do the job you want done, only that they are expressed correctly. It is a United Nations translator under a headphone, a passive processor, mindlessly turning French into English, with no power or inclination to stand up, rip off the headphones, and shout, Mais monsieur! C'est complètement stupide!
Which brings up the next difficulty: Once your instructions to the chip are expressed in a language it understands, it will do your bidding, mindlessly. But perhaps your instructions make no sense in relation to the task at hand? Yes, that is precisely what had happened to Ethan Levin. His program had made it through the compiler. He had a file full of legal instructions ready to run. But when they ran, the program went inexplicably wrong.
And so to the debugger. To see the results of his instructions. The actual path taken. The branch that went this way instead of that on the road to UI-1017.
Step, step, step.
Step. Check some values. Looks okay. Step.
"Lunch?"
It was Steghman, his head poking into the doorway. "Lunch?" he repeated.
As always, Ethan checked his hunger by the workstation clock: 12:30. Lunchtime.
"Sure."
They went to the basement cafeteria as usual, sat side by side on the stools at the counter looking out onto a hallway. Sandwiches wrapped in paper on a plastic tray. Soft drinks in waxed-paper cups with lids and straws.
"Had my VC meeting," said Steghman.
"Uhm?" said Ethan.
"You?"
"Yeah."
They ate for a while.
"How'd it go?" asked Ethan.
Steghman took a bite, chewed, pulled a drink off his straw. "Tense," he said finally.
"Yeah," said Ethan.
"You?" asked Steghman.
Bad, Ethan wanted to say. Humiliating. There was the orange ball. The people quiz. Joanna. The Game of Life. The bug. The impossible release date.
"Aggressive scheduling," he said.
Steghman laughed. And Ethan laughed: Harry Minor's heh-heh nervous laugh. Aggressive scheduling: programmer-speak for impossible.
Ethan was certain--at each step--that the next one would bring on the crash. I'll put in a breakpoint here, he thought; the program will pause; I'll step to a line of code, and certainly there it will be: the freeze-up, the exact point where some mislogic had wound its way through the layers of code, finally percolating up into functional absurdity. Some pointer would be NULL when it should have the value of an address in memory. Some Boolean variable would evaluate to FALSE when it should be TRUE. Some return code would show an error condition that was not checked by the program. And then all he had to do was think his way back through the layers, discover why it was NULL, FALSE, unchecked.
Step, step, step.
He ran his hands through his hair. Stared at the screen. Entered a new breakpoint.
Step, step, step.
The afternoon wore away, then the evening. Thorne left, Herring left, Ethan got up and turned off the lights. The windows faded to black, the lights blinked off in office after office across the floor. Step, step, step. It must be here, he thought. No, here. It will crash the next time. Okay, then the next time.
There was a roar at the door. The lights flashed on.
"Lo siento," said the office cleaner.
She ignored him, he, her. He lifted his feet, she vacuumed around him, turned off the lights, and moved on.
The moment the room went dark again, Ethan felt a surge of panic. What time was it?
Eleven. He should call Joanna.
The phone rang and rang. No answer. He dialed again. Again no answer. Where was she? Where was she?
Better fix that bug, Harry had said. William Harland is acting like he never saw a bug before. The VCs are watching. Tomorrow he was supposed to meet with Harry about the schedule. He could not stop and simply leave a note for himself. Tomorrow there would be no "Here you are, Ethan." No message saying, "Investigate pointer indirection." No, the only note he could leave himself could be the bug report itself, with its message to the testers saying, "Fixed."
Step, step, step.
Some part of him knew that he should get away from the debugger. He should get away from the machine, stop and think on a yellow pad, a whiteboard. He wasn't making headway like this. He kept beating against the same certainties--here, else here, else here. Writing and sketching might break his thinking patterns, force him into other channels. But there was something seductive about the debugger: the way it answered him, tirelessly, consistently. Such a tight loop: Step, he said. Line of code, it answered. Step, line of code; step, line of code. It was like the compulsion of playing solitaire: simple, repetitive, working toward a goal that was sure to be attained in just one more hand, just one more, and then one more again.
And so the paradox: The more the debugger remained the tireless binary companion it was designed to be--answering, answering, answering without hesitation or effort late into the night--the more exhausted and hesitant the human, Ethan Levin, found himself to be. He was sinking to the debugger's level. Thinking like it. Asking only the questions it could answer. All the while he suffered what the debugger did not have to endure: the pains of the body, the tingling wrists and fingers, the stiffness in the neck, the aching back, the numb legs. And worse, the messy wet chemistry of the emotions, the waves of anxiety that washed across him, and then, without warning, the sudden electric spikes of panic.
[ Silicon Valley | Metroactive Home | Archives ]
Copyright © Metro Publishing Inc. Metroactive is affiliated with the Boulevards Network.
For more information about the San Jose/Silicon Valley area, visit sanjose.com.
|
|