The Dotfiles

April 6, 2016

One of the three great virtues of a programmer is laziness and it’s actually culturally acceptable that programmers are lazy by nature (not judging). Programmers write software to replace mundane and repetitive tasks and let their computers work for them instead, and that’s why, programmers have ever since created so many frameworks [aframeworkeveryday.js], libraries, and even practices only to avoid repeating work (or doing it altogether).

And in this realm of eternal laziness, programmers make backups of their system settings and coding environment, and write scripts to bootstrap and link their configuration files so they can easily setup and share them on other machines. These packages are known among programmers as dotfiles!

What are they?

First of all, what is a dotfile you may ask? A dotfile, in Unix-like systems, is a file that starts with a dot/period and hence the name. They resemble hidden files in Windows systems. If you are coming from a Unix-like system, you will find some dotfiles in your home directory by performing an $ ls -a ~ in a terminal. These are mostly configuration files. You can view them in Gnome file manager (might have a different keymap for other file managers) by pressing Ctrl+H.

Up to the Point

I’ve had my dotfiles for quite some time. Every once in a while, I refactor them, change them consistently to suit my uses, or sometimes, I completely change the way they are bootstrapped.

More recently, I noticed that my shell was pretty slow on startup. I was using Oh-My-Zsh back then and it was great but, as I mentioned, slow. I wanted to give Prezto a try around that time. And I did! Prezto was more convenient for me, a little smaller than Oh-My-Zsh, and a little faster but still, it shipped with a lot of plugins and configurations that I never used (or never knew about as far as I’m concerned). Eventually, I ended up writing my ZSH configuration from scratch.

There’s a kind of a division here between whether you should fork someone else’s dotfiles and build up from there or start from scratch. In the end, it’s all about personal taste and needs.

Good Tools Do Not Make a Good Carpenter

I have spent (and still spend) a lot of time changing and tweaking my environment to my taste and it may look like an obsessions (it probably is), let’s not forget one important thing here: using these tools to practice and write software is actually more important than the tools themselves. Although I take a great pride in my configurations and tools, I believe it is a slippery slope to let a subtask take over your time and replace the actual work.

كَيْفَ يَطلُبُ العِلْمَ مَن لَهُ حِمَار؟

الشافعي

There’s a story told about Al-Shafi‘i, a Muslim scholar, jurist, and poet who lived in the 8th century, that he had to take long walks in order to get to his lectures and classes. He said: “How could I pay attention to my classes if I didn’t have a donkey?!” and bought himself a donkey. The story goes that after sometime, Al-Shafi‘i became very occupied taking care of his donkey cleaning and feeding it that he said: “How could I pay attention to my classes if I had a donkey?!”.