1
Sep/08
4

Automatic My Coke Rewards Code Entry

Until recently I had a large backlog of My Coke Rewards points. In addition to all the codes I collected myself, I also received quite a few from my friends and family (Thanks!). The problem is that the site only allows you to redeem 10 codes per day, and I had a hard time remembering to enter them every day.

To help, I created a Ruby script for automatically processing codes. Every day, it reads 10 codes from a text file, then submits them to mycokerewards.com and logs the result. That way, I could just add all my codes to a file and it would take care of the rest.

I’ve provided the script below, as well as instructions for configuring it on a Mac (should be similar on Unix/Linux). If you’re using Windows, you can do the same thing by downloading Ruby and setting up a scheduled task. This isn’t the most user-friendly process, so a little development and/or command line experience would be helpful, but if you don’t have that you should be able to work it out by stepping through the instructions. Good luck and happy redeeming!

10
Aug/08
0

Twitter Developer Interview

There’s a short interview with Alex Payne, one of the Twitter developers over at radicalbehavior.com. He’s a Ruby / RoR developer (and big fan), but points out how it falls short for high traffic applications.

A few interesting quotes:

All the convenience methods and syntactical sugar that makes Rails such a pleasure for coders ends up being absolutely punishing, performance-wise.

It’s also worth mentioning that there shouldn’t be doubt in anybody’s mind at this point that Ruby itself is slow.

All of us working on Twitter are big Ruby fans, but I think it’s worth being frank that this isn’t one of those relativistic language issues. Ruby is slow.

Ruby is a great language, but this is just further proof that you need to take a close look at your requirements up front, then pick the best (not necessarily the coolest) tool for the job at hand.