Gastón Ramos
Personal blog
What Development Environment Do You Use?
Originally written in one morning on May 31, 2024.
Leer el artículo original en español
Programming, and IT in general, requires a great deal of knowledge. That knowledge also changes over time, often very quickly. Put simply, to become a reasonably good programmer you have to learn many things—and I really do mean many. When you're starting from scratch, choosing what to learn first can be difficult. With so much ahead of you, where should you begin?
If you want to learn programming, the obvious place to start is a programming language. I strongly recommend Ruby as a first language, but that isn't what I want to write about today. I want to discuss something I rarely see people talk about: the environment. What do I mean by a programmer's environment? To me it includes the room where you work, your chair and desk, then your keyboard, monitor, and computer—and, of course, your operating system, window manager, and one of the most important tools of all: your editor or IDE.
A hacker's operating system: GNU/Linux
Let's begin with the operating system. In my view, a good hacker should use Linux, for several reasons. Much has been written about this. One practical reason is that most internet servers run Linux. When you deploy a program to production, it will probably run in a Linux environment, so it helps when your development environment resembles production.
Beyond that practical advantage, Linux is technically excellent. Its philosophy is that programs should do one thing and do it well. We have small commands such as cat, which displays a file's contents; less, which lets us read them one page at a time; grep, which searches text; and tr, which translates or replaces characters. The Linux shell lets us do something wonderful with these small tools: connect them through pipes, sending one command's output into the next command's input.
cat users.txt | grep gaston | wc -l
This pipeline counts how many users are named “gaston.” I won't explain each step here, but you can already see the power of a system in which small tools can be combined to do useful work.
Linux is free software—hence the complete name GNU/Linux. It gives us control over what we do and ownership of the software and formats we use. There are many distributions, or flavors, so you can choose the one that suits you. Personally, I use Debian GNU/Linux.
The mouse is your enemy: XMonad
The window manager is also important because it determines how we interact with the programs installed on our computers. It presents information on the screen and lets us open and arrange applications, among other things.
GNOME is one popular desktop environment for GNU/Linux. It provides windows that you can move and minimize, along with a desktop where you can keep icons. But that isn't what I want to show today. I want to introduce the environment I have used for several years: XMonad.
What is unusual about XMonad is that you can manage windows without a mouse. Why on earth would I want that? Simple: using a mouse is slow. A keyboard is much faster. We'll talk more about keyboards another time.
This is how I start working with XMonad:
First, I open a terminal with:
Ctrl + Shift + Return
Then I run screen in the terminal, although that deserves an
article of its own. I usually open Firefox next. I switch to another
workspace with:
Alt + 2
Then I press Alt + p, which displays a bar at the top. I type
fire, let XMonad complete the rest, press Return, and Firefox
opens. Notice that I still haven't touched the mouse.
Next, I open another terminal on a different workspace for my editor. I
press Alt + 3 to move to workspace three, open a terminal with
Ctrl + Shift + Return, and launch
Emacs. I created a shell
alias for it, so all I type is e. Now I can start working.
This short video shows the process and how I start an XMonad session:
To be continued...
Until next time,
Gastón Ramos
::: If you'd like to comment, email me: ramos.gaston AT gmail.com :::