440 reputation
210
bio website
location
age
visits member for 3 years, 1 month
seen Mar 7 at 4:18

Feb
11
comment Are side-effects in Array's “every”, or “some” bad?
@Isaac Alright, sorry for the delay, I understand your situation more clearly now. I'll edit my answer to add some stuff.
Aug
3
comment Generating different combinations from a list of muscles
I'm truly sorry, but I don't understand at all what you're saying :-/ I've seen my share of buzz-word mash-ups as a software engineering student, but I can't make sense of this for the life of me.
Aug
3
comment Generating different combinations from a list of muscles
I don't mean to be rude, but you might want to get a design pattern books off your shelf once again. The Observer pattern has just about nothing to do with this situation. Also, maintaining those HashSets seem like even more trouble than a gigantic switch statement.
Jul
17
comment Having 2 Initialize Paragraphs in 1 COBOL program
Designing a COBOL program, as in writing new COBOL, not merely maintaining it? Poor you... :(
Jul
12
comment Is it relevant to warn about truncating real constants to 32 bits?
@quickly_now The phrase "Note that float foo = [const] is not the same thing as float foo = [double variable], where requiring the cast seems normal to me." seems to be generalizable to what you're discussing here. The question is about constants/numeric literals, not variable expressions on the right-hand side.
Jun
28
comment What is the standard for naming variables and why?
Especially with good autocompletion. Self-documenting code ftw!
Jun
28
comment What is the standard for naming variables and why?
@user827992, I'm sorry, but Tire inherits from Car? In what world do you live where a "Tire is a kind of Car"? Because that's what inheritance implies. Also, this is indeed not Hungarian Notation at all.
Jun
19
comment How old is “too old”?
We hate fun here apparently. Shame on you for joking!
Feb
16
comment Using the decorator pattern in a deep class hierarchy
Looks like I didn't remember the pattern correctly. You're right: they must implement the same interface, not inherit from one another!
Jan
11
comment Algorithm to determine fastest route?
An admissible heuristic would be somewhat challenging to find here considering we seem to take into account many factors (such as traffic jams).
Nov
8
comment What language should an 11-year old start with to learn game programming?
+1, conditional on your choice being C# and not god-awful-VB.
Apr
19
comment Are outdated comments an urban myth?
@Karl Bielefeldt That makes a lot of sense as well.
Apr
19
comment Are outdated comments an urban myth?
The problem in this case is probably the misuse of TODOs. I believe TODOs should be only used when the code is actually functional but improvements could be made later, so TODO: implement kind of comments should not exist and the fact that no one actually came back doesn't matter that much. Sadly, not a lot of people adhere to this rule and I totally agree I'd like to see a comment like you posted in some production code at some point. It'd make my day.
Apr
15
comment Job Interview Challenges
Considering functional languages avoid side effects, I think this solution wouldn't work in any of them.
Apr
14
comment When is it appropriate to use a bitwise operator in a conditional expression?
After some more research, I found out that the only difference between | and || and & and && for boolean operands in Java is the short circuit behavior so the scenario you're describing isn't really possible.
Apr
14
comment When is it appropriate to use a bitwise operator in a conditional expression?
I don't think this can happen in Java as I believe calling the | or & operators on values that can't be bitwise and'd or or'd just performs a logical | or &. I can't recall if this is the case in Java, but know for sure it is in C# MSDN: "Binary | operators are predefined for the integral types and bool. For integral types, | computes the bitwise OR of its operands. For bool operands, | computes the logical OR of its operands"