News for hackers. Stuff that matters.
Re:Sinatra in 8 lines by apgwoz on Tuesday March 08, 2011 @03:55PM (#2302556)
I was partial to:

> wrap at 200 characters to make it readable on a terminal

What happened to the days of 80 character line limits?

Re:Sinatra in 8 lines by snprbob86 on Wednesday March 09, 2011 @02:36AM (#2304220)
I've got a 27" iMac, and I've recently moved to a 79 character limit on Python, Ruby, shell scripts, Sass, Javascript, and pretty much everything else but HTML/Haml.

I now write better (i.e. flatter) code that is easier to compare to my other (better :-P) code.

Highly recommended.

Re:Sinatra in 8 lines by apgwoz on Wednesday March 09, 2011 @08:31AM (#2304753)
I'm almost the same way. I don't however used 79, it's normally like 75.
Re:Sinatra in 8 lines by mapleoin on Tuesday March 08, 2011 @04:14PM (#2302610)
I think that was tongue-in-cheek.
Re:Sinatra in 8 lines by tjogin on Tuesday March 08, 2011 @04:13PM (#2302607)
The visual user interface happened.
Re:Sinatra in 8 lines by thenduks on Tuesday March 08, 2011 @04:52PM (#2302728)
Odd. my 'visual user interface' for editing text is still about 80 characters wide. I just get to decide on how many pixels that is now with fonts/sizes/etc. I'm not sure why I'd want more horizontal room than that - readability begins to suffer greatly (not for you? think of the others you work with!).
Re:Sinatra in 8 lines by elliottcable on Tuesday March 08, 2011 @06:11PM (#2302988)
I actually spent an inordinate amount of time calculating the ideal a while back. As a sometime designer, I’m quite intimately familiar with the limits of comfortable reading for the human eye. After a silly quantity of math, I arrived at exactly 115 columns in fixed-width text as the ideally comfortable balance between readability and compactness.

Subtracting two for `diff` output, I hard-wrap all of my source-code and documentation files at column 113 exactly, and have for quite a while. It results in some quite sane output, in my opinion: https://github.com/elliottcable/Paws.c/blob/d2a5f3f/Source/P...

There are, of course, arguments to be made about source code itself; arguments you didn’t generally need to worry about at 78 characters, but that start to come into play when given that extra 35 columns; you need to start worrying about whether a given line of code is sane or readable once it starts to stretch towards 113 characters. There’s some situations where that’s perfectly normal and looks fine; but there’s also several where that indicates a serious problem in your code’s style. It’s just one more thing to think about while you design your source code.

Re:Sinatra in 8 lines by smanek on Wednesday March 09, 2011 @05:03AM (#2304446)
What "silly quantity of math" did you do to reach your conclusion?

I would have assumed that this sort of thing was simply an unquantifiable aesthetic preference (as long as you're below the char width of the screen, of course). I'm very interested in learning more about how you can come up with a 'right' answer to this sort of question, since I struggle with similar problems all the time (website layouts, etc).

Re:Sinatra in 8 lines by thenduks on Tuesday March 08, 2011 @06:55PM (#2303130)
I definitely agree. It matters more that there is a sane limit than what that limit actually is. Your 113 column files look good to me.
Re:Sinatra in 8 lines by tjogin on Wednesday March 09, 2011 @01:35AM (#2304114)
I was kidding, a little. I think 80 characters wide feels a bit cramped (and an artifact from a time before the visual user interface and high resolution displays), but 200 character lines is clearly way too much.