RPCFN: The Game of Life - 11

Ruby Programming Challenge For Newbies

RPCFN: The Game of Life (#11)

By Elise Huard

About Elise Huard

Huard Elise Huard is based in Brussels, Belgium and is the owner of Jabberwocky, a solutions company mostly focused on Rails. She has worked with a few other technologies before falling in love with Rails and Ruby about 3 years ago and going freelance to work with Ruby full time. She contributes to open source projects as much as she can, and has given talks at a few Ruby and Rails conferences. She’s a jack of all trades, loves reading, tinkering, food, travel, learning, and people out of the ordinary.

Elise has this to say about the challenge:

This challenge consists in implementing the game of life. This is a problem that is simple to understand, but requires some thought to implement correctly. Tests will help you spot your own reasoning fallacies. And of course, every hacker has to have implemented the game of life at least once :)

Our Awesome Sponsor

This monthly programming challenge is sponsored by Backup My App.

Backup My

Backup My App is an automatic backup service for Ruby on Rails applications. You simply install the plugin to your Rails application and they handle the rest of the process. They store backup history for several weeks and you can restore any of them automatically. Try out their 1 GB plan for free. Backup My App has sponsored this challenge and is proud to make this contribution to the Ruby community.


  • The participant with the best Ruby solution (if there is a tie between answers, then the one who posted first will be the winner) will be awarded any one of PeepCode’s Ruby on Rails screencasts and a free 10 GB account for a year from Backup My App.
  • From the remaining working Ruby solutions, three participants would be selected randomly and each one would be awarded any one of Pragmatic’s The Ruby Object Model and Metaprogramming screencasts.
  • All the participants in this challenge (except the participant with the best Ruby solution) will get a free 5 GB account for 6 months from Backup My App.

The four persons who win, can’t win again in the next immediate challenge but can still participate.

The Ruby Challenge


The Challenge

The entire challenge details are available at: http://github.com/elisehuard/game_of_life

How to Enter the Challenge

Read the Challenge Rules. By participating in this challenge, you agree to be bound by these Challenge Rules. It’s free and registration is optional. You can enter the challenge just by posting the following as a comment to this blog post:

  1. Your name:
  2. Country of Residence:
  3. GIST URL of your Solution (i.e. Ruby code) with explanation and / or test cases:
  4. Code works with Ruby 1.8 / 1.9 / Both:
  5. Email address (will not be published):
  6. Brief description of what you do (will not be published):


  • As soon as we receive your GIST URL, we will fork your submission. This means that your solution is frozen and accepted. Please be sure that is the solution you want, as it is now recorded in time and is the version that will be evaluated.
  • All solutions posted would be hidden to allow participants to come up with their own solutions.
  • You should post your entries before midnight of 2nd Aug. 2010 (Indian Standard Time). No new solutions will be accepted from 3rd Aug. onwards.
  • On 3rd Aug. 2010 all the solutions will be thrown open for everyone to see and comment upon.
  • The winning entries will be announced on this blog before 10th Aug.
    1. The winners will be sent their prizes by email.

More details on the RPCFN?

Please refer to the RPCFN FAQ for answers to the following questions:


RPCFN is entirely financed by RubyLearning and sometimes sponsors, so if you enjoy solving Ruby problems and would like to give something back by helping with the running costs then any donations are gratefully received.

Click here to lend your support to: Support RubyLearning With Some
Love and make a donation at www.pledgie.com


Special thanks to:

  • Elise Huard.
  • Sponsors Backup My App.
  • GitHub, for giving us access to a private repository on GitHub to store all the submitted solutions.
  • The RubyLearning team.


Contact Satish Talim at satish [dot] talim [at] gmail.com OR if you have any doubts / questions about the challenge (the current problem statement), please post them as comments to this post and the author will reply asap.

The Participants

There are two categories of participants. Some are vying for the prizes and some are participating for the fun of it.

In the competition

  1. Dominik Masur, Germany
  2. Sergey Kruk, Russian Federation
  3. Mark Mba Wright, USA
  4. Andrew Cox, U.K.
  5. Julio C. Villasante, Cuba
  6. Nils Riedemann, USA
  7. Valério Farias, Brazil
  8. Christopher Fortenberry, USA
  9. Falk Pauser, Germany
  10. Sam Johnson, Australia
  11. Brad O’Connor, Australia
  12. Michael Klaus, Germany
  13. Dmytrii Nagirniak, Australia
  14. Milan Dobrota, USA
  15. Steve Hindmarch, UK
  16. Nithin Bekal, India
  17. Zachary Becker, USA
  18. Benoit Daloze, Belgium
  19. Tanzeeb Khalili, Canada
  20. Cary Swoveland, Canada

Just for Fun

  1. Trevor Fountain, U.K.
  2. William Crawford, USA

The Winners


Congratulations to the winners of this Ruby Challenge. They are:

Previous Challenge

RPCFN: Business Hours (#10) by Ryan Bates.

Note: All the previous challenges, sponsors and winners can be seen on the Ruby Programming Challenge for Newbies page.


  • This challenge is now closed.
  • The (#12) challenge by David Griffiths, USA is scheduled for Aug. 2010.
comments powered by Disqus