Resources for Learning Vim


To me vi is zen. To use vi is to practice zen. Every command is a koan. Profound to the user,
unintelligible to the uninitiated. You discover truth every time you use it.

Satish Reddy

A friend recently told me that he’s going turning to the “dark side” and trying out Emacs. When I asked why, he said the escape key was too far away. I tried dissuading him by saying he hadn’t learned the full extent of Vim’s zen and power (neither have I), but in the end gave wished him good luck.

I recently worked with someone who excelled at Emacs to the point that watching him code was like watching a musician playing an instrument. He mostly used muscle memory to make his fingers dancing across the keyboard. This person inspired me to drop GUI editors and focus on becoming proficient in Vim. The productivity gains, easy to discount at the outset, have been tremendous simply because I spend at least six hours a day inside a text editor. Each keystroke I reduce amounts to seconds which add up to minutes that over weeks accumulate into hours. It’s less time and brainpower I have to exert for mechanically typing code and more time to conceive of good code.

It’s been four months since I’ve been using Vim exclusively. I remember the steep learning curve at the start and the constant temptation to reach for the mouse and arrow keys. But as a novice I discovered that there are legions of Vim users passionate enough to publish helpful articles, create games, and wage crusades in order to convert more heathens.

Articles (in the order I read them):


How I Stopped Wasting My Precious Life on the Internet


I hate getting distracted. But with the increasing addictiveness of the web it’s becoming harder to prevent myself from reflexively checking sites like Facebook and Hacker News. That’s why I was excited to see a nice Python script called that acts as a DNS and schedules firewalls to prevent users from wasting time. I can block entire domains and specify timeframes during which they are allowed.

I wrote “Stay focused” on my local homepage. Annoying Facebook share and like buttons have also delightfully disappeared from my world.

Learning Computer Science Fundamentals Makes You a Better Software Engineer


I’ve heard that one can become a great software engineer with ten years of experience or with fewer years of experience but a solid grasp of data structures and algorithms. Since I studied pure math as an undergrad, I love this stuff. Recurrence relations, prime numbers in hashing functions for hash tables, P vs NP.

When I first started off programming I didn’t know just how much I didn’t know. I thought that being able to write a simple CRUD application was all there was to it and who cares about knowing how quick sort works. It’s true that I’ll probably never have to implement a hash table on the job, but knowing how to reverse a string or a linked list is like knowing how to play the scales as a musician. They’ll never be played during a concert, but they are classic building blocks in understanding computing.

How I Did on My First Post-College Job Search


Below is a chart of my job application track record during the last semester of college. First round means whether the company responded to my resumé, second round was usually a phone screen, and third round was an on-site interview.



One of my favorite classes during middle school was woodworking. Our first project was to make small wooden trays from pine and ply wood. I learned to cut wood with a miter saw, glue them together, and correctly hammer a nail. The class moved onto drills and various electric saws like the jigsaw, circular saw, and planer. (We were never allowed to use the table saw, however, as the exposed blade was too risky to trust with eleven-year-olds.) With these tools I made a two-level shelf that could be placed on desk to hold paper and various knick knacks.

5 Ways to Security Harden Your Linux System


1. Don’t Use FTP or Telnet

I only use SSH to interact with my remote machine. Your Linux distribution should come with SSH tools already installed, but in case it doesn’t, use OpenSSH.

2. Keep Kernel and Software Up to Date

If you use apt:

# apt-get update && apt-get upgrade

Apticron is a package that emails you when security updates are available.

# apt-get install apticron

Proof of the Irrationality of √2


The Pythagoreans, a wacky bunch of integer-worshipping Greeks, were so against the notion of irrational numbers that they supposedly murdered the poor soul who leaked their existence. In honor of Hippasus, we’ll prove that $$\sqrt{2}$$ is irrational, ie $$\sqrt{2}$$ can’t be expressed $$\frac{p}{q}$$ for some $$p, q \in \mathbb{Z}$$. We’ll do a proof by contradiction.

Let’s assume $$\sqrt{2}$$ is rational. Then $$\exists a, b, \in \mathbb{Z}: \sqrt{2} = \frac{a}{b}$$. $$a$$ and $$b$$ have a greatest common divisor and by dividing each by the gcd, we obtain an equivalent fraction $$\frac{p}{q}$$ that’s in lowest terms, i.e. $$p, q \in \mathbb{Z}$$, $$q \neq 0$$, $$\gcd{p, q} = 1$$.

Euclid’s Algorithm


What’s the greatest common divisor (gcd) of X and Y? It turns out there’s a nice algorithm for calculating this – the Euclidean Algorithm.

Common Divisor Divides Integer Combination

Let $$(D, +, \cdot)$$ be an integral domain.

Let $$c$$ be a common divisor of two elements $$a$$ and $$b$$ of $$D$$, i.e.:

$$ a, b, c \in D: c|a \wedge c|b $$


$$ \forall p, q \in D: c|(pa + qb) $$


$$ \begin{aligned} c|a \implies & \exists x \in D: a = xc\ c|b \implies & \exists y \in D: b = yc\ & \forall p, q \in D: pq + qb = pxc + qyc = (px + qy)c\ \implies & \exists z \in D: pa + qb = zc\ \implies & c | pa + qb \end{aligned} $$