Tagged Questions
6
votes
1answer
144 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, ...
20
votes
4answers
1k 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 ...
8
votes
3answers
444 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
102 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 ...
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? ...
2
votes
2answers
276 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 ...
10
votes
6answers
773 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 ...
2
votes
2answers
226 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 ...
4
votes
3answers
266 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? ...
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?
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 ...
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, ...
5
votes
5answers
720 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 ...
68
votes
17answers
13k 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 ...