Linked Questions

1
vote
1answer
257 views

Is there a common set of best practices for passing anonymous functions as arguments?

This is a generic question about using anonymous functions as arguments to other functions. I give an example in Python, but the question is not about Python (and I'm particularly interested in ...
-3
votes
3answers
155 views

Is storing configurations in memory more performance and maintenance efficient? [closed]

My teammate has this class which contains a lot of Strings: public class Config { /** * List of status */ public static final String IN = "bla*"; public static final String ...
-3
votes
2answers
390 views

Writing readable code and not overdoing it with naming [closed]

I've been in an argument at work about writing readable code. It was mainly about variable and method names and the idea that comments are worthless if the code is readable enough. I would not like to ...
1
vote
1answer
235 views

Metrics that measure the readability of the function

Functions are the first line of organization in any program.I believe writing them well improves the readability of code to some extent.I am working on metrics that describe how readable the function ...
1
vote
2answers
175 views

Cleanest choice for symmetric operations

I have a need to do some processing from a format A to a format B and from B to A. The job in one direction is very similar to its counterpart. Both formats are represented with an interface Msg. In ...
-1
votes
1answer
116 views

Iteration inside a using or using inside an Iteration

Is there a best practice for iterations inside of a "using"? which is better? and maybe a why? "using" inside of an iteration... foreach (var currentPerson in Persons) { using (var db = new ...
-1
votes
2answers
110 views

Common way to name methods with same name as desired variable? [closed]

I frequently find myself pulling up helper methods in order to make my code better, but end up with duplicate method names. Is there a standard way to name such methods without getting duplicate names?...
4
votes
0answers
159 views

Should the order of definitions correspond to the order of declarations in header/source files? [closed]

If my header looks like this: class foo { public: foo(); ~foo(); QString b(); QString c(); QString a(); void setB(QString s); void setC(QString s); void setA(...
3
votes
1answer
97 views

Namespace by topic or by purpose? [closed]

The project I'm working on has quite a few classes. These classes can be grouped in two different ways. I'm trying to decide which grouping is best as for namespacing. Currently I a set of user facing ...
2
votes
2answers
66 views

Should I use structure from a core library graphic toolkit in my domain?

In java (and many other programming language), there are often structure to deal with graphic element : Colour, Shape, etc. Those are most often in a UI toolkit and thus have a relatively strong ...
0
votes
0answers
139 views

Does the term “readability” refer also to the transparency of code functionality? [duplicate]

Question: Does the term "readability" refer also to the transparency of code functionality? For Example: I read that a downside of Dependency Injection is a sacrifice to readability. The idea being ...

15 30 50 per page