2,102 reputation
513
bio website
location
age
visits member for 2 years, 2 months
seen yesterday

Mar
25
comment Are project naming conventions more important than language naming conventions?
I would make an exception for hungarian notation ...
Mar
14
comment Is there is a way to pass more than one value to the calling function in c++?
Also, getting your homework done for you is less obvious when you don't put the original question in quotes.
Mar
5
comment How to organize code which converts from one type to another
Are you sure parameterized queries are powerful enough to represent a range with just one parameter? I agree that the end result should use parameterized queries, but that doesn't change the underlying question posed here.
Mar
5
awarded  Popular Question
Feb
17
comment Why are heuristics a disadvantage for decidable problems?
Note that "heuristic" in this case means "a way to evaluate approaches to the problem to find the most promising". But it can also mean "a way of solving the problem that may fail to find the best, or any solution, even if one exists". The book works with the former definition, but if you're used to the latter (as I am, due to my work domain), it can be extremely confusing.
Feb
16
comment Why is base-for-all-objects discouraged in C++
@DavorĊ½dralo So C++ has a stupid name for a basic function ("operator <<" instead of something sensible like "DebugPrint"), while Java has a freak of a base class for absolutely every class you write, no exceptions. I think I like C++'s wart more.
Feb
6
comment Design pattern where decorated object may ask for things like “status updates” from the decorator to perform it's role?
"Imagine if you could represent every front-end input form with a single backend object?" - That sounds horrible. Why wouldn't I want distinct backend objects for distinct forms? Give me tools to make writing these objects easy. I can't understand the code you posted.
Feb
6
comment Place variables frequently used by the same function on the heap?
Just to make the conclusion more obvious: Promoting a local variable to a global is likely to make the code slower, not faster.
Feb
6
comment “Use map instead of class to represent data” -Rich Hickey
I know I've seen this discussion before somewhere on SE. I believe it was in the context of JavaScript, but the arguments were the same. Can't find it though.
Feb
6
answered Should factory make context or concrete strategies objects in strategy-factory pattern?
Feb
4
comment Potential abuse of observer pattern
The entire first paragraph sounds wrong. Why does a meeting room reference employees (except possibly those in there right now)? That's the meeting's job. Why do employees have a SetMeetingDate? That's also the meeting's job. A meeting should be a combination of attendees, location, and time, and it's the meeting's job to make sure these all check out, like all attendees actually being available at the given time, the location being available, etc.
Jan
30
comment Using “Return” over “Break” or a combination
Furthermore, accidental fall-through after refactoring is not an issue in C#, as fall-through is a compiler error. You need an explicit goto case.
Jan
28
comment Will destructing a large list overflow my stack?
Yes, but that's nothing you can't achieve with std::atomic<node*> too, and cheaper.
Jan
27
comment Will destructing a large list overflow my stack?
@VF1 Are you sure the pointers are giving you the thread safety you want?
Jan
27
answered Will destructing a large list overflow my stack?
Jan
15
answered Using conditions again and again or just create different methods
Jan
11
awarded  Yearling
Jan
7
comment Is it always safe to shift bool values?
Bit manipulation is much easier to reason about if you just convert everything to unsigned beforehand.
Dec
4
answered What's the rationale behind the ordering of Scala's value/variable declaration when including a type identifier?
Nov
20
comment Is using MultiMaps code smell? If so what alternative data structures fit my needs?
"Never deserialize untrusted YAML." - Wait, what? Are you saying that YAML has a "execute this code" feature, or that most YAML parsers are incredibly buggy?