Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Are 80 Columns Enough? 763

ThinkGeek writes "Dating back to the venerable DEC VT100, the 80 column terminal has served us well for over 25 years. Even now, many open source projects and common conventions require lines of code and documentation to fit on that terminal. I am not alone, judging by code I've seen in and out of the open source world, in finding that number insufficient for coding, much less more verbose writing. Given that modern graphical displays (and all popular editors) are capable of far more, is it time we came up with a new standard-sized terminal? If so, what should the new standard be?"
This discussion has been archived. No new comments can be posted.

Are 80 Columns Enough?

Comments Filter:
  • It wasn't the VT100 (Score:5, Informative)

    by Beryllium Sphere(tm) ( 193358 ) on Saturday July 07, 2007 @05:40PM (#19783031) Journal
    The 80-column limit comes from the size of an IBM punched card.
  • by Rosco P. Coltrane ( 209368 ) on Saturday July 07, 2007 @05:50PM (#19783135)
    Actually, there is a logic in the 80 columns and 25 lines display: it so happens that 80x25 = 2000, which is just under 2048. That means with those 2K of video RAM (way expensive back then), you could use 2000 to display caracters, and use the remaining 48 bytes to store general display flags and statuses, or do whatever you like (I used to use that area in MDA video cards to store things back in my, ahem, virus-writing days...)

    So in short, 80x25 optimizes memory usage.
  • by tuxlove ( 316502 ) on Saturday July 07, 2007 @05:52PM (#19783155)
    then your code is too complicated and needs to be modularized. Or so said a professor of mine. He believed if you hit the 80th column that you should probably break your function down further into one or more additional functions. As a rule of thumb, this has served me well, about 95% of the time at least. Really, if your code is so many levels deep that it runs over 80 columns, it's probably difficult to keep track of things in there.
  • by suv4x4 ( 956391 ) on Saturday July 07, 2007 @05:54PM (#19783181)
    We have the CPU power to do so much more now. We shouldn't need to manually wrap our lines - why can't the IDE intelligently wrap it for us, so that everyone gets their screen used to the fullest.

    Actually most IDE-s wrap it, and while it may be confusing at times, it works mostly well.
    Well, most wrap it, except Eclipse. Power of the open source, huh* ..

    * I am an Eclipse user.
  • by EvanED ( 569694 ) <{evaned} {at} {gmail.com}> on Saturday July 07, 2007 @05:55PM (#19783197)
    Bah, my second and third examples should have the '//' glyphs lined up. I previewed, but only glanced at the result and didn't notice.
  • by hzoli ( 138425 ) on Saturday July 07, 2007 @06:28PM (#19783455)
    Most of the time I use my laptop with a 1024x768 resolution screen, and that's just enough to fit two 80 character wide emacs windows next to each other. I usually have several source files or different sections of the same file open next to each other, and I would not give that up in favor of longer lines. And that's with IMO the smallest readable font, 6x13 a.k.a `fixed'. There are laptops with bigger screens, but they are bigger and havier than my Thinkpad X60.
  • by Anonymous Coward on Saturday July 07, 2007 @06:39PM (#19783559)
    I am a strong proponent of the 80 character width. While programming,
    it allows me to keep two or more code files open with no or only limited
    overlapping on my 1600x1200 screen. So I don't need to switch between
    windows that often. A similar reason applies to administrative work.
    Often, I have to use multiple terminal windows in parallel to analyse problems.
    Output that relies on a larger width than 80 characters is a real
    pain in this context. Since there is no standard, I rescale the window
    to get the whole line, just to find out a few pages down that there
    is still a longer line. Moving then to other tasks in the same terminal
    window, much output requires a lot less than 80 characters. So suddenly
    most of the window estate remains unused and I have to scale it down
    to make room for other windows on my screen. So I am constantly
    resizing my windows.

    Also, as others have already said, more than 80 characters are really
    bad ergonomically. Even 80 characters are likely already too much.
    A good way to reduce the required space for coding is to reduce the
    indentation. In our company, we reduced it to two characters, be it
    Java, C, Perl or XML. We also abstain from other fancy code formatting
    that would waste space, e.g. aligning the right sides in a block of
    multiple assignment statements, or indenting following parameters in
    the same depth of the first parameter. This works well.

  • by Anonymous Coward on Saturday July 07, 2007 @07:27PM (#19783953)
    > And the gauge of UK railway lines comes from the width of two horses arses.

    No, it does not. That is an urban legend.

  • by whit3 ( 318913 ) on Saturday July 07, 2007 @08:03PM (#19784247)
    >>The 80-column limit comes from the size of an IBM punched card.

    >Urban myth perhaps? There's no relation between screen widths and punch cards.

    No myth. FORTRAN before 1977 was firmly attached to 80-character records
    with the last eight used only for sequence numbers. If you wanted your terminal
    to read/write a FORTRAN program (common 'way back then), it needed 72
    characters across. Some terminals (Tektronix 4010 for instance- my first bitmap
    screen) had exactly 72 characters.

    It bit me once or twice; if a filename was over 72 characters it crashed a shared-resource
    analysis program. When we pressed the author, he refused to increase the
    filename buffer size, citing the terminal width. Never liked that guy.
    Buffersize chauvinism....

    Also the ASR33 teletype used 8.5" paper and 10 characters per inch.
    Technically, it wasn't limited to 80 characters, BUT if you went over, you
    weren't gonna autowrap! The 14" paper in a fullsize lineprinter allowed 132
    characters, which is another 'standard' we hear about.

    FORTRAN and ASR33 both predate VT100 screens (and VT54 screens, too).
  • by Count_Froggy ( 781541 ) on Saturday July 07, 2007 @08:30PM (#19784429) Homepage Journal
    According to several sources (summarized in this Wikipedia article, http://en.wikipedia.org/wiki/Punch_card/ [wikipedia.org], the 80-column card format was formalized by IBM in 1928 on the size of the 1928 US Dollar bill. Almost everyone has copied this format, making it the 'standard' when the earliest digital computers were built. So, when the early terminals came out, it was natural to have screens the same width as the earlier card format. Early personal computers used a variety of formats from 40 character (e.g., Apple ][) to 64 character (e.g., TRS-80) to 80 character, but most moved to the 80 character 'standard'. Also, the early typewriter convention of 10 characters per inch (non-metric) results in 80 characters across a US Letter sized (or even A4) sheet of paper with some margins. This lent a lot of impetus for the glass terminal to be the same as the earlier paper terminal.
  • Re:First Column! (Score:5, Informative)

    by that this is not und ( 1026860 ) on Saturday July 07, 2007 @08:39PM (#19784483)
    80 columns is the convention of IBM Punched Cards. Which go back to before computers. The old pre-computer databases consisted of decks of punched cards. Jumper panels were used with physical card sorters to 'sort' the databases. If you wanted to generate a mailing list only for certain fields, you would put the whole deck of cards in the sorter and have it pull out just the cards you wanted. You'd put that deck of cards in a reader connected to a printer and it was configured to print out the correct fields in the right place on labels.

    This sort of 'data processing' long preceedes programmable digital computers. And the irony is that it's the kinda thing that many people in IT are still involved with. They're only incidentally involved with computers.
  • Re:First Column! (Score:2, Informative)

    by Anonymous Coward on Saturday July 07, 2007 @09:15PM (#19784733)
    Actually, I'm pretty sure that 80 was chosen because that was the standard typewriter width (US Letter and Legal is 8.5" wide, common typewriter pitch was 10cpi so that left .25" on each side as a margin) Or so I recall from my keyboarding class in High school.
  • Re:First Column! (Score:5, Informative)

    by Yaztromo ( 655250 ) on Saturday July 07, 2007 @09:18PM (#19784747) Homepage Journal

    No, 80 is not arbitrary. 64 or 128 would have been arbitrary.

    I don't know the history, but 80 was a deliberate design choice that goes against the electronics in at least one obvious way.

    IBM's most popular punch cards [wikipedia.org] from the 1920's onwards were 12 rows by 80 columns. A standard 80 x 25 video display can thus display two such cards stacked atop each other, with one row left over for displaying status information.

    The cards were initially not intended for binary encodings (although that became possible later), and thus there was no "power of two" basis for them. The 12 rows were enumerated as 0 - 9, with two extra punch zones that acted, in effect, as control characters.

    The choice of 80 columns was pretty much arbitrary -- indeed, IBM also made 51 column and 96 column cards at various points. 80 columns was big enough to record an 80-digit decimal number, and had no real special significance that I'm aware of.

    And now you know how the worlds most popular punch cards continue to influence our computing experience.

    Yaz.

  • Re:First Column! (Score:4, Informative)

    by martyros ( 588782 ) on Saturday July 07, 2007 @09:51PM (#19784977)

    According to a computer documentation class I took (i.e., writing tech manuals), optimal numbers of letters per line for reading is 50-70. With 80 characters per line, most lines will wrap around to be on the high end of that range. As far as readability is concerned, 128 would be "right out".

    Anyone know how many average characters per line old-school typewriters had?

  • Re:First Column! (Score:3, Informative)

    by WilliamSChips ( 793741 ) <`moc.liamg' `ta' `ytinifni.lluf'> on Saturday July 07, 2007 @10:08PM (#19785069) Journal
    Hungarians are the Magyars, not the Huns. The Huns were from Mongolia. Also: I occasionally use CamelCase when I'm about to say some phrase that's fairly common but that's because I UseWikisTooMuch.
  • Punched cards, baby (Score:3, Informative)

    by mbone ( 558574 ) on Saturday July 07, 2007 @10:39PM (#19785279)
    This way predated the VT 100.

    Punched cards (which is how I first programmed) came in 80 and 132 character widths. Since
    IBM machines read the punched cards, it was natural for IBM systems to be built on the same widths.

    I remember vividly email in the 1980's where if you sent emails with long lines to people on IBM mainframe
    machines, the results were basically undefined. Every time that would happen, I would think "punched
    cards strike again!"
  • Re:First Column! (Score:4, Informative)

    by hobo sapiens ( 893427 ) on Saturday July 07, 2007 @11:11PM (#19785477) Journal
    The Huns were European / central Asian, a long way from Mongolia. They controlled a large area in the final days of the Roman Empire (the one based in Rome, not Constantinople.) While it is held by some that Attila the Hun was of Mongolian origins, the area over which his rulership held sway was in what we would consider Europe / the Caucasus.

    http://www.boglewood.com/timeline/attila.html [boglewood.com]
    http://ancienthistory.about.com/cs/attilathehun/a/ attilathehun.htm [about.com]
    http://en.wikipedia.org/wiki/Attilla_the_hun [wikipedia.org]
    http://www.newadvent.org/cathen/02061b.htm [newadvent.org]

    Also, that the Huns were not the descendants of the Hungarians is a bit in question (see http://en.wikipedia.org/wiki/Maygar [wikipedia.org]).

    All this in a story about 80 column terminals. This is, like, a tangent of a tangent of a tangent. But then again, that's what makes /. so enjoyable!
  • Re:First Column! (Score:4, Informative)

    by bigtreeman ( 565428 ) <treecolin@@@gmail...com> on Saturday July 07, 2007 @11:27PM (#19785563)
    0. I agree, 80 columns is too much.
    1.
    2. Try forths 16 lines of 64 columns.
    3. One screen is 1 KB of text, simple.
    4.
    5. Room on the 80 col screen
    6. for line numbers and border.
    7.
    8. Factoring out code to shorter lines
    9. makes for more readable code.
    10.
    11. Forth also has a shadow screen
    12. of comment for each screen of code.
    13. Code and shadow both fit on 132 column.
    14.
    15. Way too simple for amazing complex code.
  • Re:First Column! (Score:2, Informative)

    by agbinfo ( 186523 ) on Saturday July 07, 2007 @11:38PM (#19785631) Journal
    I believe that there were 2 common choices:

    1) 10cpi (aka Pica) and;
    2) 12cpi (aka Elite).

  • by Doctor Memory ( 6336 ) on Sunday July 08, 2007 @12:33AM (#19786033)
    Actually, I think the author got it backwards: the VT-100 was the first terminal to support more than 80 columns. At least, it was the first one I ever saw. Most of the terminals we had around that time (evil ADM-3s and -5s, MiME-1s, VT-52s and those beautiful but useless Tek 4010/4014s[0]) would do the standard 80x24/25, and several sported "enhanced" character sets (bold, blinking, underlined, double-wide, etc.). The (DataMedia?) DT-80 was a VT-100 clone and supported 132 columns too. Oh, and soft scroll, I loved that. Useless when trying to get any real work done, but it looked so elegant when you were scrolling through a program listing or report.

    [0] They were bit-addressable video graphics terminals, and didn't scroll. So whenever you hit return on the bottom line, the cursor would just wrap around to the top line and print over whatever was already displayed, so you had to keep smacking the Clear button. Especially amusing when you make a typo in your source and the compiler spits out ten screenfuls of errors...
  • Re:First Column! (Score:4, Informative)

    by Rick.C ( 626083 ) on Sunday July 08, 2007 @02:34AM (#19786703)
    IBM's most popular punch cards from the 1920's onwards were 12 rows by 80 columns. A standard 80 x 25 video display can thus display two such cards stacked atop each other, with one row left over for displaying status information.


    Dude, that is so not true.

    Each column of a punched card was one byte. Each card contained 80 bytes of data, which was one line on a terminal.

  • Re:First Column! (Score:3, Informative)

    by Anne Thwacks ( 531696 ) on Sunday July 08, 2007 @04:11AM (#19787223)
    80 columns is the convention of IBM Punched Cards. Which go back to before computers.

    80 COlumns is the number of characters of 12 point fixed on a page of paper if you have decent margins. It probably goes back to Gutenberg or Caxton - anyway at least 400 years.

    By now people have adapred to it, and our eyes expect 80 columns.

  • by Colin Smith ( 2679 ) on Sunday July 08, 2007 @05:01AM (#19787471)
    No, it isn't.

    The first railway, colliery lines for transporting coal in the UK were pulled by horses.

     
  • by ModMeFlamebait ( 781879 ) on Sunday July 08, 2007 @07:21AM (#19788069)

    diff -Bwu


    Enjoy.
  • Re:First Column! (Score:3, Informative)

    by Schraegstrichpunkt ( 931443 ) on Sunday July 08, 2007 @11:05AM (#19789519) Homepage

    . . . or *gasp* the evil that is Hungarian notation.

    Systems Hungarian or Apps Hungarian? [joelonsoftware.com]

  • Re:First Column! (Score:2, Informative)

    by VTBassMatt ( 761333 ) on Sunday July 08, 2007 @01:24PM (#19790659) Homepage Journal

    Thus a layout was chosen, which was not based on ergonomic principles, but to slow the typer done.

    I'm mildly surprised that people still believe this. I thought it had been well-debunked. [straightdope.com]

  • Re:Not arbitrary. (Score:2, Informative)

    by derrida ( 918536 ) on Sunday July 08, 2007 @04:31PM (#19792033) Homepage

    The choice of 80 columns was pretty much arbitrary -- indeed, IBM also made 51 column and 96 column cards at various points. 80 columns was big enough to record an 80-digit decimal number, and had no real special significance that I'm aware of.
    The size of the IBM was made equal to the dollar bill [stanford.edu] of that time, allowing reuse of existing filing bins and adaptation of other currency manipulating equipment.

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...