From: James Edward Gray II Date: 2005-03-23T09:34:33+09:00 Subject: Re: Any guides for good coding in Ruby? On Mar 22, 2005, at 6:11 PM, Nikolai Weibull wrote: >> 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. All space and tab holy war fun aside, I strongly disagree on this point and would like a chance to plead my case. Here's some food for thought: If it's so in the past, why does almost everyone still recommend it? The truth is that is has nothing to do with terminals anymore, in my not at all humble opinion. You've just pointed out a great reason above: email clients. Here's another one: Web pages. 90% of the problems I have with the current Ruby Quiz site are that the code often overflows the boxes. I hand edit each and every chunk of code in a never-ending battle against this. I'm trying to come up with a good solution for it in the Ruby Quiz 2.0 site, but that's harder than it sounds. I want the new site to include the code as that'll open up a lot of exciting options, but I have to figure out how to do this realistically first and this issue is the biggest hurdle. Ironically, I still don't think those are the biggest reason to do it. I believe the number one reason you should still keep code at 80 characters per line is to help authors put your work in their books. It just so happens that a typical programming book with reasonable fonts and light indenting of the code examples has darn near 80 characters of space to play with. You do want everyone writing about your code don't you? I bet you'll shorten that margin back up when you begin writing your first masterpiece. ;) To summarize, it isn't just about terminals. Be kind to your email reader, webmaster, and author. Stick with 80. James Edward Gray II