1,214 reputation
318
bio website
location
age
visits member for 2 years, 7 months
seen Dec 11 at 1:14

Dec
3
comment When writing object-oriented code, should I always be following a design pattern?
@gnat if you think an answer must be at least 5000 characters before it is considered detailed enough, I suggest you post that on meta and link me to that.
Dec
3
comment When writing object-oriented code, should I always be following a design pattern?
@gnat it's a heck of a lot more concise, though.
Dec
3
comment When writing object-oriented code, should I always be following a design pattern?
"I need to model a door and lock, what should the interface be? Will performance be a part of the contract? Should I use a service or library? How will resources be passed?" should all be asked, and you should have answers that are basically regarded as design patterns.
Dec
3
comment When writing object-oriented code, should I always be following a design pattern?
If you're lucky enough to see your problem afterwards. Null checks, sure. Security vulnerabilities? Other insidious ways the program will break under maintenance? Problems only the next engineer will uncover? Much more yucky.
Dec
1
comment How should I break this user story into tasks
excellent answer.
Dec
1
comment Should I accept empty collections in my methods that iterate over them?
But it's your first sentence and the only highlighted one... no one understands what you are saying yet. (I'm not trying to be too aggressive here, just one of the things we're here to do is learn to write and communicate and I do thing the loss of precision in a key point is harmful.)
Nov
30
comment My boss decided to add a “person to blame” field to every bug report. How can I convince him that it's a bad idea?
"We anticipated the increase in production bugs when we moved away from having a dedicated QA team. But, as we get closer to having a true continuous deployment system in place, we need to start treating production bugs as the exception rather than the rule." -- from Y Combinator article. I wouldn't even know where to explain to Boss how wrong everything about that statement is. But I don't have to; I'd much rather convince the developers better jobs lie everywhere. underdog.io, offerletter.io, step.com, nytm.org/marketplace/jobs, etc....
Nov
30
comment Should I accept empty collections in my methods that iterate over them?
This is either wrong or tautological. writePaycheckToEmployee should not accept a negative number as input... but if "feedback" means "does anything that might happen next," then yes every function will do something it does next.
Nov
30
comment Should I accept empty collections in my methods that iterate over them?
Max of nothing is often negative infinity.
Nov
30
comment Should I accept empty collections in my methods that iterate over them?
+1 for extremely effective example (lacking in the other good answers).
Nov
30
comment Should I accept empty collections in my methods that iterate over them?
Your bold statement is extremely bad advice in full generality. I think it's true here but you need to explain what's special about this circumstance. (It's bad advice in general because it promotes silent failures.)
Nov
30
comment Should I accept empty collections in my methods that iterate over them?
-1 for emphasizing the "it depends" more than the "almost certainly yes". No joke - communicating the wrong thing does damage here.
Nov
30
comment Should I accept empty collections in my methods that iterate over them?
None of your examples have anything to do with an empty input. They're just special cases of situations where the answer might be "nothing." Which in turn should answer the OP's question about how to "handle" the empty collection.
Nov
30
comment Should I accept empty collections in my methods that iterate over them?
+1 for last sentence.
Nov
10
comment Can every language be compiled? And can every language be interpreted?
@gnat that's called a duplicate. vote to close as duplicate.
Nov
10
comment Can compilers and interpreters have bugs, and what can we (as users) do to deal with them?
C is both mature and actively developed. So is C++. So is Java. etc..
Nov
10
answered Can every language be compiled? And can every language be interpreted?
Nov
10
comment Can every language be compiled? And can every language be interpreted?
@gnat OP is trying to know whether interpreted languages can be compiled, and compiled languages can be interpreted. IOW, whether the dichotomy between the two (which is widely taught if not hokey) can be crossed. Very clear, I'm not sure why you think otherwise.
Oct
23
comment Code that converts a value into a different representation, then converts it back to where it started is bad, but how?
@gnat I don't get how that makes this a bad question. If you want I can edit it to say "is code that converts and converts back a value bad?" and it won't fit that template anymore.
Oct
18
comment A good generic type system
@Vercas how do they avoid the OP's problems?