Give meaning and explanation with the fewest number of characters in a form that is most accepted by your team or community at large.
3
votes
3answers
175 views
How to name an subclass that add a minor, detailed thing?
What is the most concise (yet descriptive) way of naming a subclass that only add a specific minor thing to the parent? I encountered this case a lot in WPF, where sometime I have to add a small ...
2
votes
1answer
356 views
What is meaning of the term “Sans” in a class name?
I was reading code of a java project where I found a class name like "UserSansXml". This class is dealing with user objects. I wanted to know the meaning of "sans".
5
votes
3answers
419 views
Inspection, code review - is it really testing?
ISTQB, Wikipedia or other sources classify verification acitivities (reviews etc.) as a static testing, yet other do not. If we can say that peer reviews and inspections are actually a kind of a ...
0
votes
3answers
124 views
What's the verb to describe downloading data en-masse from an API? [closed]
I'm stuck with a seemingly silly question of how to name an action.
We talk about "spidering" or "crawling" websites. What do we say when we are talking about doing something similar but with an API?
...
4
votes
2answers
354 views
Naming methods that do the same thing but return different types
Let's assume that I'm extending a graphical file chooser class (JFileChooser).
This class has methods which display the file chooser dialog and return a status signature in the form of an int: ...
2
votes
2answers
280 views
What do you call a queue when the word queue is reserved?
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 ...
2
votes
2answers
282 views
What package name to choose for a small, open-source Java project?
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 ...
3
votes
7answers
293 views
Vocabulary: Should I call this apply or map?
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 ...
3
votes
1answer
186 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 ...
5
votes
3answers
308 views
Naming Convention for Dedicated Thread Locking objects
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 ...
2
votes
4answers
285 views
Is it bad practice to use the same name for arguments and members?
Sometimes I write constructor code like
class X
{
public:
X( const int numberOfThingsToDo ) :
numberOfThingsToDo( numberOfThingsToDo )
{
}
private:
int numberOfThingsToDo;
};
or in C#
...
1
vote
1answer
84 views
External file (images, sounds) naming convention at Xcode
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
...
3
votes
1answer
97 views
Naming a class that processes orders
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
116 views
Naming variables with fixed point units
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 ...
8
votes
4answers
354 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
228 views
Case Class naming convention
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 ...
33
votes
11answers
2k 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? ...
3
votes
5answers
390 views
How do you name your personal libraries?
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 ...
-2
votes
2answers
105 views
Proper Method name for XML builder [closed]
I think this is the right stack for this.
I have a helper class which builds CAML queries (SharePoint XML for getting list items from SQL)
There is one method that is flexibly used to build the ...
4
votes
3answers
269 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? ...
26
votes
6answers
888 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 ...
17
votes
6answers
856 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 ...
0
votes
2answers
120 views
Name of a class that creates a bunch of classes for a process
We all know that the hardest parts of computer science deal with cache invalidation and naming things; my problem is the latter.
I have a process that raises events when various things happen. Rather ...
5
votes
5answers
998 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
328 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 ...
13
votes
1answer
588 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
235 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 ...
7
votes
1answer
205 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? ...
3
votes
3answers
363 views
Nice iterator naming
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;
...
2
votes
3answers
219 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
2answers
65 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 ...
2
votes
1answer
89 views
Naming library which generates a JSON-req to a REST-API?
How would you call a library which generates a JSON-req to a REST-API so that you just work on object-level for creating a request? Many company wants to define it as an SDK, but is it a suitable ...
2
votes
6answers
299 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 standard ...
1
vote
4answers
324 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
181 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 ...
10
votes
13answers
1k views
Should I add an “Abstract” prefix to my abstract classes?
Suppose I have an abstract class named Task.
Is there a standard or convention that would suggest I should name it AbstractTask instead?
-2
votes
1answer
213 views
Naming conventions for variables in Germany [duplicate]
Possible Duplicate:
Do people in non-English-speaking countries code in English?
Do programmers in Germany/France use English names for variables or it's a normal practice to use local ...
0
votes
1answer
114 views
Tasks, jobs, activities, operations… which term to use when? [closed]
My application has a number of different asynchronous 'things' that it performs:
There are things that fire off a schedule (every 5 minutes)
There are things that are fired when a user clicks a ...
4
votes
3answers
164 views
User defined type for healthcare / Medical Records variable name prefixes?
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, ...
1
vote
9answers
443 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 ...
0
votes
2answers
486 views
Is it best practice to always capitalize class file names in PHP, and other languages?
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
1k 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 ...
2
votes
4answers
337 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 ...
5
votes
5answers
803 views
Naming classes, methods, functions and variables
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
434 views
Should I refactor single letter variables for constructs like pointer/structure names?
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
1answer
246 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) _
...
5
votes
9answers
762 views
Should the most recent date be named 'start' or 'end'?
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 ...
0
votes
2answers
268 views
Identify name of class which does CRUD operations
Using my application (which I am currently developing), Admin can assign addresses (not only assign, it is something like CRUD operations) to salesRep, so that those addresses will be listed under ...
32
votes
15answers
3k 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 ...
6
votes
2answers
169 views
Any recognized convention for repository changelogs?
We use TortoiseSVN, but we have no bug tracking system. I know, lame, but beyond my control.
There were times when svn wasn't in daily use.
Now I've had succeeded in pressing for using it regularly, ...