dark2 wrote: > For someone with some programming background and an interest in > learning Ruby, what are a few good "practice" programs to write?
Do you use a computer on a regular basis? Do you find yourself doing the same little things over and over, by hand? Write Ruby code to automate or simply them.
Start small, pick a problem or task that has personal meaning, and scratch your own itch.
For example, got tired of having to leave the command line to run a Google search, so I wrote simple script to run my queries from a CMD prompt. I then extended it to search the TV schedule, and later to go find stuff at my local library.
I also got tired of having to open up a calender application just to add a reminder or task, so I wrote a small app to script Outlook.
Once one gets started, one sees endless places to add little tweaks and features, and learns (ideally) to refactor, simply, learn and practice new ways to do things in Ruby. I have my own version of 'find', for example, that gives me a menu of the found files, and will launch files in various applications (again, to avoid leaving the command line.)
As others have (or will) mention, the weekly ruby quizzes are an interesting source of challenges, but nothing beats self interest for motivation.
> Is there any site similar to Ruby quiz with some slightly easier > challenges?
Before University of New Haven Ruby Brigade became New Haven Ruby Brigade, we had a couple challenges. Here is one of them. Don't read to the end if you don't want to see the solutions, but it's not that hard... (Read as far as you need to for hints)
Of course, the earlier ones are quite easy (but it wouldn't hurt to spend 2 or 3 minutes on some of those). But the later ones are considerably harder (sorting, deaf grandma, birthday spankings, orange tree...).
Although some of these are quite difficult (involving, say, dynamic programming/optimization techniques), here is a huge inventory of problems associated with the Programming Challenges:
It would be very interesting to see the solutions to these problems expressed in a rubyiomatic idiom. (I wonder if they could be convinced to add Ruby as one of the permissible languages? If not maybe the ruby community could implement their own?)
> Of course, the earlier ones are quite easy (but it wouldn't hurt to > spend 2 or 3 minutes on some of those). But the later ones are > considerably harder (sorting, deaf grandma, birthday spankings, > orange tree...).