The tag has no usage guidance.

learn more… | top users | synonyms

-2
votes
0answers
49 views

What's the lhs/rhs equivlent of a single parameter? [on hold]

Typical operator overloading conventions go like this: MyObject operator+(const MyObject& lhs, const MyObject& rhs) { return MyObject(lhs.my_value + rhs.my_value); } What would be the ...
4
votes
0answers
360 views

Naming convention and structure for large-scale MVC projects [closed]

I'm interested in example of robust and flexible naming convention for structuring large scale SPA. My team is working on React app with multiple modules and each module has one parent component with ...
0
votes
5answers
239 views

Coding guidelines for seamless merging [closed]

I am looking for coding guidelines developers should follow while writing C#/ASPX/SQL code, so that merging into other branches is smooth if not seamless.
1
vote
0answers
88 views

Why does convention say DB table names should be singular but RESTful resources plural?

It's a pretty established convention that database table names, in SQL at least, should be singular. SELECT * FROM user; See this question and discussion. It's also a pretty established convention ...
0
votes
2answers
147 views

Best practice relationship variable naming: Should I use the description of the relationship or variable. Example personId or owner? [closed]

When I'm creating domain models and adding variables to a class. I'm havng to trouble which naming I should use. For example If I have a Person and a Car. When I have: Class Person { var int ...
10
votes
2answers
4k 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 ...
21
votes
3answers
3k views

Are “plus” and “minus” appropriate method names?

Java SE 8 comes with a new mechanism for dates, introducing LocalDate, LocalTime and LocalDateTime classes to represent instants of time. To manipulate such instants, a set of methods are given: ...
15
votes
7answers
1k views

What's the idea behind naming classes with “Info” suffix, for example: “SomeClass” and “SomeClassInfo”?

I'm working in a project which deals with physical devices, and I've been confused as how to properly name some classes in this project. Considering the actual devices (sensors and receivers) are one ...
1
vote
3answers
169 views

Are project naming conventions more important than language naming conventions? [closed]

I'm working on a project with a senior developer and he doesn't really abide by the naming conventions of the language that we're using. The project is in Go and he uses underscores for everything. ...
3
votes
0answers
75 views

Is there an industry standard term for a build which uses the production API, but is specifically for internal testing? [closed]

I'm working on clearing up our build processes of a PhoneGap app we're developing for iOS and Android, and I want to develop a concise naming scheme for our different build types. Here's what I'm ...
1
vote
4answers
600 views

Why is it a bad practice to use underscores in names in Java? [closed]

I'm quite used to name methods as fooBar() and variables as foo_bar. For longer names, I find the underscores much more readable. In our university Java courses, we're discouraged from using ...
1
vote
1answer
116 views

How to name a function that makes sure an element exists and returns it?

function getOrInsertEmptyElemById(id){ var elem = $(id) || document.body.insert('<div id="'+id+'"></div>'); return elem; } I find myself using functions like the above quite ...
2
votes
2answers
182 views

Should naming conventions be consistent or not across multiple programming languages in one project? [duplicate]

I saw this question on SO: here; the question is kind of old and not many viewed, so I want to ask it again. I currently work on a project using C++, C# and Actionscript-3, the conventions of C++ and ...
12
votes
3answers
417 views

What is the point of making a syntactic distinction between standard and user-defined types?

Although here I will refer specifically to C++ and Bjarne Stroustrup's naming conventions, in principle, I've seen that people use somewhat similar rules for other languages here and there. So, the ...
15
votes
2answers
744 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? ...
0
votes
1answer
158 views

What do you call classes that do arbitrary work in your project? [closed]

I work on a lot of projects with different teams. Every project has its own conventions, including what to call arbitrary classes that don't lend themselves to obvious names. As a counter-example, ...
3
votes
0answers
143 views

Erlang function naming conventions

I understand the general Erlang conventions for functions are using snake case or camel case, but what about exported functions? For example, say I have a gen_server module that defines a check to ...
2
votes
1answer
2k views

Swift Protocol Naming Conventions [closed]

Coming from a mainly c# background, I'm used to using the term "interface" for describing an object with no implementation that defines behaviour. In c#, the convention is to prepend interface names ...
-2
votes
1answer
53 views

How name class which display data? [closed]

Houston, we have a problem. I can't think of a simple class name. I have abstract class, something like that: public abstract class DataDisplay { public abstract void dataDisplay(Data data); } ...
9
votes
2answers
764 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
1answer
378 views

What are the current (2014) naming conventions in C for file names? [closed]

This is about C, not C++. Googling this brings this result up immediately: https://www.doc.ic.ac.uk/lab/cplus/cstyle.html#N10081. In that article, the authors are saying very clearly that all source ...
2
votes
1answer
158 views

In AngularJS, why do we use scope instead of $scope in the directive link?

Just curious why whenever I see an example of a directive using a link, the parameter for scope is scope and not $scope? This is always biting me because I'm so used to typing $scope, my brain ...
3
votes
4answers
422 views

Why is the use of conjunctions in method names a bad naming convention? [closed]

In my team, we work closely with a few software architects. They approve all design decisions of our projects, do some code reviews etc. Our projects consist mainly of backend functionality ...
0
votes
5answers
365 views

Representation of a question mark in variable names [closed]

I once in my childhood read a SF story in which it was assumed that the capital letter 'P' would be a good representation for a question mark, if you cannot use that character directly, eg. in ...
-1
votes
1answer
58 views

Word for author, of an add, edit, or delete? [closed]

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 ...
2
votes
3answers
223 views

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

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...
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 ...
3
votes
3answers
110 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 ...
4
votes
2answers
302 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
72 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. ...
3
votes
1answer
202 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
2answers
3k 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
389 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
355 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 ...
6
votes
1answer
302 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 ...
3
votes
0answers
112 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 ...
0
votes
1answer
294 views

Naming a predicate: “precondition” or “precondition_is_met”? [closed]

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
248 views

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

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
2answers
336 views

collection naming - singular or plural [closed]

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 ...
8
votes
1answer
1k 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
646 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 ...
11
votes
11answers
5k 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 ...
6
votes
6answers
692 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 ...
5
votes
1answer
349 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 ...
0
votes
3answers
238 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 ...
1
vote
4answers
195 views

Naming: objectAction or actionObject? [closed]

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 ...
1
vote
4answers
624 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 ...
3
votes
4answers
526 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 ...
17
votes
6answers
3k 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 ...
2
votes
3answers
774 views

Naming the project containing only interfaces [closed]

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 ...