BlueRaja - Danny Pflughoeft
Reputation
3,310
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
14 25
Newest
 Quorum
Impact
~203k people reached

Jun
17
comment Introducing a version control branching policy to a small team
@17of26: Actually, when using Git + Github-for-Enterprises (which has become an extremely common combination in large companies lately), branches are the standard mechanism for doing code reviews. Github has tons of features to make doing code reviews and their associated pull requests super-convenient.
Jun
16
comment Introducing a version control branching policy to a small team
"Keep in mind that the only real benefit to a branch is code isolation. That means you need a concrete reason to want to have the code isolated." - How about code review? I think that's a good reason, even with only two devs.
Jun
4
comment Clean Code comments vs class documentation
Even vacuous comments like Returns the id are helpful, because they still convey that "The author of this method didn't feel there were any pitfalls in using it that were worth mentioning", which is good to know. A lack of documentation comment might convey that, but it could also have been an oversight.
May
29
comment Is the use of one-letter variables encouraged?
@Lilienthal: Code should be efficient-to-read, not efficient-to-write. Usually they are the same thing, but not always, as in this case.
May
29
comment Is the use of one-letter variables encouraged?
-1 Using 1-letter variables names is lazy programming. Sometimes it's okay to be lazy, but if you're getting up to k and l in loop indices, that's too far (you shouldn't have that many nested loops to begin with; extract them to functions). Personally, I never use more than one 1-letter variable per function, but I shoot for 0.
Apr
17
comment NoSQL within SQL Server
@MasonWheeler: He makes it sound like they are orders of magnitude slower, and wrote an entire article on how searching within strings work, completely ignoring the fact that any data lookup will go through an index file first (this is true in both relational and XML databases). So basically, everything in that article is irrelevant.
Mar
30
comment NoSQL within SQL Server
Joel Spolsky is known for having strong, controversial opinions. See FogBugz is written in a proprietary language; Dependency injection is too complicated (btw, this was the most controversial answer on Stackoverflow before being closed); XML databases are slow; etc.
Feb
26
comment Why are structs and classes separate concepts in C#?
See also this answer on why Java doesn't have custom value-objects.
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.
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.
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 -_-
Nov
14
comment Is there any “real” reason multiple inheritance is hated?
"a well done system of trait style composition would be really powerful/useful..." - These are known as mixins, and they are powerful/useful. Mixins can be implemented using MI, but Multiple Inheritance is not required for mixins. Some languages support mixins inherently, without MI.
Oct
30
comment Why can't Java/C# implement RAII?
duplicate of Did the developers of Java consciously abandon RAII?, though the accepted answer is completely incorrect. The short answer is that Java uses reference (heap) semantics rather than value (stack) semantics, so deterministic finalization is not very useful/possible. C# does have value-semantics (struct), but they are typically avoided except in very special cases. See also.
Oct
29
comment Is linq more efficient than it appears on the surface?
See also Why are Where and Select outperforming just Select?
Oct
25
comment What are the safety benefits of a type system?
@BenjaminGruenbaum: ...What!? It is obviously not undecidable in statically-typed languages, or else writing a compiler for those languages would be impossible.