1,196 reputation
815
bio website
location
age
visits member for 3 years, 11 months
seen Dec 17 at 10:44

Sep
10
comment Design: multiple algorithms on the same large data sets
Any non-trivial algorithm will take much longer than the copy, so simply copy it.
Sep
9
comment Git Staging: When to stage? What to do if modification occurs afterwards
I stage files whenever I finished some small piece of work (too small for a commit) or before some changes I'm not sure about. Do whatever works for you. Find a tool (e.g., git gui or git cola) showing you both the stages and unstaged changes (git diff and git diff --cached are good, but sometimes I want more).
Jun
27
awarded  Notable Question
Jan
23
awarded  Yearling
Jan
11
answered How do you handle increasingly long compile times when working with templates?
Jan
2
comment What's the reasoning behind the “I” prefix naming convention for interfaces in .NET?
@ScottWhitlock: For me, IAnimal is much more readable than AnimalInterface. Verbose names are preferable except in cases when a simple short convention can be used for something occurring frequently enough. And interfaces are such a case.
Dec
31
comment Having error codes option in C++ library for performance
@Shao Voon Wong: No. Because of "Subsequent calls do nothing if they determine an earlier call resulted in an error" there are no error chains.
Dec
31
accepted Hash function classification interview question
Dec
31
comment Hash function classification interview question
Thanks, that's it - the link seems to be the source of this ***. It still makes no sense as they're mixing many things together: 1. computing the hashCode from a key (e.g., fold and add), 2. improving (=smearing) the hash (e.g., mid-square), 3. mapping the hash to the index (e.g., modulus, "&").
Dec
30
asked Hash function classification interview question
Dec
20
comment How can I tell whether my computer is Harvard or von Neumann architecture?
This surely depends on the definition. If you replace the rather obsolete dichotomy by a trichotomy, most current general purpose computers are Modified Harvard Architecture.
Dec
12
answered How can I tell whether my computer is Harvard or von Neumann architecture?
Dec
3
comment What should I use for a package name if I don't have a domain?
@FrustratedWithFormsDesigner: The life is full of risks and I took this one. For some time I'd do nothing and when needed I'd switch everything to a new domain. That's surely no easy task and would cost me quite some time, but the only alternative is to buy the domain immediately. It's not expensive, but the probability of somebody buying "my" domain is very low.
Dec
3
answered What should I use for a package name if I don't have a domain?
Nov
13
comment Is use of finally clause for doing work after return bad style/dangerous?
@Martijn Verburg: AFAIK, a try-catch-finallt block is essentially free as long as there's no actual exception thrown. Here, javac doesn't try and doesn't need to optimize anything as JIT will take care of it.
Nov
13
comment Do you use i-->0 for backward loops?
@barrem23: Your loop is more explicit, but it's wrong (in the sense it does something else than mine). And that's exactly the problem: I can either make it nice or error-proof, not both.
Nov
13
answered How to structure git repositories for project?
Oct
6
comment When to use identity comparison instead of equals?
@FredOverflow: I was never claiming that it makes sense to always override equals. Using virtual operator== directly corresponds with Java, as it's equals is always virtual; if it makes sense in C++ is a different story.
Oct
5
comment When to use identity comparison instead of equals?
@Mike Baranczak: What Java does to Strings doesn't matter in the context of my question as I meant it (which doesn't match well what I wrote). In C++ virtual operator== gets used in place of java's equals and pointer comparison gets used in place of java's ==, so I see there more or less 1:1 correspondence. But feel free to add the tag if you're confident it belongs there.
Oct
5
comment When to use identity comparison instead of equals?
I see that my question isn't very clear (and I still don't know how to make it better). Your first two cases are just optimizations; I could have left other==this out and I could have used equals for the class comparison (as it's actually the same). The serialization case is an important one. But when would you inside equals compare two fields of an object via == for a reason other than performance?