Hacker News new | past | comments | ask | show | jobs | submit login

We're so different, you and I. "Getting code out of sight because it's ugly" is such a foreign concept. If a code block is that ugly, it either needs to be made not ugly or put directly in the line of sight with plentiful comments.

"Shouldn't have to read it" !== "won't ever have to read it."




I agree completely with this, all code should be visible, but I still go well over 80 personally because I'm don't, nor will anyone likely edit my code on a 80 char terminal. When I was hacking on an IBM mainframe through a 3270 terminal, the 80 character limit made a lot of sense.

Why use the 80 char rule because of an edge case of some throwback editing javascript in a term that only allows for 80 characters? I mean, who does that?


Me. When I bring up the Netbeans editor, there is a red line down the right margin at column 80, and I'm not inclined to change that setting, although I sometimes type a few characters past it. This is a wise tradition, handed down from the tribal elders :-) I sometimes need to see at least a little bit of something else on screen besides your hideously wide code.

If you ever have to print out code, it makes a nice line size convention as well. Printing is becoming less common, unless you publish books, but it's still worth considering that it might be easier for the reader if the lines aren't mind-numbingly long.

Why do newspapers have multiple columns of text, when clearly they have space to go 14 inches or more across?


Almost forgot: if you need more than 80 columns, your routine is probably too long. Indicated by deep nesting, and/or variable names that need to be more than one or two English words because the scope and intent of the variables is not obvious.


You don't write in Objective-C for an Apple then, eh?


Not much, no. (for a few weeks, 2 years ago, so literally, some, but not bloody much)

Can the args to messages not be put on a continuation line?


Yea, they can, but some of the names are overly verbose.


I mean even reviewing code on Github... if you go over 80 (or close to it, not sure the exact column count) it forces scroll.

I dunno, it's just convention. I break at 80 cols.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: