IMO your second version is better since the intent is clear.  IMO,
make the intent clear at the expense of concision.

However, do what works best for you and your team.

On 4/5/06, Jean-Charles Carelli <jnchrls / flashcodersny.org> wrote:
> I'm working my way through the Pickaxe book and I have a question
> regarding syntax and best practices.
>
> Example from page 64
>
>      # 1 Book example
>      songs.append(Song.new(title, name, mins.to_i * 60 + secs.to_i))
>
>
>     # 2 Alternate version.
>      duration = mins.to_i * 60 + secs.to_i
>      songs.append(Song.new(title, name, duration))
>
>
> Version 1 is very concise but harder to read. Ruby is very intuitive
> but I find the second example easier to read.  What is everyone else
> doing?
>
> J-C
>
>
>
>


--
Keith Sader
ksader / gmail.com
http://www.saderfamily.org/roller/page/ksader