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. Other Discussions
  3. The Insider News
  4. Tabs versus spaces: Spaces won

Tabs versus spaces: Spaces won

Scheduled Pinned Locked Moved The Insider News
csharpvisual-studiocomquestion
27 Posts 10 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.
  • T Offline
    T Offline
    Terrence Dorsey
    wrote on last edited by
    #1

    Tabs versus spaces: Spaces won[^] (source: Los Techies)
    Why? Because since at least Visual Studio 2005, the default has been spaces.

    "Do you like tabs in Visual Studio? I do too! But I gave up the tabs versus spaces argument, and so should you."

    M R C L 4 Replies Last reply
    0
    • T Terrence Dorsey

      Tabs versus spaces: Spaces won[^] (source: Los Techies)
      Why? Because since at least Visual Studio 2005, the default has been spaces.

      "Do you like tabs in Visual Studio? I do too! But I gave up the tabs versus spaces argument, and so should you."

      M Offline
      M Offline
      Michael Bergman
      wrote on last edited by
      #2

      I used to work at a company that had its own interpreted language and it was written such that it choked on the tab character so all of our editors had to be set to use spaces so that we wouldn't accidently use tabs in our own scripts.

      m.bergman

      For Bruce Schneier, quanta only have one state : afraid.

      To succeed in the world it is not enough to be stupid, you must also be well-mannered. -- Voltaire

      Honesty is the best policy, but insanity is a better defense. -- Steve Landesberg

      I am not a chatbot.

      1 Reply Last reply
      0
      • T Terrence Dorsey

        Tabs versus spaces: Spaces won[^] (source: Los Techies)
        Why? Because since at least Visual Studio 2005, the default has been spaces.

        "Do you like tabs in Visual Studio? I do too! But I gave up the tabs versus spaces argument, and so should you."

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

        Nonsense: spaces have not won: have never used spaces (in over 20 years) and none of the teams I've worked for or that work for me have used spaces (they might have wanted to but they didn't). Spaces are the work of the de vil.

        "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

        P 1 Reply Last reply
        0
        • T Terrence Dorsey

          Tabs versus spaces: Spaces won[^] (source: Los Techies)
          Why? Because since at least Visual Studio 2005, the default has been spaces.

          "Do you like tabs in Visual Studio? I do too! But I gave up the tabs versus spaces argument, and so should you."

          C Offline
          C Offline
          Clifford Nelson
          wrote on last edited by
          #4

          It was easy to get my teams to go to tabs. It means that indents can be whatever each developer desires, and it takes less space (although not too much different). Tabs are easy to get everyone on the team to agree on.

          M 1 Reply Last reply
          0
          • C Clifford Nelson

            It was easy to get my teams to go to tabs. It means that indents can be whatever each developer desires, and it takes less space (although not too much different). Tabs are easy to get everyone on the team to agree on.

            M Offline
            M Offline
            MarqW
            wrote on last edited by
            #5

            I hate all the defaults of tabs space of 4 and 8... I mean 8!? Come on, you're half way across the screen. 2 is the magic number :-D

            P C L 3 Replies Last reply
            0
            • R R Giskard Reventlov

              Nonsense: spaces have not won: have never used spaces (in over 20 years) and none of the teams I've worked for or that work for me have used spaces (they might have wanted to but they didn't). Spaces are the work of the de vil.

              "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

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

              OK, now look at your code in Notepad. Not everyone uses an IDE.

              J R 2 Replies Last reply
              0
              • M MarqW

                I hate all the defaults of tabs space of 4 and 8... I mean 8!? Come on, you're half way across the screen. 2 is the magic number :-D

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

                The only place I worked that had an actual standard, the standard was four SPACEs, so I got used to that. Where I am now, all the existing code uses two SPACEs, so I adapted. Now my four SPACE indents look huge. :sigh:

                C 1 Reply Last reply
                0
                • M MarqW

                  I hate all the defaults of tabs space of 4 and 8... I mean 8!? Come on, you're half way across the screen. 2 is the magic number :-D

                  C Offline
                  C Offline
                  Clifford Nelson
                  wrote on last edited by
                  #8

                  I also vote for 2 spaces. Fortunately do not have to deal with people who insist on 4 or 8. I am surprised how many of the good developers I know agree with 2.

                  J 1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    OK, now look at your code in Notepad. Not everyone uses an IDE.

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #9

                    PIEBALDconsult wrote:

                    OK, now look at your code in Notepad.
                     
                    Not everyone uses an IDE.

                    Are you suggesting that programmers that don't use IDEs use Notepad? Certainly isn't the case for me. Certainly isn't the case for other developers that I know that don't use IDEs.

                    P 1 Reply Last reply
                    0
                    • C Clifford Nelson

                      I also vote for 2 spaces. Fortunately do not have to deal with people who insist on 4 or 8. I am surprised how many of the good developers I know agree with 2.

                      J Offline
                      J Offline
                      jschell
                      wrote on last edited by
                      #10

                      Clifford Nelson wrote:

                      I am surprised how many of the good developers I know agree with 2.

                      However presumably those "good" developers spend the vast majority of time discussing a vast array of subjects of all which have nothing to do with indent preferences.

                      C 1 Reply Last reply
                      0
                      • J jschell

                        Clifford Nelson wrote:

                        I am surprised how many of the good developers I know agree with 2.

                        However presumably those "good" developers spend the vast majority of time discussing a vast array of subjects of all which have nothing to do with indent preferences.

                        C Offline
                        C Offline
                        Clifford Nelson
                        wrote on last edited by
                        #11

                        Actually they have no reason to worry about that since that is a personal preference. Probably the best developer on my team was adamant about using tabs instead of spaces. Then he can use whatever he wants, and does not care what other developers are using.

                        L 1 Reply Last reply
                        0
                        • P PIEBALDconsult

                          The only place I worked that had an actual standard, the standard was four SPACEs, so I got used to that. Where I am now, all the existing code uses two SPACEs, so I adapted. Now my four SPACE indents look huge. :sigh:

                          C Offline
                          C Offline
                          Clifford Nelson
                          wrote on last edited by
                          #12

                          Agreed

                          1 Reply Last reply
                          0
                          • P PIEBALDconsult

                            OK, now look at your code in Notepad. Not everyone uses an IDE.

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

                            PIEBALDconsult wrote:

                            Not everyone uses an IDE.

                            Amateurs. Seriously? Creating complex, feature rich applications/web sites with notepad? Not practical. Perhaps with something like Notepad++ but Windows Notepad? No, definitely not.

                            "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

                            P A 2 Replies Last reply
                            0
                            • M MarqW

                              I hate all the defaults of tabs space of 4 and 8... I mean 8!? Come on, you're half way across the screen. 2 is the magic number :-D

                              L Offline
                              L Offline
                              Lutoslaw
                              wrote on last edited by
                              #14

                              Maybe 2 is magic, but 3 is more Freudy. Seriously, I got used to 4 which is often a default setting. But 8 looks ridiculus to me too.

                              Greetings - Jacek

                              1 Reply Last reply
                              0
                              • J jschell

                                PIEBALDconsult wrote:

                                OK, now look at your code in Notepad.
                                 
                                Not everyone uses an IDE.

                                Are you suggesting that programmers that don't use IDEs use Notepad? Certainly isn't the case for me. Certainly isn't the case for other developers that I know that don't use IDEs.

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

                                That is two separate statements.

                                1 Reply Last reply
                                0
                                • C Clifford Nelson

                                  Actually they have no reason to worry about that since that is a personal preference. Probably the best developer on my team was adamant about using tabs instead of spaces. Then he can use whatever he wants, and does not care what other developers are using.

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #16

                                  So what happens whenshe edits your code, or you edit his?

                                  MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                                  C 1 Reply Last reply
                                  0
                                  • R R Giskard Reventlov

                                    PIEBALDconsult wrote:

                                    Not everyone uses an IDE.

                                    Amateurs. Seriously? Creating complex, feature rich applications/web sites with notepad? Not practical. Perhaps with something like Notepad++ but Windows Notepad? No, definitely not.

                                    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

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

                                    mark merrens wrote:

                                    Amateurs.

                                    Contrarywise; newbies use IDEs and don't realize that there are other ways. Experienced developers know that there are several ways to skin most cats.

                                    mark merrens wrote:

                                    Creating complex, feature rich applications/web sites with notepad?

                                    I didn't say that.

                                    1 Reply Last reply
                                    0
                                    • T Terrence Dorsey

                                      Tabs versus spaces: Spaces won[^] (source: Los Techies)
                                      Why? Because since at least Visual Studio 2005, the default has been spaces.

                                      "Do you like tabs in Visual Studio? I do too! But I gave up the tabs versus spaces argument, and so should you."

                                      L Offline
                                      L Offline
                                      Lost User
                                      wrote on last edited by
                                      #18

                                      Gawd! All these 'should it be 2 spaces or 4' arguments can be done away with by using tabs-then you decide how wide you want a tab to be when you are editing, while your colleague can use a different value - everyone is happy!

                                      MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                                      P 1 Reply Last reply
                                      0
                                      • R R Giskard Reventlov

                                        PIEBALDconsult wrote:

                                        Not everyone uses an IDE.

                                        Amateurs. Seriously? Creating complex, feature rich applications/web sites with notepad? Not practical. Perhaps with something like Notepad++ but Windows Notepad? No, definitely not.

                                        "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

                                        A Offline
                                        A Offline
                                        AspDotNetDev
                                        wrote on last edited by
                                        #19

                                        We at my company often use the web editor in Umbraco to edit pages. It works best with spaces. Because of editors like this, much of the rest of our code follows that same convention so we don't have to switch things up.

                                        Thou mewling ill-breeding pignut!

                                        1 Reply Last reply
                                        0
                                        • L Lost User

                                          So what happens whenshe edits your code, or you edit his?

                                          MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                                          C Offline
                                          C Offline
                                          Clifford Nelson
                                          wrote on last edited by
                                          #20

                                          That is the reason for going with tabs. If spaces are used, then the number of spaces specified will appear for everyone no matter what the user sets his tab spacing. When the person does editing with tabs as an option, then there will be a mixture of tabs and spaces, and it will look different on applications with different settings. When a person does editing with a different tab setting with spaces, then still have the problem. With tabs set for everyone, then each person can have what they like, and it will appear correct on thier screen. Thats why there is an issue that this forum was discussing. Set Option for Text Editor for C# to "Keep Tabs" and then each developer can have whatever indent size they like, and everybody is happy.

                                          P L 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