C++: why 80 charachters??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Doe

    C++: why 80 charachters??

    I write code as long as 250+ columns sometimes (when the code refers to
    a single concept), and I don't understand why people complain about
    that. Just use the word wrap, right?

    People who write 80 columns force everybody else in the world to see
    their code in a narrow stripe of screen, when almost every programmer
    nowdays has 1280x1024+ screen resolution. Many have 1600+!

    If the algorithm does not fit into one screen, you are going to make
    mistakes when writing or reading it. Losing 2/3 of the screen to stay
    into 80 charachters seems nonsense to me.
  • Min,Lee

    #2
    Re: why 80 charachters??

    Maybe such things are called 'portability'.. .
    80 columns are quiet enough for me to code. :-)
    I would rewrite the code if it exceeds..
    Another reason (maybe the major) is to use text-mode screen!! :-)
    I prefer to code in text-mode to the graphical mode...


    "John Doe" <johndoe@nowher e.com> wrote in message
    news:c4hctt$meq $2@news.vanderb ilt.edu...[color=blue]
    > I write code as long as 250+ columns sometimes (when the code refers to
    > a single concept), and I don't understand why people complain about
    > that. Just use the word wrap, right?
    >
    > People who write 80 columns force everybody else in the world to see
    > their code in a narrow stripe of screen, when almost every programmer
    > nowdays has 1280x1024+ screen resolution. Many have 1600+!
    >
    > If the algorithm does not fit into one screen, you are going to make
    > mistakes when writing or reading it. Losing 2/3 of the screen to stay
    > into 80 charachters seems nonsense to me.[/color]


    Comment

    • Leor Zolman

      #3
      Re: C++: why 80 charachters??

      On Thu, 01 Apr 2004 09:36:28 -0600, John Doe <johndoe@nowher e.com> wrote:
      [color=blue]
      >I write code as long as 250+ columns sometimes (when the code refers to
      >a single concept), and I don't understand why people complain about
      >that. Just use the word wrap, right?[/color]

      I guess if the result of your editor's word-wrapping algorithm is
      acceptable to you, party down. Will that also be the case, though, with
      everyone who may ever need to view your code?
      [color=blue]
      >
      >People who write 80 columns force everybody else in the world to see
      >their code in a narrow stripe of screen, when almost every programmer
      >nowdays has 1280x1024+ screen resolution. Many have 1600+![/color]

      For me, to be able to fit more than about 130 characters on my
      (1400-pixel-wide) screen would require reducing the font size to something
      my 45-year-old eyes would not enjoy trying to read (I get enough headaches
      as it is, thank you very much). Not to mention the fact that I may want to
      fit another window next to my editor while editing (or at least be able to
      see some portion of it)
      [color=blue]
      >
      >If the algorithm does not fit into one screen, you are going to make
      >mistakes when writing or reading it. Losing 2/3 of the screen to stay
      >into 80 charachters seems nonsense to me.[/color]

      Bah. If the algorithm doesn't fit on one (modern-length) screen, it's too
      complicated (or uses trivial constructs like lots of switch cases).

      What about printing? Are you pleased with the results of trying to print
      your file with the 250+ columns? I guess you can customize some sort of a
      print utility (like the ZLPR program I give away on my site) to do
      intelligent things with those long lines, but I think sometime, somewhere,
      someone is likely to curse you for them.
      -leor


      --
      Leor Zolman --- BD Software --- www.bdsoft.com
      On-Site Training in C/C++, Java, Perl and Unix
      C++ users: Download BD Software's free STL Error Message Decryptor at:
      An STL Error Decryptor for C++ by Leor Zolman of BD Software - available to download here

      Comment

      • Mike Wahler

        #4
        Re: why 80 charachters??


        "John Doe" <johndoe@nowher e.com> wrote in message
        news:c4hctt$meq $2@news.vanderb ilt.edu...[color=blue]
        > I write code as long as 250+ columns sometimes (when the code refers to
        > a single concept), and I don't understand why people complain about
        > that. Just use the word wrap, right?
        >
        > People who write 80 columns force everybody else in the world to see
        > their code in a narrow stripe of screen, when almost every programmer
        > nowdays has 1280x1024+ screen resolution. Many have 1600+!
        >
        > If the algorithm does not fit into one screen, you are going to make
        > mistakes when writing or reading it. Losing 2/3 of the screen to stay
        > into 80 charachters seems nonsense to me.[/color]

        Warning: Today is April 1.

        -Mike


        Comment

        • John Carson

          #5
          Re: why 80 charachters??

          "John Doe" <johndoe@nowher e.com> wrote in message
          news:c4hctt$meq $2@news.vanderb ilt.edu[color=blue]
          > I write code as long as 250+ columns sometimes (when the code refers
          > to a single concept), and I don't understand why people complain about
          > that. Just use the word wrap, right?[/color]

          Wordwrapped code is unreadable because it wrecks indentation.
          [color=blue]
          > People who write 80 columns force everybody else in the world to see
          > their code in a narrow stripe of screen, when almost every programmer
          > nowdays has 1280x1024+ screen resolution. Many have 1600+![/color]

          Many also use multi-window IDEs, so that the source code window is only a
          fraction of the screen.
          [color=blue]
          > If the algorithm does not fit into one screen, you are going to make
          > mistakes when writing or reading it. Losing 2/3 of the screen to stay
          > into 80 charachters seems nonsense to me.[/color]

          I find that I can only carefully check code on hardcopy. With a lot of
          columns, the hardcopy will be wordwrapped and hence unreadable.


          --
          John Carson
          1. To reply to email address, remove donald
          2. Don't reply to email address (post here instead)

          Comment

          • red floyd

            #6
            Re: C++: why 80 charachters??

            John Doe wrote:
            [color=blue]
            > I write code as long as 250+ columns sometimes (when the code refers to
            > a single concept), and I don't understand why people complain about
            > that. Just use the word wrap, right?
            >
            > People who write 80 columns force everybody else in the world to see
            > their code in a narrow stripe of screen, when almost every programmer
            > nowdays has 1280x1024+ screen resolution. Many have 1600+!
            >
            > If the algorithm does not fit into one screen, you are going to make
            > mistakes when writing or reading it. Losing 2/3 of the screen to stay
            > into 80 charachters seems nonsense to me.[/color]

            Because some of us are old fashioned and like hard copy? And 12 point
            courier is easier to read on standard letter size paper when it's 80
            columns?

            [RANT type="old-geezer"]
            These darned kids and their newfangled screens! Why back in my day, we
            had to punch our programs onto Hollerith cards! And we had to walk
            fifteen miles to do it... In a raging snowstorm... Uphill... Both ways!
            And we were glad to do it, too! And we didn't have no fancy "computers"
            neither! We had to run them by hand! Darned kids... rassum fassum
            mumble grumble.
            [/RANT]

            Comment

            • Julie

              #7
              Re: C++: why 80 charachters??

              John Doe wrote:[color=blue]
              >
              > I write code as long as 250+ columns sometimes (when the code refers to
              > a single concept), and I don't understand why people complain about
              > that. Just use the word wrap, right?
              >
              > People who write 80 columns force everybody else in the world to see
              > their code in a narrow stripe of screen, when almost every programmer
              > nowdays has 1280x1024+ screen resolution. Many have 1600+!
              >
              > If the algorithm does not fit into one screen, you are going to make
              > mistakes when writing or reading it. Losing 2/3 of the screen to stay
              > into 80 charachters seems nonsense to me.[/color]

              You can't see all 250 cols at once, right?

              Personally, I do not like horizontal scrolling and find that the editor word
              wrap feature is pretty weak w/ no customizability (at least in the editor that
              I use).

              I try to keep it within the general confines of my displayed page, which is
              pretty subjective, but usually around a 100-110 cols.

              Comment

              • Leor Zolman

                #8
                Re: why 80 charachters??

                On Thu, 01 Apr 2004 16:09:19 GMT, "Mike Wahler" <mkwahler@mkwah ler.net>
                wrote:
                [color=blue]
                >
                >"John Doe" <johndoe@nowher e.com> wrote in message
                >news:c4hctt$me q$2@news.vander bilt.edu...[color=green]
                >> I write code as long as 250+ columns sometimes (when the code refers to
                >> a single concept), and I don't understand why people complain about
                >> that. Just use the word wrap, right?
                >>
                >> People who write 80 columns force everybody else in the world to see
                >> their code in a narrow stripe of screen, when almost every programmer
                >> nowdays has 1280x1024+ screen resolution. Many have 1600+!
                >>
                >> If the algorithm does not fit into one screen, you are going to make
                >> mistakes when writing or reading it. Losing 2/3 of the screen to stay
                >> into 80 charachters seems nonsense to me.[/color]
                >
                >Warning: Today is April 1.[/color]

                Damn, Mike, you just took all the wind out of the sails of my righteous
                indignation ;-)
                -leor
                [color=blue]
                >
                >-Mike
                >[/color]

                --
                Leor Zolman --- BD Software --- www.bdsoft.com
                On-Site Training in C/C++, Java, Perl and Unix
                C++ users: Download BD Software's free STL Error Message Decryptor at:
                An STL Error Decryptor for C++ by Leor Zolman of BD Software - available to download here

                Comment

                • red floyd

                  #9
                  Re: C++: why 80 charachters??

                  red floyd wrote:
                  [rant deleted]
                  sorry, I thought I had turned on line wrapping but my reader (moz 1.6)
                  is showing it extended to 250 lines :-)
                  Kind of ironic, i guess...

                  Comment

                  • Leor Zolman

                    #10
                    Re: C++: why 80 charachters??

                    On Thu, 01 Apr 2004 16:23:22 GMT, red floyd <no.spam@here.d ude> wrote:
                    [color=blue]
                    >[RANT type="old-geezer"]
                    >These darned kids and their newfangled screens! Why back in my day, we
                    >had to punch our programs onto Hollerith cards![/color]

                    [RANT type="older-geezer?"]
                    But I bet you never had to pencil in your Hollerith codes onto bubble cards
                    and wait 4-5 days for them to travel to the computer and back...before you
                    could begin to fix your /bubbling/ errors ...
                    [/RANT]

                    [color=blue]
                    >And we had to walk
                    >fifteen miles to do it... In a raging snowstorm... Uphill... Both ways!
                    >And we were glad to do it, too! And we didn't have no fancy "computers"
                    > neither! We had to run them by hand! Darned kids... rassum fassum
                    >mumble grumble.
                    >[/RANT][/color]

                    --
                    Leor Zolman --- BD Software --- www.bdsoft.com
                    On-Site Training in C/C++, Java, Perl and Unix
                    C++ users: Download BD Software's free STL Error Message Decryptor at:
                    An STL Error Decryptor for C++ by Leor Zolman of BD Software - available to download here

                    Comment

                    • red floyd

                      #11
                      Re: C++: why 80 charachters??

                      Leor Zolman wrote:[color=blue]
                      > On Thu, 01 Apr 2004 16:23:22 GMT, red floyd <no.spam@here.d ude> wrote:
                      >
                      >[color=green]
                      >>[RANT type="old-geezer"]
                      >>These darned kids and their newfangled screens! Why back in my day, we
                      >>had to punch our programs onto Hollerith cards![/color]
                      >
                      >
                      > [RANT type="older-geezer?"]
                      > But I bet you never had to pencil in your Hollerith codes onto bubble cards
                      > and wait 4-5 days for them to travel to the computer and back...before you
                      > could begin to fix your /bubbling/ errors ...
                      > [/RANT]
                      >[/color]

                      Yeah! I did! Back in '75 my Jr. High sent out bubble cards! I wanted
                      to be '1337, though (OK, so back then we didn't use 1337-sp33k), and I
                      ran a job that created a bunch of custom $JOB cards, so I didn't have to
                      waste one bubble card with the $JOB bubble filled in!

                      Comment

                      • Leor Zolman

                        #12
                        Re: C++: why 80 charachters??

                        On Thu, 01 Apr 2004 17:47:42 GMT, red floyd <no.spam@here.d ude> wrote:
                        [color=blue]
                        >Leor Zolman wrote:[color=green]
                        >> On Thu, 01 Apr 2004 16:23:22 GMT, red floyd <no.spam@here.d ude> wrote:
                        >>
                        >>[color=darkred]
                        >>>[RANT type="old-geezer"]
                        >>>These darned kids and their newfangled screens! Why back in my day, we
                        >>>had to punch our programs onto Hollerith cards![/color]
                        >>
                        >>
                        >> [RANT type="older-geezer?"]
                        >> But I bet you never had to pencil in your Hollerith codes onto bubble cards
                        >> and wait 4-5 days for them to travel to the computer and back...before you
                        >> could begin to fix your /bubbling/ errors ...
                        >> [/RANT]
                        >>[/color]
                        >
                        >Yeah! I did! Back in '75 my Jr. High sent out bubble cards! I wanted
                        >to be '1337, though (OK, so back then we didn't use 1337-sp33k), and I
                        >ran a job that created a bunch of custom $JOB cards, so I didn't have to
                        >waste one bubble card with the $JOB bubble filled in![/color]

                        Guess I lost the bet ;-)
                        I think it was 1974 I did it first (Hollywood High School). I rapidly
                        discovered free keypunch facilities at LACC down the street, and USC's. At
                        USC's Keck Management school they'd let /anyone/ come in off the street and
                        hack their VDTs. One day I left a BASIC program running to calculate the
                        square root of 5 to a few hundred places for a project a math teacher was
                        doing on Chi, and when I returned (it had been running about four hours by
                        then), there was a crowd around the screen. I had to shove through with my
                        pad and paper to get to the front and copy down all the digits /very
                        carefully/ (I guess they either didn't have printers or I didn't want to
                        have to slither up to the pick-up window and identify myself as the user of
                        an account I'd peeked at someone typing the password to...)
                        -leor


                        --
                        Leor Zolman --- BD Software --- www.bdsoft.com
                        On-Site Training in C/C++, Java, Perl and Unix
                        C++ users: Download BD Software's free STL Error Message Decryptor at:
                        An STL Error Decryptor for C++ by Leor Zolman of BD Software - available to download here

                        Comment

                        • Derek

                          #13
                          Re: C++: why 80 charachters??

                          John Doe wrote:
                          [color=blue]
                          > I write code as long as 250+ columns sometimes (when the
                          > code refers to a single concept), and I don't understand
                          > why people complain about that. Just use the word wrap,
                          > right?
                          >
                          > People who write 80 columns force everybody else in the
                          > world to see their code in a narrow stripe of screen,
                          > when almost every programmer nowdays has 1280x1024+
                          > screen resolution. Many have 1600+!
                          >
                          > If the algorithm does not fit into one screen, you are
                          > going to make mistakes when writing or reading it. Losing
                          > 2/3 of the screen to stay into 80 charachters seems
                          > nonsense to me.[/color]

                          I like to stay within 72 columns in case Fortran 77 makes a
                          comeback and I have to port all of my code.

                          Comment

                          • John Doe

                            #14
                            Re: C++: why 80 charachters??

                            > You can't see all 250 cols at once, right?[color=blue]
                            >
                            > Personally, I do not like horizontal scrolling and find that the editor word
                            > wrap feature is pretty weak w/ no customizability (at least in the editor that
                            > I use).
                            >
                            > I try to keep it within the general confines of my displayed page, which is
                            > pretty subjective, but usually around a 100-110 cols.[/color]

                            I can see about 185 chars with Lucida Console size 9, 1600x1200
                            resolution, Visual Studio; but I can arrive at 250 with size 7 and
                            Lucida Console is still readable enough. It's just that I'm currently
                            with a 15" laptop so size 9 is ok.

                            Lucida console is THE font for programming!!


                            Seems a bit a strange font at first, but after a couple of days you will
                            never go back from Lucida Console.

                            Comment

                            • John Doe

                              #15
                              Re: C++: why 80 charachters??

                              Leor Zolman wrote:
                              [color=blue]
                              > I guess if the result of your editor's word-wrapping algorithm is
                              > acceptable to you, party down. Will that also be the case, though, with
                              > everyone who may ever need to view your code?[/color]

                              This might be a problem of the word wrapper not being smart enough with
                              aligning the indentation, but it's not a flaw in my reasoning.

                              You mean that the reason for which everybody in the world codes in 80
                              chars is because nobody spent a couple of hours for implementing the
                              indentation in the word wrappers?

                              Please don't say that! :-)

                              [color=blue]
                              > For me, to be able to fit more than about 130 characters on my
                              > (1400-pixel-wide) screen would require reducing the font size to something
                              > my 45-year-old eyes would not enjoy trying to read (I get enough headaches
                              > as it is, thank you very much). Not to mention the fact that I may want to
                              > fit another window next to my editor while editing (or at least be able to
                              > see some portion of it)[/color]

                              Then please try the Lucida Console font for 2 days.
                              Looks a bit strange at first but after a couple of days you will never
                              leave that font anymore. It's THE font for programming.

                              It seems a font for doing OCR: crazily readable after your brain gets
                              used to it. I guess it can certainly improve your headache. It's
                              readable up to size 7. I use 9, you can try 10 if you have headaches...
                              even at size 10 you will definitely go over 130 chars per line even with
                              side windows


                              [color=blue]
                              > What about printing?[/color]

                              Yeah it's not intended for printing.
                              But... who prints the programs anymore anyway?

                              Comment

                              Working...