Friday, February 11, 2011

Text editor? You mean, like Notepad?

By now it's no secret that I spend a great deal of my time programming computers. The problem is this: when I tell people what I'm working on, I see eyes glaze over and my heart sinks because I know that I've spooked the Luddite within. I want to be clear on this--I pass no judgement when this happens. I readily acknowledge that most of computer science is unspeakably arcane for most people. I haven't been able to figure out why I find it so interesting, but I can easily understand why so many others find it utterly boring. I want whoever I'm talking to to "get" it only because I think it's so great, not because I think they should be interested or "smart" enough to get it.

Text editor


I mean no condescension. I could benefit from someone holding my hand and walking me through plenty of topics outside my area of expertise. To this end, I am embarking on the task of demystifying just what us geeks mean when we say "computer programming"--a task I am almost certain is impossible. We're going to start slow. Subsequent posts will build on this foundation and before you know it we'll all be experts on how programming is done if not actual programming itself.

A lightweight, flexible, powerful text editor is a programmers best friend. Think of a text editor as a stripped down version of Microsoft Word without the lingering odor of decaying software giant. Most are only capable of editing "plain text." This is the biggest difference between a word processor and a text editor. It also means no bold, no italics, no fonts--just the characters themselves. This is useful because programming languages don't care about any of these things. All that matters is the characters. Leaving out all of the fancy formatting controls at the top just makes the text editor easier to use and more lightweight.

When I say a program is lightweight, I mostly mean that it doesn't do anything that you don't need it to do. It doesn't have a lot of features cluttering up the screen. As a desirable side effect, this means that the program loads super fast. If Word takes a couple to tens of seconds to load, Vim's load time is almost imperceptible. This is important because programmers need to jump into and out of files often, and loading a word processor each time would be exceedingly annoying.

Deemphasizing formatting allows text editors to focus on what they do best--edit text. Good text editors like Vim and Emacs offer the user myriad keyboard shortcuts so that even complex editing operations can be completed quickly. Learning keyboard shortcuts might sound bothersome, but when you spend a ton of time using a piece of software, it becomes second nature.

Just as programming isn't for everyone, text editors aren't for everyone. Documents produced with text editors look like crap. They are monospaced and don't include any formatting. This problem is exacerbated by the fact that the only text editor with which most people are familiar is Notepad--not a perennial favorite.

Hopefully I took you one small step toward familiarity with what computer programming is all about. Keep an eye out as I sprinkle more indespensible (dispensible) nuggets of knowledge in with future posts.

No comments:

Post a Comment