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

1
vote
0answers
27 views

Bounded Context naming and parts of speech

I keep coming up with the following Bounded Context names. They feel right when I just type them out in a text editor, but it's bothering me that they're not the same .. I'm going to use the word ...
2
votes
1answer
78 views

ASP.NET MVC Middle tier object naming

As a corporate developer who works alone I find myself creating and writing a lot of websites that consist of screens that are basically wrappers for a DB table. So for instance on a screen that ...
1
vote
2answers
145 views

How are non-folder files called? [closed]

Maybe it looks like a weird question, but what term should be attributed inside the code for files that are not folders to differentiate them from folders? If I need write 2 functions isFolder() and ...
-1
votes
0answers
22 views

Is it legally fine to name a project or a library with a famous person name? [migrated]

I wonder if there are any legal reasons for that to be not ok? There are many precedents, e.g. Sinatra, Kafka, Shakespeare, Django etc , so are there any limitations ? (living people etc)
1
vote
2answers
169 views

How to deal with Classes having the same name (different packages)

My R&D team have Java packages containing classes with the same name. For instance: com.myapp.model Device ... com.myapp.data Device ... We had a discussion, the names conflict when both ...
9
votes
5answers
599 views

How to refer to ByRef and ByVal in a dropdown label? [closed]

The MSDN page on ByRef and ByVal keywords isn't very helpful; unless I somehow skipped it, they're simply being referred to as "keywords" everywhere. One of the main contributors of the Rubberduck ...
0
votes
1answer
43 views

Super classes that represent a wordly hierarchy: naming conventions [closed]

I'm unsure whether this post is allowed, considering it may be subjective. However, I have seen many posts concerning naming conventions (on programmers, as well as on StackOverflow - where I'm a more ...
1
vote
1answer
165 views

Why do you reduce multiple inheritance to the diamond problem?

Whenever I read something like this: Many programmers exhibit a slight, involuntary shudder whenever multiple inheritance is mentioned. Ask them to identify the source of their unease and they ...
5
votes
4answers
877 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 ...
-1
votes
1answer
56 views

How to abbreviate “Local” for a time variable, like UTC [closed]

In a database I work on, most of the datetimes I store are converted to and from UTC so all of my datetime columns end in UTC such as CanceledUTC. I have a situation where I need to store a "local" ...
1
vote
1answer
102 views

What does `Resolving` mean in programing? [closed]

