git - replaying code for a hands on code presentation


So I need to conduct a workshop where I will be coding live on stage to build a demo app while the audience may follow.

First problem is my typing speed is slow and secondly we have a fixed time span in which to complete the presentation.

I have seen some youtube videos where presenters will use some magic keys and full lines will appear in the IDE without typing or they mock the typing but at a super fast speed. A big time saver.

I came across this similar question but that tool works only on windows and I am on a mac.

Another similar concept is implemented on thecodeplayer.

My best bet right now is to save each step into a git branch and keep checking out the branches as I go during the presentation.

Any better ideas? maybe even a shell script that can checkout next branch in a chronological order ? or does there exist any tool for this purpose?

EDIT: I am using IntelliJ IDEA as my IDE, just in case there is a plugin for such use cases.

EDIT2: Some other tools doing similar stuff




1 Answer: 

You are looking for a live template feature of IntelliJ. You may have used it before, for example the most known one is when you type


and then you see dropdown of options, if you hit Enter it will become


So what you need to do is to create a several of those for your presentation. Here is an IntelliJ page on how to do it. Note that you can place cursor inside of a created code block, so if, for example, you want to create a method, with one template you can create an empty method, then second template will print the method body, and so on.


More Articles

css - Presenting two paragraphs in HTML side by side

Consider the following problem: you have one text translated into two languages,First line // Unua linioSecond line // Dua linioand there's a need to display them side by side using all available space, make them accessible to search engines as separate paragraphs and allowing separate selection. Th

r - Control size of figure in Rstudio presentation

I'm creating a presentation in RStudio (.Rpres). I have a figure that is too large and extends beyond the screen. How can I reduce it?Too big, need to reduce sizeFigure 1========================================================![alt text](fig1)

Draw on second Screen using OnGestureDetection and Presentation API in Android?

Currently I have a setup which consists of a Smartphone and a pico-projector connected via MHL. I can send Images to the projector via the Presentation API with no problems. But now I came to the point, where I have to actively manipulate the second screen. I found hardly any information.Basically I

r - Line by line analysis and plotting on multiple monitors during presentation

I am preparing a presentation on data analysis and I am provided with a 2-3 monitor and projector head-up. I would like to use one monitor(+projector) for code, one monitor(+projector) for console display and one monitor(+projector) for plots. Monitors are for me, projectors for the audience. I woul

How to run a Video Presentation on Android in loop?

I have a group of Android Tablets and I need them to only run a Video Presentation as Company Gift Card.The idea of this project is the same of usually Company's Gift PENs, where the Company give to their presentation audience the information in the PEN, but this case we will have on an Android Tabl

javascript - Make programmatically presentation

I would like to know if there is a way to create presentation (other than prezi's or powerpoint's) programmatically ?I mean maybe a library or something exists in a specific language (html/css or javascript would be great) ?Thanks for the answer :)

ipad - programmatically generate ppt in iOS

For generating PDF files we can use Core Graphics. Similarly is there any framework / class that can be used for generating .ppt (power point presentation) files via code ? Or is there any third party framework for this purpose.

vba - The specified value is out of range

I am trying to display slide no. in immediate window if they even one text box with a red font word. But the following error keeps popping up. Any ideas how I can go ahead.Run-time error'-2147024809(80070057)The specified value is out of range.Code:Sub redfont() Dim sld As Slide Dim shp As Sha

html - Vertical and Horizontal alignment

I am designing an html page where I need to display my inserted images. I want the arrangement of images in such a way :Image1 Image2 Image3 Image4 Image5 Image6 Image7 Image8 Image9<html> <head> <title>Display Images</title> </head> <body> {% for image in

objective c - iOS Now Playing View Similar To Music/Spotify App

I am trying to figure out how to create a "Now Playing" view similar to the one in the Music app and the Spotify app.Here are a few images of what I'm trying to re-create:Creating the view is not the problem. The part I'm having trouble with is how to keep the view on the screen at the bottom with t