2,571 reputation
1230
bio website sleepeasysoftware.com
location Los Angeles, CA 90066
age
visits member for 2 years, 10 months
seen Apr 19 at 8:24

Jun
11
comment What kind of code would Kent Beck avoid unit testing?
@GlenH7 after skimming those answers I'm not satisfied (but of course, that's just my opinion). For example, look at UncleBob's answer. He doesn't even acknowledge that such a situation exists. I really think there's value in understanding Kent Beck's position, not just a general, "What's your opinion?" After all, he's the father of TDD.
Jun
11
asked What kind of code would Kent Beck avoid unit testing?
Apr
29
accepted What is the Loopback Pattern?
Apr
29
comment What is the Loopback Pattern?
How is this different from a mock?
Apr
29
asked What is the Loopback Pattern?
Mar
27
comment Should we test all our methods?
I'm still making up my mind on this question, but here's a talk of someone who has decided the answer is "no". Ian Cooper: TDD, where did it all go wrong To summarize this great talk, you should test outside-in and test new behaviors not new methods.
Mar
27
revised Should I refactor my unit tests when I extract a class out of the System Under Test?
added 1 characters in body
Mar
26
revised Should I refactor my unit tests when I extract a class out of the System Under Test?
deleted 3 characters in body
Mar
26
accepted Should I refactor my unit tests when I extract a class out of the System Under Test?
Mar
26
answered Should I refactor my unit tests when I extract a class out of the System Under Test?
Mar
4
comment I'm struggling with abstracting my animation code in my game using a functional style. How can I do this?
It also seems to be against the design of the Entity Component System design pattern. That said... If you think I should still just put the function in my state, I'll trust you on this.
Mar
4
comment I'm struggling with abstracting my animation code in my game using a functional style. How can I do this?
I'm using javascript + "discipline" to code it in a functional style. I've also been trying to keep my data and behavior completely separate from each other, and I feel like the player state having-a function would be mixing the two together. My rule is somewhat arbitrary, but a nice benefit is I can easily serialize the state whenever I want to save it or have another programming language send it over the wire. That said, your answer is an easy way to accomplish the result I'm looking for. But, is there a way to do it while keeping behavior out of my state?
Mar
4
revised I'm struggling with abstracting my animation code in my game using a functional style. How can I do this?
edited tags
Mar
3
comment I'm struggling with abstracting my animation code in my game using a functional style. How can I do this?
What's a functor? Are you using the "Function Object" meaning of the word?
Mar
3
asked I'm struggling with abstracting my animation code in my game using a functional style. How can I do this?
Jan
30
comment So Singletons are bad, then what?
@Lucas ah, so is he saying the impl of that Cache class uses those interfaces on the side but implements the interfaces below?
Jan
30
comment So Singletons are bad, then what?
@Lucas that didn't clarify. Maybe because of your typos.
Jan
30
comment So Singletons are bad, then what?
I'm not sure if I understand this last picture or not. Why are there interfaces on the side? How are these interfaces different from the ones below the cache?
Jan
28
comment Is it a bad idea to return different data types from a single function in a dynamically typed language?
By coincidence, I'm dealing with this with a Java Rest API I'm building. I made it possible for one resource to return either XML or JSON. The lowest common denominator type in that case is a String. Now people are asking for documentation on the return type. The java tools can generate it automatically if I return a class, but because I chose String I can't generate the documentation automatically. In hindsight/moral of the story, I wish I returned one type per method.
Jan
28
comment Is it a bad idea to return different data types from a single function in a dynamically typed language?
It seems that it makes sense to return multiple types in one function in all the same places it makes sense to return a generic type in Java. Unfortunately, I don't know how to articulate it better than this.