1,879 reputation
822
bio website
location
age
visits member for 1 year, 10 months
seen Apr 15 at 23:37

Apr
4
comment What are the practical benefits of LISP like syntax which Clojure uses over Java like syntax of Scala?
You can partition the side-effect code in Java, but it's not very idiomatic.
Mar
29
asked How do the Application and Database Interface Layers interact at their boundary?
Mar
26
comment The problems with Avoiding Smurf Naming classes with namespaces
It's a code smell to name a class XService, XManager, etc. These don't mean anything. It's like a Util. If you're skimming the file names anything could be in there or missing from there. There's no way to know unless you look inside. I'd rename it from SmurfService to something else completely.
Mar
25
comment Keep a programming language backwards compatible vs. fixing its flaws
I don't know if I should post this as a separate question or as a comment. But why couldn't they make a programming language that elevates code migration to a first class concept? In java, there's a @Deprecated annotation that just gives you a warning. Maybe another language could actually provide a macro that replaces the old code with the correct new code. If you're using the latest version it's an error to call the deprecated code, but old code gets converted to use non-deprecated new code. Just spitballin'
Mar
21
answered Is there a reason that tests aren't written inline with the code that they test?
Mar
21
comment In TDD, if I write a test case that passes without modifying production code, what does that mean?
@AnthonyPegram Yes, but that's hindsight and because example is so simple. What if you didn't know?
Mar
21
comment In TDD, if I write a test case that passes without modifying production code, what does that mean?
@AnthonyPegram: Yes that makes sense. Of course pointing it out ruins the answer re: my OP. You wouldn't have written a test case that passed immediately. Would it be "wrong" to write TestAddMethod3 that Assert.IsTrue(Add(6,6) == 12);?
Mar
20
asked In TDD, if I write a test case that passes without modifying production code, what does that mean?
Mar
9
comment Can I start with a passing unit test?
TDD is so unintuitive I want to make sure I'm strictly following the practice before I decide if the practice is worth following. If I took the attitude of, "This seems silly and I probably don't need to worry about it" I wouldn't have attempted TDD in the first place. Even if I never strictly practice TDD, I think there's a lot of value in knowing how to strictly practice it.
Mar
9
accepted Can I start with a passing unit test?
Mar
9
comment Can I start with a passing unit test?
@JeroenVannevel OK, but after the first test makes me change that exception to a return null;, if I write 2-3 more tests after that that also assert null, am I doing something wrong?
Mar
9
comment Can I start with a passing unit test?
It's not about want, I just happened to write a few tests that say, "given...when...then return null" and my production code implementation returns null. My ide creates blank impls with return null; as a stub for me.
Mar
9
comment Can I start with a passing unit test?
Won't I be showing that when I write the first test that fails without changing the impl?
Mar
9
asked Can I start with a passing unit test?
Mar
5
answered Should I test inherited methods?
Feb
26
answered Is there an idiom for a loop that executes some block of instructions between iterations? (In Ruby in particular)
Feb
26
comment Is there an idiom for a loop that executes some block of instructions between iterations? (In Ruby in particular)
In haskell, I believe this is called a fold
Feb
15
comment How to write useful Java programs without using mutable variables
Sorry to nitpick, but I don't understand why you chose this haskell code. I've read LYAH and your example is difficult for me to grok. I also don't see the relation to the original question. Why didn't you just use take 25 (map (^2) [1..]) as an example?
Feb
15
comment How does if/else work internally in all programming languages?
Are you asking for a list saying, "in java it works like this, but in haskell it works like this"? Or are you assuming that each language works the same way? They don't.
Feb
15
comment Should I refactor my unit tests when I extract a class out of the System Under Test?
Do you think it's a possibility that in this case I shouldn't have refactored my tests or do you think that's unlikely?