2020: My Year in Emacs

Other than the very fabric of society being torn apart, and other than the silver lining of getting to spend so much time with my wife and 2 year old daughter, the big theme of 2020 for me personally was Emacs.

I started using Emacs during winter break either sophomore or junior year of college (either 2005 or 2006). At the time, I was working in various computer labs on campus. I had figured out how to SSH into the engineering computers, which had Matlab installed. It was command-line only. It was obnoxious to type commands line-by-line: if I made a mistake I often had to start all over! I quickly learned that it was more efficient to write a Matlab script and just keep re-running it from scratch. Whatever time I lost to re-running the same early steps over and over again I more than made up with the speedier development process.

That experience had such a profound effect on how I approached Matlab and programming in general. I see so many parallels between how my classmates used Matlab—issuing commands one at a time via a GUI—and how I see other data scientists use Jupyter notebooks today.

Since I was writing scripts on remote computers, I needed an editor that I could run over SSH. The options were basically vim or Emacs, and for whatever reason I went with Emacs (I think my friend Steve pointed me in that direction). It was a steep learning curve! I learned the bare minimum key strokes to do whatever I needed to do. There were certain things that I did just seldom enough that I never quite memorized the key strokes and had to look them up each time.

Later in undergrad, my research advisor made me write papers in LaTeX, and then my workflow got really fancy! I would SSH into my home computer, write papers in LaTeX using Emacs, and then use tramp to connect to the engineering workstation to run the Matlab scripts. I had configured my home computer to serve my homework folder over HTTP, so I could see the resulting PDF in a browser. I remember once I broke my server somehow and I had to run home to restart it so I could keep working. Those were fun times!

When I started working at Boeing, I was primarily using Windows. No more Emacs for me! First I did C++ development in Visual Studio for a few years. Then I did Java development for a few years and was using maybe Eclipse? I don’t really remember.

Meanwhile, I was working on my masters degree at Stanford, remotely. I would ssh into the Stanford workstations, which had Matlab installed. Same basic workflow as undergrad, but this time someone taught me how to log in with X11 forwarding (I’m not sure that’s the right terminology). So I could actually use the Matlab GUI. I quickly realized I was actually more productive without the GUI! So I kept using Emacs that way.

After I finished my masters degree in 2013, I worked at Boeing for another two years and I doubt I touched Emacs in that time. When I started at Tinder in 2015, they gave me a Mac laptop and I was done with Windows! (I don’t recall using a Windows machine since then!) I started doing Python development in earnest (I had only played around with it previously), and I decided to stick with Emacs even though they offered to buy me a license for whatever IDE I wanted.

Still, my use of Emacs was pretty basic. I maybe had 5 lines of customization in my config file. No extra packages, just bare bones Emacs. As I kept using Emacs, professionally for the first time, I slowly learned more and more customizations that improved my workflow. This was all organic: I never made a concerted effort to improve my Emacs knowledge.

Thanksgiving weekend 2019, on a lark, I started browsing the built-in Emacs manual (C-h r). I immediately saw a ton of useful functionality I had never known about! I decided to make flash cards in Anki (a program for spaced repetition I had discovered when I started studying Italian a few years ago). The goal was to practice these new keystrokes every day until they became part of my muscle memory.

I went through the entire Emacs manual, creating hundreds of flash cards which I would review every day in front of a keyboard, actually carrying out the keystrokes. When I was done with the Emacs manual, I started reading the manuals of the few packages I had adopted: Elpy for python development and markdown mode for documentation. At this point in my career I was doing a ton of python development, and I realized I had barely scratched the surface of what Elpy could do for me. I even started overwriting some of the Elpy functions to customize them for my use case! (How I use Elpy for python development is a worthy topic for a future post.)

As I was reading more about Emacs, I came across org-mode. At first I didn’t think much of it. It’s “just” a mode for writing simple notes, right? I decided to migrate my to-do list out of Trello and into org-mode. I started customizing more and more about org, creating capture templates and custom agendas. Around this time, I was furloughed from my job at Ticketmaster and took on some contracting jobs where I had to track my time. Org made this pretty frictionless and I started playing around with clock reports to make creating my invoices as simple as possible.

I also read David Allen’s book on “Getting Things Done” (GTD) during this time. The concepts of a “next action” and a “stuck project” immediately became central to the way I organize my workflows. I adjusted my org agendas accordingly. (How I use custom agendas to manage projects is also a worthy topic for a future post, but is also a moving target because I’m constantly tweaking this!)

When I started working full time at Facebook in September, I decided to keep tracking my time for no other reason than collecting meta-data about my own work habits. I wanted to be able to track how much time I spent in meetings, reading emails, working on one project vs another, and so forth. Again, org makes this frictionless! I created some custom clock reports to get better insights. At this point, the org section of my emacs init file was longer even than the Elpy section!

I now feel pretty comfortable writing my own elisp code. I have eschewed iTerm in favor of an Emacs shell (I’m currently using ansi-term, but I’d like to try eshell at some point!). I have stopped using the git command line pretty much entirely, instead using magit. I have used Emacs for 14 or 15 years now, but I learned more in 2020 than in the rest of that time combined!

What does 2021 hold for my Emacs journey? I can’t help but feel 2021 will be less Emacs-centric. I just can’t imagine there’s enough useful stuff left to learn, but who knows. And frankly I’d rather I get back to learning other things, like some of the latest python developments (I still haven’t learned about type hints) and packages (e.g. Pytorch). But I feel like everything I have learned about Emacs has made me more organized and more efficient.

2020 was an objectively horrible year. I’m definitely one of the lucky ones. I’m grateful for the extra time I got to spend with my family; I’m grateful we’re all healthy; I’m grateful I was able to find a great job. But spending some quality time with Emacs this year was pretty fun, too.

Subscribe to Adventures in Why

* indicates required
Bob Wilson
Bob Wilson
Data Scientist

The views expressed on this blog are Bob’s alone and do not necessarily reflect the positions of current or previous employers.

Related