6197 comments
2357 subscribers
Follow me on Twitter (@sachac)
Subscribe! Feed reader E-mail

The Return on Mistakes

I still remember the round-eyed awe on a first-year computer science student’s face when I walked past the monitor set into his desk, scanned his screen (upside down), pointed out the error, and nudged him in the direction of the solution. He had been trying to solve the problem by making small, random changes to his program, and he was amazed at how quickly I identified what was going on. Many of the students in the class were new to programming, and still had a long way to go before they could become comfortable with it. And there I was, figuring things out just by looking at them.

It would have been easy for the new students to feel as if they could never do what I do, so I made sure to save some time during that class session for a secret I wanted to share with them. That secret was:

If I can figure out a programming problem quickly, it’s because I’ve made so many mistakes before.

The more you program, the more intimate you become with error messages. This quote is attributed to Maurice Wilkes:

As soon as we started programming, we found out 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.

M. Wilkes

I like reading, trying things out, and making things up, so I’ve run into all sorts of errors. I also enjoy helping other people, so I’ve run into all sorts of other people’s errors, too. I haven’t encountered every single error yet (my printer has never been on fire). But I’ve hung out in IRC channels where people help other people troubleshoot in real-time, I’ve read countless mailing list posts in the process of troubleshooting something I’m working on, and I don’t mind rolling up my sleeves and getting my hands into the source code. In the process, I’ve learned some of the techniques for finding out where problems might lurk.

So that’s it. That’s the magic, really. Learn. Make mistakes. Figure things out. Help other people figure things out. Then, when weird problems come up, you can say, “Hmm. Hang on. Let me poke around… hmm… ah, there it is, the doohickey was kerfluzzled and a quick xyzzy fixed it.” Or something like that.

=)

See, all those hours hanging out on mailing lists, #linuxhelp, and #emacs in university are paying off…

Short URL: http://sachachua.com/blog/p/5443
  • http://www.RohanJayasekera.com Rohan Jayasekera

    I was once a university teaching assistant and spent a huge amount of time trying to figure out what second-year students were *really* trying to do in their programming assignments. It would have been so much quicker if I’d been able to ask them. It would also have been so much quicker to simply give a low mark (because the program was clearly never going to work), but I couldn’t bring myself to do that. These mistakes were so basic that I didn’t learn anything myself (how these people made it to second year computer science at the University of Waterloo I’ll never know), but I *hope* I helped some of them — I’ve been wondering for many years.

    • http://sachachua.com Sacha Chua

      Hello, Rohan!

      I actually quite enjoyed debugging people’s mental models. It’s a lot trickier than debugging programs. ;)

