2,062 reputation
1313
bio website
location
age
visits member for 1 year, 11 months
seen Dec 23 at 0:06

I am currently working towards a PhD in microbial genetics. Before that I spent a bit over a decade working as a programmer, with most of that time spent writing computer games. I have degrees in Mathematics (MMath), Life Sciences (BSc) and Molecular Genetics (MSc).


Dec
7
comment Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
@Ingo: what happens when you make a mistake or idly assumed that commutative transformations of equations are equivalent?
Dec
7
comment Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
@Ingo: And is that number more or less than 0?
Dec
7
comment Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
@Ingo: how often do you look at bit patterns? What matters is the meaning of the bit pattern not the which bits are on or off.
Dec
3
comment Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
True, but signed overflow is usually more obvious and predictable.
Dec
3
answered Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
Nov
24
comment Function guaranteed to never return the same value twice
I think this is the best answer. The others are solutions without requirements.
Oct
24
awarded  Nice Answer
Oct
23
answered Code that converts a value into a different representation, then converts it back to where it started is bad, but how?
Sep
24
awarded  Autobiographer
Sep
6
awarded  Great Answer
Aug
6
answered Quantifying the advantages of a modern version control system
Jul
22
comment When I test out the difference in time between shifting and multiplying in C, there is no difference. Why?
@NicholasFolk: I don't know whether they've got round to sorting them but it wasn't very long ago that all the major games platform compilers failed to perform this simple optimisation. I'd be kind of surprised if the 3DS compiler does to this day.
Jun
19
comment Why was C# made with “new” and “virtual+override” keywords unlike Java?
@SztupY: And you can see why they thought it would be an improvement but the experience of Java is part of the reason why C#'s designers decided to do it. Language design is always a bit of learning process. I don't think anyone would design C++ quite how it's designed if they were starting from scratch today, for example.
Jun
18
comment Are error variables an anti-pattern or good design?
@jhr: Quite so, which is one reason why exceptions are, as I said, generally preferable. However there are use cases where they don't behave in the desired fashion.
Jun
18
comment Why was C# made with “new” and “virtual+override” keywords unlike Java?
It's worth noting that the designers of C# has Java to look at, whereas the designers of Java didn't have C# to look at so, to some extent, the differences between Java and C# are down to learning from problems in Java and trying to solve them.
Jun
18
comment Are error variables an anti-pattern or good design?
No, I mean reporting it to the caller. It's the caller's responsibility to decide whether the user needs to know about the error or not, just as with an exception.
Jun
18
answered Are error variables an anti-pattern or good design?
Jun
12
answered Is it customary for software companies to forbid code authors from taking credit for their work? do code authors have a say?
May
30
revised Origins of code indentation
Updated answer with information from a comment above.
May
30
awarded  Nice Answer