savaged.info

2009-07-31

groovy minimalism

Filed under: technology,workfriendly — savaged @ 12:05
Tags: , , , , , , , ,

Being a minimalist, I’m not a fan of a heavy IDE, using them only when I have to. I think IDEs are like dogs, they sense your fear. At present Netbeans 6.7 seems to me to be the best trained pooch. For now however, let me propose an alternative and some background…

Recently I’ve been getting into Groovy and Grails, no doubt also appealing to my minimalist leanings. Convention over configuration let’s someone else do all the stuff that would normally clutter my development process. You have to give the tutorials a go (Groovy / Grails). If you’re a minimalist, lean processes type too, I feel sure you’ll not look back.

Now I’ve found I can mix the agility of Groovy and Grails and my favourite editor vi. At home I use Mac (did I mention I’m a minimalist). On my Mac I have MacVim. At work I’m forced to used MS Windows, I have CygWin and include vim from the setup tool.

Of course, I could have used TextMate on my Mac, and at work, the clone for MS “e“. However, I’m also a minimalist when it comes to paying money out (aka: being tight).

There are a few hoops to jump through to get going; I wanted to share them with all the other minimalists.

Step 1

Get a vimrc file working. See http://macvim.org/OSX/index.php. Particularly note the instructions about getting the $VIMRUNTIME/vimrc_example.vim files. (Works on MS Windows too, and probably Linux).

Step 2

Get Groovy language highlighting. Download groovy.vim. You might need to create a .vim directory in your home, and a ftplugin directory in there. Once you have that you just drop the groovy.vim file into ftplugin (works for both Mac and MS).

Step 3

Add NERDTree. Download and unzip NERD_tree.zip. Put the NERD_tree.vim file into your ./vim/plugin directory and NERD_tree.txt into your .vim/doc directory. (Note that you might need to create plugin and doc directories, if it’s your first plugin).

Step 4

Add snipMate. Download and unzip snipMate.zip into your ./vim/plugin and doc directories; as you did above.

Step 5

In vim run :helptags ~/.vim/doc then :help local-additions to view the docs for both the plugins.

Step 6

In vim run something like :NERDTree /mycode/mygroovyproj/

Step 7

Revel in the simplicity of your new development environment ;)

Finally, when you really do need an IDE then there’s great Groovy & Grails support in Netbeans and now in Eclipse. Oh and the one you have to pay for, Intellij.

2009-06-8

gradually groovy

Filed under: technology,workfriendly — savaged @ 13:19
Tags: , , , , , ,

This week I’ve been mostly reading Programming Groovy – Dynamic Productivity for the Java Developer by Venkat Subramaniam. This is one of those few books where you don’t skim or skip forward, where the author(s) keeps you engaged end to end.  The subject could also be a contributing factor; Groovy is quite something. There are a number of “wow” moments as you go through the book, seeing practical ways you might truly enhance your productivity.

I’m a firm believer in ‘convention over configuration‘. Groovy takes all the ceremony, repeated by each and every Java programmer every time, and does it for you. Leaving you to get on with lines of code that concentrate on delivering business value.

As I say there are many “wow” moments learning Groovy, however there’s one that stands out to me as a Product Owner, namely the ease of integration. What this means to me is a team could choose to move gradually to Groovy. The project unit tests could be used to provide the security to refactor Java functionality over to Groovy bit by bit. A steady progression rather than a big re-write. The Java and the Groovy living side by side over a period of time. I think Groovy stands out from the other similar languages, in this regard.

(Thanks Darran for pointing me in the Groovy direction)

Next stop Grails.

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 57 other followers