From: Glenn Smith Date: 2005-04-09T15:08:34+09:00 Subject: Re: How should this really be coded in the Ruby style? Gents All really excellent points/suggestions. I like Douglas' use of the separate date format function which obviously removes some of the repetitiveness. Interesting how everybody picks up on the 'unless this do this' or 'do this unless' code. I also played with a number of styles for these. My thoughts were that I wanted to put 'what would happen usually' first, and 'what would happen if it failed' second. ie. 'do this but if it fails do that' or 'if !save then raise' On the other hand I like the tidier English of 'raise unless save'. Mmm, not sure which one to use now. Other than that, it sounds like in this small example I'm not a million miles away from writing things correctly. Thanks all. G On Apr 8, 2005 10:16 PM, Bill Kelly wrote: > > Btw, I think the indentation got garbled because your original had tabs in > > it - spaces are much safer. > > To be fair, its indentation was intact. It's just $#@#%#$ Outlook > Express that's too dain bramaged to display tabs reasonably. > (If you "Properties -> Message Source" it'll display properly.) > > [P.S. This post should not be construed as an argument for or against > tabs. ] > > Regards, > > Bill > > -- All the best Glenn Aylesbury, UK