305 reputation
16
bio website
location
age 36
visits member for 3 years, 9 months
seen Jul 28 at 20:25

Freelance developer in Munich, specializing in C#/WPF and C++. And some Java, too. (My profile at Careers@SO.)


Apr
3
answered What are the valid reasons to use ContentPresenter outside of template?
Mar
10
awarded  Critic
Mar
10
comment Why do all <algorithm> functions take only ranges, not containers?
Well, using just a typename Iter seems to be too duck-typed for a strict language. I would prefer e.g. template<typename Container> void sort(typename Container::iterator, typename Container::iterator); // 1 and template<template<class> Container, typename T> void sort( Container<T>&, std::function<bool(const T&)> ); // 4 etc. (which would perhaps solve the ambiguity problem)
Dec
13
awarded  Nice Answer
Dec
12
awarded  Yearling
Dec
11
awarded  Custodian
Dec
11
reviewed Approve suggested edit on How to best protect from 0 passed to std::string parameters?
Dec
9
answered How to best protect from 0 passed to std::string parameters?
Feb
18
comment Count true array elements
Well, my point is that length(find(x>0.5)) is definitely more clear than sum(x>.5). If there is another one even more clear, I would choose that one. One more good idea would be to throw in a small trivial function with an appropriate name, something like count_true.
Feb
18
awarded  Commentator
Feb
18
comment Count true array elements
In a non-time-critical code part, I would always prefer readability over a small efficiency gain.
Sep
18
comment At what point is asynchronous reading of disk I/O more efficient than synchronous?
yep, that's the whole point of multithreading!
Aug
6
comment Why was the percent sign (%) chosen as the format specifier for the printf family of functions?
I think, the MS's reason was that if they would maintain %0, %1 etc, it would be (1) confusing to the people who come with C background, as % implies %d, %f etc to them; (2) would have serious trouble for representing 10th and further arguments.
Oct
19
comment How can I prevent users from creating multiple accounts on a web site?
You can never be 100% sure. If your site is of high value to the users, they can trade registered accounts. If it's of low value, people would be not willing to put so much effort into proving their uniqueness, so they just wouldn't register. After all, the site is for the users, not vice versa.
Oct
19
comment How can I prevent users from creating multiple accounts on a web site?
@ChrisF: well, colleagues are likely to interact more than just arbitrary pair of accounts.
Sep
13
awarded  Teacher
Oct
31
awarded  Supporter
Oct
18
comment question, the best data structure and algorithm
@sander: I've added a C++-based sample.
Oct
17
comment question, the best data structure and algorithm
I think any answer can give some clue to the OP about solution to his problem. Sometimes people ask not what they exactly need to know, so any related information is useful.
Oct
17
comment question, the best data structure and algorithm
Or maybe because a database is not an algorithm. Using a database is delegating the question of choosing the right algorithm to the database developers and database administrator (which need to make the database generic enough, so its algorithms won't necessarily be optimal for your specific case).