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

learn more… | top users | synonyms

1
vote
2answers
387 views

What do you call a queue when the word queue is reserved? [closed]

I'm working on a rails app, and in rails queue is a reserved word. I need to make a Queue model for my app, and I'm stuck because I don't know what else to call it. Has anyone else run into this ...
13
votes
3answers
2k views

What package name to choose for a small, open-source Java project? [closed]

I'd like to publish a small open-source library in Java. I wonder what package name should I choose? I'm not a company and I don't have a domain that I could use as the basis for naming the package ...
2
votes
7answers
364 views

Vocabulary: Should I call this apply or map? [closed]

So, I'm tasked with organizing the code and building a library with all the common code among our products. One thing that seems to happen all the time and I wanted to abstract is posted below in ...
7
votes
1answer
3k views

What should be done with class names that conflict (common) framework names

What should be done exactly when the most obvious class name for a component is taken by a framework? In my case, I need to make a class that describes an HTTP request. Of course, the most common name ...
11
votes
3answers
2k views

Naming Convention for Dedicated Thread Locking objects [closed]

A relatively minor question, but I haven't been able to find official documentation or even blog opinion/discussions on it. Simply put: when I have a private object whose sole purpose is to serve for ...
3
votes
4answers
2k views

Is it bad practice to use the same name for arguments and members? [closed]

Sometimes I write constructor code like class X { public: X( const int numberOfThingsToDo ) : numberOfThingsToDo( numberOfThingsToDo ) { } private: int numberOfThingsToDo; }; or in C# ...
0
votes
1answer
155 views

External file (images, sounds) naming convention at Xcode [closed]

What is better naming conventions at Xcode regardng External File (images, sounds) etc? Is there any guideline from vendor Apple? As we store our projects at SVN, is there any complicity from Hosted ...
2
votes
1answer
134 views

Naming a class that processes orders [closed]

I'm in the midst of refactoring a project. I've recently read Clean Code, and want to heed some of the advice within, with particular interest in Single Responsibility Principle (SRP). Currently, ...
2
votes
2answers
164 views

Naming variables with fixed point units [closed]

What should I name a variable that has units with a fixed point? int herpLimitLo_psig2 = 6000; // 60.00 psig int derpLimitLoPsigwithtwodigits; int herpLimitHiPsigfixedtwo; int ...
9
votes
4answers
503 views

How to avoid general names for abstract classes?

In general it's good to avoid words like "handle" or "process" as part of routine names and class names, unless you are dealing with (e.g.) file handles or (e.g.) unix processes. However abstract ...
2
votes
2answers
439 views

Case Class naming convention [closed]

In my recent adventures in Scala, I've found case classes to be a really nice alternative to enums when I need to include a bit of logic or several values with them. I often find myself writing ...
43
votes
11answers
4k views

Why are cryptic short identifiers still so common in low-level programming?

There used to be very good reasons for keeping instruction / register names short. Those reasons no longer apply, but short cryptic names are still very common in low-level programming. Why is this? ...
5
votes
5answers
2k views

How do you name your personal libraries? [closed]

I'm pretty bad with naming things. The only name I can every generically come up with is 'helper'. Say, if I have a header file that contains helping functions for manipulating paths, I tend to put ...
7
votes
3answers
517 views

Naming a “do X if needed” method

What is a good way to name a method that checks if X needs to be done, and does X it if necessary? For example, how to name a method that updates a user list if new users have logged in? ...
28
votes
6answers
1k views

In what language should I name my business classes?

I'm requesting best practice with this question. This is only an issue if the customer company is strictly national has a native language other than English, I think. If the customer has a lot of ...
18
votes
5answers
2k views

What are the benefits of prefixing function parameter names with p*?

I often see projects (in Java projects and teams using Eclipse) that prefix function parameters with p. For example public void filter (Result pResult) ... I personally don't see any benefit in ...
8
votes
5answers
4k views

