9,738 reputation
33659
bio website
location Waco, TX
age 28
visits member for 4 years
seen 3 hours ago
My native language is C++, but I have left my first love and now use python whenever I have the slightest excuse. Actually, I use python even if I don't have an excuse.

7h
comment Unit testing classes that have online functionality
Does your method just call the cloud api, or does it do additional work as well?
11h
answered Unit test database insert/remove and atomicity
21h
awarded  Taxonomist
2d
comment Function only returns unchanged parameter, useless?
I'm guessing its probably for w[ide](unicode) tr[anslation]. The idea is that the function returns the translated version of whatever you pass into it. For english that's just returning the original value itself. It was probably put in so that it'd be easier to add translations later.
2d
comment Is a long list of parameter checks an anti-pattern?
@DocBrown, I totally misread the Type in the signature. Thanks for pointing that out. As for null checks, I see pros and cons. Yes, they can get you better error messages. But I also like the flexibility of passing null for parameters that I know won't actually be used in a particular test. On balance, I think they aren't worth the extra code, but I can certainly see that others won't see it the same way.
2d
revised Is a long list of parameter checks an anti-pattern?
added 175 characters in body
Sep
13
comment How to signal that a method chain should not continue?
You need to seriously elaborate on your middle paragraph so we can understand what you are asking.
Sep
13
answered Is a long list of parameter checks an anti-pattern?
Sep
12
awarded  Nice Question
Sep
11
awarded  Yearling
Sep
8
comment When are Getters and Setters Justified
Just what do you think the interface to payroll is if it isn't set/get salary?
Sep
8
comment Liskov Substitution and SRP Principle violation - how best to structure this scenario?
What are you building? What software system is this Employee class for?
Sep
8
answered Efficient “Object with weights” structure
Sep
7
answered Dealing with code that has been written but isn't yet needed
Sep
7
comment Dealing with code that has been written but isn't yet needed
Which source control system are you using?
Sep
7
comment Is it fair to patent workarounds?
Are patents fair in the first place?
Sep
6
comment Do else blocks increase code complexity?
I tend to disagree that you should be using guard clauses for those situations. To demonstrate that point, would you point me to some XML data and a processing example that you think would require many guard clauses or excessive rightward code drift? I'll write up an implementation and see whether I'm inclined to agree with you.
Sep
6
comment Do else blocks increase code complexity?
Its subjective, but I wouldn't consider that case abnormal enough to qualify for a guard clause. I would write it as an else/if. Actually, I'd probably avoid the imprecise dispatch in the first place if at all possible.
Sep
6
comment Do else blocks increase code complexity?
It might be better to pick a more concrete example for the second case. My immediate reaction to it is, "it can't be that abnormal if you went ahead and processed it anyways."
Sep
6
comment Do else blocks increase code complexity?
@DocBrown, The most common case I see that fits that pattern is: if(someCondition()) { return doThis(); } else { return doThat(); } But my coding style discourages guard clauses in favor of exceptions, c2.com/cgi/wiki?GatedCommunityPattern, and c2.com/cgi/wiki?BouncerPattern. A different style may see a lot more guard clauses.