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.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
306 views

Is non-contiguous protobuf field numbering an anti-pattern?

Is it an anti-pattern to have gaps in field numbers to aid readability? The need being address by this idea is that metadata fields, which are "aspect" fields, can be placed in the proto ...
Bohemian's user avatar
  • 1,996
1 vote
0 answers
93 views

F# convention for brace placement

Is there a generally accepted convention for brace placement in F#? I found some examples in the documentation, but they didn't seem to be consistent with each other. In particular, and to take an ...
rwallace's user avatar
  • 1,188
1 vote
0 answers
126 views

Alternative to reorder c++ tokens

Our organization is looking to standardize the way we use const T& and T const& and while we initially looked at clang-format to solve the job, it doesn't reorder tokens so there is no way to ...
Jon's user avatar
  • 111
1 vote
0 answers
979 views

Can this be used to implement Post Redirect Get pattern?

I am trying to implement proper a Post Redirect Get on a PHP site (question is language agnostic in nature however). I thought about it, and realized that running this code on every request seems to ...
Goose's user avatar
  • 1,898
-2 votes
1 answer
2k views

Global variable or parameter?

Is it correct that homeitem should be declared inside the OnLoad method and overgiven to all the render methods instead of just declaring it as a global variable and accessing it by all the render ...
Awusuwah's user avatar
  • 111
-3 votes
1 answer
150 views

General term to describe the anti-pattern where the same concept is described in different ways?

Our codebase is old and very large. Over the years, many developers have worked on the code and frequently refered to the same concept inconsistently. For example, we have a "number that uniquely ...
AlainD's user avatar
  • 150
-3 votes
1 answer
75 views

What could be a better naming convention for the variable 'completeConfig'?

I have a feature in which the user can directly provide the entire nginx config inside the completeConfig variable in the config yaml. Like this: nginxConfig: completeConfig: > .... .... ...
Siddharth Gupta's user avatar