TWC9: Visual Studio 2013 Update 2 news, Azure updates, .Net Reference Source and more

Download this episode

Download Video

Download captions

Download Captions

Description

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Grandizer

      OMG - Not shocking about the Tabs vs Spaces at all. I blame Microsoft for some it since the default is spaces (fail.)  IMHO, spaces are crap.  If we use tabs, everyone wins.  What I mean by that is I prefer a 2 character width tab (the default is 4 but if you get too many loops or ifs and such, I hate scrolling horizontally when I code.)  An example would be I have a class open and I put a tab in, write some code on that line and check the code in.  Then you have tabs setup for 4 characters and you open it, the code looks as if it were typed by you. Awesome!

      Now let's say you are one of those ... Mort's out there that thinks spaces is the way to go.  And even if you are, what if you like 4 spaces and someone else likes 3 or 2 or 5.  Nothing lines up anymore.  That is WHY Tabs will ALWAYS rule over spaces.

      PLEASE MICROSOFT, IN THE NEXT RELEASE OF VISUAL STUDIO (EVEN UPDATE 2 SINCE IT IS STILL IN CTP) AND FROM THEN ON, MAKE IT TABS BY DEFAULT.  HELL, YOU ARE HITTING THE TAB KEY - NOT THE 4 SPACES KEY.  ;)

      Side note, I believe Open braces on same line.  Save space!!!

    • User profile image
      tocsa

      @Grandizer: I see your point with tabs vs spaces, although sometimes you have to follow the company style guide, which may require spaces. What I really hate is someone doesn't care of the guidelines, and when I turn on the "View White Space" (Ctrl+R, Ctrl+W) suddenly I see everything mixed up! If someone sticks to spaces only or tabs only, then nothing bad will happen if you change the tab size (but still don't edit anything). But if you mix up things, that's really bad.

      I don't necessarily agree with open bracket on the same line. Readability of the source code is much more important than the extra characters what an open bracket in a new line causes. That sometimes even depends on the language (for e.g. C vs C++ vs C#). In C and C# projects I worked on often used open bracket in new line, which can give a distinctive style with the closing bracket, you see the scope clearly. The other style is more dense, I saw often in dense C++ code.

      But once again (here also) the worst thing if the developer doesn't follow the actual style guide (whatever it is), and the code is mixed up. I have SO strong temptation to fix those sections, but at the same time I don't want to touch gunky areas, I don't want my name stuck there in any context in the source control.

      NEGLIGENCE (if someone just doesn't care, lazy) towards style guides is one of the worst sins!

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.