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. Uh-Oh

Uh-Oh

Scheduled Pinned Locked Moved The Lounge
csharpannouncement
47 Posts 24 Posters 2 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 Tomz_KV

    It is not easy to get an agreement on guidelines in a small team. I had the experience before.

    TOMZ_KV

    W Offline
    W Offline
    woodyata
    wrote on last edited by
    #41

    I have also had difficulties in a small team with coding standards. The best solution I found was to use Juval Lowy's coding standards (see website http://www.idesign.net/idesign/DesktopDefault.aspx). Using them stopped the me-versus-you stuff.

    T 1 Reply Last reply
    0
    • W woodyata

      I have also had difficulties in a small team with coding standards. The best solution I found was to use Juval Lowy's coding standards (see website http://www.idesign.net/idesign/DesktopDefault.aspx). Using them stopped the me-versus-you stuff.

      T Offline
      T Offline
      Tomz_KV
      wrote on last edited by
      #42

      I did not see it. Is it publicly available at the site?

      TOMZ_KV

      W 1 Reply Last reply
      0
      • T Tomz_KV

        I did not see it. Is it publicly available at the site?

        TOMZ_KV

        W Offline
        W Offline
        woodyata
        wrote on last edited by
        #43

        Here is the coding standard: [http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip](http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip)[[^](http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip "New Window")]

        T 1 Reply Last reply
        0
        • W woodyata

          Here is the coding standard: [http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip](http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip)[[^](http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip "New Window")]

          T Offline
          T Offline
          Tomz_KV
          wrote on last edited by
          #44

          Great. Thanks!

          TOMZ_KV

          1 Reply Last reply
          0
          • T Todd Smith

            John Simmons / outlaw programmer wrote:

            Seems he also doesn't like private member variables since they're "not necessary" in the latest version of C# (and a number of other ideas I don't agree with him on).

            With automatic properties that's somewhat true. The private member is created for you. So coding guidelines should be updated to incorporate that feature. If he means there's no longer any use for private member variables then of course he's mistaken and should be thrown out with the rest of the garbage :D

            Todd Smith

            J Offline
            J Offline
            James Lonero
            wrote on last edited by
            #45

            I agree with you Todd. Yes, using this method is easier and convenient and I also use this method. Sadly to say, I have started using the var method to declare local variables. There are times when I cannot use the automatic variable method, say, when I need to monitor when a class data item changes (for example, setting a dirty flag). Although, it does save typing, I'm not against it. You will need to use the getter and setter parts of the property (or else, how can you get or set the value?) You can still declare the entire property as private or either the getter or setter part as private so you only have to expose what you want.

            1 Reply Last reply
            0
            • realJSOPR realJSOP

              New guy started today, and he's very - ummm - "excited" about coding guidelines. Seems he also doesn't like private member variables since they're "not necessary" in the latest version of C# (and a number of other ideas I don't agree with him on). I suggested that all of the programmers (there are four of us right now) take a small class, and change it to their own style of coding, and then we compare notes in a meeting, taking the best of the lot (in other words, the things we agree on) and establishing a coding style guidelines document.

              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

              T Offline
              T Offline
              Tim Yen
              wrote on last edited by
              #46

              Use stylecop if your coding in C# or Resharper's standards which allows you to auto fix most code. There is a http://www.codeplex.com/StyleCopForReSharper[sytle copfor resharper plugin ] too. Which is really quite good. I've been using stylecop for resharper for a few months now and I found I just got used to the conventions, even though I only agreed with around 80-90% of them originally. If I see code that isn't formatted that way I wince. Tim

              1 Reply Last reply
              0
              • F ftw melvin

                The younger generation do seem somewhat fixated on style over substance, or box ticking. Software development should be more autocratic that democratic, but in difficult times I can see your dilemma. Instead of debating 'whose style is best' it will probably be better to fall back on pre-existing standards and best practices that everyone could perceive as 'neeutral'. Quick solution: 1. Suggest that for naming conventions and coding style you use Microsoft's recommendations unless there is a clear consensus on ignoring a certain recommendation; use FxCop (built in for VS2008) to enforce. 2. Choose a neutral 'best practice' source for going beyond mere conventions. Bill Wagner's brilliant books 'Effective C#' and 'More Effective C#' should be compulsory reading and between them offer 100 properly argued reasons why you should favour certain practices over others. I know a number of FTSE organizations where the developers stick a photocopy of the Effective C# content page where they can see it for constant reinforcement. I'll pick one at random; Item 25: Use Exceptions to Report Method Contract Failures - Any method that cannot perform its stated actions should report that failure by throwing an exception (rather than by using hand-rolled return codes). and so on. *** By recommending neutral standards you take all the personal feeling out of the choice and this will make the developer buy-in far more likely.

                "If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .

                T Offline
                T Offline
                Tim Yen
                wrote on last edited by
                #47

                I agree dev buy in is the hard bit. Go neutral.

                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