Reputation
1,391
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
8 16
Newest
 Nice Answer
Impact
~87k people reached

Nov
24
awarded  Nice Answer
Sep
24
comment Wrapping third party library is best practice
I don't know, the spirit of the advice is more "proactively wrap all your 3rd party lib". I agree it is useful to create an abstraction for one specific use case you want to test, but very rarely will it be a whole library.
Sep
24
comment Wrapping third party library is best practice
The 3rd party libs I use fall either in the "frameworks" category (in my case, Qt), which means that my own code grows inside the framework and it wouldn't make sense to mock it. Or it falls in the "utility" category (zlib, xerces, sha1), and are more an implementation detail for the code I am unit testing. Does this answer your question?
Sep
24
comment Wrapping third party library is best practice
It is very unlikely that the 3rd party libs are so much interchangeable. And even if they were, I'd say that it is a lot easier to do a replace and search using your favourite editor, than to create an abstraction in the first place.
Sep
24
revised Wrapping third party library is best practice
added example
Sep
24
answered Wrapping third party library is best practice
Sep
24
awarded  Yearling
Dec
3
awarded  Nice Answer
Sep
30
awarded  Explainer
Sep
24
awarded  Autobiographer
Sep
24
awarded  Yearling
Jun
9
revised Comparison of languages by usage type?
Fixed broken URL
May
13
awarded  Nice Answer
May
12
answered Should I use initializer blocks in Java?
May
12
revised Should I use initializer blocks in Java?
closing braces were commented out
May
12
suggested approved edit on Should I use initializer blocks in Java?
Apr
25
comment Inheritance/OO design question
My opinion is that the Liskov substitution principle encompasses more than you think it does. I really think the very definition of the Subtype Relation (the constraint rule) is an integral part of LSP. The rules about the covariance of return type and contravariance of argument types are stated in Liskov's original paper, "A behavioral notion of subtyping", see fig. 4. I give you the benefit of the doubt, though, by editing the first sentence of my answer to not refer to LSP directly.
Apr
25
revised Inheritance/OO design question
added 125 characters in body
Apr
25
comment Inheritance/OO design question
@Euphoric: of course it does. Quoting from wikipedia: "Liskov's principle imposes some standard requirements on signatures 1. Contravariance of method arguments in the subtype 2. Covariance of return types in the subtype 3. No new exceptions should be thrown by methods of the subtype, except where those exceptions are themselves subtypes of exceptions thrown by the methods of the supertype."
Apr
25
answered Inheritance/OO design question