Gif animations, after many years, reborn and, still, prospect well. Taking aside fluffy cats & mems about Bieber, they are, to some extent, a good tool to show code examples in a more interesting way than static images. asciinema is better Read more to find out why.

GIF images pros & cons

Pros:

  • Lightweight
  • Can be included on Github, Stackoverflow, etc.
  • Better than static images

However, they also suck.

Cons:

  • Animation can be too fast (some guys include slower version)
  • Not ‘good–enough’ to display longer examples
  • Quality can be a bottle neck for ‘more–rich’ examples

Meet asciinema and share your terminal sessions, the right way

The right way. Period. Some time ago while discussing with Szymon Wrożyński better documentation for Vim-CtrlSpace, asciinema seemed to be the best tool for making short screencasts.

The possibility to convert them to GIF (with relatively good quality) was tempting—asciinema2gif could do that for us. Now, (un)fortunately, with recent changes to asciinema player, asciinema2gif didn’t catch up. ;)

Yesterday, preparing Git, shell & Vim tips & tricks for Selleo Haxorz Day I gave embedded asciicasts a try. It was worth it. See for yourself:

asciinema Pros & Cons?

Good parts:

  • Crisp quality
  • Lighter than GIF images
  • Active development
  • Open source
  • No need to upload to https://asciinema.org/
  • asciicasts can be replayed locally (more below)

Bad parts? Double check the output when displaying on projectors—I did’t and the output was kind of broken due to scaled output, or enlarged terminal. Actually—my bad.

asciinema best part—code flows without touching the keyboard!

Live coding during presentations can be a challenge (or an opportunity ;). Static slides can be dull. Embedding Youtube or Vimeo content can be risky. asciinema can, in my humble opinion, be a good trade off.

  • Well–crafted examples can be replayed safely
  • Switching between shell and (console) Vim keep asciinema rec go
  • Adjustable to bad contrast with switching color scheme

asciinema records only key sequences, not bells-and-whistles. This way when you can switch to dark or light color scheme in your terminal and Vim to have a good contrast in the classroom.

Last but not least

asciinema drew my attention and I’m going to use it more. I hope, you will also give it a spin.

PS.

read this if you’re interested how we work, interact and grow professionally at Selleo. ;)