Reputation
3,388
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
2 11 31
Newest
 Yearling
Impact
~180k people reached

Jun
17
comment Best practice boolean assignment
My first assumption with code like Variant 1 is that the two branches at one point in the past were more complicated, and someone wasn't paying attention when refactoring. If however that's how it was when first written, then I agree with "not understanding booleans"
Jun
17
comment How can I write unit tests that simplify feature implementation?
@anaximander strom mentioned that everyone involved is rather inexperienced, which is why it's a good thing to keep that possibility in mind as well
Jun
17
comment How can I write unit tests that simplify feature implementation?
@anaximander There's middle ground between your thoughts, which is what usually happens to us: Something in the design changed, and the tests are now out-of-date. In that case, changing the test is the right thing to do short-term. I think this question is about trying to avoiding that situation, a long-term solution for refactoring the code so the tests don't become out-of-date as easily.
Jun
16
awarded  Yearling
Jun
5
comment Why do we use the word “sprint”?
@enderland Percentage-wise, your run last night is right about the same balance as a 1-week agile sprint
Jun
3
awarded  Popular Question
May
8
comment Fast comparison of recursive directory tree against a database?
If the file changes, then other things change as well - like the last modified date. But this almost sounds like a premature optimization to me, have you measured how long it takes?
Apr
30
comment Is it okay to have objects that cast themselves, even if it pollutes the API of their subclasses?
@codebreaker Related to Crisfole's last comment, there's another way of looking at it that might help. For example, with the move vs fly/run/etc, that can be explained in one sentence as: You should be telling the object what to do, not how to do it. In terms of accessors, as you mention is more like the real case in a comment here, you should ask the object questions, not inspect its state.
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.