My workflow and setup

In my day to day life as an Astrophysics PhD student I make heavy use of linux systems and spend many hours within terminal environments and running things on servers. Over the years I’ve created a nice workflow and setup to make things a bit easier, and below is a bit of a write up of this.

## ZSH + oh-my-ZSH

Since I do much work from within a terminal, I want a shell that works with me. I found ZSH to be a good choice. Specifically the community driven oh-my-ZSH framework provides many convenient plugins and extensions to ZSH that really make the terminal experience a lot more pleasant.

## FZF

Another very useful tool is FZF, a fuzzy finder for the command-line. This tool provides very handy auto complete functionality for the input of many other tools, allows searching in directories in a convenient way, and especially the command history search is really accelerated by it.

## TODO TMUX + addons

## pyenv & pyenv-virtualenv

Most of my coding is in Python, and since I have many projects, including public packages with different versions, I want to be able to switch between Python versions and virtual environments often and quickly. To enable this I use Pyenv and Pyenv-virtualenv. Pyenv is a tool to handle python versions without the need to touch any of the system-Python versions, and is basically a solution to the struggle of managing Python versions. Very convenient, and easy to set up. Pyenv-virtualenv is a Pyenv plugin to manage the virtual environments, which lets you create venvs for any Python version very easily.

## Git pre-commit hooks

I’ve recently started using Git pre-commit hooks, which is the concept of running certain functions before a commit to Git is actually handled. The tool pre-commit provides a convenient way of downloading and configuring these hooks. I use these to format and clean my Python code, and inform me of anything that doesn’t adhere to the PEP standards. This ensures that only well-written and well-formatted code is actually pushed to my repositories.

## Emacs + Org

For all my note-taking, minutes, and project related writing I use Emacs + Org-mode. With the help of org-capture it is very easy to quickly set up a new notes file or entry for e.g. a meeting, a journal entry or a topic that I want to write about. I’ve written some more about this in my notetaking post.

I’ve been using Emacs since my PhD and over that time my setup has become quite something, but since my configuration is a hot mess I will clean it up before I share my dotfiles and Emacs config. Notetaking

For more formal documents like papers or theses I do use Latex, but even then I try to stay within Emacs, and I use AUCtex as my latex environment within emacs.

David Hendriks
David Hendriks
Visiting Researcher Astrophysics, Research Software Engineeer

My research is on stellar astrophysics and the formation of compact objects, but I’m interested in many science related topics!