Back in the day, I used punch cards in college computer courses. Languages like FORTRAN, COBOL, and assembler were column dependent, e.g. Col. 1 : Blank, or a "C" or "*" for comments Col. 1-5 : Statement label (optional) Col. 6 : Continuation of previous line (optional) Col. 7-72 : Statements Col. 73-80: Sequence number (optional, rarely used today) With the sequence numbers if you dropped the deck and scrambled the…
Why is 80 characters the 'standard' limit for code width?
11–20 of 46 posts
Re: Why is 80 characters the 'standard' limit for code width?
#1280 characters is also comfortably within the limits for presenting code in most books, except for pocket reference sized books. The actual limits for most books are about 85 characters, so that leaves some leeway. Even if I have the screen real estate, I don't think I'd want to intentionally write wide code, and I like self-explanatory names. On a 4k screen I might like Eclipse layouts that put the logging next to th…
Re: Why is 80 characters the 'standard' limit for code width?
#13Java programmers have variables longer than 80 characters now a days.
Re: Why is 80 characters the 'standard' limit for code width?
#14Re: Why is 80 characters the 'standard' limit for code width?
#15IME, there is a very strong correlation between good developers and short lines. Bad devs doesn't mind if some lines are 150+ chars long and require horizontal scrolling. They also don't care that much about consistent naming of symbols or having correctly indented code. There are very strong reasons for keeping your lines short, naming consistent and indentation in check. But at the end of the day, you either "get"…
Re: Why is 80 characters the 'standard' limit for code width?
#16While the initial reason may be historical, I've found that on smaller monitors 80 character width makes it just about wide enough to have two code windows side-by-side. That's why I usually tend to stick to that limit. Though on bigger monitors I often stick to 100.
It just like reading a text online. Most people would prefer shorter lines, compared to one extremely long one. It's simply easier to keep track of where you are.
Re: Why is 80 characters the 'standard' limit for code width?
#17Java programmers have variables longer than 80 characters now a days.
Most of their lines are incredibly compact. In fact, a lot of people who first read the code suffer a bit of a culture shock. It's just too... simple, and readable. Especially for C. This causes some to knock their own particular style of ANSI C as inadequate.
I think it's a testament to their genius. You'll probably never find a codebase as massive yet as readable and grokkable as theirs. If you're used to modern Linux code that copiously uses glib, D-Bus and a whole bunch of other libraries, you'll either find it a huge breath of fresh air, or completely blasphemous.
Re: Why is 80 characters the 'standard' limit for code width?
#18It's funny to start seeing more and more questions from people who started using computers with Windows 95. Actually, not it's not, little punks making me feel old, get off my lawn.
no
Re: Why is 80 characters the 'standard' limit for code width?
#19It's funny to start seeing more and more questions from people who started using computers with Windows 95. Actually, not it's not, little punks making me feel old, get off my lawn.
Re: Why is 80 characters the 'standard' limit for code width?
#20Java programmers have variables longer than 80 characters now a days.
As a primarily Java programmer, those folks need to be drawn and quartered.