From: "David A. Black" Date: 2008-07-23T22:02:37+09:00 Subject: Re: Good exercises for beginner Hi -- On Wed, 23 Jul 2008, Sam Haskins wrote: > Hello all, > > I am an unexperienced programer, and though things like why's guide and other > tutorials do a good job of explaining syntax, I am trying to develop > experience in making real projects. I have tried to do the ruby quizzes, but > they are a bit too hard; I don't yet have a great feel for the best way to > approach problems, and so I ended up having to consult how other people > solved the quizzes to get over stuck points. > > Are there simpler exercises out there that would be good for a noob like me, > or do you think that reading code for a while might do better for > familiarizing me with technique? A very good source of exercises is to try to (re)implement some of Ruby's core methods in Ruby. For example, you could implement Array#each like this: class Array def my_each i = 0 until i == size yield self[i] i += 1 end self end end and similarly (though a bit more complexly) with other methods like select and map. Sometimes this takes you into a more "low-level" style of programming than you might use normally (like, maintaining an explicit counter rather than just using an iterator), but it's very good practice and a good way to learn. David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails July 21-24 Edison, NJ * Advancing With Rails August 18-21 Edison, NJ * Co-taught by D.A. Black and Erik Kastner See http://www.rubypal.com for details and updates!