Hi --

On Tue, 30 Oct 2007, M. Edward (Ed) Borasky wrote:

> David A. Black wrote:
>> Hi --
>> 
>> On Tue, 30 Oct 2007, S?ren Andersen wrote:
>> 
>>> Hello all,
>>> 
>>> I'm fairly new to ruby coming from some Java.
>>> I've been reading "The pragmatic programmers guide", which is pretty good.
>>> But, I always find it's easier to learn the language using it, rather than
>>> just reading about it. (Naturally...)
>>> 
>>> So - what are your favorite "learning-by-doing"-proejcts? Both
>>> ruby-specific, and generally?
>> 
>> My "rite of passage" program for new languages is usually the
>> word-game Jotto. (Somewhere I have my Ruby version of it....) I find
>> game-ish things to be quite good for language-learning purposes. Not
>> necessarily full-blown video games and such, but things like decks of
>> cards, anagrams, and checker board moves.
>> 
>> The main thing is to keep it all a bit fluid -- for instance, if
>> you're doing a checker board, try it with arrays and also with the
>> Matrix class. It can be a good excuse for exploring the language and
>> trying things out.
>> 
>> 
>> David
>> 
> You *really* want that "checkers" Ruby Quiz, don't you? ;)

That's funny -- I actually hadn't even read that thread.

I wrote a Boggle game in Ruby once, and tried to generalize the
algorithm so that it could use a board of any size and calculate legal
letter paths. Not exactly the same as checkers, but similar in some
ways. With the standard-size board (4x4), it was literally true that
almost every case was an edge case.


David

-- 
Upcoming training by David A. Black/Ruby Power and Light, LLC:
   * Advancing With Rails, Edison, NJ, November 6-9
   * Advancing With Rails, Berlin, Germany, November 19-22
   * Intro to Rails, London, UK, December 3-6 (by Skills Matter)
See http://www.rubypal.com for details!