Skip to main content

Questions tagged [coding-standards]

Coding standards, or coding conventions, are sets of rules or guidelines designed to govern the process of code production in a software project. They're usually based on industry best practices or generally accepted conventions. They include naming conventions, style, prohibited features, and more.

2votes
4answers
389views

How to combine multiple functions into a single template based function

Threre are two functions FindMaxDistanceVector and FindMaxDistanceList whose implementation is almost same except some debug information added in FindMaxDistanceList. Note that these two functions are ...
user146290's user avatar
2votes
4answers
473views

How to avoid 'Call super' code smell with multiple bases having same method name?

According to Wikipedia, Call super is a design anti-pattern in which a particular class stipulates that in a derived subclass, the user is required to override a method and call back the overridden ...
VL-80's user avatar
2votes
5answers
636views

Is Exception caught in the Service class a matter of preference?

In a Java EE legacy project, almost all the DAO and Service classes are written in a a way that DAO level does not catch any exception and instead the service classes catch(Exeption e) in all of their ...
Rui's user avatar
  • 1,925
-4votes
1answer
102views

Feedback on custom "Orchestration" architecture

I've been doing some deep thinking on how to structure code and found myself coming up with a (for me) new pattern. The pattern is based on a highly modular approach with a large focus on indirection, ...
Felix ZY's user avatar
0votes
2answers
190views

Should each commit in a branch implementing a new feature be prefixed by "feat:" using conventional commits?

Consider I'm working on a branch feat-1 implementing a new feature. I'm confused what to prefix each commit with on that branch. Should they all be prefixed with feat: (after all, they are all part of ...
Shuzheng's user avatar
1vote
3answers
269views

Considering IDE and text editor features when choosing a coding style

Recently, I had a debate with one of my friends on using type inference in C# (var keyword). His argument was that we should stick to using the explicit type names because "even with the ...
Zombies are Real's user avatar
0votes
1answer
58views

Wrapper Auxiliary Method VS Default Arguments for Initialization: Pros/Cons

I have a class in which there are several methods that can act as an "entry point" to its private innards (or the "fruit" thereof). Said functions might be called multiple times ...
Shay's user avatar
  • 103
0votes
1answer
222views

Creating necessary documentation for maintenance staff when only Code repository contents can be relied on [closed]

Conditions: stable legacy prod system no Software Devs of the system are available anymore app is maintained by Engineers, who do not have the same software dev experience like the original Devs and ...
stack3r's user avatar
0votes
2answers
547views

Should entities always be simple and mapped?

I am told everywhere that entities are only to represent the data structure, then entities should be mapped to a model and then the model possibly to a DTO. The other way is similar, DTO -> model -&...
Gersalom's user avatar
0votes
0answers
58views

Are type, constant/static/global, and pointer prefixes still necessary in C coding standards, considering the capabilities of modern IDEs? [duplicate]

Our coding standards for C include various prefixes for data types, constants, static/global variables, and pointers. These prefixes were originally introduced for code review purposes, but with the ...
Cem Polat's user avatar
1vote
5answers
370views

Is storing computed values always bad?

Edit: I'm copying the question but changing the example code. Apparently, I used a bad example earlier that contained an imprue getter. I'm keeping the old example code at the bottom so the first ...
sharbel okzan's user avatar
0votes
1answer
83views

Practical Advice for rapidly changing code maintainability [closed]

This question may get closed quickly, but I'll appreciate any advice I can get and all the resources I can find online about this topic aren't quite relevant to my case. I am a Math PhD student doing ...
msm's user avatar
  • 109
4votes
5answers
345views

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
-1votes
1answer
196views

What is point of having certain microservices making another API call in the same service

I was going through an old, largely untouched part in my company’s codebase and found one API. It does the following things. A POST API with path host/entities/trigger which fetches a list of entity ...
elliot's user avatar
4votes
1answer
354views

How to label backwards incompatible changes which change the API but don't add a feature?

I have a project in which I'm the sole contributor, there isn't a stable API yet and I'm constantly refactoring code, but I still try to denote breaking changes whenever they do happen. Recently ...
Clara's user avatar

153050per page
close