2,110 reputation
513
bio website
location
age
visits member for 2 years, 3 months
seen 5 hours ago

6h
answered Fastest way to determine if a value is in a list?
6h
comment readFromFile reads file from reference in a function help!
Even if there was a question, this looks like it should be on stackoverflow, not programmers.
6h
comment How to migrate my thinking from C++ to C#
Many things done with macros in C++ can be done with reflection in C#.
6h
comment How to migrate my thinking from C++ to C#
"One example of this that I have seen is that a lot of C++ developers will like to use for loops because they're faster than foreach." This is a bad idea in C++ too. Zero-cost abstraction is the great power of C++, and foreach or other algorithms shouldn't be slower than a hand-written for loop in most cases.
Apr
24
comment Is there a approximate string comparison function which is odd like mathematical functions are odd?
Well, you could use distance(a, b) = length(a) - length(b), which is very fuzzy and fulfills your requirement.
Apr
20
comment Receiving information from another application
I feel like attaching it to this answer makes it more likely to be read.
Apr
20
comment Receiving information from another application
Also, be aware that for most online multiplayer games, bots violate the terms of service.
Apr
17
comment Job Interview Challenges
@jwenting As I said, very specific circumstances, and looking for someone with a very special mindset.
Apr
17
comment Job Interview Challenges
The only reason I would ever ask such a question in an interview is if I had a team of very opinionated developers and needed another senior programmer capable of standing up to them. The correct interview response would be for the candidate to stand up to me. And this is a very risky proposition.
Apr
17
comment Job Interview Challenges
@LorenPechtel No, not even there. Chances are, the compiler will optimize a swap through a temporary to some kind of xchg instruction without any temporary. It probably won't for an arithmetic or bitwise trick.
Apr
16
comment Transforming XML to JSON in C++
This isn't a task for C++. This is a task for Python or Ruby or really any language but C++.
Apr
16
comment Pass by value result with exceptions
I don't think it's productive to ask edge-case questions about fictional languages.
Apr
14
comment How to write a good exception message
If you're in a language that doesn't have a GC, like C++, you should be very careful about putting references to arbitrary data into exceptions that you send up the stack. Chances are, whatever you're referencing has been destroyed by the time the exception is caught.
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.