Live Coding - Good or Bad?

So I was at Prairie Dev Con last week, giving a few talks. David Wesst was right before my Win 8 with HTML/JS talk and totally nailed his HTML5 talk. It was entertaining, had flashy demos, and really got the point across. After that he came to me and we started talking about “live coding” in presentations.

img from Dave’s Page of Art and Programming – live coding for a concert!

Well, it was more he was telling me his thoughts on it. The conversation started by asking if he should stick around for my Win 8 talk, or go to a more “work-related” session. He then told me about his new presentation style where he just shows the code and the demo. According to him (and possibly others?), watching a presenter write code is boring – we do this on a daily basis, what’s there to gain to watch someone type into Visual Studio? (paraprahsing).

I didn’t really have the heart to tell him my Win 8 talk was about 60% live coding :) But it was, and most of my presentations that focus on coding concepts are. For me, I always thought live coding in a presentation accomplishes a few things. It captures the audience’s attention with moving screen content (compared to static slides). It instills a sense of “you can do it too – look how easy it is!”, and in the same breath it shows that there’s not a lot of complicated setup – often I find demos that only show pics of the code aren’t actually showing the whole story, hiding setup and configuration steps that may be crucial.

That being said, some things need to be copy-paste demos or pics of code. Part of Dave Paquette’s talk on Entity Framework Code First for example involved setting up some POCOs – he manually typed through one or two of them, and then just copy-paste’d the rest of them in to save time. Perfectly acceptable. Glenn Block and I had a quick tweet on this subject when he referred to a workshop he ran – he had so much content to go through that live coding wouldn’t have been feasible.

Another example is David Wesst’s talks on HTML5 – really, he was presenting simple HTML, JS, and CSS. Watching him type that out probably would have been boring! That said, he had some really interesting demos that showed the code and the result of that code executing.

On the flipside, there’s presentations that have only pictures of code. Jeff Pihach gave a few presentations at PrDC about YUI and Extensible JavaScript – the presentations were great and had a lot of content, but they were all just screenshots of code. I didn’t get quite the same experience compared to a presentation with demos or live coding – we basically just had to take his word that the code snippets worked. For myself, I didn’t come away with that presentation with more than the feeling that YUI was verbose and there was a lot of complexity to extensible JavaScript (I gave this feedback in my session review form).

Of course, this is all just my opinion. In the end I really think it boils down to your target audience and the outcomes of your presentation. I’d be really interested in hearing other’s opinions on the subject – if there’s an overwhelming opinion against live coding, I’d definitely take that into consideration for my future talks.

Comments