An Anecdote

Recently, I’ve been trying to make myself learn how to write rich documents within plaintext files. I want to do this for a few reasons:

• I can write everything in vim. Let’s face it — Word processors are pretty ugly. I really don’t like working on documents in Microsoft Word or LibreOffice when I can instead work on my documents in vim. Not only the look, but also the speed. I am able to edit so much faster using vim than any other editor on the market.

• Portability is key. Have you ever received a paper from a colleague only to be found that it is in some format that you can’t read? (Cough Pages Cough). I, personally, really hate when this happens. In order to solve the problem, why not just write everything in plaintext and distribute it that way?

• It prepares for the future. In the future, Microsoft Office, Pages, LibreOffice, and the like will probably be out the window. In fact, Windows, Mac OSX, UNIX, or anything you hold dear in the computing world will probably be thrown out the window. If this is the case, the text that we write needs to be unformatted. That way, the text can be viewed on any operating system with any text editor.

The Solution

The solution, I have found, is to write everything using Markdown (Using the CommonMark Spec) and LaTeX. In this way, I will be able to express all of my thoughts in a clear, succinct, portable, and easy-to-read fashion.

One of the great things about these two markup languages is that they are everywhere. You don’t really know until you start using it without thinking, but almost every program supports it. It’s great expressing your thoughts in Skype or GChat because you can bold important words or italicize others. What a good way to express your thoughts!

Because of my recent change in heart, I will be writing all of my blog posts in plaintext from now on and leaving it to the WordPress text rendering system to render everything (hopefully properly). There are also many, many plugins making LaTeX and Markdown rendering possible. It’s really great.

Look how easy it is to express my favorite finite automata:
$M_{favorite} = {Q, \Sigma, \delta, q_{0}, F}$
$M_{favorite} = \{Q, \Sigma, \delta, q_{0}, F\}$

I Dislike The Mouse

My Desktop

The above picture is a screenshot of my Linux machine. What is unique about it? Well, everything is controlled by the keyboard. I have a tiling window manager (i3) and do all of my text editing in vim. What does this mean? It means that I rarely touch the mouse.

I grew up using Windows. It was my primary operating system for the past 10 or 11 years. I got very used to it, its semantics, and using the mouse+keyboard combo in order to navigate around my Windows machine. There was nothing wrong with it. As I got more into computers, however, I got bored of using Windows. There’s nothing wrong with the operating system – I just got bored of using the same thing for 10 straight years. Because of this, I installed Linux.

When I first install Linux, I tried to emulate my Windows experience as much as possible. I installed LXDE as my desktop environment and Openbox as my window manager. I used these just like I used Windows.

As I used Linux more and more, though, I realized that most of the power of Linux was not in the interface, but rather, the terminal. This led me to be in the terminal a lot more than I ever was. I no longer needed a file manager as I did all of my file operations in the terminal. I no longer needed desktop icons because I launched everything in the terminal. Eventually, I no longer needed my mouse to switch Windows, as I just used keyboard shortcuts. I no longer needed my mouse to open terminals because I used keyboard shortcuts.

What did I need my mouse for, then? I decided to experimentally ditch the mouse entirely and switch to a tiling window manager that allowed me to manipulate my windows and their positions by just using the keyboard. At first, I used Awesome. However, Awesome felt very static. In order to move windows around, I had to switch the layouts entirely. I wanted something more dynamic, so I switched to i3.

It definitely took some getting used to. I had to train myself to not reach for my mouse every time that I wanted to do something. Eventually, however, I got used to it. Once I did, it felt awesome. It made me feel like a whole new breed. I was able to rearrange windows, launch applications, and do everything from my keyboard. Not to mention that when my mouse isn’t around, it has the added bonus of keeping people from using my computer since they don’t know how to use things.

