3,253 reputation
1424
bio website blueraja.com/blog
location
age
visits member for 4 years, 2 months
seen 13 hours ago

Mar
20
awarded  Nice Answer
Mar
19
revised When is it a good idea to force garbage collection?
hehe
Mar
18
answered When is it a good idea to force garbage collection?
Mar
16
revised Do enums create brittle interfaces?
added 16 characters in body
Feb
27
awarded  Nice Answer
Feb
26
comment Why structs and classes are separate concepts in C#?
See also this answer on why Java doesn't have custom value-objects.
Jan
20
revised Did the developers of Java consciously abandon RAII?
added 157 characters in body
Jan
20
awarded  Yearling
Dec
18
comment Are all magic numbers created the same?
if 3.50 is used in only one place, I would define it as a constant on the line above.
Jul
29
comment Should the commit history be used to convey critical information to developers?
-1 emails don't work well as documentation
Jul
9
comment What does it mean for a sorting algorithm to be “stable”?
"Stable" can also apply to data-structures, eg. a "stable heap" is a heap which dequeues items that have the same priority in the same order they were queued. This is very important for efficient path-finding algorithms.
Apr
30
comment What's wrong with circular references?
I wasn't claiming it's a good practice, I was just pointing out it's not impossible as claimed in the answer.
Apr
29
comment What's wrong with circular references?
Dependency injection is not impossible with circular references, even with automatic DI. One will just have to be injected with a property rather than as a constructor parameter.
Jan
20
awarded  Yearling
Dec
30
answered Implementation of algorithm to generate chess positions
Dec
30
comment Implementation of algorithm to generate chess positions
Each bishop attacks up to 14 different squares, so this is actually about 444k positions to search (15862*28). We can do significantly better than that - see my answer.
Dec
22
awarded  Good Answer
Dec
22
awarded  Announcer
Nov
21
comment Why do most programming languages only support returning a single value from a function?
@David I'm not sure what you mean by the "current convention," all calling conventions use the stack. thiscall (the calling convention used by C++) uses one register for the this pointer, and the rarely-used fastcall stores the first two arguments in registers. Everything is is on the stack. See also
Nov
21
comment Why do most programming languages only support returning a single value from a function?
@David no, cdecl allows for (theoretically) unlimited number of parameters (that is why varargs functions are possible). Though some C-compilers may limit you to several dozen or hundred arguments per function, which I think is still more than reasonable -_-