conversations.from: human
conversations.value: What could be a title for a story about Creative with the genre: Computers & Technology, Programming?
conversations.from: assistant
conversations.value: A title for this story could be 'Debugging'
conversations.from: human
conversations.value: Give me the first five paragraphs for this story.
conversations.from: assistant
conversations.value: Debugging
  For their support, encouragement, and countless favors large and small, a special thanks to my in-laws, Dick and Joan Blagbrough. To my daughters, Jen and Liz, hugs and kisses for being fun and believing in me. (Also for letting me have a shot at the computer in the evenings between high-scoring games and instant messenger sessions.)
  Now, maybe some of you never need to debug. Maybe you sold your dot.com IPO stock before the company went belly-up and you simply have your people look into the problem. Maybe you always luck out and your design just works—or, even less likely, the bug is always easy to find. But the odds are that you and all your competitors have a few hard-to-find bugs in your designs, and whoever fixes them quickest has an advantage. When you can find bugs fast, not only do you get quality products to customers quicker, you get yourself home earlier for quality time with your loved ones.
  How can something that's so short and easy to read be so useful? Well, in my twenty-six years of experience designing and debugging systems, I've discovered two things (more than two, if you count stuff like "the first cup of coffee into the pot contains all the caffeine"):
  I compiled a list of these essential rules; I've taught them to other engineers and watched their debugging skill and speed increase. They really, really work.
  If you're a teacher, your students will enjoy the war stories, which will give them a taste of the real world. And when they burst onto that real world, they'll have a leg up on many of their more experienced (but untrained in debugging) competitors.
conversations.from: human
conversations.value: Give me five more paragraphs.
conversations.from: assistant
conversations.value: Social scientists and medical researchers often use siblings, and sometimes twins, to isolate the factors they're studying. They might look at identical twins who have been separated, since these twins are genetically identical and any differences come from environmental factors. Similarly, they might look at adopted children, using the family environment as a constant and assuming that any differences come from genetics. When your dentist is trying to find that cold-sensitive tooth, he aims a rifle-like stream of cold air at one tooth at a time; he doesn't fill your mouth with ice chips. And in the days of series-wired Christmas tree bulbs, where the whole string went out if one bulb died, you changed one bulb at a time until the string lit up again—if you changed them all, you'd have an expensive handful of used bulbs with one unidentified bad one in it.
  This is just scientific method; in order to see the effect of one variable, the scientist tries to control all of the other variables that might affect the outcome. In the popular grade school plant growth experiment, you use identical soil, an identical watering schedule, and identical seeds, but you vary the amount of light that the plants get. Thus, any variation in plant size is due to sunlight time. If you give them all the same amount of sun, but you vary the amount of water, any variation is due to the amount of water. If small plant size is the bug you want to fix, and you change the pot color and the watering schedule and the sunlight exposure, you won't figure out that pot color has nothing to do with your problem.
  This was difficult, since each measurement involved setting up a timing guess, measuring the results against it, and then using those results to recalculate the timing for guessing the next parameter. When I first ran the system, it failed miserably, of course. (We always give it a shot, though, don't we?) The interaction between each measurement and the timing for the next measurement made it difficult to analyze the results, but the problem seemed to be determining where the pixel edges were with respect to my clock.
  I ran my procedure again, but with all measurements bypassed and set to default values, except for the pixel sample point delay (phase) parameter. This I manually moved through each of eight positions (see Figure 7-2). When the sample point crossed from one input pixel to the next, the system would be sampling the video one clock earlier. I expected the output video to jump one pixel to the left; instead, it jumped right at one phase, then jumped back to the left again at a later phase. This made no sense, but since there were no other variables changing, I knew it was really happening.
  I presented the data to the third-party vendor; the vendor looked into the problem and discovered that the phase parameter I was using had been misdocumented. As I increased the parameter from 0 to 359, instead of the actual sample phase going from 0 to 359 degrees as documented, it went from 0 to 89 degrees, then jumped back to –270 degrees, and then went forward to –1 degree. The video jumped right when the phase jumped backward, then jumped left when it later recrossed the pixel boundary on its way to the starting position again.
conversations.from: human
conversations.value: Give me the last five paragraphs.
conversations.from: assistant
conversations.value: Finally, remember that once they've learned the rules, they're going to use them to tackle the next debugging task you give them. Don't pressure them to guess their way to a quick solution—give them the time they need to "Understand the System," "Make It Fail," "Quit Thinking and Look," and so on. Be patient, and trust that the rules are usually the quickest way to the fix and will always help keep you out of those endless, fruitless guessing games you desperately want to avoid.
  Be engineer B and follow the rules. Nail the bugs and be the hero. Go home earlier and get a good night's sleep. Or start partying earlier. You deserve it.
  Dave Agans is a 1976 MIT graduate whose engineering career spans large companies such as Gould, Fairchild, and Digital Equipment; small startups, including Eloquent Systems and Zydacron; and independent consulting for a variety of clients. He has held most of the customary individual contributor titles as well as System Architect, Director of Software, V.P. Engineering, and Chief Technical Officer. He has played the roles of engineer, project manager, product manager, technical writer, seminar speaker, consultant, and salesman.
  Mr. Agans has developed successful integrated circuits, TV games, industrial controls, climate controls, hotel management systems, CAD workstations, handheld PCs, wireless fleet dispatch terminals, and videophones. He holds two U.S. patents. On the nontechnical side, he is a produced musical playwright and lyricist.
  Dave currently resides in Amherst, New Hampshire, with his wife, two daughters, and (when they decide to come inside) two cats. In his limited spare time, he enjoys musical theatre, softball, playing and coaching basketball, and writing.
conversations.from: human
conversations.value: Swap the first and the last sentence.
conversations.from: assistant
conversations.value: In his limited spare time, he enjoys musical theatre, softball, playing and coaching basketball, and writing. Don't pressure them to guess their way to a quick solution—give them the time they need to "Understand the System," "Make It Fail," "Quit Thinking and Look," and so on. Be patient, and trust that the rules are usually the quickest way to the fix and will always help keep you out of those endless, fruitless guessing games you desperately want to avoid.
  Be engineer B and follow the rules. Nail the bugs and be the hero. Go home earlier and get a good night's sleep. Or start partying earlier. You deserve it.
  Dave Agans is a 1976 MIT graduate whose engineering career spans large companies such as Gould, Fairchild, and Digital Equipment; small startups, including Eloquent Systems and Zydacron; and independent consulting for a variety of clients. He has held most of the customary individual contributor titles as well as System Architect, Director of Software, V.P. Engineering, and Chief Technical Officer. He has played the roles of engineer, project manager, product manager, technical writer, seminar speaker, consultant, and salesman.
  Mr. Agans has developed successful integrated circuits, TV games, industrial controls, climate controls, hotel management systems, CAD workstations, handheld PCs, wireless fleet dispatch terminals, and videophones. He holds two U.S. patents. On the nontechnical side, he is a produced musical playwright and lyricist.
  Dave currently resides in Amherst, New Hampshire, with his wife, two daughters, and (when they decide to come inside) two cats.Finally, remember that once they've learned the rules, they're going to use them to tackle the next debugging task you give them.