What do you call classes without methods?

What do you call classes without methods? For example, class A { public string something; public int a; } Above is a class without any methods. Does this type of class have a special name?
4
votes
6answers
400 views

Order of subject and modifiers in variable names

I'm looking for experiences regarding the ordering of the subject and modifiers in variable names. A simple object Shape would have just a subject for the variable name, such as Area. A slightly ...
18
votes
1answer
2k views

Why does the C library use macros and functions with same name?

I am reading 'The Standard C Library' by PJ Plauger which is really interesting. The book explains not only how to USE the library but also how it is implemented. I have finished reading the ctype.h ...
0
votes
1answer
243 views

Coincidence or rule?

I was reading about Assemblies (modules, which Microsoft CLR works with). The Assembly contains so called Manifest, which by definition describes a set of files in the Assembly. I know that Android ...
15
votes
2answers
992 views

Why does XMLHttpRequest not seem to follow a naming convention?

I've been working with the XMLHttpRequest object in JavaScript recently, and I couldn't help but notice that the casing of this name makes no sense. Why is 'XML' all in caps while 'Http' is not? ...
1
vote
2answers
996 views

Nice iterator naming [closed]

How do you name your iterators when you return a begin and an end iterator from a class? Without it sounding clunky, that is. Example: typedef std::vector<Idea> Ideas_Type; Ideas_Type::...
2
votes
3answers
695 views

What's a better name for this many-to-many table?

Part of one of my applications has contracts and contract_types tables, wherein a type may have many contracts but a contract may only be of one type. Now a new wrinkle has been introduced: a contract ...
2
votes
1answer
92 views

Variable names for Contact Information bits [closed]

I am in the middle of refactoring code and would like to get some ideas on variable naming so that my new names clearly represent the data they hold. I have a class called ContactMethod which makes ...
3
votes
6answers
665 views

How to define a natural id in database?

There are a lot of manuals. I am trying to create an database to hold information of these documents. But, there is a small problem. How can I give meaningful id to the manuals? Are there any ...
1
vote
4answers
803 views

CamelCase issue (PList or Plist)

Ok, I understand what CamelCase is. This question is relating to how to CamelCase the shortened version of Property List (PList). I am asking this because I am working on a PList parser in C# and ...
1
vote
4answers
287 views

Non-English Naming Conventions [duplicate]

Possible Duplicate: Do people in non-English-speaking countries code in English? I know that there are non-English based languages out there, where keywords are in some other tongue, but ...
14
votes
13answers
10k views

Should I add an “Abstract” prefix to my abstract classes? [closed]

Suppose I have an abstract class named Task. Is there a standard or convention that would suggest I should name it AbstractTask instead?
3
votes
3answers
223 views

User defined type for healthcare / Medical Records variable name prefixes? [closed]

I was reading Code Complete regarding variable naming in trying to find an answer to this question and stumbled on a table of commonly accepted prefixes for programming word processor software. Well, ...
3
votes
9answers
479 views

What is a widely accepted term for a string variable that would probably contain a file path and file name?

For functions that need to index files in a directory and rename them FileName0001, FileName0002, etc... I often need to write a function that splits the file name from the file path and rename the ...
-1
votes
2answers
3k views

Is it best practice to always capitalize class file names in PHP, and other languages? [closed]

I ask because I've seen a couple of OO PHP tutorials which do not adhere to this, but to me it just makes sense. It makes it easy to instantly see if a file is a class or not, if non-class files all ...
6
votes
4answers
2k views

What is the name for a NON-self-calling function?

I have a collection of normal functions and self-calling functions within a javascript file. In my comments i want to say something along the lines of "This script can contain both self-calling and ...
4
votes
4answers
2k views

Choosing names for integration tests

With unit tests the domain is quite small, so it's easy. I used Osherove's methodName_conditions_result() scheme and found it very clear. But with integration tests I feel like it would make a very ...
36
votes
6answers
32k views

