Using AO to handle roles Learning AOP from the gurus
May 31

Throwing away code again with Groovy

Groovy, Tech Add comments

I run into a task now and then in which the effort of manually doing something is more than writing a script to do the task for me.

However, at the same time, this task may be a one off, so I don’t want to spend a lot of time worrying about:

  • How elegant the design is
  • How the program handles its memory
  • How readable the code is
  • How generic and reusable it is
  • … and the other many things that you often worry about …

When I was hacking a lot of Perl, I would not think twice… and would open up a doFoo.pl and get going. As soon as it worked, I was done.

When in the Java world though, I often found myself spending more time thinking about things, and how I could make it generic etc etc. I had a suddent oversion to writing code that I would maybe rm after it was used.

Now, I can still use Perl (and do), but now with Groovy I am getting the best of both worlds.

  1. I feel that I can throw away code again
  2. I can utilize my large set of Java libraries from with my “script”
  3. I am having fun :)

It is refreshing to have my mind back in the mode of throwing away code. Be-gone!

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: What is the number before 3? (just put in the digit)