Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. How wide is your code?

How wide is your code?

Scheduled Pinned Locked Moved The Lounge
questiondiscussion
68 Posts 41 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Roger Wright

    Printing is no issue to me; I've got a 24" HP plotter, so any page up to 150' wide is no trouble. ;P My screen is somewhat more limited, however.

    "A Journey of a Thousand Rest Stops Begins with a Single Movement"

    U Offline
    U Offline
    urbane tiger
    wrote on last edited by
    #36

    Roger Wright wrote:

    Printing is no issue to me; I've got a 24" HP plotter, so any page up to 150' wide is no trouble ;P

    Does that mean you've still got a working copy of Sideways, mine morphed into a movie :sigh:

    Multi famam, conscientiam pauci verentur.(Pliny)

    1 Reply Last reply
    0
    • D Dr Walt Fair PE

      charlieg wrote:

      I'm one of those old geezers still writing code, dangerously close to the 3 decade mark.

      Youngster! I wrote my first program in 1967 (remember punch cards? ), so I'm working on my 5th decade. I usually try to keep my code on a normal screen or page, so I keep it around 80 characters wide, but sometimes I violate that guideline.

      CQ de W5ALT

      Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

      J Offline
      J Offline
      JDL EPM
      wrote on last edited by
      #37

      Walt Fair, Jr. wrote:

      Youngster! I wrote my first program in 1967 (remember punch cards? ), so I'm working on my 5th decade. I usually try to keep my code on a normal screen or page, so I keep it around 80 characters wide, but sometimes I violate that guideline.

      First Program: 1965 First Computer: IBM 1620 First Language: Gotran (a simplified Fortran - only one operation per punch card) First printer: IBM golf ball typewriter Page Width: Whatever the flavour of the month is for my employer. 43 pay cheques to go!

      D 1 Reply Last reply
      0
      • B Brady Kelly

        Whatever the other developer hasn't got, surely they have line wrap, the ingrates.

        You really gotta try harder to keep up with everyone that's not on the short bus with you. - John Simmons / outlaw programmer.

        U Offline
        U Offline
        urbane tiger
        wrote on last edited by
        #38

        I would have thought common sense was a pre-req for line wrap, in which case perhaps they don't.

        Multi famam, conscientiam pauci verentur.(Pliny)

        1 Reply Last reply
        0
        • R Robert Surtees

          I'm an 80 column "puncher" as well. I pretty sure the world would come to an end if I typed past column 80. For those that did not have the pleasure of using punch cards, you have to also understad that the keypunch machines rarely had a working ribbon in them so to insert new cards (or, heavan forbid you dropped the deck) you had to identify them by reading the semi-braille dents across the top or otherwise make sense of the pattern of punched out holes. Now for the bit switchers, here's[^] a nice video going though an Altair 8800 bootstrap to bring back a memory or two. Now that was an IDE. Deposit,

          J Offline
          J Offline
          jsc42
          wrote on last edited by
          #39

          Robert Surtees wrote:

          For those that did not have the pleasure of using punch cards, you have to also understad that the keypunch machines rarely had a working ribbon in them so to insert new cards (or, heavan forbid you dropped the deck) you had to identify them by reading the semi-braille dents across the top or otherwise make sense of the pattern of punched out holes.

          Luxury! We had the 'manual' card punches - normally requiring using two or three fingers per character (up to 6 if using EBCDIC) directly pushing the punches that made the holes; later models included a mechanism that forwarded the card to the next column after you released the punches; there were no printing capabilities. You only found out if you'd used the correct finger combinations when the deck came back with the lineprinter listing (approx a fortnight later). Even that was better than using coding sheets - sent to the punch room to be mispunched, so you'd send the same data again to be mispunched again. I'm still a youngster to computing - only about 37 years of coding experience (started late in life). I started with paper tape - I cut my own strips of paper, sellotaped the lengths then punched the holes with a knitting needle, being careful to ensure that the holes lined up. After that, cards punched using a mechanical machine were a breeze.

          D B 2 Replies Last reply
          0
          • R Roger Wright

            Printing is no issue to me; I've got a 24" HP plotter, so any page up to 150' wide is no trouble. ;P My screen is somewhat more limited, however.

            "A Journey of a Thousand Rest Stops Begins with a Single Movement"

            G Offline
            G Offline
            Gary Wheeler
            wrote on last edited by
            #40

            I'm shocked at you, Roger, making size boasts in the Lounge.

            Software Zen: delete this;

            1 Reply Last reply
            0
            • L Luc Pattyn

              Hi, I use different computers, different monitor widths, and I hate scrolling horizontally all the time, so I prefer not to exceed some 90 characters on a line; I use 4-space tabs and told Visual to show guide lines by adding a registry key: HKEY_CURRENT_USER\Software\Microsoft\VCSExpress\9.0\Text Editor (adjust as required) Add a string called “Guides”, set its value to RGB(255,0,0) 80,96 BTW: my printing code will take care of lines that exceed the page width. FWIW: I don't want wide code snippets when composing a message here! :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


              modified on Sunday, May 17, 2009 6:32 PM

              S Offline
              S Offline
              sketch2002
              wrote on last edited by
              #41

              That is really neat. I never worry about the width though, usually the first (80/96/132/500/however many characters fit on your screen) give me enough of an idea of what's going on with that line that I don't need the rest of it unless I am sure there is something wrong with it and need to debug that particular line. Like you, when I print VS2008 wraps the text that's too wide. Maybe it would be just as well for anyone concerned to turn on the word wrap in the IDE which in VS2008 can be done at Tools -> Options, under Text Editor, All Languages, General under the Settings section.

              1 Reply Last reply
              0
              • A Anna Jayne Metcalfe

                Me too. :)

                Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                G Offline
                G Offline
                Gary Wheeler
                wrote on last edited by
                #42

                We've got a guy in our group named Mr. Object. All of his function calls use simple line wrap with no indentation for parameters, which makes his code look more like a Victorian novel than software. Fortunately, he became the boss a while back, and he doesn't write a lot of code these days :-D.

                Software Zen: delete this;

                A 1 Reply Last reply
                0
                • G Gary Wheeler

                  We've got a guy in our group named Mr. Object. All of his function calls use simple line wrap with no indentation for parameters, which makes his code look more like a Victorian novel than software. Fortunately, he became the boss a while back, and he doesn't write a lot of code these days :-D.

                  Software Zen: delete this;

                  A Offline
                  A Offline
                  Anna Jayne Metcalfe
                  wrote on last edited by
                  #43

                  Ugh.

                  Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                  D 1 Reply Last reply
                  0
                  • J jsc42

                    Robert Surtees wrote:

                    For those that did not have the pleasure of using punch cards, you have to also understad that the keypunch machines rarely had a working ribbon in them so to insert new cards (or, heavan forbid you dropped the deck) you had to identify them by reading the semi-braille dents across the top or otherwise make sense of the pattern of punched out holes.

                    Luxury! We had the 'manual' card punches - normally requiring using two or three fingers per character (up to 6 if using EBCDIC) directly pushing the punches that made the holes; later models included a mechanism that forwarded the card to the next column after you released the punches; there were no printing capabilities. You only found out if you'd used the correct finger combinations when the deck came back with the lineprinter listing (approx a fortnight later). Even that was better than using coding sheets - sent to the punch room to be mispunched, so you'd send the same data again to be mispunched again. I'm still a youngster to computing - only about 37 years of coding experience (started late in life). I started with paper tape - I cut my own strips of paper, sellotaped the lengths then punched the holes with a knitting needle, being careful to ensure that the holes lined up. After that, cards punched using a mechanical machine were a breeze.

                    D Offline
                    D Offline
                    Donsw
                    wrote on last edited by
                    #44

                    I thought we were talking about width and not punch cards

                    cheers, Donsw My Recent Article : Backup of Data files - Full and Incremental

                    1 Reply Last reply
                    0
                    • A Anna Jayne Metcalfe

                      Ugh.

                      Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                      D Offline
                      D Offline
                      Donsw
                      wrote on last edited by
                      #45

                      isn't it all about readability? when was the last time you printed code?

                      cheers, Donsw My Recent Article : Backup of Data files - Full and Incremental

                      A P 2 Replies Last reply
                      0
                      • C charlieg

                        You young'uns ar spoiled by modern technology. I'm one of those old geezers still writing code, dangerously close to the 3 decade mark. I think John Simmons is older than me. He's angrier, i'm more dangerous ;) So, I'm contemplating a couple of s/w issues and one of those is - when to hit the return key? As I type this, I have to my left a 1920x1200 monitor connected to my 1920x1200 laptop. It seems to me a little silly to worry about any developer who might not have the same h/w rsources. To arbitrarily linebreak at 80, 132, or whatever seems a bit silly. Printing? Muahahahaaha.. come on. Thoughts?

                        Charlie Gilley Will program for food... Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin This crap sandwich is all yours.... 2009 "Stimulus Bill"

                        W Offline
                        W Offline
                        W Balboos GHB
                        wrote on last edited by
                        #46

                        c nuf said!

                        "The difference between genius and stupidity is that genius has its limits." - Albert Einstein
                        "How do you find out if you're unwanted if everyone you try to ask tells you to stop bothering them and just go away?" - Balboos HaGadol

                        "It's a sad state of affairs, indeed, when you start reading my tag lines for some sort of enlightenment. Sadder still, if that's where you need to find it." - Balboos HaGadol

                        1 Reply Last reply
                        0
                        • H Henry Minute

                          Another useful registry hack is: Under the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0 key, you can create a DWORD UseMRUDocOrdering = 1. What this does is, when you select a tab in the editor, that tab moves to be the leftmost tab. This obviously keeps the most recently used files/designers visible in the editor. Only the least used fall off the end. Works in VS2008, VS2005 and their express versions. I like it, anyway.

                          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                          D Offline
                          D Offline
                          Dan Neely
                          wrote on last edited by
                          #47

                          Now if we could just get a multirow tab strip, or have the tabs shrink to fit like in a browser...

                          It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies

                          H 1 Reply Last reply
                          0
                          • D Dan Neely

                            Now if we could just get a multirow tab strip, or have the tabs shrink to fit like in a browser...

                            It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies

                            H Offline
                            H Offline
                            Henry Minute
                            wrote on last edited by
                            #48

                            Maybe in VS2010, now they are using the delights of WPF for the Editor?

                            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                            1 Reply Last reply
                            0
                            • C charlieg

                              You young'uns ar spoiled by modern technology. I'm one of those old geezers still writing code, dangerously close to the 3 decade mark. I think John Simmons is older than me. He's angrier, i'm more dangerous ;) So, I'm contemplating a couple of s/w issues and one of those is - when to hit the return key? As I type this, I have to my left a 1920x1200 monitor connected to my 1920x1200 laptop. It seems to me a little silly to worry about any developer who might not have the same h/w rsources. To arbitrarily linebreak at 80, 132, or whatever seems a bit silly. Printing? Muahahahaaha.. come on. Thoughts?

                              Charlie Gilley Will program for food... Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin This crap sandwich is all yours.... 2009 "Stimulus Bill"

                              K Offline
                              K Offline
                              Kevin Li Li Ken un
                              wrote on last edited by
                              #49

                              I still break at 80 characters even though I have a 1920 × 1200 resolution display. I have a lot of panes opened under Visual Studio, but I don't like auto-hiding panes very much. I just leave everything in front of me at the same time. Maybe it’s a sign for me to get an ultra HD display[^]: the ones with 7680 × 4320 resolution. Then I can break after every thousand characters. :)


                              My GUID: ca2262a7-0026-4830-a0b3-fe5d66c4eb1d :) Now I can Google this value and find all my Code Project posts!

                              1 Reply Last reply
                              0
                              • D Donsw

                                isn't it all about readability? when was the last time you printed code?

                                cheers, Donsw My Recent Article : Backup of Data files - Full and Incremental

                                A Offline
                                A Offline
                                Anna Jayne Metcalfe
                                wrote on last edited by
                                #50

                                Yes, it is.

                                Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                                1 Reply Last reply
                                0
                                • C charlieg

                                  You young'uns ar spoiled by modern technology. I'm one of those old geezers still writing code, dangerously close to the 3 decade mark. I think John Simmons is older than me. He's angrier, i'm more dangerous ;) So, I'm contemplating a couple of s/w issues and one of those is - when to hit the return key? As I type this, I have to my left a 1920x1200 monitor connected to my 1920x1200 laptop. It seems to me a little silly to worry about any developer who might not have the same h/w rsources. To arbitrarily linebreak at 80, 132, or whatever seems a bit silly. Printing? Muahahahaaha.. come on. Thoughts?

                                  Charlie Gilley Will program for food... Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin This crap sandwich is all yours.... 2009 "Stimulus Bill"

                                  L Offline
                                  L Offline
                                  Larry G Grimes
                                  wrote on last edited by
                                  #51

                                  Anyone like me remember when we were restricted to a 132 character line length limit because that was the standard for line printers? The longer a line is, the more difficult it is to read. To keep program code effective, efficient, readable and elegant, lines should be kept short. If indenting keeps moving to the right, it helps elegance and readability to create a subroutine (if it doesn't affect performance).

                                  1 Reply Last reply
                                  0
                                  • J JDL EPM

                                    Walt Fair, Jr. wrote:

                                    Youngster! I wrote my first program in 1967 (remember punch cards? ), so I'm working on my 5th decade. I usually try to keep my code on a normal screen or page, so I keep it around 80 characters wide, but sometimes I violate that guideline.

                                    First Program: 1965 First Computer: IBM 1620 First Language: Gotran (a simplified Fortran - only one operation per punch card) First printer: IBM golf ball typewriter Page Width: Whatever the flavour of the month is for my employer. 43 pay cheques to go!

                                    D Offline
                                    D Offline
                                    Dr Walt Fair PE
                                    wrote on last edited by
                                    #52

                                    My first program was for an IBM 1620 with the golf ball typewriter as well. The first program I *wrote* was also in Gotran, but unfortunately our machine didn't have enough power to run the compiler, so I never got to run it. The first program I actually *ran* was in IBM 1620 assembly language. For those who don't know, the IBM 1620 had a rotating drum memory, used BCD rather than pure binary, and only did integer addition and subtraction for math operations. Part of our class project was to program multiplication and division and figure out how to implement some sort of floating point. Of course the compilers took care of that, but we were messing with assembly.

                                    CQ de W5ALT

                                    Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                                    1 Reply Last reply
                                    0
                                    • D Donsw

                                      isn't it all about readability? when was the last time you printed code?

                                      cheers, Donsw My Recent Article : Backup of Data files - Full and Incremental

                                      P Offline
                                      P Offline
                                      PIEBALDconsult
                                      wrote on last edited by
                                      #53

                                      Donsw wrote:

                                      when was the last time you printed code?

                                      Friday.

                                      1 Reply Last reply
                                      0
                                      • J jsc42

                                        Robert Surtees wrote:

                                        For those that did not have the pleasure of using punch cards, you have to also understad that the keypunch machines rarely had a working ribbon in them so to insert new cards (or, heavan forbid you dropped the deck) you had to identify them by reading the semi-braille dents across the top or otherwise make sense of the pattern of punched out holes.

                                        Luxury! We had the 'manual' card punches - normally requiring using two or three fingers per character (up to 6 if using EBCDIC) directly pushing the punches that made the holes; later models included a mechanism that forwarded the card to the next column after you released the punches; there were no printing capabilities. You only found out if you'd used the correct finger combinations when the deck came back with the lineprinter listing (approx a fortnight later). Even that was better than using coding sheets - sent to the punch room to be mispunched, so you'd send the same data again to be mispunched again. I'm still a youngster to computing - only about 37 years of coding experience (started late in life). I started with paper tape - I cut my own strips of paper, sellotaped the lengths then punched the holes with a knitting needle, being careful to ensure that the holes lined up. After that, cards punched using a mechanical machine were a breeze.

                                        B Offline
                                        B Offline
                                        BadKarma
                                        wrote on last edited by
                                        #54

                                        jsc42 wrote:

                                        Luxury! We had the 'manual' card punches - normally requiring using two or three fingers per character (up to 6 if using EBCDIC) directly pushing the punches that made the holes; later models included a mechanism that forwarded the card to the next column after you released the punches; there were no printing capabilities. You only found out if you'd used the correct finger combinations when the deck came back with the lineprinter listing (approx a fortnight later). Even that was better than using coding sheets - sent to the punch room to be mispunched, so you'd send the same data again to be mispunched again.

                                        Luxury. We had to get up at 4 a clock in the morning, walk ten miles to the stone quarry, work for 12 straight hours sawing of a nice stone tablet. Then we had to walk back 14 miles with the 100 pound tablet on our backs, to the office where we carved holes in the tables using a spoon. God forbid if we carved a hole out at the wrong place, we could go back to the quarry for a new tablet. When we done programming the tablet we could test it on our debugsystem which was located on the 31 floor (no lift in the building). I usually got back from the office at 3 a clock the next day. So could sleep at least 1 houre. ;)

                                        Learn from the mistakes of others, you may not live long enough to make them all yourself.

                                        1 Reply Last reply
                                        0
                                        • C charlieg

                                          You young'uns ar spoiled by modern technology. I'm one of those old geezers still writing code, dangerously close to the 3 decade mark. I think John Simmons is older than me. He's angrier, i'm more dangerous ;) So, I'm contemplating a couple of s/w issues and one of those is - when to hit the return key? As I type this, I have to my left a 1920x1200 monitor connected to my 1920x1200 laptop. It seems to me a little silly to worry about any developer who might not have the same h/w rsources. To arbitrarily linebreak at 80, 132, or whatever seems a bit silly. Printing? Muahahahaaha.. come on. Thoughts?

                                          Charlie Gilley Will program for food... Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin This crap sandwich is all yours.... 2009 "Stimulus Bill"

                                          K Offline
                                          K Offline
                                          kmoorevs
                                          wrote on last edited by
                                          #55

                                          There is a limit of 1024 characters in the VS editor. For long sql statements I have to break as I prefer to separate the same as my query builder. I am the sole developer here, so no one else ever sees it anyway and I have no problem debugging in this format. Print code? Why on earth would code need to be printed? What a waste!

                                          D P 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups