The Holy Grail of Conference Talks: Live Coding

The Holy Grail of Conference Talks: Live Coding

If you’ve ever been to a code-focused conference before, you can surely attest to the fact that the number of live-coding talks is incredibly low. The reason why is obvious: they’re super, super hard! Imagine coding on stage in front of hundreds of people, when, all of the sudden, something goes wrong, and your code breaks! In real life, a few minutes of debugging is a non-issue. On stage, even a single moment of silence is a speaker’s nightmare.

So, should we never attempt such talks? Absolutely not! You simply have to prepare in the right ways. I’ll provide a few tips in this article.

What’s Live Coding? This refers to a style of presentation, where the speaker limits the number of his or her slides, in favor of writing the examples or demos in real-time. It’s an incredibly dangerous style of talk, yet can offer significant benefits for the audience.


Tip 1 – Make a Decision

If you’re the nervous type, this may not be a good choice.

Certainly, when preparing a new talk, the most important question to ask yourself is if there’s any value in doing a live-coding presentation. For example, if you’re merely providing a variety of examples, do you truly need to code those in real-time? Would a well-presented slide not work just as well, while relieving you of some stress, and the potential for breakage?

You might consider taking the live-coding route in the following instances:

  • Your code samples require context to be as effective as possible.
  • You’re hoping to present your topic in a workshop style.
  • Your talk focuses on workflow, in which case a slide-based layout isn’t optimal.
  • You enjoy living on the edge.

Personally, I’d urge you to reach for the slides, unless you can provide a good enough argument as to why they won’t be as effective. Live-coding requires a significant amount of preparation, as well as backup plans, to counter any potential roadblocks that may arise as you code. Keep that in mind. If you’re the nervous type, this may not be a good choice.


Tip 2 - Practice, Practice, Practice

Practice. Practice. And, when you’re done, practice some more.

Clearly, every talk should be rehearsed at least once or twice before being given in front of a live audience. However, if you intend to code in real-time, as a basic rule of thumb, triple the number of rehearsals. Code your way through the talk once, and then repeat the process; the more repetitions, the better!

When speaking on stage, you should fully expect to blank at least a few times.

  • What was I supposed to say next?
  • Is it time to switch slides yet?
  • I have no idea what I’m doing up here!

These insecurities exist in all speakers. The easiest way to prevent as many errors as possible is to know the subject matter (and how you will present it) as well as humanly possible. Practice. Practice. And, when you’re done, practice some more.


Tip 3 – Create a Backup Plan

Your first step should be to expect the worst.

So you’ve decided to push forward with a live workshop-style presentation. Good for you! Your first step should be to expect the worst. Ask yourself, “What happens if I completely crash and burn? What if my mind blanks?”

I always save a copy of the finished project ahead of my talk. That way, should the stage drop out from under me, so to speak, I can always make a casual, self-deprecating joke, noting how I’m clearly not talented enough to execute this style of talk. Then, I can quickly switch over to the finished code, and do my best to continue on from there.


Tip 4 – Snippets Are Your Friend

I religiously use a Mac app, called Dash.

Additionally, consider creating a variety of smaller snippets, which can represent everything from a single function, to a bit of HTML, to a CSS ruleset. Doing so can serve a few different purposes:

  • Don’t make the audience watch you type a particularly intricate piece of code.
  • If you’re moving along in your talk quite nicely, but happen to forget a line or two, it only takes a second to replace the last two lines you wrote with the finished snippet. This way, you can prevent a potentially embarrassing moment on stage, without the audience realizing.
  • The simple fact that you have a variety of backup snippets for your code can help provide a great deal of confidence.

I religiously use a Mac app, called Dash, however any text expander (or even your code editor’s snippet creation functionality) will do the trick nicely.

Dash Snippets

Tip 5 – Plan Your Content Well

Think of every line as mental debt.

Remember: live coding is not an excuse to demonstrate how smart you are, or how quickly you can maneuver around your code editor. The end goal is, of course, to teach the audience something that they didn’t know before you stepped on stage. With that in mind, do your best to structure the code that you write in a way that doesn’t overwhelm the audience. Admittedly, this requires a bit of tinkering to achieve the perfect balance.

As a guideline, always opt for the simplest route through your code. If a piece of logic is not vital to what you’re attempting to pass on to the audience, then cut it out (perhaps with a quick warning that, in a real world project, you’d likely add a bit more here and there).

