Reputation
3,577
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
3 12 33
Newest
 Good Answer
Impact
~233k people reached

Apr
29
comment Should I validate a method call's return value even if I know that the method can't return bad input?
@MSalters Don't validate the value if it is there ;)
Apr
29
comment Dealing with states in a immutable approach
@Snowman It's oddly phrased, but I'm pretty sure what he means is that since playerOne is immutable, it won't have the current state - so how can state be updated?
Apr
27
comment What is the maximum number of steps to find a bug using bisecting?
@DocBrown This is awkward to do in comments, but if the commit tree is A -> B -> D and A -> C -> D (a diamond), and the bug is in B and D, then your arbitrary linearization cannot choose A, B, C, D and still work - even though B and C are still independent
Apr
27
comment What is the maximum number of steps to find a bug using bisecting?
@DocBrown If you choose the wrong order, the bug can disappear and then reappear in the linear ordering. Bisect at its most basic works as a binary search; those intermediate "fixed" commits would make it go in the wrong direction if it landed on one of them, so I don't think the simplification works here
Apr
25
comment Explanation of two of Lehman's Laws of Software Evolution
@JayElston Agile projects take input from the stakeholders after the initial build in order to drive the direction and possibly change the goals. They don't necessarily have a single defined goal or timeline for the entire duration of the project/product. It seems to me like it fits
Apr
25
comment Structuring Procedural vs OO code
@DocBrown Declarative is more "opposite" than imperative, I'd say. But even more accurate would be that none of these are opposites of each other, they're just plain different methods of programming
Apr
3
comment Is it the standard accepted practice to install software using VBScript?
*entering a token, not license key
Apr
3
comment Is it the standard accepted practice to install software using VBScript?
"but actually, where is the difference for the user if he has to copy a VBS file to a second machine, or if he has to copy a license file?" - Entering a license key can have typos. But they do have to use email/flash drive/etc to get the file over there, so it is a trade-off
Mar
23
comment Method extraction vs underlying assumptions
You can also nest functions in C using gcc (but I don't know if that's a language thing or a gcc extension)
Mar
21
comment How come the computer doesn't have to read the entire table when the column is indexed?
Sounds like you need a better intuitive example of what an index is
Mar
12
reviewed Approve Why do schools teach arrays over List?
Mar
6
comment Name for a Function which Returns its Arguments?
@Telastyn And in Java 8 it's still called "identity". The name is easing out of its math/functional background and becoming the standard.
Mar
3
comment What programming technique is this?
I think you're running into memoization
Feb
20
comment How to sell DRY architecture
@gnat Doesn't seem like a duplicate - here they agree that quality is good, but not how to get quality code.
Feb
5
comment Is there a name for the problem of representing state twice and then getting out of sync?
With regards to databases, the equivalent of DRY is third normal form. Not sure if it can be applied to data in the code (free variables, object attributes, etc)
Feb
1
comment Literal strings vs. object properties in JavaScript
And if the latter's verboseness really is an issue for the user (as it would for me), the examples are really really easy to create a short wrapper that takes an array of objects and calls .addColumn() for each
Jan
30
comment Are there any benefits of using this extra variable in the for loop annotation?
According to your jsperf, the one without n is faster on my computer. So yeah, don't do this - assuming it even did anything (there may be more going on similar to what CodesInChaos mentions), it's a micro-optimization that's so minor, any other fluctuation in CPU usage has more of an effect.
Jan
15
comment Is there a pattern for a more “natural” way of adding items to collections?
@KilianFoth If you're restricting yourself to just one function/method, sure. But if you want to base it off of English or similar languages, a wrapper for the singular item seems closest: put(item).into(items)
Jan
9
comment One-line functions that are called only once
@JamesAnderson Current time shouldn't be treated as a global. Imagine unit testing a leap-year bug where the "current time" has to be set to something specific.
Jan
5
comment What are 4th & 5th programming language generations? Are there more of them?
"There is no universally accepted definition of what exactly defines the “nth generation” for n > 2." - Okay, so, what are 1 and 2?