From: vasudevram Date: 2006-07-28T01:40:04+09:00 Subject: Re: OO Paradigm and Ruby Exercises for a Beginner Meador Inge wrote: > Picklegnome, > > I am happy to hear of your enthusiasm for Ruby and programming. > > Others have mentioned good books, so I will spare from adding to the list. > The bit of advice I can given is simple: just program a lot. You can > read web pages and books all day long, but some things you just won't > get until you come across them on your own. > > Don't get me wrong studying and reading are definitely great for > learning new ideas and the way others think about things. My point is > that you have to be trying to program and solve problems on your own > for it to be most effective. > > Best of luck! > > --Meador > Good suggestions by Meador. I'd like to add these: Since you're new to OOP, you might want to try writing small (OOP) programs that model real-world objects and their behaviour and interactions. E.g. Racing cars on a racing track. Classes like Car, with instances like Car1, Car2 (or SchumiCar (Michael Schumacher), etc. :), methods like Car#start, Car#stop, Car#changeGear, and so on. After writing some such basic classes and methods, write programs that use them, say to do simulations of a race-car session. No need to do a GUI initially - will complicate things, though could do later. Could just use print statements to the console. Simulations and game programming are a good way to learn/improve your programming skills, and hey - also fun :) Remember Matz's comments about why he created Ruby ... "I believe the purpose of life, is at least in part, to be happy" ... I'm pretty sure that point is one that has drawn many people towards learning and using Ruby. Once you've learnt some programming by doing this and some of the other suggestions given, then you can progress to modeling (non-physical-world) software concepts as classes and objects (e.g. Queue, DatabaseConnection, Thread, etc. - just some examples, may not be the best ones to illustrate what I mean). Also, as part of Meador's suggestion of programming a lot, another good thing to do is to download, read, understand and then *modify" programs written by others. Nothing shows whether you've understood some(one elses) code as much as modifying it and then seeing whether it works as per your intent or not. Cheers Vasudev ---------------------------------------------------------------------- Custom utility development in Ruby/Python/C/Java/UNIX Software consulting and training http://www.dancingbison.com ----------------------------------------------------------------------