Do your best to be incredibly sensitive to each line that you write over the course of your presentation. Think of every added line as mental debt. The audience is a sponge; eventually, they’ve soaked up all that they’re capable of in one forty-five minute sitting. Keep it simple.


Tip 6 – Shake it Out

Speaking on stage is a scary experience. Coding on stage is even worse!

There’s no two ways about it: speaking on stage is a scary experience. Coding on stage is even worse! If you’re the nervous type, find some way to remove excess energy an hour before you go on stage. The less built-up energy you have when speaking, the less likely that your hands will shake uncontrollably. Here’s a few tips:

  • No caffeine twenty-four hours before your talk.
  • During the talk that comes before yours, excuse yourself to the restroom. Shake your hands back and forth rapidly, and run in place.
  • Make the bathroom faucet as hot as possible, and stick your hands under the water for five seconds. Repeat this process several times to loosen your fingers. This is particularly helpful in cold climates.

Tip 7 – Don’t Forget to Talk

Avoid the tendency to type away silently on stage.

As developers, we spend the majority of our work days in silence, coding away. But, an interesting transition will take place, if you choose to try your hand at a live coding presentation: not only will you be coding, but you’ll also be talking your way through the process, verbally illustrating each line of code.

Don’t forget to keep talking! Avoid the tendency to type silently on stage. This is a one-way to ticket to a bad review. The key is to rephrase every single line of code in a manner that everyone in the audience can understand, regardless of their skill level.


Tip 8 – Cross Your Fingers

Sometimes, it all comes down to a bit of luck.

Look: there’s a reason why developers widely consider a live-coding presentation to be incredibly dangerous, and rarely successful. If not prepared for adequately enough, as soon as things go wrong (and they will), the audience will cringe, as they watch you silently, but desperately attempt to correct your mistake.

