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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
Y

yippiecoder

@yippiecoder
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • StyleCop
    Y yippiecoder

    Couldn't agree more. I wish that the tool provided automatic re-formatting where possible. Better yet, I'd prefer that the lenses in my eyes would automatically reformat code the way that I find it most helpful.

    The Lounge csharp com graphics game-dev question

  • StyleCop
    Y yippiecoder

    Hmm, Super Lloyd I think you nailed it on the head in that you don’t want to be bothered with style issues so StyleCop may be seen as just an impediment. Nothing wrong with that. StyleCop certainly takes a lot of getting used to and if the benefits of its use won’t be realized, well, just like anything else, probably best not to go down that path.

    We started using StyleCop 5 years ago in one project and moved to use it in all of our in-development C# projects, ~70. Prior to its usage, styles varied wildly and conflicted making for a difficult to read, modify and navigate code base. We've gone from a team of 5 developers up to 12 and now to 4.

    A few notes:

    1. It is not that StyleCop rules are always right, it’s the fact that they are always enforced that, IMHO, is the big win. Ever have to listen to, or explain about style in a code review? Tool usage might be easier. – megaadam mentioned this as well.
    2. Enforcing that StyleCop warnings are errors or turn them all the way off to avoid spewing warnings that never get fixed.
    3. Understand that it takes quite a while to get used to the level of checking. It took me about 6 months but around then I just stopped doing things that would cause errors, same thing goes with Code Analysis.
    4. Some team members had to give up the idea that their code style was part of who they were or how they expressed themselves. Once they got over that, they were the biggest proponents of the tool.
    5. The <inheritdoc/> tag can be used when implementing overrides where the base class documentation is sufficient to avoid duplication.
    6. The <include file='....'/> tag can be used for documentation that would otherwise have been copied and pasted.
    7. A CustomDictionary.xml can be used to inform StyleCop of naming overrides.
    8. The argument that things should be placed next other things which are most related works great until it doesn’t. For example, two methods or properties that use the same field – where should the field be located?
    9. I don’t know what you are referring to when talking about #regions begin required around using statements. #region’s and StyleCop don’t get along together well and most of our code base does not use #region’s. The only requirement I know of is the ordering and placement of namespace using statements; they must be within the enclosing namespace and grouped and order by name.
    The Lounge csharp com graphics game-dev question

  • What is a good year for VS?
    Y yippiecoder

    2013 for code 2010 for test, alm

    The Lounge question visual-studio

  • Return name and identity for all tables
    Y yippiecoder

    Little help with returning both the name and the current identity for all tables? If a table doesn't have any rows, instead of the current identity, I'd like to return 0. The database will be in single user mode during the query if that helps. The following query is close but it still returns 1 for tables that don't have any rows. Somehow the CASE expression isn't right. Thanks in advance.SELECT TABLE_NAME, CASE WHEN COUNT(TABLE_NAME) = 0 THEN 0 ELSE IDENT_CURRENT(TABLE_NAME) END FROM INFORMATION_SCHEMA.TABLES WHERE OBJECTPROPERTY(OBJECT_ID(TABLE_NAME), 'TableHasIdentity') = 1 AND TABLE_TYPE = 'BASE TABLE' GROUP BY TABLE_NAME

    Database database help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups