I have always wanted to give something back to the wonderful creators of the Remember The Milk to-do list service. It has been a great tool for me the past couple years by helping me keep organized. Thank you, RTM crew!
Over the last couple months I’ve been taking a bit of spare time to write something that I hope all of us can benefit from: GroovyRTM
What is GroovyRTM?
GroovyRTM allows you to easily take advantage of the Remember The Milk REST API using any language on the JVM. In short, you can now write apps for Remember The Milk without having to worry about all the HTTP transaction stuff, error handling, etc. As its name implies, it’s written in Groovy, which made it much easier to write and test. Continue reading →
I recently ran into a case where I was violating the DRY principle by having to encode part of a string every time I added to it. After some digging I found the solution: Groovy Categories.
A bit of Groovy background
A couple key features of Groovy are that everything is an object and that operators are just syntactic sugar for calling methods on the objects. What’s cool about this is that with Groovy you can override the default behavior of these operators for certain classes. For example, 4 + 2 in Groovy really means 4.plus(2)
How to implement/override operators in Groovy
Groovy allows you to override a LOT of stuff, including final methods and operators. If I want to override a method on the String class, all I need to do is:
Continue reading →
One of the ways to speed up your site and save bandwidth is to optimize your images. You can often halve an image’s size without losing (much) quality. Many photo editors may give you this option, but it’s a slow manual process. What we really need is a way to automate this so that every time we deploy changes we can optimize in one step.
Getting Started
You’ll need 2 tools (and Cygwin if you’re on Windows) to pull this off:
Continue reading →