From: Pistos Christou Date: 2006-04-07T00:58:04+09:00 Subject: Re: best practices Jean-Charles Carelli: I always go for a little more verbosity rather than sacrifice clarity or readability in an attempt to compress code into the most terse articulation. I use whitespace and my-typing-speed-is-fast-enough-to-type-long variable names, and break up long lines with newlines and indentation (as per Chiaro Scuro's examples). Jeff Cohen wrote: > def append_song(title, name, mins, secs) > duration = mins.to_i * 60 + secs.to_i > song = Song.new title, name > songs.append song > end > > so then the original line way above becomes > > append_song title, name, mins, secs This sort of throws up a warning flag for me. :) Code like that makes it feel like PHP's becauseweshyawayfrom_objectsandnamespaces_inthisdomain_wewilldothis_withthesethings( args... ), and moves away from myobject.mymethod.myothermethod( args... ). I would still keep songs.append song (or songs << song). Pistos -- Posted via http://www.ruby-forum.com/.