Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 20065

Programming Practices are the commonly or not so commonly used practices in development of software. These can include things like Agile Development, Kanban, Coding shortcuts, etc.

1 vote

How important is it to pick the best IDE for your programming language of choice?

How important is it to pick the best IDE for your programming language? In my personal opinion, it is very important. With a good code parser, it can greatly speed up programming. With auto-compl …
BЈовић's user avatar
5 votes

Is it a bad practice to use GUI designer tools with code generation for application programm...

For a big and medium project, they should not be used, because the code they generate is not very nice to maintain. Unless you don't plan to clean up the code generated by a GUI designer, you are bett …
BЈовић's user avatar
41 votes

if/else statements or exceptions

The usual way of error handling is this: If you can solve the problem locally, then use the if statement (or if the function throw an exception, handle that exception). If you can not solve the probl …
BЈовић's user avatar
0 votes

How to let teammates know what changes I made to an object?

Now, how can I notify my teammates that my object had more attributes that they can set? Well, you shouldn't inform your teammates about every little thing you make. Otherwise, you'd have to sen …
BЈовић's user avatar
3 votes

Should injecting dependencies be done in the ctor or per method?

There are various kinds of inversion of control, and your question proposes only two (you can also use factory to inject dependency). The answer is : it depends on the need. Sometimes it is better to …
BЈовић's user avatar
5 votes

Why is C++ backward compatibility important / necessary?

Are there conceptual reasons or technical problems (e.g. compiling existing templates) that make such a change undesirable or even impossible? Some features are deprecated, and you get a warning …
BЈовић's user avatar
0 votes

Setting global parameters: is this a reasonable use of const_cast and volatile?

It is not only unreasonable, it is forbidden by the standard to modify a const variable. [dcl.type.cv]/4 tells (emphasize mine) : Except that any class member declared mutable (7.1.1) can be modi …
BЈовић's user avatar
3 votes

How can I avoid always feeling like if I completely rebuilt my program from scratch I'd do i...

How can I avoid always feeling like if I completely rebuilt my program from scratch I'd do it much better? What you could do is to create a throwaway prototype, before start doing the "real" proj …
BЈовић's user avatar
15 votes

Should a method do one thing and be good at it?

To quote Clean Code, on the page 36, it says: So, another way to know that a function is doing more than "one thing" is if you can extract another function from it with a name that is not merely a …
BЈовић's user avatar
1 vote

Is it bad practice to supply command line arguments for unit tests

Sorry to say, but that is the worst idea I heard today, for several reasons: anyone who executes unit tests, has to pass correct parameter at correct position, otherwise the unit tests are going to …
BЈовић's user avatar
78 votes

Is throwing an exception an anti-pattern here?

Yes, your colleague is right: that is bad code. If an error can be handled locally, then it should be handled immediately. An exception should not be thrown and then handled immediately. This is much …
BЈовић's user avatar