Naming classes, methods, functions and variables [duplicate]

There are 3 important naming conventions: with_underscores PascalCased camelCased Other variants are not important because they are not commonly used. For variables it seems that the one with ...
2
votes
7answers
575 views

Should I refactor single letter variables for constructs like pointer/structure names? [closed]

And No, i am not referring to single variables in loops or exceptions. Lets say pointer/struct names in large c ,c++ programs . Are there any languages where this type of naming is acceptable or is ...
3
votes
2answers
313 views

Better use on the name of variables

I have a method that looks like this: Public Function NormalizeStreetAddress(country As Namespace.Country, streetAddress As Namespace.StreetAddress) _ ...
6
votes
9answers
852 views

Should the most recent date be named 'start' or 'end'? [closed]

So I have a function that takes two dates. The SQL query gets all the results between the two dates. I currently have my function setup as such: function myFunc(start, end) Where start is the ...
36
votes
15answers
8k views

Is it bad practice to name an unused variable with a single underscore?

Often when the syntax of the language requires me to name a variable that is never used, I'll name it _. In my mind, this reduces clutter and lets me focus on the meaningful variables in the code. I ...
5
votes
6answers
521 views

Is there any reason in a Java program for a special naming for a function arguments? [closed]

I'd like to know, why would I want to have a special prefixes for a function arguments, like "p_name", "p_age", "p_sex"? On the one hand it helps to distinguish parameter from local variable or field ...
6
votes
3answers
649 views

What are the disadvantages of naming things alphabetically?

Let me give you an example of how I name my classes alphabetically: Car CarHonda (subclass of Car) CarHondaAccord (subclass of CarHonda) There are two reasons why I put the type of the class ...
8
votes
3answers
3k views

What are the names for various forms of camel-case style naming?

For the purposes of communicating coding styles to my co-workers, what would I formally call the following variants of camel case? camelCase and CamelCase Notice that the former version ...
-1
votes
6answers
314 views

Function parameter names [closed]

I just found the following code in our code base: public String identifyArchitectureName(String platformName, String input) ... In my opinion input is one of the most meaningless names for a ...
-2
votes
3answers
251 views

What is the abstract name for Drive, Directory and file? [closed]

I want to give nice name to my function while returns drive, directory and file. Can you please suggest a good abstract name for this trio? This is the function. static IEnumerable<string> ...
2
votes
5answers
177 views

What is a generic term for name/identifier? (as opposed to label)

I need to refer to a number of things that have both an identifier value (used in code and configuration), and a human-readable label. These things include: database columns dropdown items ...
26
votes
7answers
19k views

Practical considerations for HTML / CSS naming conventions (syntax) [closed]

Question: what are the practical considerations for the syntax in class and id values? Note that I'm not asking about the semantics, i.e. the actual words that are being used, as for example ...
16
votes
3answers
2k views

How to camel-case where consecutive words have numbers?

Just wondering if anybody has a good convention to follow in this corner-corner-corner case. I really use Java but figured the C# folks might have some good insight too. Say I am trying to name a ...
11
votes
6answers
2k views

Javascript naming conventions

I am from Java background and am new to JavaScript. I have noticed many JavaScript methods using single character parameter names, such as in the following example. doSomething(a,b,c) I don't like ...
10
votes
7answers
464 views

What is a good alternative to the name variable for a language that only has immutable references or labels?

For example, in functional languages, variables are single assignment and their values are immutable once assigned. So they have two states unbound and bound, once bound they can't be changed. Is ...
17
votes
8answers
2k views

A Class named Class?

This is more of a style question, but it is something I am currently pondering for a project of mine. Assume that you're creating an application which is modeling a school. So there are entities like ...
5
votes
2answers
552 views

How to name event types?

Clean code recommends to name methods to be a verb, and classes to be a noun. I am developing an c++ application using boost::signal as some kind of event framework, and have defined various events, ...