From: James Britt Date: 2008-02-13T16:52:14+09:00 Subject: Re: most useful instance methods Trans wrote: > > On Feb 12, 6:07 pm, Adam Akhtar wrote: >> Ive just been getting to grips with some of the string and array >> methods. The basics were easy enough such as reverse. Then came map and >> uniq. Im wondering what else is good to practice with. It seems to make >> sense to study new methods on the basis of their useage. So what methods >> do you constantly use or couldnt live without for arrays and strings >> without including the elementary stuff like push pop etc. >> >> Perhaps you think there arent that many methods but to a beginner like >> me every time i open the pickaxe to look at what method could help solve >> a problem I soon feel lost amongst them. > > I suggest reading though the whole reference section, at least enough > to get a quick imprint of every core method. Start with Kernel/Object > though. Good plan. The problem with trying to pick the "most used" is that it becomes self-fulfilling. Most people will tend to use the methods that are most familiar, which makes them *more* familiar, which makes them more often used. And so on. Here's a small hacking project: Write a ruby app that grabs a random API page from ruby-doc.org and brings it up in a browser. Run it a few times each day and scan over what you see. After a while, as you code, you'll start recalling various methods that seem just right for various tasks, and your Ruby vocabulary and experience will expand. -- James Britt www.risingtidesoftware.com - Wicked Cool Coding www.rubystuff.com - The Ruby Store for Ruby Stuff