naming-conventions

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 your naming convention for stored procedures?

I have seen various rules for naming stored procedures. Some people prefix the sproc name with usp_, others with an abbreviation for the app name, and still others with an owner name. You shouldn't use sp_ in SQL Server unless you really mean it. Some start the proc name with a verb (Get, Add, Save, Remove). Others emphasize the entit...

C# naming convention for constants?

private const int THE_ANSWER = 42; or private const int theAnswer = 42; Personally I think with modern IDEs we should go with camelCase as ALL_CAPS smells "Hungarian". What do you think? ...

When should an application honor case sensitivity from input?

I recently rolled an application that automatically encrypted a file output from another internal system using PGP and then sftp’d to a foreign target server directory where it was to be consumed by a third-party application. I have been trying to trouble shoot the whole process for about a week and was getting no response from the third...

What Delphi coding standards document(s) do you follow?

What Delphi coding standards document(s) do you follow? Our company is looking at putting some better coding standards in place, to improve our code’s readability, reviewability, and maintainability. We’ve come across CodeGear’s “Object Pascal Style Guide”, but it hasn’t been touched in quite a while and I imagine a number of people ha...

What's the proper naming convention for a property 'ID' : ID or Id ?

Pretty simple question: When i have a persistable object, it usually has a property called ID (for abstract classes). So .. is the naming convention ID or Id? eg. public int ID { get; set; } or public int Id { get; set; } cheers :) PS. This is for .NET btw. FXCop conformat would be a bonus. ...

C# Float vs. VB.net Single - Namin' complainin'

Why is it called a single in VB.net? I'm sure there is a good reason but it doesn't seem intuitive to a non formally trained programmer like me. ...

When is a website considered "static" or "dynamic"

Hi friends, I have created a site, which parses XML files and display its content on the appropriate page. Is my site a dynamic web page or static web page? How do dynamic and static web pages differ? I feel it's dynamic, because I parse the content from xml files; initially i don't have any content in my main page.. What do you thin...

definition of filename ?

After years of programming it's still some of the simple things that keep tripping me up. Is there a commonly agreed definition of filename ? Even the wikipedia article confuses the two interpretations. It starts by defining it as 'a special kind of string used to uniquely identify a file stored on the file system of a computer'. Tha...

Naming an intermediary table in a database

Consider two tables transaction and category each having their own ID and information. A transaction can have more than one category, I have read creating a 3rd table to link transaction and category using their IDs is best. But what would you call this table, assuming you would have many like it? transactionCategories is the best I'm ...

Do you follow the naming convention of the original programmer?

If you take over a project from someone to do simple updates do you follow their naming convention? I just received a project where the previous programmer used Hungarian Notation everywhere. Our core product has a naming standard, but we've had a lot of people do custom reporting over the years and do whatever they felt like. I do no...

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...

What package naming convention do you use for personal/hobby projects in Java?

I'm already familiar with the standard Java package naming convention of using a domain name to create a unique package name (i.e. package com.stackoverflow.widgets). However, I've never seen any recommendations for how to choose package names for personal projects. I assume because this is because this is really a matter of personal tas...

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; ...

When should I start a method name that gets a property with the "get-" prefix?

What's a good rule of thumb for naming methods that return properties/attributes/members of an object? If an object has some immutable quality "blarg", should a method that returns that quality be called "blarg()" or "getBlarg()"? The Java API, for example, is inconsistent: most properties are accessed through "get" methods (even those...

count vs length vs size in a collection

From using a number of programming languages and libraries I have noticed various terms used for the total number of elements in a collection. The most common seem to be length, count, and size. eg. array.length vector.size() collection.count Is there any preferred term to be used? Does it depend on what type of collection it is? ie...

Annoying or idiotic naming conventions?

What programming or naming conventions have you come across that really rub you the wrong way? For those that aren't aware, in C# we can wrap blocks of code with a #region directive, which allows you to collapse these blocks in Visual Studio for readability. So the convention on this team is to wrap all combinations of access modifi...

Naming Conventions in C#

As a beginning programmer, I'm trying to settle on a standard naming convention for myself. I realize that it's personal preference, but I was trying to get some ideas from some of you (well a LOT of you) who are much smarter than myself. I'm not talking about camel notation but rather how do you name your variables, etc. IMHO, var_Qu...

'Exports' naming convention - how does it work?

What rules apply to the name that ends up in the exports section of an PE (Portable Executable)? Roughly, I see names starting with an '_' underscore, a '?' question mark or an '@' at-sign. What do those mean, and what about the rest of the name? Also - How can I reverse the naming convention into something more usable? ...

Are variable prefixes (“Hungarian notation”) really necessary anymore?

Hi, Since C# is strongly typed, do we really need to prefix variables anymore? e.g. iUserAge iCounter strUsername I used to prefix in the past, but going forward I don't see any benefit. ...