Give meaning and explanation with the fewest number of characters in a form that is most accepted by your team or community at large.

learn more… | top users | synonyms

9
votes
10answers
777 views

What do you call the test suite developers run before checkin? [closed]

I'm working on a project where we're adding automated testing to an existing project. We're starting with a central component, and setting up both unit tests at the code module level, and tests that ...
9
votes
3answers
6k 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 ...
9
votes
5answers
359 views

How to make it obvious that a function is being accessed from the outside?

This is a C specific question. I am trying to keep everything possible inside the translation unit boundaries, exposing only a few functions through the .h file. That is, I am giving static linkage to ...
8
votes
6answers
4k views

Is the term “web portal” obsolete?

My boss uses the term "portal" for the project I work on all the time. To me, the word makes me think of Yahoo in the late 90s. Does the word "portal" have old-school connotations, or is it just me? ...
8
votes
3answers
5k views

Should I always use “is” as prefix for boolean variables? [closed]

Should I always use is as prefix for boolean variables? What about booleans that indicate something in past? Should I write isInitialized or wasInitialized? Should I write for properties IsManyMembers ...
8
votes
3answers
18k views

Naming conventions for instance, local and parameter variables [closed]

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 ...
8
votes
6answers
8k views

What naming Convention to Use for C# Function Parameters

There are situations when a name passed in Parameter will be Cast into a new type, but the name of the Passed object should remain similar. For the case of Class Attributes, we can use this operator, ...
8
votes
2answers
18k 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 ...
8
votes
3answers
1k views

C project avoiding naming conflicts

I'm struggling to find pragmatic real-world advice on function naming conventions for a medium sized C library project. My library project is separated into a few modules and submodules with their own ...
8
votes
4answers
288 views

Word for the superset of files and folders [closed]

I'm trying to come up with a name for a class that can represent both files and folders. Anyone know a word for this?
8
votes
3answers
3k views

What are the names for various forms of camel-case style naming?

For the purposes of communicating coding styles to my co-workers, what would I formally call the following variants of camel case? camelCase and CamelCase Notice that the former version ...
8
votes
6answers
7k views

What naming conventions do you use for php classes? [closed]

I really like using ClassNames and memberNames as convention but I am not sure how I would name the file containing a class. I like making my classes defined in a file with the exact same name as the ...
7
votes
10answers
6k views

Variable names: underscores, no underscores, or camel case? [closed]

Variable names can be written in many ways, but the most common that I'm familiar with are: thisisavariable, this_is_a_variable, and thisIsAVariable. Which of these are preferred, and why?
7
votes
5answers
4k 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?
7
votes
2answers
2k 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 ...
7
votes
7answers
1k views

Use of past tense (passive voice) to connote immutability? (E.g. Array.Transposed vs. Array.Transpose)

