Skip to main content

Questions tagged [naming-standards]

Naming standards is about defining rules about the use of symbols such as the name of namespaces, packages, modules, types, functions, or variables

Filter by
Sorted by
Tagged with
0 votes
1 answer
438 views

It might be that my question would sound a bit stupid but I would like to find the best way for naming my DTO interfaces. In my PHP application I have following DTO types: Simple (which contains a ...
Viacheslav Ravdin's user avatar
-2 votes
3 answers
1k views

There's a lot of free or member predicate-like functions (that returns boolean value) in different programming languages and popular libraries/frameworks that have "is" as a prefix, e.g.: ...
αλεχολυτ's user avatar
2 votes
1 answer
549 views

The problem I noticed is that I wrote a function called filterX which removed any X from a list. Then another engineer came along and wrote a filterY function which kept only the instances of Y in the ...
ubershmekel's user avatar
4 votes
5 answers
364 views

Presume I have a function that does some precise calculation on a large amount of data, call it calculateResult(data). This function gets very slow with increasing size of input. Luckily, I only need ...
csstudent1418's user avatar
-1 votes
1 answer
89 views

Suppose I have a std::span-like type, that represents a matrix or an image, or a class modelling a 3d mesh. I would like to say template<class T> class 2d_span; class 3d_mesh; But that would ...
user877329's user avatar
0 votes
2 answers
757 views

From my understanding, a constant is a value which is assigned only once and cannot change at runtime, whereas variables have mutable values which are unpredictable by nature. My question is, to what ...
Clara's user avatar
  • 53
0 votes
1 answer
579 views

I have just recently joined a new company and one of the classes used to log information has not been written properly. So I have been asked to add new functionality to the logger. Rather than ...
user16405900's user avatar
3 votes
1 answer
3k views

We are currently splitting up our Intranet monolith into multiple (Micro)services. The layout in itself is already finished and we have decided to split them up in a way that there is only ever one ...
SirHawrk's user avatar
  • 259
-2 votes
1 answer
121 views

I'm developing an application that has no client-server connection by design, all of the work is done locally (no internet connection needed), so I'm wondering if I can call it a client? (I'm asking ...
SmallDevice's user avatar
2 votes
1 answer
4k views

I have some issues selecting an appropriate naming scheme for GitHub repositories that belong to the same project. The main package repo relies on additional repos to generate documentation or run ...
mluerig's user avatar
  • 147
3 votes
5 answers
4k views

A couple months ago, Microsoft updated their C# Naming Conventions (https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions). As the developers of C#, I consider ...
Evorlor's user avatar
  • 1,563
-2 votes
1 answer
3k views

What commit type should I use when I'm deleting files from a repo? I have seen several types over the internet, but none talk about file deletions. Possibly the closest options that come to mind are ...
Asif Kamran Malick's user avatar
9 votes
6 answers
9k views

I'm wondering if there is a widely accepted convention for naming base classed in OOP. Does marking a parent class with "Base" indicate that it's abstract or that it's just an extended class?...
alamoot's user avatar
  • 199
-2 votes
1 answer
173 views

I am currently trying to name a method that prepares/alters some input data, then passes it on, and I'm wondering if there is a naming scheme for such methods. Concretely, I have a reusable UI ...
BlackWolf's user avatar
5 votes
2 answers
2k views

I'm sometimes torn between two naming conventions defining the order of words that make up a function name. The first one is choosing the words in the same order we would natural use in a sentence, ...
Petras Purlys's user avatar
4 votes
3 answers
355 views

I am wondering if it is good practice to name function which does the main logic "proceed" + "functionName". I would use that name if there are some checks(if-s, try-catches, etc.) ...
Jakov's user avatar
  • 151
0 votes
2 answers
327 views

In variables/classes/methods naming, sometimes "of" preposition is omitted and word order changing, for example: "Absolute path of source file of entry point" -> "...
Takesi Tokugawa YD's user avatar
4 votes
3 answers
3k views

I'm using MVVM + Clean Architecture in my app. And I sometimes don't have any idea if my namings are good enough for each Interface Adapters, Use Cases / Interactors, Entities. For View Models, it's ...
Bawenang Rukmoko Pardian Putra's user avatar
0 votes
1 answer
229 views

I'm planning to work with different libraries that use different conventions. One uses snake_case, another one uses camelCase. This leads to code that looks like I can't make up my mind: Some_Result ...
infinitezero's user avatar
-4 votes
3 answers
920 views

Let's get to an example. Suppose, I have a Course object with the following properties: (course' code, course's title, credit of course etc.). When expressing this as a JS object, I can do it in the ...
Jahirul Islam's user avatar
13 votes
2 answers
2k views

Here are a few examples: Imperative verb Initialize! InitializeWhenCreated! RequireValue! Third-person verb HasValue? RequiresValue? Are there some rules how to choose either imperative verb or ...
Denis535's user avatar
  • 307
2 votes
3 answers
2k views

When writing a library, designing a class or extending some existing API, we often need to express actions or relations involving noun entities: "Place the ball in the bin" "Obtain the coat for the ...
einpoklum's user avatar
  • 2,808
4 votes
3 answers
4k views

I have an object: const riders = { Dave: { gender: 'male', age: 13, }, Nina: { gender: 'female', age: 16, }, Mike: { gender: 'male', ...
yaserso's user avatar
  • 209
2 votes
3 answers
3k views

In many languages, it is common for a function to have multiple return values (as a tuple), such as: def foo(): return "Hello, World!", 0 I often do this when a computationally expensive (or an ...
Ali Rasim Kocal's user avatar
2 votes
1 answer
172 views

Probably a trivial question but I just don't know how that piece of software would be called correctly: I have a closed system (A) and an application on another system and location (B). The ...
spcial's user avatar
  • 137