Slashdot Mirror


Coding Standards for C#?

infinite9 asks: "I've been given the task of writing the coding standards for my corporation. I've been in IT for 12 years, so many things are obvious. Recently though, my employer has standardized on C# and .NET, and since I'm new to the technology (isn't everyone?) I'm not sure what to include. I've included a paragraph about signing assemblies with a standard key pair as well as a few other odds and ends. Apart from the obvious statements that apply to any language like good comments, good variable names, and maintainable code, can anyone suggest other C#/.NET related things that I should include?"

4 of 82 comments (clear)

  1. Use the IDE's beautify by buro9 · · Score: 3, Insightful

    Don't attempt to come up with any of your own formatting rules (as much as it's tempting to make your code look like the rest of your code)... having a standard formatting implemented by the IDE results in much cleaner formatting and will ensure that the people you hire will understand the code that much sooner.

  2. Two non-obvious things I'd suggest by Sevn · · Score: 4, Insightful

    Make sure you recommend CVS, or some other type
    of versioning system to save hell down the road.

    Enforce under penalty of death or termination of
    employment that DOCUMENTATION IS PART OF DEVELOPMENT.
    I've had many a contract where I've basically just
    had to say "screw it" and redo a rats nest of
    undocumentated code because of zero documentation.

    --
    For every annoying gentoo user, are three even more annoying anti-gentoo crybabies. Take Yosh from #Gimp for example.
  3. Wiki Wiki Wiki by Bat_Masterson · · Score: 2, Insightful

    A complete coding standard is difficult to come up with in one shot. Also, developers generally have their "de-facto" standards that they like to follow, so getting buy-in can be difficult. Perhaps it's easier to just allow the coding standard to evolve as needed by using a collaboration facility to come up with it.

    Take a look at Twiki.

  4. Poor guy. by pmz · · Score: 3, Insightful

    Recently though, my employer has standardized on C# and .NET, and since I'm new to the technology (isn't everyone?)

    I'm suprised your company would take such a high-risk action. "Standardizing" on something so new and untested is, IMO, irresponsible.

    Adopting .NET now is like adopting J2EE when it was at version 1.0 or 1.1. The details of the APIs aren't hammered out, yet, so a lot of code your company creates will be "legacy" very quickly--probably within one year. If you don't believe me, ask anyone who jumped onto the JSP and Java Servlet bandwagon when they first came out (before tag libraries, etc.).