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

6
votes
6answers
2k views

Do variable names affect the performance of websites?

Do variable names affect website performance? I know this will going to be very low number, but still can any one provide the reasons for not choosing a long variable name in aspect of performance?
6
votes
6answers
479 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
3answers
502 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
635 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
3answers
810 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
275 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
4answers
5k views

What's the dominant naming convention for variables in PHP: camelcase or underscores? [closed]

The consensus seems to be that one should follow the convention of the platform they're developing for. See: Underscore or camelcase? Naming conventions: camelCase versus underscore_case? However, ...
6
votes
2answers
223 views

Any recognized convention for repository changelogs?

We use TortoiseSVN, but we have no bug tracking system. I know, lame, but beyond my control. There were times when svn wasn't in daily use. Now I've had succeeded in pressing for using it regularly, ...
5
votes
9answers
794 views

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

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 ...
5
votes
10answers
4k 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?
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 ...
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 ...
5
votes
7answers
1k views

How to ensure quality of code? [closed]

I have been learning programming in C# for about a year and a half now. How should I ensure that the code that I am writing and the habits are forming are good ones? ie. I don't want to end up having ...
5
votes
9answers
2k views

Naming convention: is it good that all subclasses have same prefix or suffix or not?

I'm bothering about a naming problem. Given that I got an interface which got named Extension, and there will be lots of implementations, like Radio extension, video extension, music extension, ...
5
votes
4answers
2k views

What is a Bootstrapper in programming?

I sometimes see the term "Bootstrapper". I saw it last when creating some learning exercises for Prism. I stumbled upon UnityBootstrapper class. My question is: when would you call a class a ...
5
votes
2answers
3k 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 ...
5
votes
6answers
4k views

Naming conventions used for variables and functions in C

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

When inheriting from a class in C#, which naming convention is preferred?

If you inherit from Tile, for example, should the subclass be called CollisionTile or just Collision? What about for painting tools in an application like Paint? PenTool or just Pen? Are there any ...
5
votes
4answers
348 views

Meaningful names in weakly typed language like JS

I've been learning java for about a year, but recently entered the world of javascript. I'm having trouble coming up with meaningful names in function parameters, so that I'll be able to tell and ...
5
votes
3answers
219 views

How to name an subclass that add a minor, detailed thing?

What is the most concise (yet descriptive) way of naming a subclass that only add a specific minor thing to the parent? I encountered this case a lot in WPF, where sometime I have to add a small ...
5
votes
3answers
642 views

Inspection, code review - is it really testing?

ISTQB, Wikipedia or other sources classify verification acitivities (reviews etc.) as a static testing, yet other do not. If we can say that peer reviews and inspections are actually a kind of a ...
5
votes
3answers
559 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 ...
5
votes
5answers
294 views

Is it good or bad form to name a function after the workaround it fixes?

Lets say you have to write some code to fix a bug that on first glance by another engineer would seem weird or unnecessary. Would it be good or bad form to put the code in a method named for example ...
5
votes
2answers
884 views

Should APIs be in en_US or en_GB or both?

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

What should I name this helper class? [closed]

Usually when writing unit tests I create a helper class with extension methods. I use these methods exclusively for generating generic data for things that I am too lazy to type out. I usually name ...
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 ...
5
votes
3answers
699 views

When we say “sanity” when referring to user input, are we talking about the cleanliness of the input or whether or not it is sane?

I often hear people say they "sanitize input," which would mean make it clean. I understand this to mean "clean of potentially damaging contents," where the function that does the sanitizing would do ...
5
votes
6answers
3k views

What naming conventions do you use for php classes?

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

Naming Convention for Dedicated Thread Locking objects

A relatively minor question, but I haven't been able to find official documentation or even blog opinion/discussions on it. Simply put: when I have a private object whose sole purpose is to serve for ...
5
votes
1answer
511 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 ...
5
votes
1answer
549 views

How should a ViewModel be named?

While starting work on a brand new ASP.net MVC application we've learned that we should have all of our available data pushed to make it easy to create a full view. While learning this we've started ...
5
votes
2answers
117 views

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

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

What is it called when you set properties on object initialization?

What is it called when you set properties on object initialization? var customer = new Customer() {RequestID = request.ID, AddressID = 5}; Is it considered good practice?
4
votes
3answers
656 views

Were they joking when they named PHP? [closed]

PHP stands for: PHP: Hypertext Preprocessor This a recursive loop, if I'm not mistaken. Did the creator of PHP have this in mind when he named PHP? Is this the only language where the name has ...
4
votes
3answers
576 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); } ...
4
votes
3answers
318 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? ...
4
votes
5answers
423 views

What happened to the this type of naming convention?

I have read so many docs about naming conventions, most recommending both Pascal and Camel naming conventions. Well, I agree to this, it's ok. This might not be pleasing to some, but I am just trying ...
4
votes
6answers
355 views

Order of subject and modifiers in variable names

I'm looking for experiences regarding the ordering of the subject and modifiers in variable names. A simple object Shape would have just a subject for the variable name, such as Area. A slightly ...
4
votes
4answers
3k 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 ...
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 ...
4
votes
7answers
1k views

What do you call a customer's customer in a specification document, use case, or scenario?

My team and I develop software that our customers will use to interact with their customers. Additionally, we also eat our own dogfood and use the software ourselves to interact with our customers. ...
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 ...
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 ...
4
votes
2answers
311 views

Why are “class” variables misspelled? [duplicate]

I have started to see variable initialisations like that in Java libraries: Class clazz = new Class(); or Class klass = new Class(); Is there a particular reason for people to misspell the word ...
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 ...
4
votes
1answer
221 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 ...
4
votes
4answers
221 views

Naming boolean variables: negated or not

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): ...
4
votes
3answers
204 views

When should I prefix names with the project name?

If you work with SharePoint, you'll see classes like SPList, SPSite etc. I've seen variations of this on other projects, in other technologies, e.g. for a CRM project, classes named ...