Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [naming]

Give meaning and explanation with the fewest number of characters in a form that is most accepted by your team or community at large.

11
votes
4answers
1k views

Stored procedure Naming conventions? [closed]

One of our senior developers has stated that we should be using a naming convention for stored procedures with an "objectVerb" style of naming such as ("MemberGetById") instead of a "verbObject" type ...
8
votes
7answers
4k views

What do you call a customer's customer in a specification document, use case, or scenario?

My team and I develop software that our customers will use to interact with their customers. Additionally, we also eat our own dogfood and use the software ourselves to interact with our customers. ...
4
votes
2answers
321 views

Good abbreviations for XML … things

I've never been very good at maintaining a coherent bunch of variable names for interfacing with XML files because I never name the variables in my interfaces the same way across my source. There are ...
21
votes
5answers
28k views

What to do if I hate C++ header files?

I was always confused about header files. They are so strange: you include .h file which doesn't include .cpp but .cpp are somehow compiled too. Recently I joined a team project, and of course, ...
7
votes
2answers
144 views

Test descriptions/name, say what the test is? or what it means when it fails? [closed]

The API docs for Test::More::ok is ok($got eq $expected, $test_name); right now in one of my apps I have $test_name print what the test is testing. So for example in one of my tests I have set this ...
4
votes
6answers
4k views

Naming conventions for variables [closed]

When programming, what naming conventions do you use for your variables? I don't mean when the name of the variable should be obvious; ie. sum, total, first, last. But when you name variables that don'...
14
votes
9answers
871 views

What do you do when your naming convention clashes with your language?

Okay, this is one of those little things that always bugged me. I typically don't abbreviate identifiers, and the only time I use a short identifier (e.g., i) is for a tight loop. So it irritates me ...
8
votes
2answers
4k views

Should APIs be in en_US or en_GB or both? [closed]

Should I write APIs in US spelling or British spelling? Or should I provide with mapping both of them to a single one and internally using anyone which I like so that both of them works ? At present ...
17
votes
5answers
4k views

Why are PHP function signatures so inconsistent? [closed]

I was going through some PHP functions and I could not help notice the following: <?php function foo(&$var) { } foo($a); // $a is "created" and assigned to null $b = array(); foo($b['b']); ...
9
votes
4answers
8k views

Java abstract class naming

Example: You create an abstract class for Ajax actions. Different Ajax actions will all extend this class. Problem: Do you name the class AjaxAction or AbstractAjaxAction? When you create ...
14
votes
4answers
237 views

Merits of Namepsaces/Packages

Some programming languages (e.g. Java and C++) have language features called "packages" or "namespaces". How useful is it really to have namespaces? It is possible to mark functions and classes as ...
70
votes
22answers
196k views

Naming conventions: camelCase versus underscore_case ? what are your thoughts about it? [closed]

I've been using underscore_case for about 2 years and I recently switched to camelCase because of the new job (been using the later one for about 2 months and I still think underscore_case is better ...
4
votes
2answers
103 views

Begin and Finish or Pre and Post in async call pair?

In an async call pair you would rather have a BeginDoSomething & FinishDoSomething or PreDoingSomething & PostDoingSomething pair? Cheers
28
votes
5answers
17k views

Is the Java package name convention flawed? [closed]

We're all familiar with the Java package name convention of turning the domain name around. I.e. www.evilcorp.com would, by convention, chose to have their java packages com.evilcorp.stuff. ...
14
votes
3answers
7k views

Are my method or variable names too long? [closed]

So I was currently in the middle of coding, unfortunately for me, I was in "The Zone" then I thought to myself, are my method/variable names to long? POP out of the Zone I go! So I came here to ...
2
votes
1answer
224 views

Best place to put classes that extend the .net framework?

I have no clue where to put the following class and I've noticed I just keep putting them in a helpers folder which isn't much helpfull towards reusability in future projects. Example: I want to ...
80
votes
15answers
19k views

Is it bad to use Unicode characters in variable names? [closed]

I recently tried to implement a ranking algorithm, AllegSkill, to Python 3. Here's what the maths looks like: No, really. This is then what I wrote: t = (µw-µl)/c # those are used in e = ...
14
votes
13answers
3k views

async & await - poll for alternatives [closed]

Now that we know what is in store for c#5, there is apparently still an opening for us to influence the choice of the two new keywords for 'Asynchrony' that were announced by Anders Heijsberg ...
10
votes
18answers
11k views

What do you name functions/variables/etc when you can't think of a good name? [closed]

When you are defining a function/variable/etc and are not sure what to name it, what do you name it? How do you come up with a name? If you use a temporary name as a place-card until you give it it's ...
6
votes
2answers
2k views

How would you name import and export functions in Java? [closed]

I have a Java class that handles import and export of data. It started out as a simple private void export() { } private void import() { } Of course, I wrote the export first, committed it, and then ...
8
votes
6answers
10k views

What naming conventions do you use for php classes? [closed]

I really like using ClassNames and memberNames as convention but I am not sure how I would name the file containing a class. I like making my classes defined in a file with the exact same name as the ...
16
votes
6answers
921 views

“A”, “an”, and “the” in method and function names: What's your take? [closed]

I'm sure many of us have seen method names like this at one point or another: UploadTheFileToTheServerPlease CreateATemporaryFile WriteTheRecordToTheDatabase ResetTheSystemClock That is, method ...
0
votes
3answers
223 views

Should I bother with trying to come up with names for these? [closed]

If you were to run across code like this in your travels would the short names bother you? let setPropertyAssignment = parser { let! a = setIdentifierName let! b = propertyName ...
104
votes
13answers
63k views

What “version naming convention” do you use? [closed]

Are different version naming conventions suited to different projects? What do you use and why? Personally, I prefer a build number in hexadecimal (e.g 11BCF), this should be incremented very ...
25
votes
17answers
24k views

How do you name your private variables in C#? [closed]

What is the best practice, most commonly accepted naming conventions for private variables in C#? private int myInteger; private int MyInteger; private int mMyInteger; private int _myInteger; private ...