471,350 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Naming convention and FxCop question

Hi,

My namespace looks like

DDD.DEF.Something.Otherthing

DDD is abbreviation for the company name and DEF for the product
name.

FxCop is asking me to change it Ddd.Def.Something.Otherthing.

Is it not ok to ignore pascal casing for abbreviations?

TIA
Jun 27 '08 #1
3 1602
Is it not ok to ignore pascal casing for abbreviations?
As I recall, the recommendation distinguishes between <= 2, and >= 3
characters, i.e. IP, but Tcp; however, I think you could argue strongly
when it comes to company names. As an example, I use a tool by ILOG -
and it is in an ILOG namespace.

At the end of the day, it is your code; if in doubt, perhaps lean
towards clarity and constistency, whichever that is...

Nobody is going to drop on you, unless your company is called "System",
and your product is called "Collections" ;-p

Marc
Jun 27 '08 #2
Is it not ok to ignore pascal casing for abbreviations?

Also, if you choose to ignore, and didn't already know, it may be more
convenient to add the abbrivation to the CustomDictionary.xml, found
in the FxCop folder (If your using VS Team Suite built in code
analysis its "C:\Program Files\Microsoft Visual Studio 9.0\Team Tools
\Static Analysis Tools\FxCop\".

It would be added to the "<Acronyms>" "<CasingExceptions>" section.
Some default values for this area are like "NESW" for "North East
South West", etc, and would then be applied to all projects you open,
which might be what you want for something like a company name.

NB
Jun 27 '08 #3
parez wrote:
My namespace looks like

DDD.DEF.Something.Otherthing

DDD is abbreviation for the company name and DEF for the product
name.

FxCop is asking me to change it Ddd.Def.Something.Otherthing.

Is it not ok to ignore pascal casing for abbreviations?
Seems perfectly valid to me.

If DDD and DEF were (english) words, then you should
capitalize them per coding convention.

But acronyms are always all uppercase.

The .NET coding convention from MS is important, but they
can not require IBM to call them Ibm.

So this is one of the VERY FEW exceptions where I would
not recommend following the coding convention to the letter.

Arne
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mark Broadbent | last post: by
11 posts views Thread by orekinbck | last post: by
3 posts views Thread by Phillip Conrad | last post: by
114 posts views Thread by Jonathan Wood | last post: by
35 posts views Thread by Smithers | last post: by
8 posts views Thread by mrashidsaleem | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.