CS 106A February 8, 2009 The Psychology of Debugging.

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Chapter 5 Errors Bjarne Stroustrup
On the Telephone! On The Telephone.
Topic 17 assertions and program logic
Psych 5500/6500 t Test for Two Independent Groups: Power Fall, 2008.
Libertarianism A Libertarian, such as Taylor:
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Annuities and Sinking Funds
Presented by Dr. Peter C. Rogers, D.D., PhD.. The Law Under Which We Live  All conditions and experiences that come to you do so for your benefit. Difficulties.
S.T.A.I.R.. General problem solving strategy that can be applied to a range problems.
Chapter 7: Introduction to Debugging TECH Prof. Jeff Cheng.
Follow the Evidence Roll Call
1 RUNNING a CLASS (2) Pertemuan Matakuliah: G0454/Class Management & Education Media Tahun: 2006.
How to write a review Set the book in context. When, where and if possible why was it written. Tell us a little about the author and his/her objectives.
Eric Roberts Department of Computer Science Stanford University Psychology of Programming Interest Group 2004 Nottingham, England December 15, 2004 Teaching.
Student Academic Success Center Overcoming Procrastination Why do you procrastinate?
How to Read Literature Like a Professor by Thomas C. Foster
#1 - How to Formulate a Strong Thesis Statement
Writing an Essay Career Fair Paper.
This program is provided with compliments from By Doug Steward.
Narrative Essay: Telling your Story. Simply a Story Oral stories (what we did over the last weekend) Can come from your experiences, imagination, or a.
Recent Research Studies on Cooperative Games In the recent years since around 2003 I have been doing research following up on a specific idea for the finding.
As soon as you are given an essay question, begin your thinking. If you don't, you might miss useful information whilst doing other research. The television.
Pengukuran Opini Publik. Survey Research Survey research is a technique that well designed for assessing the prevalence and distribution of attitudes,
Thinking About How You Read
Test Taking Tips How to help yourself with multiple choice and short answer questions for reading selections A. Caldwell.
The Road Not Taken Robert Frost Analysis
ENGINEERING PROFESSIONALISM AND ETHICS EGN 4034 FALL TERM 2008 CHAPTER 3 Engineering Ethics: FRAMING THE PROBLEM.
thinking hats Six of Prepared by Eman A. Al Abdullah ©
SAT Prep- Reading Comprehension Strategies- Short Passages
Decimals as an Extension of Percents © Math As A Second Language All Rights Reserved next #8 Taking the Fear out of Math %
Welcome... Simon Walls PhD Marketing School of Business Administration.
LOCUS OF CONTROL Manishaa & Dayaanand.
This is what BC Students told us…
Paper #2 (due 2/6/13) After reading Chapter 7 in the textbook ("Arguing a Position"), read David Crystal's article, "2b or Not 2b?" (pp in your.
Helping the Shy Student Connect to School ASCA June 29, 2008 Dr. Teesue H. Fields.
1 Boot Camp Dave Eckhardt 1 This Is a Hard Class ● Traditional hazards – 410 letter grade one lower than other classes – All other.
“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how.
Q.A.R. Question-Answer Relationships Adapted from works of P. David Pearson & Dale D. Johnson, 1972 and Taffy E. Raphael 1982, 1984, 1986 SDE-Staff Development.
Some Responses to Essential Questions
.. SAN Distance Learning Project Student Survey 2003 – 2004 School Year BOCES Distance Learning Program Quality Access Support.
MENTORING ACCORDING TO THE PRACTICE OF CENTRAS Constantza Mamaia 2- 3 June 2011.
Software Engineering Chapter 3 CPSC Pascal Brent M. Dingle Texas A&M University.
How to Read a Text book Or How to get the most out of a text book.
Everyone Communicates Few Connect
BMTRY 789 Lecture 11: Debugging Readings – Chapter 10 (3 rd Ed) from “The Little SAS Book” Lab Problems – None Homework Due – None Final Project Presentations.
The Reading Test.  Knowing the variety and the amount of reading that awaits you in college, the ACT has included a reading test.  It’s all about your.
“Think about It…” Answer the following questions HONESTLY… Do you ever read something but not remember what it says? What do you do if you catch yourself.
DIGITAL DESIGN Digital Design is the art and process of creating a single Web page or entire Web sites and may involve both the aesthetics and the mechanics.
Psychology 3051 Psychology 305A: Theories of Personality Lecture 18 1.
The Communication Process WHAT IS COMMUNICATION?.
NOTES.
Introduction to Philosophy Lecture 13 Minds and Bodies #2 (Physicalism) By David Kelsey.
SAT Reading Strategies.
An Introduction to Writing
© 2015 albert-learning.com How to talk to your boss How to talk to your boss!!
Professor : Dr. Mark Rajai. Application Letters  Resume is a focal point in searching a job and it needs support from employment messages like Application.
Say What??????.  What are Independent and Dependent Variables?  Question: What's a variable?  Answer: A variable is an object, event, idea, feeling,
1 INSIGHT ON EFFECIVE READING SKILLS Rotimi Taiwo (PhD)
This I Believe Essay Writer’s Workshop: Introductions, Juicy Details, & Conclusions 8 th ELA St. Joseph School.
Eric Roberts and Jerry Cain
CASE STUDY BY: JESSICA PATRON.
The Tragic Hero and Identity Crisis
Introduction Artificial Intelligent.
chapter 1 chemistry: an introduction
Topic 17 assertions and program logic
slides courtesy of Eric Roberts
Business Communication
ACT Reading Test You will read 4 passages and answer 40 questions in 35 minutes. You have approximately 9 minutes per passage.
ACT Reading Test You will read 4 passages and answer 40 questions in 35 minutes. You have approximately 9 minutes per passage.
Presentation transcript:

