Reputation
2,914
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
14 30
Newest
 Good Answer
Impact
~142k people reached

Jul
23
comment What is the point of having every service class have an interface?
@wrschneider I disagree. Interfaces are less cluttered, since they only expose methods of the contract. There are no implementation details, no private or protected or (accidentally) public methods. An interface simply defines a cleaner contract.
Jul
23
comment What is the point of having every service class have an interface?
@wrschneider Unfortunately Java classes are pretty bad (as in "unclear" and "cluttered") at defining public contracts, which is why interfaces are preferred.
Jul
23
comment Why is modularity a good idea?
But why is a God Object a bad idea? Simply giving it an anti-pattern name won't convince anyone :)
Jul
22
comment Who should write Unit Tests?
@KonradMorawski "she" is a generic placeholder, it doesn't imply the programmer is actually female. I've seen it used in many programming books as a way to balance the use of the generic "he" (which also doesn't mean the programmer is actually male).
Jul
17
comment What is the meaning of “doesn't compose”?
It's closer in meaning to function composition than to object aggregation.
Jul
16
comment Isn't there a substantial problem with SVN tags?
You can clone a single branch with git. Other than that, I agree with your answer.
Jul
16
comment Is the function using python list comprehension, stateless?
Where do you think you see state?
Jul
6
comment Advantages of these recommendations in ooprogramming using Java
@overexchange Any book on OO design and programming will probably do.
Jul
6
comment Advantages of these recommendations in ooprogramming using Java
This should be closed because it's too broad. If the answer to this question can be a book's chapter about OOP design practices, then it's probably not for this site. This question will either invite subjective opinion, or will result in long-winded answers where you will be inclined to debate with the author.
Jul
1
comment What's the difference between simulation and emulation
I'd say you got the two concepts mixed up. It's simulation that doesn't care about the exact implementation; emulation cares very much about the internals. See: M.A.M.E.
Jun
17
comment Why would a program use a closure?
@supercat I'm probably missing something, but it seems pretty inconvenient and fragile to design shareable objects that way. I'd say it's about as inconvenient as designing shareable closures.
Jun
16
comment Why would a program use a closure?
@supercat Wouldn't the same disadvantage exist with stateful objects?
Jun
12
comment Why pointer symbol and multiplication sign are same in C/C++?
@iammilind A possible compromise would be to close the other question but copy the answer quoting Ken Thompson here (you could post it yourself and accept it)
Jun
12
comment Why pointer symbol and multiplication sign are same in C/C++?
@iammilind Don't take it the wrong way! This isn't something negative about your question. Also, relative age of both questions isn't relevant. I think the accepted answer here is less accurate than one of the answers in the other question (which comes "straight from the horse's mouth").
Jun
10
comment Why would we need to rollback twice before closing in a finally block?
@RobertHarvey I think the OP is asking about the two consecutive rollbacks in the finally block. They seem like a cut-and-pase mistake to me...
Jun
8
comment Why isn't lazy evaluation used everywhere?
Such as? There are reports of significant performance costs when using eager evaluation as well (costs in the form of either unneeded evaluation, as well as program non-termination). There are costs to almost any other (mis)used feature, come to think of it. Modularity itself may come at a cost; the issue is whether it's worth it.
Jun
7
comment Why isn't lazy evaluation used everywhere?
This seems to be an answer out of inexperience with languages with lazy evaluation. For example, what about infinite data structures?
Jun
7
comment Why isn't lazy evaluation used everywhere?
You seem to be arguing out of inexperience. I suggest you read the paper "Why Functional Programming Matters" by Wadler. It devotes a major section explaining the why of lazy evaluation (hint: it has little to do with performance, early optimization or "loading infrequently accessed data", and everything to do with modularity).
Jun
4
comment What can go wrong if the Liskov substitution principle is violated?
@user949300 A matter of good OO design is mostly orthogonal to having "a good compiler or static analyzer" -- good OO design must work in most situations and for most OO languages. For example, if you do OOP with an interpreted language, how is the "compiler" going to help you then? And a "minimal test suite" is demonstrably not enough (give me your suite and I'll write code that breaks it); even a reasonable test suite won't catch many bugs.
Jun
4
comment What can go wrong if the Liskov substitution principle is violated?
@user949300 I cannot give you an example of convoluted production code and don't have the time to distill it to its essentials. But Jimmy Hoffa's last comment hit the mark: it's not enough for software to "work", the costs of maintaining and refactoring it have to be taking into account. Otherwise, what's the point of having generics in Java, if collections of Objects work just as well?