------ art_8298_26348853.1202223347337 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hey Adam, There was a suggestion by Joe at CodeMash, that really helped me. Write unit tests! Write unit tests for methods in the core ruby classes. This allows you to work with all the API's without having to have a problem to solve, and its self documenting. Currently I am writing unit tests for the Array class, and I have methods like test_flatten, test_flatten_with_nested_arrays, etc. Great ruby practice coding, you can do it over your lunch break (if you don't work with ruby to pay the bills :D), and you can always keep that project with you in case you want to test a boundary condition. IRB works great too, but I like journaling my discoveries with Ruby... Hope this helps.. Raju On Feb 5, 2008 9:39 AM, Ilan Berci <coder68 / yahoo.com> wrote: > Adam Akhtar wrote: > > Looking for fairly simple string exercises that will familiarise myself > > with all those string methods in the back of pickaxe. Dont want major > > exercises like those in the ruby quiz as they demand knowledge in a lot > > of other areas. > > > > Heres one example of the sort im looking for > > > > Rotate the words in a string around a fixed point given by a letter. Eg. > > string Ruby is a great language" > > puts Rotate(string, "a") > > > > output: "a great language ruby is" > > > > ok that one is probably at upper end of the scale when it comes to > > difficulty but its quite focused. > > > > Anyone got any other string practice exercises that are short, > > relatively simple and use some of the methods?? > > > irb(main):002:0> "Ruby is a great language".reverse.split(" ").map {|w| > w.reverse}.join " " >