https://techcrunch.com/wp-content/uploads/2015/04/codecode.jpg?w=730&crop=1

The Art of Live Coding

People often relate live coding with a receipe of disaster. Due to this belief most presenters play it safe by staying away from live coding during their presentations and lean towards slides.

I have been live coding in presentations for more than a decade. Almost all of my presentations are live coding sessions. Live coding does take an amount of courage and confidence, but when executed correctly it can work wonders. In this post I will discuss lessons I have learned during my live coding presentations.

Practice

This goes without saying, practice practice and more practice. Practice makes perfect and there is no substitute for a good practice. You should know exactly what you are trying to demonstrate and how the flow of your presentation will unfold. Even if you are an expert in the technology make sure you practice your presentation.

Backup

It is always a good idea to have a backup of your running code. Hopefully, your live demo will run smoothly but if you forget something then you will always have backup code to consult.

Small Bursts of Code

This is the essence of a great live coding demo. No one is attending your talk to see you type. Make sure you type small amount of code to produce an output. Ideally, you should be able to showcase a component or part of your demo by typing only 4–5 lines of code.

Stuck, Move On

If you are stuck on code that does not work then consult your backup. If you cannot fix it using backup in under 10 seconds then move on. Don’t stand in front of the audience trying to troubleshoot the issue. Every single second you are trying to resolve the problem feels like an eternity to your audience members.

Don’t Take Requests

I am not sure how common is this in other parts of the world but in Houston this is very common. Every now and then you will get a person in your talk who will continously ask you to add features while you are live coding. The best way to deal with those people is simply tell them that the code will be available after the talk and they are free to add the features themselves as an exercise.

Questions Later

Sometimes you have a lot of demos to show and you simply cannot afford to answer all the questions during your presentation. In those cases it is best to tell the audience members before the start of presentation that you will be taking questions at the end and you will even be available after the session to help them out.

Be Prepared for Armageddon

If you have demos that requires an internet connection to work then make sure you have some sort of backup in case there is no internet connection. Usually, it is a good idea to record a small video of your running demo, which you can use in case SkyNet brings down the whole internet.

Live coding during a session/presentation is not easy. That is the main reason not many people do it. It takes special skills, confidence and courage to perform a successful live coding session. In the end I view live coding as an art which takes a lot of practice to develop.

Do you live code in your presentations? I would love to hear your tips!