[Note: The below is a bit C# heavy in its syntax and conventions, such as citing FxCop rules, because this is my background, but the intent of this discussion is to be language-agnostic and the code ...
7
votes
3answers
358 views

What is the name of the functional argument in fold

In the higher order function fold/reduce what is the name, if any, of the functional argument? I am working on a monadic tabular processing library where rows are folded to produce simple analyses ...
7
votes
2answers
130 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 ...
7
votes
2answers
2k views

Should APIs be in en_US or en_GB or both? [closed]

Should I write APIs in US spelling or British spelling? Or should I provide with mapping both of them to a single one and internally using anyone which I like so that both of them works ? At present ...
7
votes
4answers
551 views

“Immutable” interfaces

I am confused about the notion of immutability. Consider the following structure of a simplistic calculator: Here are the interfaces: interface IOperationalInterface { int Sum(int a, int b); } ...
7
votes
1answer
3k 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 ...
7
votes
4answers
3k 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 ...
7
votes
1answer
7k views

Naming convention: Final fields (not static)

Today I had a discussion with a co-worker about the naming of final fields in Java classes. In his opionion final fields should also be considered constants since their values won't change after the ...
6
votes
9answers
846 views

Should the most recent date be named 'start' or 'end'? [closed]

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 ...
6
votes
4answers
2k 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 ...
6
votes
3answers
477 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? ...
6
votes
2answers
10k views

Naming convention: field starting with “m” or “s”

I saw lot of code (for example some Android source code) where fields name start with a m while static fields start with s Example (taken from Android View class source): private ...
6
votes
6answers
540 views

How permissive should a language be about identifiers?

This is a sister question to: Is it bad to use Unicode characters in variable names? As is my wont, I'm working on a language project. The thought came to me that allowing multi-token identifiers ...
6
votes
4answers
6k views

Naming for a REST webservice

I have a rest webservice with an endpoint www.foobar.com/service.svc/MAC (migration authorisation code). Posting and getting to that adds and gets one MAC respectively. I now need to impliment a new ...
6
votes
6answers
16k views

Naming conventions used for variables and functions in C [closed]

While coding a large project in C I came upon a problem. If I keep on writing more code then there will be a time when it will be difficult for me to organize the code. I mean that the naming for ...
6
votes
3answers
630 views

What are the disadvantages of naming things alphabetically?

Let me give you an example of how I name my classes alphabetically: Car CarHonda (subclass of Car) CarHondaAccord (subclass of CarHonda) There are two reasons why I put the type of the class ...
6
votes
5answers
1k views

What do you call different user roles in software design?

I'm just curious, I'm building a web app with a User model which has role-based permissions. I have the following roles: Visitor (anonymous user) ?? (logged-in user) Moderator Admin I'm having a ...
6
votes
1answer
398 views

Should methods that return boolean be named after a question or an assertion? [closed]

Many naming conventions recommend that methods returning a boolean (also called predicate methods) should be named after a question. My question is: don't they really mean the methods should be named ...
6
votes
3answers
2k views

Why is Quicksort called “Quicksort”?

The point of this question is not to debate the merits of this over any other sorting algorithm - certainly there are many other questions that do this. This question is about the name. Why is ...
6
votes
1answer
301 views

Term for a Class with Multiple Interfaces

Say I have a class that implements multiple interfaces. I pass the same instance around using a different interface, depending on what the consumer is interested in. I am trying to remember what this ...
6
votes
2answers
2k views

Should I use mMember and sStatic naming convention in Android? [closed]

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 ...
6
votes
3answers
3k views

Python lower_case_with_underscores style convention: underscores not popular? [closed]

PEP8 recommends using lowercase, with words separated by underscores as necessary to improve readability for variable and function names. I've seen this interpreted as ...
6
votes
2answers
3k views

How to name a private method in a language which doesn't support privacy?

What's the coding standard for naming a private method in a language which does not have the private modifier? Specifically, I am talking about Javascript. Below I've placed an underscore at the end ...
6
votes
5answers
647 views

Using π, φ, λ etc. as variable names while programming? [duplicate]

This is a function in the d3.v3.js file (the graph library D3.js): function d3_geo_areaRingStart() { var λ00, φ00, λ0, cosφ0, sinφ0; d3_geo_area.point = function(λ, φ) { ...
6
votes
4answers
857 views

Naming conventions and organization of packages

I've been programming in Java, C#, Python and AS3 most of the time and in all of these languages there are packages (or something like that). The problem I found is with the naming convention, or even ...
6
votes
2answers
134 views

Test descriptions/name, say what the test is? or what it means when it fails? [closed]

The API docs for Test::More::ok is ok($got eq $expected, $test_name); right now in one of my apps I have $test_name print what the test is testing. So for example in one of my tests I have set this ...
6
votes
6answers
562 views

Object creation: when should I expose a factory vs wrapping class?

I am having some problems trying to figure out when to use a factory or to wrapper class. This question is slightly geared towards C# I guess, so I'm not sure if this is the correct place to ask. Say ...
5
votes
6answers
520 views

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

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 ...
5
votes
3answers
1k views

Extension method naming convention [closed]

We are using some utility methods in our company to simplify programming. So we have following string extension: public static bool IsNoE(this string s) { return string.IsNullOrEmpty(s); } ...
5
votes
3answers
651 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 ...
5
votes
4answers
881 views

How narrow or broad should constant names be?

I always seem to come back to this question and cannot settle on a convention that I'm comfortable with or that I can concretely define: when naming a constant, how narrowly or broadly should it be ...
5
votes
3answers
2k views

What Http verb should the route to log out of your web app be? [closed]

Browser support issues aside, if you're being an Http/hateoas stickler what verbs should the request to log into/out of a site be? DELETE would seem like the obvious choice but I'm not sure what the ...
5
votes
4answers
895 views

Naming boolean variables: negated or not [closed]

A few years ago, I was in a software engineering class and the teacher explained how messages, options, variables, etc. should not be negated to avoid confusion. He gave the example (something like): ...
5
votes
2answers
1k 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 ...
5
votes
4answers
1k 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 ...