On This Day...

  • 2012: Decision review: Art class (includes sketches) — As part of my resolution to spend more on learning, I went for one-on-one art classes in a nearby studio [...]
  • 2011: Emacs, artbollocks-mode.el, and writing more clearly — Analyzing the text of my blog showed me that I use some phrases way too much. Fortunately, Emacs can shame [...]
  • 2010: More MobileOrg hacking on the Android — I’ve gotten IBM’s permission to contribute my changes back to the MobileOrg project, yay! (Disclaimer: I’m doing this as myself [...]
  • 2009: Conversations with a mentor: chat about plans, mentoring, and knowledge sharing — Conversations with David Singer are usually more laid-back, but I was buzzing with a few things I wanted to pick [...]
  • 2008: Weekly report: Week ending Dec 14 — Last week’s activities: Work: Site moved into user acceptance testing, hooray! Lots of stuff to work on. Reviewed pictures. Got tablet to [...]
  • 2007: Gnus multi-pane tricks, or I heart Planet Emacsen — The tips Joseph Miklojcik shared for reading e-mail in Gnus included this _really_ nifty thing that I hadn’t come across [...]
  • 2007: Status report: Dec 16
  • 2007: Oh, the weather outside is frightful
  • 2007: Outline for task management chapter — Why manage your tasks in Emacs - [ ] What you might be using now - [ ] Your brain [...]
  • 2007: Weekly report — The week was full of starts and stops and starts again. I practiced Christmas carols with Mike Tsang last Tuesday because [...]
  • 2007: Salmon steak with dill
  • 2007: Sketchblogging with the Nintendo DS Lite
  • 2007: He loves to cook
  • 2007: So close!
  • 2005: Friday night — Ack! I guess I really am an extrovert now. I find it to be _dreadfully_ quiet for a Friday night. The [...]
  • 2005: Characters blogged versus bookmarks — My blogging activity is similar to my bookmarking activity, so that means that bookmarking stuff with del.icio.us doesn’t mean I don’t blog [...]
  • 2005: The Year in Bookmarks — Top 10 tags for 2005 productivity(104) web2.0(88) digitalpinay(88) social(84) useful(83) business(80) blogs(70) research(69) lifehacks(68) blogging(60) Check out my year in bookmarks for [...]
  • 2004: YDC Festival: Puppet shows — I caught the tail end of a puppet show carried out with store-bought dolls: Barbie, Billikin… I was surprised at how [...]
  • 2004: Refactoring Planner annotation code — Many planner files just contain code for creating hyperlinks from the current buffer. This does not have anything to do with [...]
  • 2004: Factors for idea growth — From ParaMode in ZhurnalWiki : But the history of Para mode does highlight three deep sources of power that, in one form [...]
  • 2004: Updating the timelog — I often update my task descriptions. We haven’t found a neat way to do this in-buffer, so I use planner-edit-task-description. However, [...]
  • 2004: Kanji for the day — 初めて会う人と話す時、緊張しないで頑張ってきださい。 はじめてあうひととはなすとき、きんじょうしないでがんばってください。 hajimete au hito to hanasu toki, kinjou shinaide ganbatte kudasai. 頑張ってきださい。| Try your best. 緊張しないで頑張ってきださい。| Try your best not to be nervous. 話す時、緊張しないで頑張ってきださい。| [...]
  • 2003: Perl for Windows administration — - Keith_M: One that I use quite often is Win32::AdminMisc by Dave Roth. www.roth.net - Keith_M: Win32API::Net - Keith_M: Win32::Lanman
  • 2003: Oooh, cool way to split — use Text::ParseWords; @new = quotewords(",", 0, $text);
  • 2003: Cultural differences between UNIX and Windows — http://www.joelonsoftware.com/articles/Biculturalism.html E-Mail from Gino LV. Ledesma
  • 2003: Useful Perl resources — - http://learn.perl.org/ - http://www.perlfect.com/articles/ - http://apprentice.perl.org/ - http://www.stonehenge.com/merlyn/PerlJournal/ - http://learn.perl.org/library Teaching.Perl
  • 2003: More stuff from visiting professor — How do you pronounce your name, Dr. Nievergelt? (Neevergelt) - Let me see if I understand your teaching approach. You develop passive [...]
  • 2003: Perl training — Plan: - Day 1 morning: What is Perl? Lay of the land - Day 1 afternoon: Basic syntax, Perl for extracting data - [...]
  • 2003: Hey, more thoughts on kara — Finite state machines are perfect for pen and paper, because students can check it manually – and they can enlist their [...]
  • 2003: Moving computing into the basics — Mathematics users – elementary mathematics, technicians have more mathematics. So the mathematics teachers could say all we have to teach our students [...]
  • 2003: Meeting with Dr. Juerg Nievergelt — - Advocates strong mathematical approach in first year - Upcoming split - Computational science – common math: numeric and symbolic computation (6 [...]
  • 2003: More about group reviews — Perhaps setting up this kind of tutoring in-class is a good way to encourage student interaction and close the gap between [...]
  • 2003: Recipe from [[bbdb://Aadisht][Aadisht Khanna]] — 1. Set Capsicum, Minced Meat, Sweet Corn, Cheese 2. Slice off capsicum tops. 3. Scoop out capsicum innards. 4. Stuff Capsicum with (Cheese&&(Minced [...]
  • 2003: Backlog: Fish – 2003.12.15 — - Find small sections of fish. I haven’t gotten around to eating fish bellies yet, although many people swear by [...]