The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Capitalization: Should you use ID or Id

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Darrell Norton

Posts: 876
Nickname: dnorton
Registered: Mar, 2004

Darrell Norton is a consultant for CapTech Ventures.
Capitalization: Should you use ID or Id Posted: Aug 12, 2004 8:43 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Darrell Norton.
Original Post: Capitalization: Should you use ID or Id
Feed Title: Darrell Norton's Blog
Feed URL: /error.htm?aspxerrorpath=/blogs/darrell.norton/Rss.aspx
Feed Description: Agile Software Development: Scrum, XP, et al with .NET
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Darrell Norton
Latest Posts From Darrell Norton's Blog

Advertisement

Ander Stevenson has a post asking whether to ID or to Id. FxCop treats the ID as an error of the capitalization guidelines (name acronyms of three or more characters are Pascal-cased, and ID is not considered an acronym, it’s an abbreviation).

First off, realize that FxCop are rules that were originally developed for component developers extending the .NET Framework. Go look at this page here and read the title. Right, design guidelines for class library developers (my emphasis added!). That’s why the rules include all sorts of globalization, standard usage and naming guidelines, COM interop, etc. Microsoft wants people that sell products that extend the Framework to play by the same rules as they did, or tried to do, anyway.

That being said, Microsoft made the egregious error (I’m being sarcastic here, see Brad Abrams for a discussion on why the choice was made) that 2-letter abbreviations, such as IO for input-output, should both be capitalized. FxCop has the IO override hard-coded in the program, but ID is not. You can exclude the error on a per-occurrence basis, but who wants to do that?

So the choice is up to you. If you are designing a non-public API (that is, an API that will not be exposed via a service or to external consumers), I don’t think that this rule matters if you really like your ID. But if someone external to your team will see it, then follow the naming guideline.


This Blog Hosted On: http://www.DotNetJunkies.com/

Read: Capitalization: Should you use ID or Id

Topic: New and Notable 63 Previous Topic   Next Topic Topic: Windows XP SP2 experiences

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use