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

0 votes
1 answer
426 views

DTO Interfaces naming convention in PHP

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
13 votes
4 answers
3k views

How to name uppercase variables when using the camelCase convention?

I am writing a C# class and one of the fields is an API endpoint. Being that API is an acronym and is written in all uppercase letters, what is the correct way to name the field _APIEndpoint, ...
BeeFriedman's user avatar
-2 votes
3 answers
1k views

Common practice where to place "is" word while naming predicate function: at the beginning or in the middle?

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
0 votes
3 answers
366 views

Naming multiple Entities of same collection (with different sets of fields, few less, few more)

Say I have a complex entity (class) called Quote. We have one representation that has just 3-4 fields used to hold minimal amount of data to identify a quote. Is there any convention to call an entity ...
tgkprog's user avatar
  • 610
2 votes
1 answer
545 views

What would be good alternative function names for "filterHighNumbers"? The word "filter" could go either way [closed]

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
0 votes
2 answers
179 views

Is usage of "with" prefix acceptable for filter methods that are specific(not generic) [closed]

I am not a native english speaker so I have the following question related to naming I have a class that has generic filter method of type: filter(Predicate predicate) In the same class I have some ...
Alexander Petrov's user avatar
4 votes
5 answers
363 views

Naming a method that does the same thing faster but only approximates the result?

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 vote
4 answers
6k views

What's the convention to name a REST endpoint that returns a boolean?

I have an endpoint that returns whether a resource is valid or not (true or false): GET resource/{id}/valid Where the returned value is not a field of the resource and is dynamic, it does not depend ...
Marco Lackovic's user avatar
-1 votes
1 answer
88 views

Workaround for digits in beginning of identifier

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
24 votes
5 answers
8k views

Best Practice - Avoid naming class and field the same?

When modeling classes I always have stumbled on the problem that the class has a field with the same name. Look at this example: class Name { string meaning; string language; string name; /...
bubbletea's user avatar
  • 357
0 votes
2 answers
752 views

Can a UUID be called a constant?

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
3 votes
4 answers
274 views

Does it make sense to use the word 'Set' in a class as an umbrella term for both sets and individual items?

For instance, if I'm modeling a book collection and I want to be able to represent sets of books that come together (like an encyclopedia series), the sets may share a lot of properties that ...
user6490576's user avatar
0 votes
1 answer
577 views

Best way to name derived classes when extending its functionality [closed]

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
5 votes
2 answers
19k views

Naming convention for Boolean arguments

In many languages, the convention for naming Booleans is typically to prefix them with "is", "has" or "can". This convention seems to be applied mostly to fields and ...
k314159's user avatar
  • 161
3 votes
1 answer
3k views

Naming Conventions for microservices

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

15 30 50 per page
1
2 3 4 5
12