Reputation
2,607
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
11 21
Impact
~216k people reached

Apr
4
comment Can the circle-ellipse problem be solved by reversing the relationship?
This answer is by far the best thing I've seen about the whole issue, and how the potential for design mistakes can arise in more general cases. Thanks
Apr
4
accepted Can the circle-ellipse problem be solved by reversing the relationship?
Apr
4
comment Can the circle-ellipse problem be solved by reversing the relationship?
@PhilipKendall I ask, because I am obviously missing it
Apr
4
comment Can the circle-ellipse problem be solved by reversing the relationship?
okay - so, if there were some common interface between Ellipse and Circle (such as getArea) that would be abstracted to a type Shape - could Ellipse and Circle separately subtype from Shape and satisfy LSP?
Apr
4
comment Can the circle-ellipse problem be solved by reversing the relationship?
Where in the article?
Apr
4
comment Can the circle-ellipse problem be solved by reversing the relationship?
yes - i even link it in my question...
Apr
4
asked Can the circle-ellipse problem be solved by reversing the relationship?
Apr
4
answered SOLID principles and generating many objects from a file
Mar
31
comment For Object Oriented Programming purists, are @annotations heresy?
@JimmyJames - in my view, all code smells - but you only have to fix it when it is ripe ;) To put it another way, coupling with new (or annotations) could be an indicator that there is a design problem, but not always.
Mar
28
comment Where is password hashing/salt logic applied?
@Brian - as long as the client hashed password is sent over a secure connection - otherwise some could intercept it, and then just post it whenever they want.
Mar
28
comment Where is password hashing/salt logic applied?
The hash should not be generated at the client at all - sounds like a bad tutorial. The password should be sent via HTTPS and then salted/hashed and compared on the server
Mar
28
comment Is 'exercise bugs' an expression?
Exercise or exorcise?
Mar
21
answered Why do you have to specify the data type when declaring variables?
Mar
21
comment Why do you have to specify the data type when declaring variables?
That's because English has implicit typing - so yourPhoneNumber is implicitly typed as a PhoneNumber - humans also have dynamic memory allocation... ;)
Mar
17
awarded  Notable Question
Mar
4
comment What defines the dimensionality of an array?
I did +1, but then retracted, as I think this falls foul of the notation used... [0, 0] does look like a one-dimensional array with 2 items, but mathematically it could be the indices of a two-dimensional array
Mar
4
revised Lower class count vs explicitness
Tried to reduce some confusion...
Mar
3
comment Lower class count vs explicitness
@BenAaronson - no, they don't directly parse the XML - there is an XML parser class that they have access to. They just tell the parser how to get the query the document and, in some cases, further manipulate as necessary.
Mar
3
comment Lower class count vs explicitness
In any event - I've decided to go the explicit route, so that the next guy knows that when the <subgroup> XML structure changes, he can easily refer to the InteractionSubgroup class to change the code behaviour (there are actually 6 interaction types within the XML, all but the Group and Subgroup have distinct behaviours - and then there are other meaningful nodes like Chapter, etc, elsewhere in the document).
Mar
3
comment Lower class count vs explicitness
@radarbob "interaction" here is a word in the domain - as in "drug interaction" rather than describing behaviour between the OO classes.