Friday, February 5, 2010

Learning Emacs Part 1

As I mentioned in my last post, January and February were to be devoted to getting to know Emacs better.

After reading "Tip 22: Use a Single Editor Well. Choose an editor, know it thoroughly, and use it for all editing tasks" in The Pragmatic Programmer: From Journeyman to Master, I decided that I would go ahead with Emacs because I have used it some in the past and it would be available in both Linux and Windows, so I really could use it for all of my editing tasks. Also, I am a supporter of GNU and the FSF, so I figured I would give Emacs the first shot at being my all-purpose editor.

The first thing I learned about Emacs is that there is most likely nothing you can't do in Emacs! The second thing I learned is that with great power comes great complexity. Using Emacs is not something that I would call intuitive or even user friendly. I also don't think that it was designed to be so. It is really the single most powerful tool I have ever come across in my computing career.

Since I was using Ubuntu 9.04, the installation couldn't have been easier. I went to the terminal and typed:
sudo apt-get install emacs23
After the download/installation completed, I just typed (also in the terminal) :
This brought up the main screen for Emacs. Installation successful! I also wanted to have it available to me for when I had to boot to my Windows partition as well, so I rebooted and began the download for Windows. After I downloaded the .zip file, I unpacked it and in the /bin directory is emacs.exe.

Using Emacs
When you first load Emacs and are greeted with the main screen, there are two links. The first is the Emacs Tutorial and the second is the guided tour. I went through the tutorial and learned quite a few keyboard shortcuts. I really enjoy not having to take my hands off of the keyboard in order to use a mouse to move around. The most useful shortcut is M-f and M-b (M stands for the ALT key, so M-f means hold down the ALT key while pressing f). This moves the cursor either forward (f) one word or backward (b) one word. I have been using Emacs now for just over a month and I can tell you that I now hate all editors that don't do this!!! In fact, I installed Emacs on my work machine as well (Windows based, unfortunately). I can no longer bare to use a mouse or hold down the arrow keys just to move a cursor around!

I will admit that I still find myself looking at the refcard for certain key combinations and that the learning curve is steep, I have already noticed a significant increase in productivity. I just recently discovered Org-mode (M-x org-mode). Which lets you do all sorts of amazing things and gives me more reasons to use Emacs. I have also started looking into Emcaspeak, which apparently lets you tweet from Emacs on top of other things. There is also a Blogger add-on that will let me write and post my posts from Emacs! Hopefully my next post will be written in and posted through Emacs.

Tuesday, February 2, 2010

6 Things I Want to Learn This Year

In the last few years I have found that software developers generally come in only three flavors:

1)The Rockstar:
In this case, I am not talking about the standard definition, I'm talking about the programmers who get by on talent alone. They come to a job and they know about as much as they are going to know. They may pick up a few tricks here and there, but they are good enough that they don't have to work at it.

2)The Jazz Man:
The Jazz man may not have been born with the most talent, but they never let that stop them. They continually work on their craft and try to be creative and inventive in everything they do.

3)The Pop Singer:
Everything they write is terrible and full of bugs. The UI may look nice on the outside, but on the inside, it's mayhem and confusion. This code will be impossible to maintain and they will usually only be around for a short period of time.

Since, I like to think of myself as a Jazz Man (programatically speaking), I decided that this year I was going to find 6 ways to become a better programmer. As a way of helping me along, I am going to blog about them as well. Along the way I will pass along the Websites I found useful (or not useful), the books I read, and some examples of the work I did.

While reading The Pragmatic Programmer , I came across a few ideas as to how I can become a better programmer and I decided that, every two months, I would actively try to take my knowledge of a subject to the next level. Here is my List:

January & February: Emacs
March & April: Bash Scripting
May & June :The LISP Programming Language
July & August : Regular Expressions
September & October : The C Programming Language
November & December : JavaScript

These are all tools/languages/ideas if which I have at least a fundamental knowledge. I am going to attempt to delve deeper and increase my comfortability with them in order to become a faster, more efficient programmer. This shouldn't be that difficult for me because I really do enjoy programming and I think that this will be a fun way to also help me reduce my addiction to TV!
Join me if you like, follow along and of course feel free to suggest some alternative methods/books/sites etc.