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. Tabs, Spaces, 2 column widths, 4 column widths, oh my...

Tabs, Spaces, 2 column widths, 4 column widths, oh my...

Scheduled Pinned Locked Moved The Lounge
csharpc++javascriptrubysysadmin
42 Posts 23 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.
  • J Jeremy Falcon

    Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

    Jeremy Falcon

    T Offline
    T Offline
    TheGreatAndPowerfulOz
    wrote on last edited by
    #13

    Been through the same journey as you. I like best 3 columns, but my current work requires 4 columns. Ah well.

    #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

    J 1 Reply Last reply
    0
    • T TheGreatAndPowerfulOz

      Been through the same journey as you. I like best 3 columns, but my current work requires 4 columns. Ah well.

      #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

      J Offline
      J Offline
      Jeremy Falcon
      wrote on last edited by
      #14

      You're a smart man! :thumbsup:

      Jeremy Falcon

      1 Reply Last reply
      0
      • J Jeremy Falcon

        Come on man... give spaces a try. Peddling this like a drug dealer. Only the first space is free. :rolleyes: Not to open up that can of worms, but I was a hardcore tabs guy for years. But spaces are universal. Once I got used to spaces, I could see my code formatted well in any IDE. I could upload it to the web server, output or inspect it in the terminal on Unix/Linux or command line or Notepad in Winders and it still was formatted well. Basically, it made life more portable. I never went back.

        Jeremy Falcon

        R Offline
        R Offline
        R Giskard Reventlov
        wrote on last edited by
        #15

        Chuck Norris uses Tabs. So should you. :-)

        J D 2 Replies Last reply
        0
        • R R Giskard Reventlov

          Chuck Norris uses Tabs. So should you. :-)

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #16

          Oooooooh snap. :laugh:

          Jeremy Falcon

          1 Reply Last reply
          0
          • J Jeremy Falcon

            Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

            Jeremy Falcon

            D Offline
            D Offline
            David ONeil
            wrote on last edited by
            #17

            Jeremy Falcon wrote:

            And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins.

            And unworthy of my answer, so go away! Oh, wait, I've been ahead of you[^] for quite some time in this respect.

            It Is The Absolute Verifiable Truth & Proven Fact

            That Your Belly-Button Signature Ties

            To Viviparous Mama.

            1 Reply Last reply
            0
            • J Jeremy Falcon

              Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

              Jeremy Falcon

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #18

              2 columns and use tabs all applications, including TSQL. ctrl e d will reformat the current file in c#. Red-Gate has an excellent formatter for stored procs. As the lead developer I set the standards and if I find someone has reformatted my code I get quite grumpy.

              Never underestimate the power of human stupidity RAH

              J 1 Reply Last reply
              0
              • M Mycroft Holmes

                2 columns and use tabs all applications, including TSQL. ctrl e d will reformat the current file in c#. Red-Gate has an excellent formatter for stored procs. As the lead developer I set the standards and if I find someone has reformatted my code I get quite grumpy.

                Never underestimate the power of human stupidity RAH

                J Offline
                J Offline
                Jeremy Falcon
                wrote on last edited by
                #19

                Mycroft Holmes wrote:

                As the lead developer I set the standards and if I find someone has reformatted my code I get quite grumpy

                That's the biggest thing... everyone being on the same page. I'll never get you two column folks. :laugh: But I do think the project will suffer if the team can't agree on one.

                Jeremy Falcon

                1 Reply Last reply
                0
                • J Jeremy Falcon

                  Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                  Jeremy Falcon

                  J Offline
                  J Offline
                  Joan M
                  wrote on last edited by
                  #20

                  Now with wide displays is not as important, but 2 spaces (using tab) is good as it is not very space consuming but at the same time is clear enough to see the desired effect. And of course this doesn't allow any debate. I'm right. Anyone thinking a different thing must be burnt in fire. :rolleyes:

                  www.robotecnik.com[^] - robots, CNC and PLC programming

                  https://www.robotecnik.com freelance robots, PLC and CNC programmer.

                  J 1 Reply Last reply
                  0
                  • R R Giskard Reventlov

                    Chuck Norris uses Tabs. So should you. :-)

                    D Offline
                    D Offline
                    Daniel Pfeffer
                    wrote on last edited by
                    #21

                    Chuck Norris is NOT celebrated for his programming abilities.

                    If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                    R 1 Reply Last reply
                    0
                    • J Jeremy Falcon

                      Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                      Jeremy Falcon

                      D Offline
                      D Offline
                      Daniel Pfeffer
                      wrote on last edited by
                      #22

                      I've used so many differing styles (usually mandated by anal-retentive bosses) that today I just go with whatever (a) the company requires, or (b) the IDE inserts as a default. The only problem with using tabs as a formatting mechanism is when reading code in a different editor, whose tab setting differs. Your nicely (and carefully) formatted code then looks like a formatting disaster. :sigh:

                      If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                      J 1 Reply Last reply
                      0
                      • J Jeremy Falcon

                        Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                        Jeremy Falcon

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

                        Always used 3 spaces for punch cards. Reasonable compromise for easy resorting when the deck was dropped v maximising levels of indentation given that the width of a card was 80 cols, and the last 8 of then were for sequence numbers. (Also useful for old versions of FORTRAN where statements started in col 7 - 2 * 3 spaces). Now we have screens, I use TAB (only 1 key stroke) and accept whatever the editor of the day displays it at. I still try to limit lines to 80 chars.

                        1 Reply Last reply
                        0
                        • L Lost User

                          3 is still a bit too wide so I prefer 2.718 spaces per tab.

                          S Offline
                          S Offline
                          Slacker007
                          wrote on last edited by
                          #24

                          harold aptroot wrote:

                          2.718

                          I prefer 2.6589754 spaces, but hey, now we are splitting hairs. :)

                          T 1 Reply Last reply
                          0
                          • J Jeremy Falcon

                            Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                            Jeremy Falcon

                            N Offline
                            N Offline
                            Nelek
                            wrote on last edited by
                            #25

                            3 Empty spaces here

                            M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                            1 Reply Last reply
                            0
                            • J Jeremy Falcon

                              Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                              Jeremy Falcon

                              M Offline
                              M Offline
                              maze3
                              wrote on last edited by
                              #26

                              I prefer the length of two dried elephant ear hairs plucked by 24 year virgin males, and must be the 2nd child.

                              1 Reply Last reply
                              0
                              • J Jeremy Falcon

                                Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                                Jeremy Falcon

                                N Offline
                                N Offline
                                Nathan Minier
                                wrote on last edited by
                                #27

                                One space is too short. Other than that, whatever the environment provides for a tab is fine. The point is to quickly see nesting, not to conform to the whims of some mad god.

                                "There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli

                                1 Reply Last reply
                                0
                                • J Jeremy Falcon

                                  Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                                  Jeremy Falcon

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

                                  Three column tabs? Now that really is odd.

                                  Ravings en masse^

                                  "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                  "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                  1 Reply Last reply
                                  0
                                  • J Jeremy Falcon

                                    Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                                    Jeremy Falcon

                                    M Offline
                                    M Offline
                                    Marc Clifton
                                    wrote on last edited by
                                    #29

                                    Jeremy Falcon wrote:

                                    So, I'm curious to know, what do y'all use still and why?

                                    Whether spaces or tabs, 2, 3, 4, or 5 (I loved 5 when I was doing C++ work years ago), I don't particularly care, as long as: 1. The IDE creates appropriate indentation when I hit the tab key 2. The IDE is smart enough to un-indent the entire group of spaces when I hit the delete key anywhere in the indented region (this is extremely rare, which is why I prefer tabs over spaces) 3. The IDE supports block indent \ un-indent 4. The IDE supports a "format" which will format the entire code block/file to however I've set up my IDE. 95% of the time I love how pressing '}' will reformat the C# / Javascript code. But what I really grouse about is vertical spacing. I am anal about that. Here are the rules not all dealing with vertical spacing: 1. C# using (and other language equivalents) should be in alphabetic order, unless, like in some other languages, they are imports that have dependencies on prior imports 2. .NET framework using's come first. 3. Third party using's are alphabetically grouped next, with a blank line between them and the .NET using's above. 4. Internal library using's next, grouped and separated as #2 5. Application specific using's next, same 6. One class per file 7. Methods separated by a single blank line 8. Public events first, one per line, the group "guarded" by a blank line. 8. Public properties next, one per line, the group "guarded" by a blank line. 9. Protected/private properties next, one per line, the group "guarded" by a blank line. 10. Internal fields next, one per line, the group "guarded" by a blank line. 11. Public constructors next, each constructor method separated by a single blank line. 12. Protected/private constructors next, each constructor method separated by a single blank line. 13. Public methods next, each constructor method separated by a single blank line. 14. Protected/private methods next, each constructor method separated by a single blank line. OK, I must be really bored at work to have just written all that down. :rolleyes: Marc

                                    Latest Article - Create a Dockerized Python Fiddle Web App Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Ar

                                    1 Reply Last reply
                                    0
                                    • J Jeremy Falcon

                                      Now you know, we as nerds just love a good debate. And clearly, everyone who doesn't agree with us is intellectually inferior by substantial margins. And no other topic, save a few, has this proven to more evident than in the tabs versus spaces great debate of our generation. Now, rather than fan the flame of that saga, I'm curious to know what people still prefer for tab width (regardless of an actual tab char or if it's spaces). For years, I've always been a four column guy with tab widths. I mean years. Anything else was stupid and bunches together what would otherwise be beautiful code. But then I started doing a lot of JavaScript development where the popular thing is to use two column widths. Ruby seems to embrace that too. It's ugly I thought. I shan't cave in. It's immoral and just wrong. But in being a team player you go along with what must be done for the sake of the project. Now, a couple years later. I look at four column tab width code and think "well gee that's just too damn wide." I still don't like two column width. Looks like the code is still in kiddy land when I see that. I started doing some plug-in development for a Forex trading platform a few years back. It's a proprietary language and by default it uses 3 column widths in the code editor for it. At first I was like "ok wtf." But after years of using that proprietary language... turns out 3 column width is perfect! You can use it everywhere. C#, C/C++, JavaScript. Whatever, it's a nice compromise for everyone. In this day and age where we are expected to learn 20 million things, both client and server, rather than just one language, I tend to find myself using this more and more so I don't have to readjust my eyes to differently spaced code all day long. Only problem is... nobody else uses 3 column widths that I know of. So, I'm curious to know, what do y'all use still and why?

                                      Jeremy Falcon

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

                                      4

                                      Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                                      1 Reply Last reply
                                      0
                                      • S Slacker007

                                        harold aptroot wrote:

                                        2.718

                                        I prefer 2.6589754 spaces, but hey, now we are splitting hairs. :)

                                        T Offline
                                        T Offline
                                        TNCaver
                                        wrote on last edited by
                                        #31

                                        1.618 spaces is golden.

                                        If you think 'goto' is evil, try writing an Assembly program without JMP.

                                        1 Reply Last reply
                                        0
                                        • D Daniel Pfeffer

                                          Chuck Norris is NOT celebrated for his programming abilities.

                                          If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                                          R Offline
                                          R Offline
                                          R Giskard Reventlov
                                          wrote on last edited by
                                          #32

                                          Meh! Chick Norris thinks in binary and writes in assembler. Everything he does is code.

                                          F 1 Reply 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