473,549 Members | 2,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Naming convention and FxCop question

Hi,

My namespace looks like

DDD.DEF.Somethi ng.Otherthing

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

FxCop is asking me to change it Ddd.Def.Somethi ng.Otherthing.

Is it not ok to ignore pascal casing for abbreviations?

TIA
Jun 27 '08 #1
3 1662
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 "Collection s" ;-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 CustomDictionar y.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> " "<CasingExcepti ons>" 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.Somethi ng.Otherthing

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

FxCop is asking me to change it Ddd.Def.Somethi ng.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7137
by: Mark Broadbent | last post by:
stupid question time again to most of you experts but this is something that continually bothers me. I am trying to get into the habit of naming variables and controls in an assembly as per convensions. The thing is that Ive never really get the full reference to check against. Ive seen a couple of articles, but there always seems to be a bit...
11
6168
by: orekinbck | last post by:
Hi There What convention do you use when naming an enumeration and variables that use the enumeration? I like plural/singular, for example: public class Example { public enum VehicleTypes { Car, Truck, Motorbike };
14
3115
by: 42 | last post by:
Hi, Stupid question: I keep bumping into the desire to create classes and properties with the same name and the current favored naming conventions aren't automatically differentiating them... (both are "Pascal Case" with no leading or trailing qualifiers). For example... I'll be modelling something, e.g. a computer, and I'll
10
17754
by: jjkboswell | last post by:
I'm trying to pin down a good naming convention for the 3 things required to implement an event. You need: 1) a delegate 2) an event 3) an event handler Below is my understanding of a naming convention based on the Windows Forms events. Can someone let me know if this convention is standard,
3
1371
by: Phillip Conrad | last post by:
Here is a little problem I've run into, and none of the naming conventions have helped... Ever since I switched from C to C# and FxCop, I've going crazy trying to fix some style issues. I have 3 major issues... --------- Let's say I have a class called Parameter.
114
7770
by: Jonathan Wood | last post by:
I was just wondering what naming convention most of you use for class variables. Underscore, "m_" prefix, camel case, capitalized, etc? Has one style emerged as the most popular? Thanks for any comments. --
35
12146
by: Smithers | last post by:
Is it common practise to begin the name of form classes with "frm" (e.g., frmOneForm, frmAnotherForm). Or is that generally considered an outdated convention? If not "frm" what is a common or recommended practise? Thanks.
8
2283
by: mrashidsaleem | last post by:
Can anyone guide me what is wrong with the naming conventions suggested below? I know that this is not recommended by many (including Microsoft) but I need to know what exactly is the rationale behind going for a different convention in .NET. The recommendations do make sense (to me, at least but I may be wrong and would like someone to...
47
2463
by: Zytan | last post by:
Is the m_variableName used for data members in C# classes? Since everything is in a class, it seems that it becomes pointless. What is the general naming conventions? What are your personal thoughts? I've been using m_variableName, but I think I'm going to drop it. I've also been prefixing classes with clsMyClassName, and forms with...
0
7524
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7451
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7720
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7960
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7812
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6048
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5089
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...

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.