The Blog
Follow The Leader – Leaderboards with Ruby/Redis
Leaderboard: A board showing the ranking of leaders in a competition.
Do you need to create leaderboards for your application? Do you use Redis? Do you use Ruby? If you’ve answered yes to any or all of these questions, you might want to take a look at the leaderboard gem I am releasing today.
Creating high score tables (leaderboards) using Redis
To my other colleagues at Agora Games, I have one word: FIRST!
Now that I’ve got that out of my system, down to the business at hand. I’ve read a number of articles on Redis that mention how it could be used for high score tables (leaderboards), but I didn’t see any examples that would walk you through exactly how to do that. Time to rectify that since it’s 2011 and we still don’t have flying cars … so ,,|, future.
UPDATE: Please use the original post for any comments/feedback. This post is a placeholder.
UPDATE: All of this has been packaged up in the leaderboard gem on GitHub.
Creating high score tables (leaderboards) using Redis
To my other colleagues at Agora Games, I have one word: FIRST!
Now that I’ve got that out of my system, down to the business at hand. I’ve read a number of articles on Redis that mention how it could be used for high score tables (leaderboards), but I didn’t see any examples that would walk you through exactly how to do that. Time to rectify that since it’s 2011 and we still don’t have flying cars … so ,,|, future.
UPDATE: All of this has been packaged up in the leaderboard gem on GitHub.
CAPTCHA failed or How I Patched ruby-recaptcha In 5 Minutes For Success
We are using the ruby-recaptcha library here at Agora Games. I got a bug from our QA department that they wanted the CAPTCHA failure message to change from ‘Captcha failed.’ to ‘CAPTCHA failed.’.
Hello there…
I’m Steven. I hail from the suburbs of Boston and I’m currently a 3rd year student at the Rochester Institute of Technology where we are required to do a minimum of 12 months of full time co-op before graduation. Agora Games is my 3rd and final co-op experience and I’m very excited to be working here!
Lightweight concurrency with Ruby and Eventmachine
Eventmachine describes itself as a “fast, simple event-processing library for Ruby programs.” Included in it is a module called Deferrable that allows easy and lightweight concurrency. Deferrable makes it simple to spawn a blocking or long running operation, push it to the background, and on completion execute any number of code blocks (callbacks).
My “Freedom Patch” Gem: constant-redefinition
The constant-redefinition gem allows you to define constants if not defined on an object and redefine constants without warning.
A Better Way to Avoid a Project Named Server
Yesterday I posted about how I avoided creating the annoying rails server projects when accidently running rails server under a rails 2 application. I wanted to follow up with a much more concise script that accomplishes the same ends through different means. Using this script requires no changes to how you start the development server and, even cooler perhaps, allows you to start the rails 2 server as if you were in a rails 3 project. Shout out goes to Intern Mike for the assist.
rails () { if [ -e script/server ]; then script/"$@" else command rails "$@" fi}To Version or Not To Version Your Gems in Gemfiles
I don’t like moving targets. I’m a software developer, not a sharpshooter. So why don’t more people version all of their gems in a Gemfile?
Moving to Rails 3 Pain Point: rails server
Update: I have posted a better solution!
Working with rails 2 and 3 projects back and forth, day to day has been pretty painless thanks to rvm and .rvmrc files. That is with the exception of accidentally running rails server on a rails 2 project. I do this all the time and it results in generating a new rails project called server rather then starting the rails server, my actual intention. It’s almost as frustrating when running script/server on a rails 3 project but at least it doesn’t spit out a bunch of useless files. Incidentally, all of the built in rails command (i.e. generate, console, …) set the same trap. To avoid falling prey, I have created a bunch of shell functions which I would like to share with everyone in case they would like to be privy as well.