CS 106A February 8, 2009 The Psychology of Debugging

The Discovery of Debugging Maurice Wilkes, lecture on “The Design and Use of the EDSAC,” September 23, 1979 — “As soon as we started programming, we found to our surprise that it wasn’t as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.” Maurice Wilkes, 1913-

The Importance of Psychology Gerald Weinberg, For programming is not just human behavior; it is complex human behavior. Although programming is a form—a complex form—of human behavior, few people have studied programming from this point of view. But perhaps there is a reason why programming has not been so viewed? Perhaps programming is too complex a behavior to be studied and must remain largely a mysterious process.

The Psychology of Debugging Gerald Weinberg, The Psychology of Computer Programming, 1971 — First, there is only the gestalt, a general feeling that something is out of place without any particular localization. Then follows the ability to shake loose from an unyielding situation—the ability to change one’s point of view.... Then, however, one must go from the general to the particular—“focusing” as it was called here. Although one does not find errors by a detailed search of each line, word, or character, the ability to get down to details is essential in the end. Thus, for debugging, an almost complementary set of mental powers is needed. No wonder good debuggers are so rare!

Example of a Psychological Barrier As an illustration of the kind of psychological barrier that novices encounter when debugging, most students when faced with a bug set out to determine why their program isn’t doing what it’s supposed to be doing. In general, this strategy is less effective than trying to figure out why the program is doing what it is in fact doing. In all likelihood, understanding why the program is behaving as it does provides precisely the insight necessary to repair it.

Roles in the Programming Process Programming requires you to assume a variety of roles over the course of the development cycle: Design Coding Testing Debugging Architect Engineer Vandal Detective

Sherlock Holmes on Debugging There is nothing like first-hand evidence. A Study in Scarlet, 1888 — It is a capital mistake to theorise before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts. A Scandal in Bohemia, 1892 — It is of the highest importance in the art of detection to be able to recognize out of a number of facts which are incidental and which vital. Otherwise your energy and attention must be dissipated instead of being concentrated. The Adventure of the Reigate Squires, 1892 —

Literary Sources of Debugging Wisdom Regard with distrust all circumstances which seem to favor our secret desires. Émile Gaboriau, Monsieur Lecoq, 1868 — With method and logic one can accomplish anything. Agatha Christie, Poirot Investigates, 1924 — A great detective must have infinite patience. That is the quality next to imagination that will serve him best. Indeed, without patience, his imagination will serve him but indifferently. Cleveland Moffett, Through the Wall, 1909 — Detection requires a patient persistence which amounts to obstinacy. P. D. James, An Unsuitable Job for a Woman, 1972 — It was always more difficult than you thought it would be. Alexander McCall Smith, The No. 1 Ladies’ Detective Agency, 1998 —

And Best of All... The best discussion I have ever encountered of the psychology of debugging occurs in Zen and the Art of Motorcycle Maintenance by Robert Pirsig. In Chapter 26, Pirsig introduces the idea of the gumption trap, a psychological barrier that stands in the way of understanding the solution to a problem. Gumption traps occur frequently in computing, usually in the context of the debugging phase.

Lest the Title Put You Off Robert Pirsig, “Author’s Note,” Zen and the Art of Motorcycle Maintenance — What follows is based on actual occurrences. Although much has been changed for rhetorical purposes, it must be regarded in its essence as fact. However, it should in no way be associated with that great body of factual information relating to orthodox Zen Buddhist practice. It’s not very factual on motorcycles, either.

The End

Example of a Gumption Trap Robert Pirsig, Zen and the Art of Motorcycle Maintenance, 1971 — Of the value traps, the most widespread and pernicious is value rigidity. This is an inability to revalue what one sees because of commitment to previous values.... The typical situation is that the motorcycle doesn’t work. The facts are there but you don’t see them.... This often shows up in premature diagnosis, when you’re sure you know what the trouble is, and then when it isn’t, you’re stuck. Then you’ve got to find some new clues, but before you can find them you’ve got to clear your head of old opinions. If you’re plagued with value rigidity you can fail to see the real answer even when it’s staring you right in the face because you can’t see the new answer’s importance.