
Doitlive, a tool for live presentations in the terminal - robin_reala
https://doitlive.readthedocs.io/en/latest/
======
masukomi
I've used this before and it works well, but I can only kind-of recommend it.

If you are doing a presentation at some large conference where people will not
be interrupting you with questions as you do your presentation, then I would
recommend it. HOWEVER most of us do presentations to smaller more informal
groups: coworkers, local coding meetups, etc. In those situations people are
more likely to interrupt you and ask you something that would normally be
doable IF you weren't running a script

So, IF you're going to use this in an interruptable situation I would strongly
recommend mentioning BEFORE you start, that you are executing the commands
live, but that you're using an interactive script to do it so that you don't
screw anything up. Otherwise you look like a fraud when someones like "what
about X" and you're all ... "well yes, but i can't do that right now because
while it looks like I've been typing these commands, in reality I've been
deceiving you and can't break out of this script or everything goes awry...
but yes i could do that.... if i wasn't pretending i was actually typing this
stuff." And yes, I'm speaking from experience, although i used different
words. It's really awkward. Don't do it.

~~~
remram
It seems to me that this could be improved with a few handy shortcuts.

Because it is actually running your commands in an actual interpreter,
executing unplanned commands is only a problem because you can't input it.
Having a few keystrokes to go back, edit/enter a command, go to line N, would
make this problem disappear.

Or do it the other way, and have a keystroke insert the next line from your
script. Like Ctrl-R, but at the speed of my typing.

------
tyingq
If you're having trouble visualizing what this does:
[https://www.youtube.com/watch?v=u4_UhFloISY](https://www.youtube.com/watch?v=u4_UhFloISY)

~~~
trendroid
Comment on youtube:

>How does Jordi type commands so quickly?﻿

I did wonder while watching the video if I would have thought the same thing
if I wasn't coming from this thread. It was a little too subtle I guess.

~~~
jordigh
I've wondered if the gimmick distracts people from the presentation. It's a
comfortable way for me to present the talk, but maybe it's not so good for the
people following along.

------
haswell
I speak at conferences/developer meetups on a regular basis, and this is
intriguing.

I have two primary concerns:

1) When you’re doing a live presentation, making the occasional mistake is not
only expected, it helps prove that what you’re doing is really live. With a
tool like this, everything might be TOO perfect. Might have to start
incorporating intentional flubs into the script to make things authentic.

2) I haven’t tried this out yet, but I wonder what happens when something goes
wrong. I’ve had too many live situations impacted by some unforeseen thing.
Forgot to clean up the working directory last time I ran the demo, or who
knows what. I’d want to have the ability to take over the controls if needed.

And of course, the antidote to #2 is having very carefully planned repeatable
steps with a “cleanup” at the beginning or end to prep for the next time
around.

All said, very cool, and I’ll be trying this soon.

Edit: Downvotes, really?

~~~
decafb
The problem is while presenting my IQ is 20 points lower. I suppose this holds
for many people. There are too many presentations on youtube which spend
minutes just fixing typos.

I agree a few seem authentic but soon it just feels like a waste of time — and
break in the flow of presentation.

~~~
LeifCarrotson
I'm not sure about the 20 points number, the effect feels much larger. Perhaps
if you simultaneously apply a 20% penalty to hand-eye coordination, balance,
facial expressions, typing skills, enunciation, penmanship, memory/recall,
creativity, etc. you could accurately represent my skill as a human being
while presenting.

~~~
kpil
It's a truth universally acknowledged, that a man in possession of a keyboard
is guaranteed to spot spelling errors and trivial errors absolutely last of
everyone watching.

------
bazzargh
I wrote one of these hackertypery-presenters a while back:

[https://gist.github.com/bazzargh/a267b97a52f7a1f70c46](https://gist.github.com/bazzargh/a267b97a52f7a1f70c46)

some slight differences; doitlive drives recording for you; I used ttyrec, so
you get some more natural typing, like me editing the command line. I set it
up so events within 20ms are fired by a single keypress; this makes for
quicker typing in the replay while letting you insert natural gaps between
commands. NB if your command output is slow, you'll need to type to make it
replay, which is a bit weird.

The other thing is, I used this to intersperse the 'demo' portions with slides
(the slides were just 'echo some text|figlet' recordings). In order to support
multiple files like this, at the end of each recording, you need to press
'return' to move forward; but also, you can press backspace to go back to the
start of the current script, or if at the start of a script, backspace again
will jump to the start of the previous one.

------
breadbox
Interesting, but isn't this kind of the opposite of "do it live"? I would
think "lip synch" would be a better name for it.

I've done a couple of live presentations in my career (in fact I just did one
last Friday). I think they're great for audiences, when the circumstances
permit. People connect to the physicality of the typing in a way that looking
at some screenshots just doesn't provide.

~~~
jordigh
Well, it runs the commands live. With whatever bash environment you have at
the moment you run it. And you can type at whatever speed you want, so there
is a certain liveness to it.

------
ohthehugemanate
This looks like great fun - I speak at conferences, and I can tell you that my
next demo is going to involve coding with my elbows, feet, and probably butt.

