Skip to main content
Best practices
1 vote
5 replies
78 views

this program prints a pyramid (its from a cs50 problem set). I call the function recursively by decrementing n, but i also wanted to keep track of its initial value in all the loops after the first ...
Leopold's user avatar
Best practices
3 votes
3 replies
71 views

I���m part of a team of 10 developers, and recently our product team requires us to use feature flags for almost every new change. The idea is that they can always “roll back” to the previous behavior ...
Jon's user avatar
  • 464
Best practices
1 vote
4 replies
148 views

I'm trying to have an array of structure. The sprite_s struct: typedef struct sprites_s { bool *initialized; sfSprite *duck; } sprites_t; Can I, with memset, fill the array with data so I can ...
DoctorService's user avatar
Best practices
1 vote
2 replies
80 views

What's the best practice, preferably backed by a publicly available guideline issued by a tech company or a standards organization, when it comes to the order of method declarations in a Java source ...
Sergey Zolotarev's user avatar
-3 votes
1 answer
89 views

In Angular/RxJS, when should you use tap({ error }) and when catchError for side effects? How do you best separate the two logically or combine them? For example, does resetting the UI to its previous ...
Fabian Röhrle's user avatar
0 votes
0 answers
37 views

I'm new in Vue, and I'm trying to enable code style inside a <script> block in WebStorm, and in the settings everything is correct, but the style still doesn't work inside the <script> tag....
Konstantin 's user avatar
-6 votes
1 answer
154 views

I'm aware that C++11 introduced alias templates (which is well-explained in this thread) that makes it simple to reduce verbosity. For example: #include <vector> template <typename T> ...
K.R.Park's user avatar
  • 1,229
2 votes
0 answers
59 views

I'm trying to enforce this indentation style in TypeScript: const response: Asana.Response<Asana.Tag[]> = await tagsApi.getTagsForWorkspace(process.env.ASANA_WORKSPACE_GID!, opts); ...
Dzmitry Dranitski's user avatar
1 vote
0 answers
26 views

The @stylistic/lines-around-comment rule allows me to require new lines before or after comments, but I can't seem to find a way to disallow them. I thought the @stylistic/padding-line-between-...
ElJay's user avatar
  • 377
2 votes
2 answers
180 views

I am developing with Flutter using Android Studio. When I try to format the code using the Cmd + Opt + L keys, it ends up like #1 below. Is there a good way to make it look like #2? //#1 @override ...
footddangkong발달린땅콩's user avatar
-1 votes
1 answer
49 views

I am new to sonarLint rules, I am trying to findout the rule for indentation and variable naming in typescript rules.But couldn't find it. I was able to find naming rules for classes and functions but ...
Rishik Bhimavarapu's user avatar
0 votes
1 answer
123 views

I just started to use clang-format and I could set up quite a lot of things, but I am stuck with my general handling of long function headers. This is how I usually create them: void ...
FERcsI's user avatar
  • 500
4 votes
2 answers
191 views

I'm trying to set up SonarQube to have our coding conventions/rules in it. I'm looking for ideas on how to do this best. We're using C# as our dev language and Visual Studio as our IDE. We have dozens ...
MrSoundless's user avatar
  • 1,394
0 votes
1 answer
236 views

What to do if I use a switch case in a function, and the default case should not happen, yet I must return something? I tried to program some cellular automaton, where there are two possible cell ...
PlsHelp's user avatar
  • 337
0 votes
2 answers
104 views

I have a project written in C on STM32 platform. My project source code will be available for multiple hardware. I use CMakeLists For example I have 2 header for the moment hardware1.h and hardware2....
simon's user avatar
  • 1,234

15 30 50 per page
1
2 3 4 5
516