Debug Better: 2017 Edition

*
Accepted Session
Short Form
Intermediate
Scheduled: Thursday, June 22, 2017 from 3:45 – 4:30pm in B202/203

Excerpt

Debugging: the schedule destroyer, the confidence sapper, the mire in which thousands of working hours are lost every day. It’s time to stop staring at those four lines of code, desperately willing the solution to appear. This session is about the strategies that will steer you around bugs, tactics for dealing with them, and tools that can shorten a four-hour debugging session to five minutes.

Description

Have you ever:

  • Spent hours staring at the same block of code, trying to work out where the bug was, only to realise that it’s actually somewhere else?
  • Littered your code with print statements, trying to locate a bug, then deleted them all, then put them back in for another bug later?
  • Checked in those print statements accidentally?
  • Been told that IDEs are for wimps, but secretly wondered what the attraction is?
  • Looked at your language’s debugging tools, wistfully thought about memorizing the obscure commands they need, then gone back to print statements?
  • Wondered if all the debugging means that you’re not a good coder after all?

Stop wondering. All code has bugs, and all coders fall victim to them. You can’t predict what kind of bugs you’ll get, but you can arm yourself against their mischief. Even better, with the right coding strategies in mind, you can avoid many of them entirely.

This is a ground-up reworking of my 2013 OSB talk on the same topic, now with huge amounts of new material! New tools, new tactics, new ways to make your practice better.

We’ll be looking at:

  • Why bugs happen, even to the best of us
  • The common bug types we fall into again and again
  • Software engineering strategies for preventing and containing bug damage
  • How to dive into the unknown when diagnosing problems
  • What to look for when choosing languages and frameworks
  • Some great tools that free up debugging time for much nicer things instead
  • Debugging your production environment

The main language I’ll use in examples is Javascript, but I’ll demonstrate some others, and the techniques under discussion apply to all languages.

You can code amazing things. Don’t let the bugs drag you down!

Tags

debug, debugging, debuggers, errors, defects, error messages, javascript, elm, visual studio code, logging

Speaking experience

I gave an earlier version of this talk at Open Source Bridge 2013: https://www.youtube.com/watch?v=2hoL3WmgUI8
(The new version is substantially reworked and will be at least 50% new material)

I've spoken at O'Reilly's ETech (2006, about Ning http://www.christine.net/2006/03/ning_a_playgrou.html and microformats http://microformats.org/wiki/events/2006-03-07-etech-microformats ) and OSCON (2011, with Alex "Skud" Bayley: http://www.oscon.com/oscon2009/public/schedule/detail/8376 )
Also at FOO Camp 2005, BarCamp Palo Alto 2007, and at Noisebridge's "5 Minutes Of Fame" on the topic of Winamp, which you can watch here: http://www.ustream.tv/recorded/27058148 (starts about 18 minutes in, lasts 8 minutes)

Speaker

  • Yoz Grahame

    18F, General Services Administration

    Biography

    Yoz does troubleshooting, debugging, web app wrangling, legacy untangling, hand waving, architecting, listening and nodding. He’s been doing it professionally for over 20 years. He currently does it for 18F, which is a new part of the US Government that’s trying to improve how the rest of it works. The end result, we hope, will be much more usable and responsive services for everyone.

    Previously he contributed to such bizarre and frankly silly projects as Second Life, Dio, Ning, lots of Douglas Adams-related things (h2g2, Starship Titanic, douglasadams.com and the Hitchhiker’s movie), a lean & agile consultancy called Neo Innovation, some MySociety civic-engagement tools (WriteToThem, TheyWorkForYou), The IT Crowd and Limmud. His amateur wrestling name is “Dr Henry Metzger”.

    Sessions

      • Title: Debug Better: 2017 Edition
      • Track: Theory
      • Room: B202/203
      • Time: 3:454:30pm
      • Excerpt:

        Debugging: the schedule destroyer, the confidence sapper, the mire in which thousands of working hours are lost every day. It’s time to stop staring at those four lines of code, desperately willing the solution to appear. This session is about the strategies that will steer you around bugs, tactics for dealing with them, and tools that can shorten a four-hour debugging session to five minutes.

      • Speakers: Yoz Grahame