Sometimes, though, it all comes down to a bit of luck. Prepare like crazy, cross your fingers, and hope for the best. If you’re successful, you just might show the audience something that they rarely (if ever) get to see at a conference. Good luck!

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://twitter.com/rodripcg Rodrigore Campos

    Cool!, I’m waiting to see your laracon presentation. It’s seem that you made a great job as you do it in your screencast.

  • http://twitter.com/kristjanmik Kristján Ingi

    Nice. Your talk at Laracon was just amazing. It was so nice to see you planting all those errors on purpose and them fixing them afterwards to show the crowd what went wrong.

  • ibura

    Excellent read! Thanks Master.

  • http://twitter.com/rei_liit John Kevin Basco

    Excellent article! This made me more excited to watch the video of your talk on Laracon. They said you really did a great job there!

    • jeff_way

      Well enough, I think, to get the points across. But, I still have a lot to learn in this area. I rarely do these styles of talks because of the stress level.

  • http://www.miniarray.com/ Simon W. Jackson

    Great read! I’ve seen too many videos of live coding where the presenters were not prepared and *constantly* tripped over their own words.

  • Patkos Csaba

    Nice. I had a talk with live coding about TDD this week, too. Not hundreds of attendees, just about 25-30, but it was hard enough even in the quite relaxed environment we had at our meeting. I think it went pretty well, but you gave me some ideas I didn’t think about before. Thanks for the tips.

    • jeff_way

      What a coincidence. Was it recorded, by any chance?

      • Patkos Csaba

        No. It wasn’t. But as I am asked to more and more talks lately I think I will start to record my talks. Up until now I talked only on these small events (not that there are any big events in this part of the World – Eastern Europe) and I saw no reason to think too much about the talks themselves and to record them for later review. Anyway, it was in Romanian and you would understand nothing :))

  • Lasse Rafn

    The last advice is the best! (The others are great too) I once created YouTube videos (not even live) and I did not prepared anything, 2-3 minutes of the video was me trying to correct errors and saying sorry, ehmm… etc. Yet I had tons of positive feedback, subscribers and tons of views+downloads, but I was just lucky that the audience was not that picky!

  • Rory

    So are the Laracon talks going to be available for us who couldn’t travel 1000′s of miles?

    • http://twitter.com/chriscandy Christer R Austad

      As far as I know these talks will be available later this week. Guess there’s a lot of raw material that need some editing. You can follow @cborgia on twitter. He’s the guy responsible for the recording of the conference.

    • jeff_way

      Yeah – I heard next week.

      • http://www.mackhankins.com Mack Hankins

        That’s awesome!

      • Rory

        awesome

    • http://twitter.com/ben_corlett Ben Corlett

      I travelled 1000′s of miles, 9752.8 miles to be exact :P

  • rajkumar9788

    I am a big fan of yours and love all your tutorials. Thanks Jeff.

    • jeff_way

      Thanks!

  • http://twitter.com/macodev Marco Cervellin

    Jeffrey I think you have a talent for this – I’ve watched your screencasts only to admire your confidence.

  • BounasserAbdelwahab

    net tuts is nothing without jeffray!

    • http://twitter.com/drale2k Drazen Mokic

      I remember back when almost every tut was written or casted by Jeffrey, glory times!

  • http://twitter.com/joshbedo Josh bedo

    Awesome tips definitely inspires me to possibly take on live-coding talks in the near future. I started doing video tutorials on things like node.js and mongodb but it’s not nearly as hard as talking in front of a live audience.

  • shivabeach

    It has to be terrifying to forget what you are doing, the why am I up here syndrome. Some really good thoughts here. I can only imagine if Jeffery had to do all those tuts live for us

  • MPinteractiv

    I’m against live coding in conferences( tutorials are fine ;) ) , unless it is a real “class” with a lot of time. A better approach is using snippets with incremental coding( myclass.v1, myclassv2, … ). and highlighted diffs between snippets . Seeing someone coding is not interesting. Having snippets in the slides is better , you can even give people the slides before the talk so they dont miss a thing. And you can still demo the result in realtime if you want.

    • Patkos Csaba

      I agree with you if your scope is to demonstrate code in the live coding lesson. But when you want to demonstrate the process, than it has to be live. How could you effectively demonstrate TDD or Pair-Programming without actually showing your audience the steps you take and the reasoning you do before each step?

      • jeff_way

        Yeah, particularly for talks on TDD, I don’t know any other way. Slides with assertions aren’t helpful.

  • Nicklas

    Anyone got links to some good live coding conferences?

  • urbgimtam

    Maybe a good practice should be to make video tuts like Jeffrey (they’re marvellous, let me tell you). He types a lot, teaches a lot, and always manages to maintain a very good rhythm across the whole presentation. And you have a bonus of watching back, and evaluate your performance. It’s not live, but for me it’s always been a nice step in the right direction.

  • http://cubicleninjas.com/ Tyler Etters

    This is like the next level of performance art. Teaching + theatre + coding! Exciting. I would love to do this someday. Also, check out Max/MSP performances on youtube. Really cool stuff.

  • http://www.facebook.com/ehap.hamdy Ehab Hamdy

    Great talk Jeff, your are awesome
    Thanks

  • http://twitter.com/paul_the_kelly Paul Kelly

    As a live coding presentation veteran, I would suggest you add Tip 8 – Find a (good) Code Monkey. Code Monkey is the tongue-in-cheek name for whichever of your respected colleagues does the typing and the coding while you speak. It does mean the two of you have to practice in advance, and have a good deal of respect for and trust in each other as you are now relying on two people *not* to make each other look foolish. But when it works you can give a much better live commentary on what’s happening while your colleague types, and you avoid those long embarassing silences for thinking time. You need the flow of the demonstration well-scripted between the two of you, but there’s always room for a spot of improvised chat to keep it feeling spontaneous.
    A lot of our presentations were “look how productive our tools are”, so live coding was a must.

    • jeff_way

      Yeah, that’s good advice.

  • http://dan.cx/ Daniel Lo Nigro

    Lea Verou’s presentations are some of the best examples of live coding I’ve ever seen. She does such a great job!
    eg. http://vimeo.com/31719130 and http://www.youtube.com/watch?v=3ikye7Qc7Ak

  • chotu

    hey its really good post

  • http://twitter.com/edwardjbeckett Edward Beckett

    This is a fantastic post … It’s quite important to know your limits … you may be a brilliant coder yet terrible at public speaking, presenting, etc ….

  • Akhil Gupta

    Your content is always awesome .. Every time we find a new to read :)

  • marvin

    thanks for sharing us these tips jeff. you rock! m/ http://www.blogussion.com/

  • Osama Mursleen

    You are best speaker… i really admire your work….