Reputation
3,307
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
10 15
Newest
 Good Answer
Impact
~81k people reached

  • 0 posts edited
  • 1 helpful flag
  • 77 votes cast
Feb
2
comment Is it an antipattern to use peek() to modify a stream element?
Have you used peek with a stream that generates its elements dynamically? Does it still work, or are the changes lost? Modifying the elements of a stream sounds unreliable to me.
Jan
31
comment What's the point of running unit tests on a CI server?
Most common test failure reason in our company is the developer testing the debug build only on his machine. The CI servers test the release build.
Jan
30
answered Should a C++ program catch all exceptions and prevent exceptions from bubbling up past main()?
Jan
29
awarded  Good Answer
Jan
28
answered Splitting one class into subclasses to save memory
Jan
27
comment Should we avoid language features that C++ has but Java doesn't to increase maintainability?
@DevSolar How exactly did I give the impression that Java is more advanced? I need to know so I can fix it.
Jan
25
awarded  Nice Answer
Jan
25
comment Is it acceptable to copy and paste long but straightforward code instead of wrapping them into a class or function?
Imagine you have a bug in that code, such as not freeing objects you allocate. (Does your framework free the Alert objects?) Now imagine you have to find every copied instance of this code to fix the bug. Now imagine it's not you who has to do it, but a crazy axe murderer who knows you were the one who created all these copies in the first place.
Jan
25
answered Should we avoid language features that C++ has but Java doesn't to increase maintainability?
Jan
24
comment Does it make sense to have a user specified thread limit?
"Fairly sharing" causes our performance to plummet due to inefficient cache use. However, the solution is to lock the program to a subset of the CPU cores, not limit its threads directly.
Jan
24
comment Does it make sense to have a user specified thread limit?
Some of our customers use big shared machines where users just log in remotely. These customers frequently complain that our products hogs all the resources of the computer and want it to be nicer to multiple people using it in parallel.
Jan
24
comment Where to inject dependency required by all implementors of an interface?
The assumption that every implementer of an interface has some specific dependency is unquestionably wrong. At the very least, debugging fakes have no reason to hold the dependency.
Jan
23
comment When is it appropriate to make a separate function when there will only ever be a single call to said function?
Being unable to think of a good name for a part of a function could also mean that you're trying to split too much at once.
Jan
13
comment Explanation on how “Tell, Don't Ask” is considered good OO
The second example looks weird to me because I don't see why sound_alarms should be a method on SystemMonitor.
Jan
12
comment C++ Virtual destructors used only when there are virtual functions
"I have a parent class and a child class, with no virtual functions, and I have a parent-class-pointer to a child object" - But why would you want that? The only thing you could do with such a thing is destroy it (or use dynamic_cast).
Jan
11
awarded  Yearling
Jan
5
comment Throwing an exception inside finally
If Fortify complains about try-with-resources with a single resource variable, then it has a bug. It has to assume that the close method of the resource is implemented to correctly clean up the resource even in the presence of some failure, or else it's impossible to write sane code.
Jan
5
comment Why use an OO approach instead of a giant “switch” statement?
@LokiAstari The newest and fastest-growing C++ compiler, Clang, uses lots and lots of switch statements in its hand-written parser. The compiler team actually added very powerful switch completeness warnings to the compiler so that you can easily track down all switch statements that need to be modified. Yes, it's not always easy for maintenance, but that's just the nature of the problem. In fact, the problem is so common that it has a name: expression problem.
Jan
3
comment In C++, is it a reflection of poor software design if objects are deleted manually?
What kind of pool are we talking about here, and why wouldn't I want the pool to deal out smart pointers (handles) that automatically return the object to the pool once I'm done?
Jan
3
comment Is Java much harder to “tweak” for performance compared with C/C++?
Does vectorization count as micro-optimization? C++ compilers are pretty bad, and JITs usually don't even bother to try.