tags:

views:

81

answers:

4

I use ruby infrequently - usually it adds up to writing a script once in two months or more. I do most of my programming with C++, which is very different from ruby.

with such wide gaps between my brushes with ruby I keep forgetting basic aspects of the language (like parsing a text file and other simple stuff).

I would like to do a daily drill of the basic stuff and I was wondering if there is some site I can subscribe to and will send me the Ruby question of the day or something similar.

anyone knows of such a site / Internet service?

+2  A: 

What about a general problem site like Project Euler( http://projecteuler.net/ ) or the ACM programming competition problem sets ( http://www.inf.bme.hu/contest/tasks/ ) and just restrict yourself to using ruby?

Akusete
that's a bit more heavy wight than I had in mind, I was thinking along the lines of "how do you extract the 23'th line of a file and display the second word"? kind of question :-)
Kira
+5  A: 

It's not daily, but you might be interested in Ruby Quiz.

You might also subscribe to ruby-talk and look over the posts there each day.

+2  A: 

A more arduous (but awesome) task is the google code jam. Just assign yourself one of the problems, and set a time per week to put an hour into it. Quit while you are still working. That way, you hunger for more, and think about it in the interim time.

http://code.google.com/codejam

TL;DR: Find a large task, that is interesting. Work on it in bite-size pieces, leaving yourself hungry for more.

evantravers
+3  A: 

Check out Jim Weirich's ruby koans. It's a set of ruby scripts organized by topic that guides you through the different parts of the language by unit testing your knowledge.

def method_with_block
  result = yield
  result
end

def test_methods_can_take_blocks
  yielded_result = method_with_block { 1 + 2 }
  assert_equal __, yielded_result
end

The game is to go through these and fill in the __ blanks. Running rake will check your answers.

Andrew Vit
this is great! thanks for pointing this out
Kira