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. I sometimes despair of MS [modified Someone, sort of, agrees with me]

I sometimes despair of MS [modified Someone, sort of, agrees with me]

Scheduled Pinned Locked Moved The Lounge
csharpc++delphicomdesign
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.
  • J Joe Woodbury

    I suspect a lot of this is due to churn, the penchant for hiring post graduates thinking they are smarter than everyone else and bored programmers who are either doing just enough to keep their jobs or trying to find excuses to do something new to pad their resume. Oops, I pretty much defined the industry as a whole. Back to Microsoft--at the very least, they need to find the guy or gal who does the dialogs for Visual Studio and give them a whipping. Then find the idiot who keeps rejected bug reports about badly designed dialogs in Visual Studio and invite them to try a different career.

    Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

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

    Joe Woodbury wrote:

    the guy or gal who does the dialogs for Visual Studio and give them a whipping

    Bit of a sore point?

    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
    • H Henry Minute

      Back in 2003 when I jumped the Delphi ship for C#, one of the first things I did was to read the Framework Design Guidelines, although I think it had a different name back then. As far as I could, for someone learning a new language, I tried to stick to those conventions. I have just started experimenting with Entity Framework, which seems to be a quite useful thing, and I am astonished at the divergence from its own standards in the code generated. How on earth do MS expect people to follow its guidelines when its own developers don't? Are they unaware of FXCop? I think MS should immediately adopt a policy for its own developers, that all code released should pass the FXCop test, and that includes generated code. I am not advocating that all developers should adopt this style, an ingrained C/C++ dev naturally falls into their familiar style, but there is no point in MS publishing standards if they don't follow them. [MOD] Just found this article[^] "But the way that the Windows 7 UAC "improvements" have been made completely exempts Microsoft's developers from having to do that work themselves. With Windows 7, it's one rule for Redmond, another one for everyone else." [/MOD]

      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.”

      modified on Saturday, March 7, 2009 2:01 PM

      R Offline
      R Offline
      Rama Krishna Vavilala
      wrote on last edited by
      #16

      Exactly what rules are you talking about?

      H 1 Reply Last reply
      0
      • R Rama Krishna Vavilala

        Exactly what rules are you talking about?

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

        Just little things like: Do not use a prefix for member variables (_, m_, s_, etc.). If you want to distinguish between local and member variables you should use “this.” in C# and “Me.” in VB.NET. Do use camelCasing for member variables Do use camelCasing for parameters For some reason things like

        private int _AnInt = 0; (should be - private anInt = 0; )
        public int AnInt
        {
        get
        {
        return _AnInt; (should be - return this.anInt; )
        }

        set
        {
          \_AnInt = value;   (should be - this.anInt = value; )
        }
        

        }

        drive me ablolutely nutso. As I said previously I can understand that non-MS developers might use other conventions. MS, however, should stick to the rules that it published itself.

        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.”

        R 1 Reply Last reply
        0
        • H Henry Minute

          Just little things like: Do not use a prefix for member variables (_, m_, s_, etc.). If you want to distinguish between local and member variables you should use “this.” in C# and “Me.” in VB.NET. Do use camelCasing for member variables Do use camelCasing for parameters For some reason things like

          private int _AnInt = 0; (should be - private anInt = 0; )
          public int AnInt
          {
          get
          {
          return _AnInt; (should be - return this.anInt; )
          }

          set
          {
            \_AnInt = value;   (should be - this.anInt = value; )
          }
          

          }

          drive me ablolutely nutso. As I said previously I can understand that non-MS developers might use other conventions. MS, however, should stick to the rules that it published itself.

          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.”

          R Offline
          R Offline
          Rama Krishna Vavilala
          wrote on last edited by
          #18

          Are you talking about stylecop or fxcop? Fxcop does not inforce any rules on private members as is the case with you. Stylecop has an option that allows You to disable checking for generated code.

          H 1 Reply Last reply
          0
          • R Rama Krishna Vavilala

            Are you talking about stylecop or fxcop? Fxcop does not inforce any rules on private members as is the case with you. Stylecop has an option that allows You to disable checking for generated code.

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

            You could be right. I may well be confusing the two. That does not, however, negate my point. If MS publishes rules for things like naming conventions and the like, it should stick to them.

            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.”

            R 1 Reply Last reply
            0
            • H Henry Minute

              Back in 2003 when I jumped the Delphi ship for C#, one of the first things I did was to read the Framework Design Guidelines, although I think it had a different name back then. As far as I could, for someone learning a new language, I tried to stick to those conventions. I have just started experimenting with Entity Framework, which seems to be a quite useful thing, and I am astonished at the divergence from its own standards in the code generated. How on earth do MS expect people to follow its guidelines when its own developers don't? Are they unaware of FXCop? I think MS should immediately adopt a policy for its own developers, that all code released should pass the FXCop test, and that includes generated code. I am not advocating that all developers should adopt this style, an ingrained C/C++ dev naturally falls into their familiar style, but there is no point in MS publishing standards if they don't follow them. [MOD] Just found this article[^] "But the way that the Windows 7 UAC "improvements" have been made completely exempts Microsoft's developers from having to do that work themselves. With Windows 7, it's one rule for Redmond, another one for everyone else." [/MOD]

              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.”

              modified on Saturday, March 7, 2009 2:01 PM

              G Offline
              G Offline
              Gary R Wheeler
              wrote on last edited by
              #20

              Henry Minute wrote:

              With Windows 7, it's one rule for Redmond, another one for everyone else."

              One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.

              Software Zen: delete this;
              Fold With Us![^]

              H D 2 Replies Last reply
              0
              • G Gary R Wheeler

                Henry Minute wrote:

                With Windows 7, it's one rule for Redmond, another one for everyone else."

                One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.

                Software Zen: delete this;
                Fold With Us![^]

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

                Gary R. Wheeler wrote:

                One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.

                Weven does sound like it ought to be a river/village in Middle Earth. Doesn't it?

                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.”

                G 1 Reply Last reply
                0
                • H Henry Minute

                  You could be right. I may well be confusing the two. That does not, however, negate my point. If MS publishes rules for things like naming conventions and the like, it should stick to them.

                  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.”

                  R Offline
                  R Offline
                  Rama Krishna Vavilala
                  wrote on last edited by
                  #22

                  Henry Minute wrote:

                  If MS publishes rules for things like naming conventions and the like, it should stick to them.

                  MS Does follow FxCop rules well. You will find that all the new MS development after FxCop was developed follow these rules. StyleCop is a new thing and it does not have any strong backing. Also StyleCop is not meant to be followed for generated code anyway, I believe the default options are turned off for that.

                  H 1 Reply Last reply
                  0
                  • H Henry Minute

                    Marc Clifton wrote:

                    You could, probably, generate your own FXCop-compliant code from the EDM's XML

                    That's probably true. It would certainly be quicker than attempting to do it in the Editor. I haven't got round to looking at the XML yet. However, that would get me off on another rant about the .NET code generation classes and their inability to, amongst other things, deal with line-breaks properly. :laugh: [MOD] BTW, I started my exploration of EF with your Intro to EF article. [/MOD]

                    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.”

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

                    Henry Minute wrote:

                    BTW, I started my exploration of EF with your Intro to EF article.

                    :cool: Marc

                    Will work for food. Interacx

                    1 Reply Last reply
                    0
                    • R Rama Krishna Vavilala

                      Henry Minute wrote:

                      If MS publishes rules for things like naming conventions and the like, it should stick to them.

                      MS Does follow FxCop rules well. You will find that all the new MS development after FxCop was developed follow these rules. StyleCop is a new thing and it does not have any strong backing. Also StyleCop is not meant to be followed for generated code anyway, I believe the default options are turned off for that.

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

                      I have done a little research since your last post and have discovered that I was not confusing FXCop and StyleCop. I said FXCop and I meant FXCop. So that you are aware of the research that I did, I will tell you what it was. I took my brand new copy of 'Framework Design Guidelines Conventions, Idioms, and Patterns for Reusable .NET Libraries' out of the wrapper it arrived in, and read it. Page 372. B.2 The Evolution of FXCop Para 1. Line 6 onwards. "In addition to enforcing the Framework Design Guidelines" (my emboldening) Page 368. 3rd rule "DO use camelCasing for local variables" (their emboldening) So there immediately is one rule that the generated code breaks. The point that StyleCop does not check generated code is true (<autogenerated> tag in header). To some extent that makes sense, but only because it would be difficult to enforce for third party tools. For In-House tools, generate the code, edit out the 'autogenerated' tab and whack the thing through FXCop and/or StyleCop. Repeat until done. Then, and only then release the tool. To say that it doesn't count because it's generated code is anarchy. Any development group inside MS could then stuff anything they felt like in a generated file. Brad Abrahams in his 'Coding Style Guidelines' document said "The reasons to extend the public rules (no Hungarian, no prefix for member variables, etc.) is to produce a consistent source code appearance. In addition a goal is to have clean readable source. Code legibility should be a primary goal." That is as valid for MS 'generated' code as for any other code they produce. End of! No ifs, ands or buts. If they are going to have rules they should stick to them, for all in-house code. If they are incapable of doing that, that tells us a lot about what to expect from any of their products in the future. :mad: :rolleyes: :zzz:

                      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.”

                      R 1 Reply Last reply
                      0
                      • H Henry Minute

                        I have done a little research since your last post and have discovered that I was not confusing FXCop and StyleCop. I said FXCop and I meant FXCop. So that you are aware of the research that I did, I will tell you what it was. I took my brand new copy of 'Framework Design Guidelines Conventions, Idioms, and Patterns for Reusable .NET Libraries' out of the wrapper it arrived in, and read it. Page 372. B.2 The Evolution of FXCop Para 1. Line 6 onwards. "In addition to enforcing the Framework Design Guidelines" (my emboldening) Page 368. 3rd rule "DO use camelCasing for local variables" (their emboldening) So there immediately is one rule that the generated code breaks. The point that StyleCop does not check generated code is true (<autogenerated> tag in header). To some extent that makes sense, but only because it would be difficult to enforce for third party tools. For In-House tools, generate the code, edit out the 'autogenerated' tab and whack the thing through FXCop and/or StyleCop. Repeat until done. Then, and only then release the tool. To say that it doesn't count because it's generated code is anarchy. Any development group inside MS could then stuff anything they felt like in a generated file. Brad Abrahams in his 'Coding Style Guidelines' document said "The reasons to extend the public rules (no Hungarian, no prefix for member variables, etc.) is to produce a consistent source code appearance. In addition a goal is to have clean readable source. Code legibility should be a primary goal." That is as valid for MS 'generated' code as for any other code they produce. End of! No ifs, ands or buts. If they are going to have rules they should stick to them, for all in-house code. If they are incapable of doing that, that tells us a lot about what to expect from any of their products in the future. :mad: :rolleyes: :zzz:

                        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.”

                        R Offline
                        R Offline
                        Rama Krishna Vavilala
                        wrote on last edited by
                        #25

                        Henry Minute wrote:

                        I said FXCop and I meant FXCop.

                        I have tried for ages to make FxCop enforce rules for private and internal members and I have not been able to do so. Can you share how you enabled it? As far as the design guidelines go, they make most sense when enforced on public/protected members (even though I enforce it everywhere as it comes to me naturally) as it is what developers using your library will use. I personally will not sweat if it s not enforced for private members in tool generated code as long as rest of the code is FxCop compliant.

                        1 Reply Last reply
                        0
                        • H Henry Minute

                          Gary R. Wheeler wrote:

                          One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.

                          Weven does sound like it ought to be a river/village in Middle Earth. Doesn't it?

                          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.”

                          G Offline
                          G Offline
                          Gary R Wheeler
                          wrote on last edited by
                          #26

                          Sort of the low-rent district in Hobbiton, maybe.

                          Software Zen: delete this;
                          Fold With Us![^]

                          1 Reply Last reply
                          0
                          • G Gary R Wheeler

                            Henry Minute wrote:

                            With Windows 7, it's one rule for Redmond, another one for everyone else."

                            One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.

                            Software Zen: delete this;
                            Fold With Us![^]

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

                            but BIND[^] is a BSD app.

                            Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                            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