From: Peter Hickman Date: 2010-06-30T22:45:53+09:00 Subject: Re: Best practices resource/guidance for strings --001485f45438610b10048a3f921b Content-Type: text/plain; charset=ISO-8859-1 Personally doing things on one line is not a sin of itself. Only when it is overdone! As to what counts as overdone depends on your reading ability. Splitting things onto individual lines allows you to insert logging at various points without fear of breaking the code which the one line approach does not. However the multiline approach can make an insignificant part of the code take up lots of screen real estate which can make the larger code harder to read. For example x.downcase.gsub(/\s+/, ' ').strip.capitalize is a fairly easy to read clean up on a string but if it goes multiline x.downcase! x.gsub!(/\s+/, ' ') x.strip! x.capitalize! not only does it take up more of the screen but it has also altered x, something that the single line version did not. Of course if things get really silly you could just create a function and stuff all the code in there. --001485f45438610b10048a3f921b--