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.
557 questions
0
votes
3
answers
231
views
Is JSON Schema-based runtime validation more practical than static type hints in real-world Python applications?
Question Body
I'm currently developing a Python coding standard for use in enterprise-level internal systems. Our typical use cases include:
API input/output validation
Reading from databases, ...
3
votes
6
answers
597
views
Is OOP really beneficial for enterprise-scale business software compared to procedural languages like ABAP or COBOL?
I'm currently drafting a Python coding standard for internal enterprise use, primarily targeting business applications that involve heavy data access, reporting, and transactional logic.
In this ...
2
votes
4
answers
484
views
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 ...
2
votes
4
answers
522
views
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 ...
2
votes
5
answers
731
views
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 ...
0
votes
2
answers
330
views
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 ...
1
vote
3
answers
307
views
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 ...
0
votes
1
answer
67
views
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 ...
0
votes
1
answer
315
views
Creating necessary documentation for maintenance staff when only Code repository contents can be relied on
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 ...
0
votes
2
answers
682
views
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 -&...
0
votes
0
answers
59
views
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 ...
1
vote
5
answers
398
views
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 ...
0
votes
1
answer
88
views
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 ...
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 ...
-1
votes
1
answer
216
views
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 ...