naming-conventions

Python Notation?

I've just started using Python and I was thinking about which notation I should use. I've read the PEP 8 guide about notation for Python and I agree with most stuff there except function names (which I prefer in mixedCase style). In C++ I use a modified version of the Hungarian notation where I don't include information about type but o...

Naming conventions: "State" versus "Status"

Quick question: I'd like to hear your thoughts on when to use "State" versus "Status" when naming both fields such as "Foo.currentState" vs "Foo.status" and types, like "enum FooState" vs "enum FooStatus". Is there a convention discussed out there? Should we only use one? If so which one, and if not, how should we choose? ...

.htm vs .html

Which extension should I choose for my HTML files and why? ...

Is "username" one word or two?

While trying to cleanup an application's API, I found myself scratching my head... What should I call the variable for a user's name "username", or "userName"? ...

Rule of thumb for naming wrapper classes

I find myself creating a significant number of wrapper classes, purely because I want to mock out the behaviour of Classes that don't lend themselves well to the RhinoMocks isolation model (for instance like DirectoryInfo or WindowsIdentity) Native Win API methods (I normally collect all the methods I need into a single class and wrap...

Acronyms in Camel Back

I often see Java class names like XmlReader instead of XMLReader My gut feeling is to completely upper case acronyms, but apparently many people think differently. Or maybe it's just because a lot of code generators are having trouble with acronyms... So i would like to hear the the public opinion. How do you capitalize your class...

Should I use the Java naming convention?

I'm assigned to a large project that is going to be done in Java and viewed by a few programmers on the team. I want the code to be readable and understandable, and so want the naming convention to suite everyone that reads it. I'm wondering if I have to use the Java naming convention in order for other people to view it and understand ...

How do I override rails naming conventions?

I have a model named "clothing" which I want to be the singlular (one piece of clothing). By default, rails says the plural is clothings. Right or wrong, I think it will be more readable if the plural is "clothes". How do I override the plural naming convention? Can I do it right in the model so I don't have to do it over and over?...

Best set of names for iterations ?

Hi there, I was curious what do you use as iteration names and how much iterations do you have? What is the best set of names for iterations which will also be simple enough to explain to the customer. EDIT: lets say that my iterations are 5 weeks long each. cheers Perica ...

Why are many ports of languages to .net prefixed with 'Iron'?

Was discussing over lunch why several ports of languages to the .net framework are prefixed with 'Iron'. e.g. IronPython IronRuby IronLisp IronScheme IronPHP Anyone out there know? (language list sourced from http://www.dotnetpowered.com/languages.aspx) ...

What names do you find yourself prepending/appending to classes regularly?

Which nouns do you find yourself putting regularly at the end of your classes? For example, I have a habit of sticking Info onto classes that pass information around but don't do a great deal: ImportInfo SiteInfo Or for Coordinating classes: UserManager SecurityManager I end up using Builder quite often for string related classe...

In C# .NET, what is the reason for array.Length vs. list.Count?

Possible Duplicate: count vs length vs size in a collection Am I overlooking a semantic difference between "Length" and "Count", or did perhaps some implementation detail in the .NET Framework require different names for these similar concepts? Given the close attention that was paid to naming and everything else in the framewor...

Prefixing database table names

I have noticed a lot of companies use a prefix for their database tables. E.g. tables would be named MS_Order, MS_User, etc. Is there a good reason for doing this? The only reason I can think of is to avoid name collision. But does it really happen? Do people run multiple apps in one database? Is there any other reason? ...

The meaning of ' in Haskell function name?

What is quote ' used for? I have read about curried functions and read two ways of defining the add function - curried and uncurried. The curried version... myadd' :: Int -> Int -> Int myadd' x y = x + y ...but it works equally well without the quote. So what is the point of the '? ...

What should I name my PHP class file?

I have seen many different naming schemes and extensions used for PHP files that are basically just classes. Some examples: myClass.php myClass.class.php myClass.class What is the difference, and which is better? ...

Preferred way to simulate interfaces in C++

Since C++ lacks the interface feature of Java/C#, what is the preferred way to simulate interfaces in C++ classes? My guess would be multiple inheritance of abstract classes. What are the implications in terms of memory overhead/performance? Are there any naming conventions for such simulated interfaces, such as SerializableInterface? ...

Name for program that converts between two formats?

This question is a little silly, but sometimes it's tough to figure out how to name things correctly. The conversion will parse a config file into XML and vice versa. I want to call the program MyCompany.Config2Xml, but the program also needs to be able to "Xml2Config". ...

Naming Conventions: What to name a boolean variable?

I need a good variable name for a boolean value that returns false when an object is the last in a list. The only decent name I can come up with is 'inFront', but I don't think that is descriptive enough. Another choose would be 'isNotLast'. This is not good practice though (Code Complete, page 269, Use positive boolean variable nam...

Why use prefixes on member variables in C++ classes

A lot of C++ code uses syntactical conventions for marking up member variables. Common examples include m_*memberName* for public members (where public members are used at all) _*memberName* for private members or all members Others try to enforce using this->member whenever a member variable is used. In my experience, most larger c...

What are the most common naming conventions in C#?

What are the most common naming conventions in C# for classes, namespaces and methods? Is it common to have getter/setter style methods as in Java? ...