------
meop
I prefer using asciicinema. It's perfectly OK to use a recording but no need
to hide it.

~~~
justinsaccount
I like making recordings too, but they are annoying to update/recreate when
the expected output changes.

I found spielbash[1] recently which helps you automate asciinema recordings...
though it was a bit broken and I ended up forking it and re-writing most of it
[2] and adding a bunch of new features.

There's probably a way to merge the two ideas and have a way to automate live
demos as well as have a mode that just spits out a asciinema recording.

[1] [https://github.com/redhat-cip/spielbash](https://github.com/redhat-
cip/spielbash) [2]
[https://github.com/justinazoff/spielbash](https://github.com/justinazoff/spielbash)

~~~
andrenotgiant
Nice! I'm glad you posted.

I forked spielbash in order to add an option that lets it read `cloud-init`[1]
YAML as input, and also noticed there were opportunities to improve the
original. Will see if I can jump over to your fork.

[1]
[http://cloudinit.readthedocs.io/en/latest/](http://cloudinit.readthedocs.io/en/latest/)

------
otterpro
I am an introvert, like a lot of coders, and having to give a presentation in
front of a live audience, and in addition, writing code (or doing demo) at the
same time, is a LOT of pressure. It's hard enough to try to remember what I
need to say, and my mind would sometimes go blank, sometimes trying to
remember what I did wrong when there's unexpected error or forgetting a
function name or parameters, etc.

It might also useful for for screencast recording / Youtube tutorial. Bisqwit
has his own tool, running on DOS, that does something similar, which mimics
him typing code on the editor.
([https://www.youtube.com/watch?v=5Da6ZyQJjE0](https://www.youtube.com/watch?v=5Da6ZyQJjE0))

~~~
makapuf
I really like bisqwit presentations and videos, often mindblowing. However i
really dont see the point of scripting typing code. For command-line like here
sure why not. But for code there is no point. If I'd much rather see blocks of
code copy pasted and explained orally or just going through existing code -
maybe several versions more and more complex - with someone explaining it. I
don't see the value of some c++ code being typed very fast and accelerated.

------
l8again
Very cool indeed. Nit: I think the page can use some cool gifs showing off how
the tool is used. Gifs are worth thousand words.

~~~
sloria
Done!

------
narendraj9
I saw this a few hours ago and here it is in Emacs:

[https://github.com/narendraj9/dot-
emacs/blob/master/packages...](https://github.com/narendraj9/dot-
emacs/blob/master/packages/rest/livemacs/)

:)

I haven't implemented the next-position function for shell yet.

------
hashkb
I have always used [http://man7.org/linux/man-
pages/man1/scriptreplay.1.html](http://man7.org/linux/man-
pages/man1/scriptreplay.1.html)

How is this different/better?

~~~
Daneel_
It looks like this one only outputs when you type on the keys - you have
direct control over the replay speed, rather than having it play back at the
speed you 'recorded' at with scriptreplay.

Reminds me of hackertyper: [http://hackertyper.com/](http://hackertyper.com/)

~~~
hashkb
Oh I did always love hackertyper. I suppose I'm convinced.

~~~
Cthulhu_
Run `doitlive` with `-s 3` to show off your turbo hacker skills :D

------
voltooid
Can't not think of that one news anchor yelling "do it live" with a bunch of
expletives.

~~~
rightos
[https://www.youtube.com/watch?v=O_HyZ5aW76c](https://www.youtube.com/watch?v=O_HyZ5aW76c)

~~~
visarga
That was awkward.

------
decafb
also needs a nod to
[https://github.com/rfk/playitagainsam](https://github.com/rfk/playitagainsam)
which comes with a javascript player that can be embedded in presentations.

Love the effect with a clickety keyboard ;)

------
throwawaysml
I've used
[https://github.com/jaspervdj/patat](https://github.com/jaspervdj/patat) for
the same purpose in the past. Nice to see there are more options.

------
Dowwie
First thing I wondered was, "How does this compare to asciinema?"

First difference seems to be that do it live allows manual control of
progressing through the session where as asciinema doesn't.

What else?

~~~
StavrosK
asciinema actually records output, this relies on the environment being
exactly as it was the first time you ran it. If one command fails or has
different output, other things might not work.

This also cannot follow cli sessions. If you open, say, a REPL, you're on your
own.

That said, I would love for asciinema to get some "type to progress"
capabilities.

------
woodrowbarlow
nit: i don't think the session files should have the .sh file extension, since
they aren't executable shell scripts.

~~~
Cthulhu_
They're not? Looks like an executable script to me (in a simple demo script),
it's just missing the `#!/bin/bash` header. Might be an idea to add that.

But giving it its own extension might be a good idea either way.

~~~
woodrowbarlow
it looks like doitlive supports inline python blocks. having these in your
session file would causing a parsing error if you tried to run it as an
executable script.

------
rambojazz
Is there any demo (screenshot or video) somewhere?

~~~
sloria
I've added a gif to the docs and the README.

------
DroidX86
Ha ha this is pretty awesome!

------
dotdi
In one word: neat.

~~~
zamber
Word quota exceeded. Please correct your message ;).

