The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
40 views

Word for author, of an add, edit, or delete?

Supposing I have an SQL table named websiteArticle containing articles filed by date under various categories. It has field names id, category, date, subject, body. As a matter of best practice, I ...
1
vote
3answers
121 views

Is there a standard for naming the parts of a file path? [on hold]

For example: /path/to/file.zip # absolute path /path/to/ # path file.zip # file name I can't seem to find a standard on naming the parts of a path anywhere...
0
votes
2answers
127 views

function naming: plural form of “if not exists” [closed]

This is a question about function naming. I am writing some code that updates the structure of a database according to a specification. Somewhere in this code I have something like this: void ...
3
votes
3answers
86 views

Is it bad to use the same class or idiom names as in a third-party API that you're using?

FlashPunk is a third-party graphics API for simple game development in AS3, and they take what are effectively sprites or display objects of some sort and refer to them as "Entities". Entity is the ...
30
votes
9answers
3k views

How to name a method that both performs a task and returns a boolean as a status?

If there is a method bool DoStuff() { try { // doing stuff... return true; } catch (SomeSpecificException ex) { return false; } } should it rather be called ...
2
votes
1answer
99 views

On naming conventions: would you recommend short names or longer, more descriptive names? [closed]

I'm consistently being asked by a colleague to shorten my identifiers (class names, mostly). We use CamelCase and rarely if ever use 4 words in a name, but I often get requests to shorten from 3 to 2 ...
1
vote
0answers
66 views

Use Generic of Specific Function names for similar objects

Is there a school of thought on putting focus on using generic names for functions, opposed to naming functions based on the things they do? Example Say we have a Bill / Price Sheet object, that has ...
4
votes
2answers
231 views

Should duck typing affect naming conventions?

I'm a C++/C# developer and recently I've started to learn Python. I think I understand the concept of duck typing right now except for one thing. When I'm coding in C++ or C# I sometimes create ...
-1
votes
2answers
52 views

Naming convention for classes that represents different versions of the same thing [closed]

Let's imagine I have an abstract class named ProtocolA that represents the basic operations to work with the protocol A. Such protocol is in version 1, but new revisions are expected in the future. ...
1
vote
1answer
143 views

What do you call a method that might do something? [closed]

Is it okay to call it void maybeGenerateUIDsAndDownload() ? Because sometimes it will generate UIDs and download but sometimes it will not do it.
1
vote
1answer
254 views

HTML DOM in .NET: following specification vs. following language standards [closed]

Let's say we're implementing HTML DOM in C#. Naming conventions are different: HTMLCollection interface/class vs. IHtmlCollection/HtmlCollection, body attribute vs. Body property etc. Behavior is ...
0
votes
2answers
409 views

Summary of C# naming conventions (official Microsoft conventions) [duplicate]

I am struggling with naming convetions in C# I do not know when to use PascalCase or camelCase. I have read Microsoft's naming convention, but I got lost ther ...
4
votes
2answers
312 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 ...
-1
votes
1answer
134 views

Naming - Differentiate between a 'User' and the 'current User' [closed]

I'm working on a site with a lot of interaction between Users. So I've named the model class User. When I refer to a page of a specific user, I have variables like user, userPoints and userUrl. When a ...
4
votes
4answers
305 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 ...
0
votes
1answer
143 views

Naming conventions for language file keys

What is your strategy for naming conventions for the keys in language files used for localization? We have a team that is going to conversion of a project to multiple languages and would like to have ...
3
votes
1answer
180 views

Best way to rename existing unique field names in database?

I have a database table that contains id, filename, userId id is unique identifier filename should also be unique table may contain >10000 records When a user uploads a file it should be ...
0
votes
1answer
124 views

Naming a predicate: “precondition” or “precondition_is_met”?

In my web app framework, each page can have a precondition that needs to be satisfied before it can be displayed to the user. For example, if user 1 and user 2 are playing a back-and-forth ...
1
vote
3answers
150 views

How important is to avoid name collisions between libraries belonging to different domains?

I have written a small open source Java library for facilitating conversions between different types of objects (in the style of Google's gson, but quite more general). It seems to me that a nice ...
2
votes
0answers
104 views

Script language native extensions - avoiding name collisions and cluttering others' namespace

I have developed a small scripting language and I've just started writing the very first native library bindings. This is practically the first time I'm writing a native extension to a script ...
2
votes
2answers
189 views

collection naming - singular or plural

This is related to this question but not quite the same. BTW, I'm not a native English speaker. I keep having a hard time choosing a proper name for collections - Lets say that we have a collection ...
4
votes
2answers
940 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 ...
7
votes
1answer
679 views

Why is the Scala Option type not called Maybe, just as in Haskell?

Why is the Scala Option type not called Maybe, just as in Haskell? Maybe makes a lot more "semantic sense" to me, but maybe Option has different behaviour I am not aware of. Is there any particular ...
8
votes
1answer
626 views

Is there an explicit word for non-abstract class?

I got mainly abstract classes in my project and there are a few other class which are using/inheriting them. When I'm writing the documentation I would like to specify that a part of it is just about ...
6
votes
6answers
501 views

Painfully Stupid Method Names in Legacy Code: Fix or Leave as Warning? [duplicate]

For this case let's assume something like... "removedNonPriceChangingConfermations" that is in no way relating to things that happened in the past tense, nor does it return a list of removed items ...
0
votes
3answers
179 views

URL Naming Convention for with Repetitive Letter

What is a good practice to name an URL if it contains repetitive letters. For example, /info/foossite The two s looks kind of odd and if this was access point for a Web-Service, this could lead into ...
0
votes
4answers
141 views

Naming: objectAction or actionObject?

The question, Stored procedure Naming conventions?, and Joel's excellent Making Wrong Code Look Wrong article come closest to addressing my question, but I'm looking for a more general set of criteria ...
9
votes
11answers
2k views

What is the reason for using lowercase for the first word in a local variable (eg, employeeCount, firstName)

I take a good deal of criticism from other programmers due to my use of full proper casing for all my variables. For example, your typical programmer will use employeeCount for a variable name, but I ...
5
votes
1answer
325 views

Class Naming Conundrum

I am working on a personal project that works with databases, and in this project I have a set of classes that are similar, so they inherit from a common base class. The problem I am faced with is ...
3
votes
4answers
299 views

naming convention for different types of functions (use prefixes or suffixes?)

Does anyone have suggestions for naming conventions for different types of functions, particularly wrapper functions that need to connect to and disconnect from the database vs. wrapper functions that ...
6
votes
2answers
316 views

Property proper naming to represent string starting with number

Looking at some camera metadata on Windows File Properties there are (along with a few more) two Properties named Focal length and 35mm focal length. I'm developing software that will make use of ...
1
vote
4answers
508 views

“Is” prefix and “On” suffix as reasonable exceptions to a “non-hungarian” naming standard?

First, I believe I've seen this question discussed here before, but I cannot find it. My apologies if you do find it. I'm starting a new project, and trying to figure out why IsResolved and/or ...
2
votes
3answers
440 views

Naming the project containing only interfaces

I've extracted interfaces from my repository classes, like ICustomerRepository, IProductRepository and so on. The project which contains the repositories is named X.DataAccessLayer. Should I call the ...
4
votes
2answers
492 views

Why do most java classes end with “ers”? [closed]

...Provider ...Searcher ...Resolver ...Builder ...Manager ...Importer ...Descriptor ...Helper ...Indexer Is it a global convention to refer a thing with "..ers" or "..ors". In contrast, a "thing" ...
9
votes
4answers
2k views

What's the best practice for naming uploaded images?

Suppose I have a form in my web application where users can upload a profile picture. I've got few requirements about file size, dimensions etc, but when the user uploads the image, how should I name ...
6
votes
3answers
1k views

Might starting variables/members with an underscore puzzle the compiler?

I've been taught since high school that defining variables like this: int _a; or int __a; should be consider bad practice because this would eventually puzzle compilers that use variables starting ...
1
vote
2answers
174 views

Pros/Cons for getter and setters of collections

I'm creating a model where one element can contain other elements. I'm currently writing the interface to the model, and I'm not sure which is the best of the two options: Option 1 interface ...
2
votes
4answers
425 views

Derived Class Method Naming

I'm having a hard time coming up with a good naming convention for methods in derived classes that serve the same purpose as the methods in the base class. For example, if both the base class, and the ...
3
votes
2answers
357 views

Writing Clean, Elegant Procedural Code (BASIC): Is There Such a Thing?

I learned to code in OO languages. I've always been interested in design patterns, clean code, etc., etc. - you know the type. Now at work I'm using a BASIC dialect. Given modern programming values, ...
6
votes
1answer
277 views

What is the convention for the star location in reference variables?

I have been learning Objective-C, noting that different books and examples use differing conventions for the location of the star (*) when naming reference variables: MyType* x; MyType *y; MyType*z; ...
0
votes
3answers
242 views

How should compound words be handled when coding? Is there a definitive list of compound words? [closed]

QUESTION: How should you handle compound words when programming? Are there any good lists available online for developers of generally accepted technology-related compound words? I can see how ...
10
votes
1answer
338 views

Why does XMLHttpRequest not seem to follow a naming convention?

I've been working with the XMLHttpRequest object in JavaScript recently, and I couldn't help but notice that the casing of this name makes no sense. Why is 'XML' all in caps while 'Http' is not? ...
5
votes
3answers
1k views

Environment naming standards in software development?

My project is currently suffering from environment naming issues. Different people have different assumptions as to what environments should be named or what the names designate, and it's causing ...
12
votes
6answers
2k views

What is the philosophy/reasoning behind C#'s Pascal-casing method names?

I'm just starting to learn C#. Coming from a background in Java, C++ and Objective-C, I find C#'s Pascal-casing its method-names rather unique, and a tad difficult to get used to at first. What is the ...