I have to say I was pleased when I opened up c# to see the integer data types being Int16,Int32 and Int64. It removed any ambiguity e.g int increasing in size with age.
What surprises me is why there isn't or doesn't seem to be Float16,Float32 and Float64
or atleast not in normal use: a quick search of MSDN refers to float64 as R8 (unma...
I'm creating a new Java project for a concept/construct that's usually referred to with an ampersand (e.g. PB&J). Is it ok to name the project that? Should I avoid it? Are there any symbols that are not allowed in Java project names? Are there any symbols that are generally avoided? Where do symbols come in with regard to Java project na...
By convention classes are often named like nouns, methods like verbs and interfaces like adjectives.
What is the common naming convention for a delegate? Or what's a good way to differentiate its name when delegates are listed among types and other things?
My immediate assumption is to name a delegate more like an adjective because a ...
Hi all,
In my program I need a 'preview' mode where it doesn't make any changes to the data, there's a common name for this that I've seen in other apps but I can't put my finger on it. Any ideas?
Thanks
...
Hello all,
I soon started a small C++ project and elaborated some naming convention rules for variables, according to scope.
I made class members _prefixed_with_underscore and methods parameters suffixed_with_underscore_. I soon got neurotic about inventing naming conventions for everything, like global variables (ok, those might be im...
Introduction:
I'm working on API which provides access to Picasa, Flickr and some other image services.
I have a class WebAlbum (it provides access to nested photos, albums if allowed, and some meta information).
My API allows not only read albums but it also allows to create new albums. In general case in order to create new album AP...
In Java, is there a semantic difference between using "Illegal" (as in IllegalArgumentException) versus "Invalid" (as in javax.activity.InvalidActivityException)?
During the course of an assignment it became useful to write a subclass of IllegalArgumentException to represent a series of input characters that cannot be tokenized, and I'...
Probably a silly question, because I assume the N stands for ".NET", though I could be wrong. I'm interested in where this naming convention got started.
Examples:
NHibernate
NLog
NCover
NDepend
Ninject (I realize this is supposed to be a play on "ninja", but it still fits)
...
One of my project's coding guideline is
"function/variable/parameter" name should be less than or equal to 31 characters.
The project is in C++.
IMHO this guide line is not useful because
a) C++ compiler itself creates long names ( via name mangling).
b) Makes it hard to write self-documenting / expressive code.
What say ya??
...
While other questions have tackled the broader category of sequences and modules, I ask this very specific question:
"What naming convention do you use for dictionaries and why?"
Some naming convention samples I have been considering:
# 'value' is the data type stored in the map, while 'key' is the type of key
value_for_key={key1:valu...
I am defining naming conventions for a simple plugin framework. For example:
index.php - the main plugin file
info.php - returns an array with plugin information
install.php - self-explanatory
can you think of an elegant, short-hand name for a PHP file that contains the code that is to be executed before any HTML is output? Do any ex...
I'm building a PHP framework and my english is not the best.
There are several classes (database abstraction, module, router,...) in my framework and there is a place where they all have to be initialized and executed together.
What is a good name for a "master" class that initializes and runs all other classes?
...
Hi,
I'm working on a project where we use Hibernate and JBoss 5.1. We need our entity classes to be mapped to Oracle tables that follow a certain naming convention. I'd like to avoid having to specify each table and column name in annotations. Therefore, I'm currently considering implementing a custom implementation of org.hibernate.cfg...
hi,
i have a general question regarding naming convention.
if I separate the data and operations into two separate classes. one has the data elements (entity), the other class manipulates the entity class. what do we usually call that class that manipulates the entity class?
(the entity I am referring to has nothing to do with any...
Since the standard c# convention is to capitalize the first letter of public properties, the old c++ convention of initial capital for type names, and initial lowercase for non-type names does not prevent the classic name collision where the most obvious object name matches the type name:
class FooManager
{
public BarManager BarMana...
Lets assume we have a class car.
How would You name parameters of function that takes two different cars?
void Race(Car first, Car second);
or maybe
void Race(Car car1, Car car2);
The same situation with function that takes car and list of cars as a parameters.
I'm used to name 'cars' for list of cars, so it is inconvenient to use ...
From time to time I see something like this:
class Clazz {
private int _goodName;
private int _anotherGoodName;
...
}
I don't get it. It's hard and unusual to read such code. What are the pros?
...
If I create a table with datetime default getdate() field that is intended to keep date&time of record insertion, which name is better to use for that field ?
I like to use Created and I've seen people use DateCreated or CreateDate.
Other possible candidates that I can think of are: CreatedDate, CreateTime, TimeCreated, CreateDateTime,...
Here is an easy question:
I have a struct which contains two hash tables and one vector. Im looking for a generic name for this kind of structure. Any suggestions? say factory?
...
Library and Plugins seem similar,what's the difference?
...