I see many places where the word Resolve is used, in Dependency Injection (resolve an implementation to an interface), Package Manager (ex: Resolve packages dependencies), Web (ex: Resolve a ...
-1
votes
1answer
37 views

What is the broadly understood name of sub-command to check environment of the application? [closed]

Our CLI tool needs to have a sub command that verifies environment (amount of available disk space, RAM, GPU, versions of OS and drivers etc) to find out whether it can run. What would be the best ...
-3
votes
2answers
96 views

What might be a simple, expressive acronym for the usage of JSON to represent an HTML structure? [closed]

This is going to be subjective, but I think there can only be a few good possibilities for an answer, so it shouldn't be a problem. I'm not the first one to use JSON to represent an HTML hierarchy. ...
2
votes
1answer
44 views

Should a class go inside the package which pertains to it?

<?= $vars['title'] ?> For example, if we were writing a library from scratch, and we had File, FileHandle, DirHandle, and FileSystem classes, would each of these go inside a package/namespace ...
1
vote
0answers
70 views

Word for method that gets and sets? [closed]

Is there a word for the API pattern where a method may get or set, depending on whether it is called with an argument or none? This style is often used in JavaScript: obj.prop(); // ...
-1
votes
4answers
379 views

What does the prefix “on” in a function (e.g.“onButtonPressed”) mean?

Sometimes I'll see some functions use "on" as a prefix, for example, on a button listener: onButtonPressed(); and there are other examples: onStateChanged(); onNotified(); onResume(); Does the ...
1
vote
0answers
142 views

What is a good name for functions like 'sum', 'max', 'min'? [closed]

Suppose you have a function that allows you to find the sum/minimum/maximum of a data field: void g(DataField* d, Operation* op){ // applies op->f(...) on all fields of d } Operation would be ...
19
votes
1answer
844 views

What are the standards for dealing with pluralia tantum in your code? [closed]

When using variables of which their plural and singular are both the same, how do you name them? Are there any standards out there? For example: Series[] series // Plural Series series // ...
1
vote
4answers
143 views

Better way of handling pre conditions and logging

1. Imagine you have the following: void Foo::doFoo() { if (!isConditionValid()) { log("doFoo not possible because condition is not valid"); return; } if ...
3
votes
1answer
74 views

Namespace by topic or by purpose? [closed]

The project I'm working on has quite a few classes. These classes can be grouped in two different ways. I'm trying to decide which grouping is best as for namespacing. Currently I a set of user facing ...
-6
votes
3answers
281 views

Why different languages have different syntax? [duplicate]

Different programming language always/most of the time use different syntax. For example take PHP, Java and Python. In Php & Java semicolons are compulsory at the end of the line, yet Python ...
1
vote
2answers
106 views

Naming convention for getting the primitive backing a type? [closed]

I have a class that is backed by a double value, and I am wondering about accessor method names that preserve abstraction. Based on my experience in Java, there seems to be at least two precedents: ...
1
vote
2answers
398 views

Use of “this” in Golang

On the closest thing Golang has to a style guide found here, under Receiver Names this is written: The name of a method's receiver should be a reflection of its identity; often a one or two letter ...
1
vote
1answer
52 views

Name pattern for quickly find descendents with SQL (PATH column with [TopId]…[DirectAncestorId].[OwnId]) NO nested sets

I read a long time ago about a pattern/technique for easily querying for all "descendants" of a record (no need to use CONNECT TO, which is not standard and not available with JPA). I remembered the ...
15
votes
4answers
552 views

Semantically more appropriate package name than `util` for the following things?

As a strawman consider the package java.util it is a dumping ground for various classes that in most cases do not share anything in common other than the person that put them there was lazy or ...
2
votes
4answers
1k views

What do you call an iterator that returns the current, previous and next siblings of each node of a list? [closed]

What do you call an iterator that given a list [a, b, c], returns an object of the form { prev, curr, next } for each iteration? e.g, (? === undefined) { prev: ?, curr: a, next: b } { prev: a, curr: ...
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
4answers
219 views

Is there a name for refactoring technique that turns hardcoded values into configurable parameters? [closed]

What is that technique called when you take values in the code that are hardcoded and make them variable, possibly constructing elaborate OO constructs to make that variable properly configurable? ...
1
vote
2answers
175 views

Should method names getX and setX only be used for fields and have no other effects? [duplicate]

Should I avoid using getX() and setX() as names for methods that aren't "traditional" getters or setters? (Let's define traditional as it only gets/sets the field and has no other effects.) I guess ...
1
vote
1answer
109 views

How to name complex DAL/repository methods? [closed]

I'm beginning working with repository pattern. When it comes to simple queries I don't have problems with names. GetById GetByDay UpdateById If a method retrieves data filtered by two values also ...
2
votes
1answer
111 views

Ambiguity of seemingly clear method names in APIs

(The question is language-agnostic, but to illustrate the point, I wrote the examples in C#.) Say I'm trying to model the behavior of "components" that communicate via "ports". I might model this ...
4
votes
2answers
105 views

How to deal with libraries that use different naming conventions?

I'm working on a personal project that uses a few different libraries, such as GLFW, glm and Bullet. How are different naming conventions usually dealt with in this context? Working with C++ I always ...
0
votes
1answer
94 views

Vector API, naming for element-wise multiply [closed]

I'm helping develop a 3D Vector class, which has common operations such as: v = v1.cross(v2) v = v1 * v2 - infix multiply for dot product. v = v1 + v2 - infix addition. v = v1.slerp(v2) - spherical ...
3
votes
0answers
88 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
2answers
245 views

Immutable vs Read-only vs Unmodifiable naming difference [closed]

So, I've looked at some similar questions asked here in regards to how these three should be used in naming. Usually, the answer is something along the lines of "it's conventional" and "just be ...
2
votes
2answers
90 views

How to organize code which converts from one type to another

If I have a DateRange class, and I want to translate a DateRange into SQL (e.g. some_col >= '2015-3-5' AND some_col <= '2015-3-5'), where should I put the method that does the translating? ...
0
votes
2answers
362 views

What naming convention should you use for data objects solely meant for parameters [closed]

This is my pseudocode for DAL: CusOrderDTO GetCustomerOrder(DateTime OrderDate, string customerCode) CusOrderDTO orderSet = new CusOrderDTO() * query data from database, populate CusOrderDTO ...
1
vote
1answer
122 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
1answer
193 views

How to deal with server-side and client-side naming conventions that clash? [closed]

I have a project that uses the underscore naming convention for the MySQL database and PHP scripts but uses camelCase for the javascript application (a common scenario I'm sure). However, once JSON ...
0
votes
5answers
325 views

Is it bad form to use the same variable name in different scopes?

Say you have some basic code where similar operations will take place in nearby lexical scopes. Take for example some simple pseudo code: variable = "foo" # Do something with variable if (True) { ...
2
votes
3answers
229 views

8085 assembly question. Why flag stacks named d0-d7?

I'm trying to make my C programming exciting by learning assembly programming. I've encountered an image of flag registers in 8085 assembly programming. In that image blocks are named from ...
2
votes
2answers
259 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 ...
0
votes
1answer
69 views

Naming Active-Low Outputs [closed]

I'm writing some software for an embedded system. I am trying to think of clear names for my single pin output functions. Normally, when I'm working with active-high outputs (ON = 1, OFF = 0), I am ...
3
votes
2answers
178 views

How to use scala case classes when delegation is needed

Let's assume in our application we want to model cars. We also want to model a car repository where we store some registered cars. How should that be modeled in scala? Here comes my approach: First, ...
6
votes
6answers
501 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 ...
0
votes
1answer
177 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, ...
0
votes
1answer
85 views

Does a create() method exist as part of a pattern? [closed]

Is there something special(i.e. a design pattern being related) to a method named create()? Background The case is, I often make some instances of objects (of the same class/prototype). These ...
0
votes
1answer
131 views

Inverse property naming (ORM scenario) [closed]

I have a class that represents a process. In this process there are inputs boxes and output boxes. public class Process { public long ProcessId { get; set; } public virtual List<Box> ...
2
votes
4answers
212 views

Is naming a class based on its implementation acceptable?

Is naming a class according to its implementation an acceptable practice? e.g. SortedSet if the class is maintains a sorted list of unique items or TreeSet if it using a binary search tree structure ...
15
votes
10answers
2k views

Why do we use non-descriptive internal codenames? [closed]

I think using codenames are quite widespread. Our company is using them too. But my main concern is these names are usually not documented anywhere. And the meaning is spread by the word of mouth. ...