naming-conventions

Interfaces and Versioning

I am designing a new System and I have a lot of Interfaces that will grow over time with the system. What is the best practice to name this interfaces ISomethingV01 ISomethingV02 etc and I do this public interface ISomething{ void method(); } then I have to add method 2 so now what I do? public interface ISomethingV2:ISometh...

Valid characters in a Java class name

What characters are valid in a Java class name? What other rules govern Java class names (for instance, Java class names cannot begin with a number)? ...

Is there a specific name for the node that coresponds to a subtree?

I'm designing a web site navigation hierarchy. It's a tree of nodes. Nodes represent web pages. Some nodes on the tree are special. I need a name for them. There are multiple such nodes. Each is the "root" of a sub-tree with pages that have a distinct logo, style sheet, or layout. Think of different departments. What should I name...

Infrastructure for a software project

Hi, I'd be leading a new project soon. And I've been pondering over what are the basic infrastructure for a software project. These are the stuff that I think every project should have: -Coding style conventions -Naming conventions -Standard project directory structure(eg maven standard dir layout, etc) -Project management and issue...

Assembly names and versions

I am wondering what is considered as best practice when it comes to assemblies and releases. I would like to be able to reference multiple versions of the same library - solution contains multiple projects that depend on different versions of a commonutils.dll library we build ourselves. As all dependencies are copied to the bin/debug o...

Naming Conventions for Unit Tests

What are some popular naming conventions for Unit Tests? General Follow the same standards for all tests. Be clear about what each test state is. Be specific about the expected behavior. Examples 1) MethodName_StateUnderTest_ExpectedBehavior Public void Sum_NegativeNumberAs1stParam_ExceptionThrown() Public void Sum_NegativeNumb...

Library naming conventions

There are two popular naming conventions: vc90/win64/debug/foo.dll foo-vc90-win64-debug.dll Please discuss the problems/benefits associated with either approach. I am also wondering if it is possible to expose meta-data (i.e. compiler, platform, build-type) in approach #1 in an easy to use, cross-platform manner. ...

Package naming conventions for domain object models

What are some good package naming conventions for domain specific object models. For example, say you have a Person.java POJO, would you put it in a mydomain.model or mydomain.entity or mydomain.om (object model) package. The idea is to separate the MVC model objects from the domain object model. Our MVC based application has a model...

What is an ideal variable naming convention for loop variables?

If you are writing a simple little loop, what should you name the counter? Provide example loops! ...

Best practice for naming convention of UI controls for referencing in code-behind?

What is the best practice for naming UI controls (textboxes, drop-downs, etc.) on forms and reports for reference in the code-behind pages? I develop a lot of reports and forms in my office. I have several web applications providing about 80+ "live" reports being generated from various and multiple data sources (Access, SQL, Oracle). ...

Why shouldn't I use "Hungarian Notation"?

I know what Hungarian refers to - giving information about a variable, parameter, or type as a prefix to its name. Everyone seems to be rabidly against it, even though in some cases it seems to be a good idea. If I feel that useful information is being imparted, why shouldn't I put it right there where it's available? See also: Do peopl...

Method-naming: get or load

I'm writing a desktop application that communicates with a web service. Would you name all web-service functions that that fetch data LoadXXXX, since they take a while to execute. Or would you use GetXXXX, for instance when getting just a single object. ...

Class Naming Conventions / Layout

Does anyone have a good article or good advice for class naming for n-tier web applications? I'm used to the layout that LLBLGen gives when it generates objects based on a database structure, which might generate the following class files for a given "User" table in the database: /EntityClasses/UserEntity.vb /CollectionClasses/UserColl...

Dash vs. Underscore

Should it be /about_us or /about-us? From usability point of view, I personally think /about-us is much better for end-user yet Google and most other websites (and javascript frameworks) use underscore naming pattern. Is it just matter of style? Are there any compatibility issues with dashes? ...

Jar file naming conventions

Are there any industry standard conventions for naming jar files? ...

Common Naming Conventions

What are the naming conventions that you use while coding? ...

Too many "pattern suffixes" - design smell?

I just found myself creating a class called "InstructionBuilderFactoryMapFactory". That's 4 "pattern suffixes" on one class. It immediately reminded me of this: http://www.jroller.com/landers/entry/the_design_pattern_facade_pattern Is this a design smell? Should I impose a limit on this number? I know some programmers have similar...

Pascal casing or Camel Casing for C# code?

I've been arguing with my coworkers about Pascal casing (upper camel case) vs. lower CamelCasing. They are used to lower camel casing for everything from table names in SQL databases to property naming in C# code but I like Pascal casing better, lower camel casing for variables and Pascal casing for properties: string firstName; public ...

Using underscores in Java variables and method names

Even nowadays I often see underscores in Java variables and methods, an example are member variables (like "m_count" or "_count"). As far as I remember, to use underscores in these cases is called bad style by Sun. The only place they should be used is in constants (like in "public final static int IS_OKAY = 1;"), because constants shou...

Why are the built in functions in PHP named so randomly?

It seems that there is no real pattern to the way functions are named, str_replace, strrpos, strip_tags, stripslashes are just some. Why is this the case? EDIT - this wasn't meant as a "troll" type post - just something that I think everytime I use the language! ...