1
vote
1answer
145 views

Naming of type parameters in java

We all know that it is good to use descriptive identifier names. However, the convention in java is to use a single letter for a type parameter identifier. The default most people go to is T, but if ...
2
votes
2answers
299 views

Naming boolean field that is a verb

In Java, by convention getter and setter for boolean fields will be isField() and setField(). This works perfectly fine with field names that are adjectives like active, visible, closed, etc. But how ...
5
votes
1answer
515 views

Should I use mMember and sStatic naming convention in Android?

Android source code and many Android open-source apps and libs use m prefix for member fields and s prefix for static member fields: private static boolean sStarted; private long mTimestamp; I ...
4
votes
2answers
910 views

Naming conventions for Java classes that have a static main method?

After reading gnat's answer to Why a static main method in Java and C#, rather than a constructor? I take his answer to mean that the purpose of a Java class with a static main method is to define a ...
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
2answers
274 views

The suffix Exception on exceptions in java

Specifying a suffix of Exception on exception classes feels like a code smell to me (Redundant information - the rest of the name implies an error state and it inherits from Exception). However, it ...
5
votes
3answers
608 views

Why the name 'continue' [closed]

The 'continue' keyword in Java (and probably in many other programming languages) is used to skip further execution of the current iteration. Why was the name 'continue' chosen? Why not something ...
8
votes
3answers
2k views

What should I use for a package name if I don't have a domain? [duplicate]

Possible Duplicate: What is the point of Java’s package naming convention? What package name to choose for a small, open-source Java project? I write Java (and derivative languages with ...
4
votes
2answers
904 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: ...
4
votes
2answers
674 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 ...
17
votes
5answers
1k 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 ...
2
votes
1answer
95 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 ...
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?
5
votes
6answers
501 views

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

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 ...
-1
votes
1answer
119 views

Does anyone have any idea how Java decides the names of the converters? [closed]

Making reference to this link In particular, what made them decide to pick 'tl' as the converter symbol for hour... It seems so random. I understand why they've decided on 'te' (it's because 'e' ...
8
votes
2answers
7k views

Naming conventions for instance, local and parameter variables

I was discussing with a senior developper coding conventions to apply to our projects (mainly Java/JEE projects). I disagreed with one convention he proposed: Instance variable names should start ...
4
votes
2answers
600 views

Java class version specific naming conventions

I have to create an Adapter between two software (mech. simulation, non-cs). Assuming we have a class named ThatThing. I have to handle various vendor specific implementations. These versions don't ...
1
vote
5answers
249 views

Case convention- Why the variation between languages?

Coming from a Java background, I'm very used to camelCase. When writing C, using the underscore wasn't a big adjustment, since it was only used sparingly when writing simple Unix apps. In the ...
5
votes
2answers
9k views

Difference between Handler, Manager and Controller

Is there any difference between naming a class "Handler", "Manager" or "Controller"? IE: PurchaseManager, PurchaseHandler, PurchaseController. Do these suffices convey the same meaning or is there a ...
1
vote
1answer
149 views

Good extension name for a war file with source

Is there a name for a Java Webapp's war that includes the source code? We will be using a webserver that accepts Java Web Projects with source code) uploaded into the docroot folder, so ...
7
votes
4answers
2k views

Java abstract class naming

Example: You create an abstract class for Ajax actions. Different Ajax actions will all extend this class. Problem: Do you name the class AjaxAction or AbstractAjaxAction? When you create ...
17
votes
5answers
7k views

Is the Java package name convention flawed?

We're all familiar with the Java package name convention of turning the domain name around. I.e. www.evilcorp.com would, by convention, chose to have their java packages com.evilcorp.stuff. ...
4
votes
2answers
761 views

How would you name import and export functions in Java?

I have a Java class that handles import and export of data. It started out as a simple private void export() { } private void import() { } Of course, I wrote the export first, committed it, and ...