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

0
votes
2answers
221 views

Semantic or structure - which should get preference for variable naming?

We've a call stack in our project. The program is written for microcontroller, the language is C. The call stack is basically an array of integers. The variable that represents this call stack ends ...
20
votes
8answers
899 views

Are there good techniques or tests for naming types?

An awkward, open question, but it's a problem I'm always bumping against: Software that's easy to maintain and work with is software designed well. Trying to make a design intuitive means naming your ...
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 ...
3
votes
7answers
860 views

Any standards for naming variables in for loops (instead of i,j,k) [duplicate]

Possible Duplicate: Why do most of us use 'i' as a loop counter variable? I was just writing a nested loop and got to the point where I was using l and m as variables to control for ...
3
votes
3answers
313 views

Naming conventions for the only envisioned implementation of an interface

If you decide "Program to An Interface" trumps YAGNI and decide to create a supertype where you don't envision anything other than one obvious implementation - is there a convention for naming the ...
0
votes
3answers
593 views

Collection providing lookup by one of several keys [closed]

What do you call a collection in which each item may be looked up by one of multiple keys? A partial, simplified definition in C# might be: class MyDataStructure<TKey1, TKey2, TValue> { ...
0
votes
2answers
191 views

Naming Rules: Standards, Reserved, and what do they depend on? [closed]

I want to know the rules of naming (AlwaysCapitalize, _underscore, firstSmallLetter, etc...) for each of Namespaces, Classes, Interfaces, Exceptions, Data Members, Methods, Variables, etc.... also I ...
11
votes
5answers
1k views

What's the idiomatic name for a throwaway variable? [closed]

Velocity Template Language's set directive requires a variable on the left hand side. This doesn't work. #set ( $entries.add("d") ) Even though I have no use for the return value of add("d"), I ...
8
votes
5answers
280 views

How do you avoid name similarities between your classes and the native ones?

I just ran into an "interesting problem", which I would like your opinion about: I am developing a system and for many reasons (meaning: abstraction, technology independence, etc) we create our own ...
7
votes
2answers
127 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 ...
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 ...
0
votes
1answer
75 views

Name user object and user table correctly [closed]

It's maybe simple but I think about this every time I build a new application. How do you name the class for the current user of the application and for the orm class of the user table? Usually I ...
8
votes
6answers
2k 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? ...
11
votes
8answers
2k views

Meaningful concise method naming guidelines

Recently I started releasing an open source project, while I was the only user of the library I did not care about the names, but know I want to assign clever names to each methods to make it easier ...
30
votes
6answers
3k 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 ...
2
votes
1answer
158 views

Is there a standard name for this search approach?

In order to create a (Lucene) query, an "incomplete" domain object is used. All properties with a value are used for the query, the rest is ignored. In the absence of a better name, we call it ...
3
votes
1answer
620 views

Should the name of my program be a verb (“frobnicate”) or a noun (“frobnicator”)? [closed]

If I have a program that takes some input data, frobnicates the data, and outputs the result, should the name of the program be the verb, "frobincate", or the noun, "frobnicator"? Here's a ...
121
votes
19answers
29k views

Why is naming a table's Primary Key column “Id” considered bad practice? [closed]

My t-sql teacher told us that naming our PK column "Id" is considered bad practice without any further explanations. Why is naming a table PK column "Id" is considered bad practice?
3
votes
1answer
300 views

Are there restrictions on table and column names in DB2?

I'm working with a DB2 database and I can't help but notice - these table and column names are really confusing! I realize that good names are important in every facet of software development, and ...
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 ...
20
votes
13answers
3k views

Is Systems Hungarian notation still a useful practice? [closed]

I searched the forum, but I couldn't find the answers why it should be avoided, only why it's not a silver bullet. So I don't think this question is a duplicate. Is there a VALID reason why I should ...
2
votes
3answers
263 views

What is the general accepted way to name variables that end and start with the same letter? [closed]

Is something like this acceptable or is it frowned upon? String newsSymbol It just looks strange to me, but it's the best way to describe what the variable is and the data it will hold. I could ...
8
votes
4answers
311 views

