From: Nikolai Weibull Date: 2005-03-23T09:11:59+09:00 Subject: Re: Any guides for good coding in Ruby? * James Edward Gray II (Mar 22, 2005 23:50): > Amen! I don't know who thought up the two space thing, but they were > out of line. :) In Ruby, you don't even need the extra characters to > keep lines short, generally. I'm set tabs to four spaces wide, but > it's definitely tabs all the way. Messing with the width of tabs is always crazier than using two-space indents. I don't see why you would need the extra indent in Ruby anyway, it's pretty clear without the additional horizontal whitespace. I began writing Ruby-code with an eight-space tab indent, but it made my code look chubby (it was wider than it was long). > And while we're getting things off our chest, it really bugs me when > people don't keep their code within the 80 character boundary > guideline. I've been reading all the links posted in this thread and > they've all recommended it, but I can sure tell you from running Ruby > Quiz that not everyone is listening. ;) Actually, for the Quiz, 72 would be a better limit, as that works best for mails. Seriously, though, the 80 character boundary is a thing of the past. Terminals (not to mention emulators) can be made wider, 132 being a good "standard" setting, so it's not even about backwards compatibility anymore. I find that I can write code the way I want it if I'm not constrained to 80 characters per line. (I only switched to a 132-character-wide terminal about 3 months ago, though, so I may change my mind yet again.), nikolai -- ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka ::: ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden ::: ::: page: minimalistic.org :: fun atm: gf,lps,ruby,lisp,war3 ::: main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}