Welcome Back

I’ve done some house cleaning on my webserver in the last few days. It’s not quite there yet, but it’s progress.

My blog is now located at http://blog.jonhoman.com, which means the feed url has changed. I am redirecting the old feed url to the new one for now, but it’s probably a good idea (for all my loyal fans) to use the new url.

I have some other updates in the works as well. Stay tuned.

Python Highlighting in Vim on Ubuntu

Tonight, I took a look at Google App Engine after watching a video on it at our weekly brown bag lunch meetings and starting working through the Python tutorial. I quickly wanted Python syntax highlighting in Vim. Here’s how you can get it in Ubuntu as well.

It seems syntax highlighting doesn’t work in vim-tiny (which apparently is in Ubuntu by default), so I installed vim-full and vim-common.

sudo apt-get install vim vim-full vim-common

Next, we need to get the Python syntax package for Vim. I got it from vim.org. Save the python.vim file where you can find it.

Now, move python.vim to ~/.vim/syntax. You will most likely need to create these directories unless you have previous used Vim syntax packages.

Lastly, edit your ~/.vimrc file. Again, you will most like need to create this file. Add the following line:

syntax on

There, that should be all you need. I believe the colors are based on a black background, so you might need to do some tinkering if you use a a light background for your terminal. Hope this helps make your Python code a little easier to read in the future.

References:
http://www.vim.org/scripts/script.php?script_id=790
http://ubuntuforums.org/showthread.php?t=262750

How To: Install Eclipse AspectJ Plugin

This week in class we started taking a look at AOP, Aspect Oriented Programming. I don’t know too much about it yet, but it deals with “cross-cutting concerns” and its use seems to make sense in some cases especially logging. AspectJ is a popular extension to Java.

Anyways, let’s look at adding AspectJ support to Eclipse. I assume you already have Eclipse installed.

First, open Eclipse and open the Software Updates window from the Help menu.

Now click the Available Software tab and click Add Site. Paste in the following URL:
http://download.eclipse.org/tools/ajdt/34/update

Click OK.

Now that the plugin site has been added you will see it listed as AJDT Update Site in the plugin listings. Expand that node to see the available addins. You can grab all of them, but I choose not to get the source code for the plugins. After selecting what you want, click Install.

Follow the installation dialog. Note, you will need to agree to a license agreement.

You will need to restart Eclipse for the install to take affect.

Now that have AspjectJ support in Eclipse you can write the obligatory HelloWorld applicatiion which I will walkthrough in my next post.

Groovy and Grails

Groovy is cool.

Grails is fun.

More some other time.

SOLID Principles Reordered

The SOLID Principles, popularized by Robert C. Martin, were a topic of discussion in one of my classes this year. So far that class has largely followed on design patterns so Martin’s SOLID principles fit in well.

Via Uncle Bob’s twitter account, I read about reordering the principles in their order of significance. So, perhaps instead of the SOLLD principles, we should call them the SDOLI principles.

Overall, I’ve found these principles to be informative and definitely worth keeping in mind as one designs and implements a piece of software.