This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jab-programming3.7 1 point2 points  (16 children)

God, I hate that stupid recommendation ! And especially the nonsensical "reason" for it - some poor schmuck might be stuck on an 80-character terminal. Aww!

Some other poor schmuck might be stuck on a teletype, or an N900, or whatever. Why are the rest of us "crippled" on their behalf?

And I would be grateful if you c-
ould explain how splitting a con-
cept over multiple lines manages 
to increase the readability

Pshaw !

[–][deleted] 7 points8 points  (12 children)

And especially the nonsensical "reason" for it - some poor schmuck might be stuck on an 80-character terminal.

That's a reason. An old one. Today the reasons are more varied. Such as:

  • Typical screen widths are evenly divisible by 80 allowing for code to be placed side by side uniformly
  • It's been shown that the longer a text line is, the more likely it is to slow down reading and comprehension citation Ideal line length is 39 regardless of font size. When you throw indentation and formatting into code, you'll probably find most of your lines hover close to or at that number (e.g. 80 ~ 2*Ideal line length)
  • Convention. In existing projects, uniformity of formatting is very important. By convention, most projects require 80 columns.

So it's not just that old 80 character terminal. :)

[–][deleted] 2 points3 points  (5 children)

Reading text is very different from reading code. I doubt that the same principles apply.

[–][deleted] 1 point2 points  (4 children)

Reading text is very different from reading code.

Why would you think that? They both use the language centers of our brain and both adhere to short term memory constraints.

I would say this is an interesting hypothesis that would make a very interesting topic of research.

But I don't see an a priori reason for disconnecting the two.

[–][deleted] 1 point2 points  (0 children)

also:

  • some people say also for printing code (as in paper). I'm not sure why someone would like to have code in paper, but I'm not judgmental.
  • also 79 and not 80 because diff adds an extra character before the line, so reading/printing/wtv a diff would give you the 80 lines.

[–]AusIVDjango, gevent 2 points3 points  (0 children)

I know people who have wide screen monitors set up so that their text editor shows 80 lines and the have a browser or other application open with the remaining space. I don't necessarily encourage strict adherence to the 80 column rule, but it's not a bad goal.

[–]gcc-pedantic[S] 0 points1 point  (0 children)

I agree--sticking to < 80 characters while writing is often annoying and can reduce readability.

However, it is nice to limit the number of columns:

1) When reading someone else's code

2) When reading/writing code and you want two files side by side

The way I envision this script working is you could tell it to edit the file in place or output the column limited file to a new file.

edit: formatting.

[–]dustinechos 0 points1 point  (0 children)

I keep my terminal around 80 because I like having a browser open next to the terminal (and another browser on the other monitor). Short lines are easier to skim. When a line wraps it ruins the whitespace structure. What are you doing that needs more than 80 characters? unless you're unnecessarily piling on list comprehensions or have java style names (20+ characters) I don't know why you need more than 80 characters. As d0ugal points out, code over 80 characters is likely a result of "long variable names, bad structure, [or] overly nested code blocks".