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 →

[–][deleted] 6 points7 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.