Muscle Memory

Published 30 May 7 12:38 AM | jop

Eight years ago, a friend of mine introduced me to the world of Unix (you know who you are -- thank you). After mastering the finger ballet that is emacs, I then discovered the wonders of modal text editing in VI. Those are the first *real* programmer editors that I've used.

The power of Emacs lies in Lisp. It is a very programmable editor. It is so powerful, there actually came a time when Emacs is the application that I use for majority of my tasks. It has a mail reader, news reader, file manager, web browser, - it even has Tetris!

The power of VI lies on the conciseness of its commands and its integration with command line utilities. Unix provides lots of little utilities for slicing and dicing text. On a conceptual level, these utilities are very much like SQL for text files - you can query and join files (cat), filter lines (grep) and do all sorts of things with text.  In this conceptual level, VI is like Query Analyzer for text files.

These editors both have a steep learning curve. It took me a few hours just to get used to the environment and learning the basic commands.  That sounds silly - editors should be simple - open a file, type in text, save, and close. These editors are not like that. These editors are arrogant. If you make a mistake, they will just pout and let you figure it out. However, once you've learned the commands/shortcuts, muscle memory kicks-in and you'll not even notice that you're using a different editor at all. Then you'll have withdrawal symptoms every time you use another editor. :w

As a programmer, you owe it to yourself to learn at least one of these very powerful utilities. Even in this PostIntelliJ era, these editors are still very relevant. Of course I'll still use built-in editors of VS.NET/Eclipse on my day to day work (I guess once you're addicted to Intellisense, you can never go back), but there will always be instances where the built-in editor just doesn't cut it. CSV, XML, HTML, CSS files, SQL scripts are all those files that doesn't have the same level of tooling present on mainstream programming languages. Whenever the need arise, you can pull out your VI and start slicing!

:wq

Filed under: