Skip to main content

Questions tagged [code-quality]

Questions for best practices for writing high quality code.

4 votes
1 answer
1k views

My job uses SonarQube as part of the CI/CD quality gate. One of the "Maintainability" issues (severity: medium) raised is the CA-1822: Mark members as static. The link explains the added ...
Veverke's user avatar
  • 541
4 votes
1 answer
435 views

As we know, determining the semantic properties of programs is an undecidable problem (e.g. Halting, commonly attributed to Turing). But tools such as static analysis (notably that of Clang/LLVM) are ...
DannyNiu's user avatar
  • 374
5 votes
1 answer
577 views

Using assimp I've created a function to load 3D models and it does everything I need and I don't plan to use another library or write something custom, however, I am curious how techniques such as ...
Konjointed's user avatar
0 votes
1 answer
231 views

Our php codes base has 6 different ways to do INSERT … ON DUPLICATE KEY UPDATE. It happened over years because the php framework is evolving and my team members come and go, although I won't say we ...
Qiulang 邱朗's user avatar
2 votes
3 answers
348 views

I'm creating the UI for a "Point of Sale" type page. You can add orders, grouped orders, and custom items to your transaction, and it should display these in a list so you can see what you ...
Conman_123's user avatar
0 votes
1 answer
279 views

I recently changed my job to a big MNC and the code I am exposed to is highly complicated, difficult to read and understand. Although it is divided in microservices and runs on local I have to keep ...
Surya Saini's user avatar
17 votes
8 answers
7k views

I'm a Software Engineer who sometimes need to review the code of my fellow team members. I often look at the source code and think; this looks fine. I'm having a hard time to think critical about it. ...
Jay's user avatar
  • 289
21 votes
4 answers
10k views

I have a situation like the following: int fds[2]; pipe(fds); // Write lots of stuff into fds[1] close(fds[1]); do_stuff(fds[0]); // Should I close fds[0] here or at the end of do_stuff? Which one ...
eem's user avatar
  • 329
19 votes
9 answers
7k views

So this is a basic question that was asked by a junior developer (not in these exact words). He had worked on a feature which was used in multiple projects. The main feature can be easily isolated and ...
nakiya's user avatar
  • 387
18 votes
6 answers
5k views

According to When is a number a magic number?, I know magic number should not exists, so I know the following code about creating a Label from some UI framework and set the color RGB needs to be ...
wcminipgasker2023's user avatar
40 votes
11 answers
14k views

This is more of a philosophical question. I have recently started working on a new team and I see here a pressure on developers to fix bugs in their own code. Whenever a bug is found in a feature, the ...
emperor-shallots's user avatar
1 vote
1 answer
309 views

A module app.js includes another module service.js. The service.js module/file contains some functions but also does some module scoped initialisations(registry variable). // service.js const ...
Cap Barracudas's user avatar
0 votes
2 answers
179 views

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
1 vote
1 answer
292 views

I'm and entry-level developer straight out of college. I am the only developer at this company. I feel the challenges I face are different to most people working with sub optimal or very poorly ...
mpAppProg's user avatar
2 votes
5 answers
577 views

I have a testing project, in Katalon Studio, that uses data classes, called models. This is a conscious design decision. Also a conscious design decision, is the decision to separate the concern of ...
Mike Warren's user avatar

15 30 50 per page
1
2 3 4 5
44