From: Daniel Schierbeck Date: 2007-02-22T19:15:37+09:00 Subject: Re: Trade-off between variable name descriptiveness and readability On Thu, 2007-02-22 at 14:32 +0900, Daniel Finnie wrote: > As a mentor of the new adopt-a-newbie system, which I think is going > excellently, I was reviewing a 99-bottles-of-beer method. We went over > what he had, what I thought could be better and I showed an example of > exactly how I would do it, which was this: > > > def sing_song(start) > > start.downto(1) do |numBottles| > > puts "#{numBottles.bottles} of beer on the wall, > #{numBottles.bottles} of beer!" > > puts "Take one down, pass it around, #{(numBottles-1).bottles} of > beer on the wall" > > puts > > end > > end It should be "num_bottles" if nothing else! ;) Cheers, Daniel