It’s been a while since a new version of Ruby/AWS was released. In fact, it’s been more than eight months since version 0.7.0 first saw the light of day. I often don’t even mention new releases here, because they’re of such limited interest.
To prove there’s still life in this old coder’s brain, however, I’ve been working on version 0.8.0 for the better part of the last week.
That work has involved my least favourite type of coding: rewriting from scratch. Specifically, the implementation of batched requests and multiple operations had become unmaintainable. I could no longer read my own code, even with plenty of comments. Worse, there were bugs that needed fixing and it was impossible to set to work for fear of introducing new gremlins.
So, there was really no way around it. I kicked a new approach around in the back of my head for a couple of days and, when I was ready to commit some time to coding, sat down at the computer, deleted the methods related to the old implementation (to prevent them from negatively influencing me) and set about reimplementing the features from scratch.
The work was quite painful, but I’d expected that, which is why the rewrite had been postponed for as long as it had. In the course of writing the new implementation and producing unit tests for it, bugs came to light that had gone undetected in the old implementation. These have now been dutifully squashed.
If you need programmatic access to Amazon’s catalogue and shopping cart facility, I urge you to look at Ruby/AWS. It’s almost two years old, maturing well and takes a lot of the headaches out of querying for Amazon’s products.