785 reputation
2417
bio website
location
age
visits member for 11 months
seen 3 hours ago

Jan
27
accepted What's the dominant naming convention for variables in PHP: camelcase or underscores?
Jan
27
awarded  Notable Question
Nov
15
awarded  Nice Question
Nov
14
awarded  Popular Question
Nov
14
comment Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
So, if I understand you correctly, dependency injection provides the same code reuse capabilities as inheritance. But what would you use inheritance for, then? Would you provide a use-case? (I really appreciated the one with FileStream)
Nov
13
comment Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
@DannyTuppeny Why not?
Nov
13
comment Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
@Stargazer712 Would you care leaving an answer? Code reuse through inheritance was barely mentioned yet, so I think it would be useful to talk about it at more length.
Nov
12
comment Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
Could you provide a basic example of PetEatingBehavior implementation?
Nov
12
awarded  Custodian
Nov
12
reviewed Edit suggested edit on Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
Nov
12
revised Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
Clarified title, fixed spelling, removed filler words
Nov
12
comment Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
Wait, why re-implement eat() in every animal? We can make mammal implement it, can't we? I understand your point about the requirements, though.
Nov
12
comment Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
alligator's implementation of eat differs, of course, in that it accepts cat and dog as parameters.
Nov
12
asked Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
Oct
5
comment SQL API instead of a REST API?
First: what are your goals? Second: Why doesn't REST API fulfill them?
Oct
3
awarded  Popular Question
Sep
18
answered How to get Object Oriented Programming Concepts?
Aug
23
awarded  Favorite Question
Aug
23
awarded  Great Question
Aug
22
answered How do I find a qualified web designer in my area?