As I practiced more and more, I felt that I was getting faster and faster. In fact, I felt that I was doing things faster than if I needed to reach for my mouse. Need to listen to Spotify and type some notes at the same time? Easy.
<WINDOWS>+3 – Switch to a new Desktop
<WINDOWS>+D – Open the app-launcher
‘spotify’              – Launch spotify
<WINDOWS>+B – Open the next window to the right of Spotify
<WINDOWS>+<ENTER> – Open a terminal window
‘vim notes.txt’   – Launch vim and write some notes
Of course, this is a lot of steps, but they can be executed very quickly without reaching for the mouse to resize the windows in order to get the right proportions between the vim and Spotify windows.

Of course, as time goes on, I will only get faster and faster. However, this experience has made me realize that I really dislike using the mouse. Of course, this experience is only on my laptop, where I often find myself reaching for my touchpad because it is easy to reach with the keyboard so close. However, I plan on getting a new Desktop soon and installing Linux on it with my i3 setup. I am excited to see how everything will end up working out on my setup with two monitors and so much screen space. I will report back.

If you’re wondering whether or not you want to take a shot at using a computer without the mouse, try it. It’s a great experience and it looks super awesome whilst doing it.

Taking Notes in Class

To clear up any confusion before anyone begins to read this post, I am a Computer Science Major at University of California, San Diego. I run Linux as my primary operating system.

As I go from class to class, I often ponder upon the most efficient and effective way to take notes. Why do I ponder this? Because every time I forget something I wish that I could just use a computer function to scan all of my handwritten notes for certain keywords. But I can’t for several reasons.

1. My handwritten notes are not on a computer
2. Manually scanning pages of my handwritten notes into a PDF file would take decades
3. No computer handwriting recognition system can recognize my handwriting.

Because of these three factors, I often ponder upon taking notes on an electronic device; however, what happens when I want to draw pictures or draw fancy symbols or doodle? I can’t if I am not working on a tablet with a decent stylus – and I’m not. I am working on my trusty laptop. Usually, this is enough to convince me that I should just stick to buying a few nice notebooks and keeping all of my notes organized in them. However, next time I need to find something fast, I regret it, as I really want to CTRL+F my notes.

In order to solve this, I looked for a lightweight note editor program for my laptop that had basic organization and markup capabilities. I found ZIM, which is super handy for building a local version of Wikipedia for all topics that interest you. I used this program for a good 20 weeks. Everything worked great and I acquired a vast amount of notes in many subjects that covered a range of topics. The problem arose; however, when I wanted to use vim keystrokes.

Writing in ZIM is great, don’t get me wrong, but sometimes you just want to be able to write faster. You don’t have time to reach over to the enter key for a newline. You don’t have time to press end to get to the end of the line. You want something faster. In order to solve this, I gave up writing in ZIM’s editor and used vim instead. Of course, I acquainted myself with ZIM’s markup syntax so I could still read my notes from ZIM, but I no longer wanted to use their proprietary environment. Instead, I stuck with my handy-dandy vim.

All was well in my note-taking world. That is, until someone asked for a copy of my notes. They were a mess if you didn’t have ZIM installed. Markup syntax everywhere that made the file almost unreadable to the untrained eye. I needed someway to share this file with my friend while retaining the beauty of its marked up design. The closest markup language I found was Markdown, the internet standard for marking up documents.

I could write all of my notes in markdown and then save them to a GitHub repo and then everyone could access my notes all the time and I could edit them and then push the changes and then everything would be great. In fact, that’s exactly what I did. I setup a repo and began writing my notes in Markdown. The only problem was that I had no way of converting my old notes from ZIM to Markdown. Thus, zimdown was born.

zimdown is my own personal solution to converting ZIM markup files into Markdown. It is not complete, but it will allow me to continue writing my notes in ZIM markup, view them locally in ZIM, and convert them into markdown to push to my GitHub repo for public viewing. Sound like a pain? It probably will be.

Why do I write notes like this? All because I don’t want to let go of my precious vim and I don’t want to use a heavy solution like Evernote. I think it is worth it. What are your thoughts?