File naming convention for images stored in version control?

My application has an icon file which is stored in version control. Now tomorrow I might decide to change the icon. I'm debating between two possible naming conventions for the icon file: Keep ...
1
vote
2answers
824 views

Is there a difference between property and attribute?

These two words are completely synonymous for me, but I wonder if there's actually a useful semantic difference that I can incorporate into coding/naming conventions/process.
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?
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 ...
10
votes
3answers
635 views

What's the reasoning behind the “I” prefix naming convention for interfaces in .NET?

I know the "I" convention has been around since COM, but I've never understood why it hasn't been reconsidered like every other naming convention before .NET has. Consumption wise, the only thing ...
14
votes
7answers
2k views

Why it is called “hash table”, or “hash function”? Hash doesn't make any sense to me here

It's now about 4 years of development that I'm using, hearing, talking about, and implementing hash tables and hash functions. But I really never understand why it's called hash? I remember the first ...
1
vote
1answer
185 views

Namespaces and naming

I'm having some trouble working this one out, probably more than I should. This is a pretty large project, with a very clearly defined structure, with no obvious problems, but I can't seem to figure ...
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 ...
0
votes
1answer
137 views

C++ wrapper for “releasing” a singleton object

I have a class like this template <typename T, typename Policy> AutoObjectRelease { public: AutoObjectRelease(T& obj):obj_(obj){} ~AutoObjectRelease(){ ...
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 ...
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 ...
8
votes
6answers
1k views

If this is camelCase what-is-this? [closed]

The naming convention for a term like doSomething is camel case. What would the naming convention of do-something be called?
20
votes
4answers
5k views

Classes naming: singular or plural?

It is always difficult for me to choose between singular and plural forms for classes names: CustomerRepository vs. CustomersRepository CustomerService vs. CustomersService CustomerController vs. ...
1
vote
3answers
4k views

Why am I seeing more boolean naming conventions where “is” is used as the first word in the variable (eg, IsUserAdmin vs UserIsAdmin)? [closed]

I think everyone will agree that the following boolean variable/property names are standard: UserIsAdmin OrdersAreClosed The important thing to note about boolean expressions is that they are ...
74
votes
16answers
18k 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 ...
13
votes
7answers
700 views

What is more standard shortening for “regular expression”, “regex” or “regexp”? [closed]

I want to know what is more standard way to call regular expression in short way. I have seen both, regex and regexp. Google says regex has almost 2 as much hits that regexp, but it depends on way I ...
4
votes
4answers
373 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 ...
8
votes
8answers
2k views

Why did Microsoft make parameters, local variables and private fields have the same name naming convention?

I asked this question quite some time ago: How do you name your private variables in C#? In one of the answers, I was pointed to Microsoft's MSDN page that shows that private variables/fields should ...
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 ...
18
votes
6answers
314 views

Should the internal naming (classes, methods, database tables, etc) of entities be changed if the marketing and UI naming changes?

We've had a long living product for about 8 years now. Over time, the names of concepts and entities change. Should we put the work in to rename all the code base and database tables and columns to ...
4
votes
4answers
391 views

What is the name of this code-get-together…hackathon, codecamp, codejazz or?

Recently there's risen this small subculture in Denmark with geeks meeting up and hacking along on their sparetime projects together. The base is that there is no session, there is no keynote or ...
0
votes
2answers
235 views

Name for this pattern?

I'm writing a class that will handle thread synchronisation. It would have a begin method which would increment a counter and an end method that would de-increment a counter. It'll have another ...
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 ...
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 ...
8
votes
5answers
2k views

What's a good naming convention for generic types in C#? [closed]

I decided to ask this question here instead of on stack overflow because it is rather subjective. In C#, typically I see generic types with very poor names. Specifically, "T" is commonly used but is ...
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?
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 ...
14
votes
2answers
3k views

c# class naming standards/guidelines

Over the years I've used various naming conventions for services in my applications for example: [ClassName]Service [ClassName]Manager [ClassName]Factory [ClassName]Provider ...