naming

How to correctly name a variable which represents a value of 1 - n?

It obviously depends on the context you are using them in but, I was wondering if there is a universally accepted way to name such variables, or at least in a mathematical context. I've often seen: float k = someValue; float oneMinusK = 1 - k; ...which seems as descriptive as much as meaningless to me. Please note that I'm ...

What is the technical term for C# or Java type languages?

This is probably a very simple question, but what is the technical term for this class of language? They use an "intermediate" assembly type language which is sent through the JVM or CLR. They both are object oriented and they both depend on an intermediary such as the Java Virtual Machine or the Common Language Runtime to compile in...

How to name variables.

What rules do you use to name your variables? Where are single letter vars allows? How much info do you put in the name? how about for example code? what are your preferred meaningless variable names? (after foo & bar) why are they spelled "foo" and "bar" rather than FUBAR ...

Need help choosing a name for an interface

I'm refactoring a number of classes in an application to use interfaces instead of base classes. Here's the interfaces I created so far: ICarryable implemented by all Item objects IActable implemented by all Actor objects IUseable implemented by some Item sub-classes IWieldable implemented by some Item sub-classes You can see the...

Really long class/variable/property/method names

Some friends and colleagues of mine have a little running contest to find or write the longest class/variable/property/method names possible. Keep in mind, we try to be good boys and girls and keep the naming intelligible and concise, while still explaining what the thing does via its name. Sometimes it just doesn't happen though. Hav...

C# 3.0 Anonymous Types: Naming

I was wondering if there is some way to name or rename a property on an Anonymous type to include a space in the property name. For example: var resultSet = from customer in customerList select new { FirstName = customer.firstName; }; In this example I would like FirstName to be "First Name". The reason for this ...

Check LDAP connection (Java)

I'm using javax naming to connect to an LDAP database. Is there a good way to check if a connection is still valid? I'm looking for something really efficient here because it may need to be done often. After some web searching all I have found is a suggestion to do a quick search, is there any more lightweight way? /mac ...

Is there a name meaning "not a singleton"?

Is there a name meaning "not a singleton"? ...

Is there a concise catalog of variable naming-conventions?

There are many different styles of variable names that I've come across over the years. The current wikipedia entry on naming conventions is fairly light... I'd love to see a concise catalog of variable naming-conventions, identifying it by a name/description, and some examples. If a convention is particularly favored by a certain...

What is the most poorly named application out there?

What application, language, or other software product name makes you cringe every time you hear it; or was just an astoundingly bad choice from a marketing perspective? One name per answer, vote up the worst. ...

Most amusing function / method / procedure names

Every so often while writing code you do a double take at the function you just made and realise you've just created a very stupid function name! It might be descriptive and accurate, but totally inappropriate, or it might be completely off topic due to a mind warp! What are the best, funniest, strangest or stupidest function or code na...

Term for "find, remove and return an element" in a set?

Title says it mostly. I want to add a simple extension method to the base Dictionary class in C#. At first I was going to name it Pop(TKey key), kind of like the Stack method, but it accepts a key to use for lookup. Then I was going to do Take(TKey key), but it coincides with the LINQ method of the same name...and although C# 3.0 lets y...

Legalities of Naming Products - Your experiences

What is the legal process for naming software products? We will be talking to lawyers at some point, but I'd like to know a little more about the process before spending a fortune on them. I realize that few, if any, people on here are lawyers, but if you've gone through any sort of legal process for naming your products, please share yo...

Good name for an class that holds a object with an onset time

I'm creating a (Java) class to represent an object in a musical score that has a specific onset time, and possibly a duration as well. I need a good name for this class. Is something like "Timed" or "TimedObject" appropriate? I've tried to come up with something that ends in "-able" (like Runnable) but I can't think of anything good; ...

Should .NET Assembly names include a version number?

We currently have a heated internal debate as to whether the actual .NET assembly name should include the code's version number (e.g. CodeName02.exe or CompanyName.CodeName02.dll). Does anyone know of an authoritative source, like Microsoft, that provides guidance on this issue? ...

Name for HTTP Request+Response

There's one thing I haven't found in rfc 2616 and that's a "canonical" name for a request/response pair. Is there such thing? 4.1 Message Types HTTP messages consist of requests from client to server and responses from server to client. HTTP-message = Request | Response ; HTTP/1.1 messages Taking this as a temp...

Deploying a python application with shared package

Hey everyone, I'm thinking how to arrange a deployed python application which will have a Executable script located in /usr/bin/ which will provide a CLI to functionality implemented in A library installed to wherever the current site-packages directory is. Now, currently, I have the following directory structure in my sources: fo...

Codenamed Products and Visual Studio

Are there any practices regarding using codenames of products in Visual Studio projects and solutions? In that typically, namespaces, assembly names, binary outputs, et al need to be renamed once a product name is chosen: is there any way to deal with this? ...

What naming convention do you use for member variables?

What do you use to denote a member variable in a class? The most common time this is a problem is when you have a parameter passed into a constructor to set a member variable. Here is an example: public MyClass(string name) { name = name; // arghh!! } I've used m_name before, but that stinks of Hungarian. I've used _name before...

Rename my ServiceManager class

Following Alan Green's "Naming Java classes without Manager" I've started hunting *Manager classes in my own code. How would you rename the following class? ServiceLoader, maybe? but it doesn't "load" anything from anywhere. class ServiceManager { public bool IsRunning { get; }; public void Start(); public void Restart(); ...