3
votes
3answers
84 views

Is it bad to use the same class or idiom names as in a third-party API that you're using?

FlashPunk is a third-party graphics API for simple game development in AS3, and they take what are effectively sprites or display objects of some sort and refer to them as "Entities". Entity is the ...
4
votes
4answers
302 views

Why is the following naming guideline different between OO and non-OO languages?

I am working with a non-OO language and I'm trying to name my routines consistently. I came acrross the following guideline from Steve McConnell's Code Complete: To name a procedure, use a strong ...
0
votes
1answer
213 views

How to justify efforts to make capitalization of class and property names uniform? [closed]

In this thread, an Oracle Product Manager (username "Alex Keh") refused to make Oracle's EF provider to conform with .NET's PascalCase coding standard for class names and property names, saying that ...
4
votes
2answers
708 views

Java naming conventions vs. C++/C naming conventions

I am a Java developer who is starting to pick up more and more C++/C (yes I know they're different, bear with me). One thing that struck me as odd was the different naming conventions used by these ...
7
votes
1answer
260 views

Naming of related classes and interfaces

I have created an ObjectParser class which parses data into strongly typed objects using an IObjectParserDataSource as the data source (the data could be an Excel file, text file, array, query string, ...
11
votes
3answers
893 views

The problems with Avoiding Smurf Naming classes with namespaces

I pulled the term smurf naming from here (number 21). To save anyone not familiar the trouble, Smurf naming is the act of prefixing a bunch of related classes, variables, etc with a common prefix so ...
0
votes
2answers
114 views

addIfNotExist alternative

Is there are any standards or conventions on naming methods which add something if it not exist into another something. For example: Store.instance().addItemIfNotExist(item) IfNotExist is really ...
4
votes
2answers
676 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
316 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 ...
2
votes
2answers
288 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 ...
36
votes
11answers
3k 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? ...
4
votes
3answers
319 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? ...
11
votes
13answers
3k 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?
4
votes
3answers
182 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, ...
2
votes
9answers
457 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 ...
10
votes
5answers
4k 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
2answers
166 views

Standards for mixing languages within one application? [duplicate]

Possible Duplicate: What do you do when working with multiple languages with different capitalization schemes? When mixing programming languages, is it a best practice to use different ...
2
votes
5answers
164 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 ...
23
votes
7answers
10k 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 ...
10
votes
6answers
1k 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 ...
4
votes
4answers
856 views

How can I deal with developers who don't use English in code? [duplicate]

Possible Duplicate: Code maintenance: keeping a bad pattern when extending new code for being consistent, or not? I'm working on a project for a Greek public organization, as a part for a ...
0
votes
2answers
191 views

Naming Rules: Standards, Reserved, and what do they depend on? [closed]

I want to know the rules of naming (AlwaysCapitalize, _underscore, firstSmallLetter, etc...) for each of Namespaces, Classes, Interfaces, Exceptions, Data Members, Methods, Variables, etc.... also I ...
8
votes
5answers
281 views

How do you avoid name similarities between your classes and the native ones?

I just ran into an "interesting problem", which I would like your opinion about: I am developing a system and for many reasons (meaning: abstraction, technology independence, etc) we create our own ...
7
votes
2answers
127 views

What do you do when working with multiple languages with different capitalization schemes?

I'm making a webapp using Django. The Python convention for naming variables is lowercase_with_underscores, but the Javascript convention is camelCase. In addition, I've seen many people use ...
30
votes
6answers
3k views

Should interface names begin with an “I” prefix?

I have been reading "Clean Code" by Robert Martin to hopefully, become a better programmer. While none of it so far has been really ground breaking it has made me think differently about the way I ...
74
votes
16answers
18k views

What is the benefit of not using Hungarian notation?

One of the things I struggle with is not using Hungarian notation. I don't want to have to go to the variable definition just to see what type it is. When a project gets extensive, it's nice to be ...
8
votes
8answers
2k views

Why did Microsoft make parameters, local variables and private fields have the same name naming convention?

I asked this question quite some time ago: How do you name your private variables in C#? In one of the answers, I was pointed to Microsoft's MSDN page that shows that private variables/fields should ...
2
votes
2answers
132 views

Is it good idea to write variable names that match application specific terms?

Let us say I am writing a Facebook like application. I write code like below $this->get_user_friends(); then next morning the boss says that we don't want to call Friends friends anymore, we ...
4
votes
6answers
2k 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 ...
20
votes
17answers
9k 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; ...