Reputation
561
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 8
Newest
 Good Answer
Impact
~20k people reached

  • 0 posts edited
  • 0 helpful flags
  • 24 votes cast
Jun
30
comment How do I design a subclass whose method contradicts its superclass?
@Mehrdad - In the specific case we are looking at, the question mark isn't part of the method signature. It's not documentation either. It's not a part of a separate contract formalism. It's just a naming convention. However, that's as much of a contract as you can find in the original post. I don't want to get to the mud of discussing the difference between structured code documentation and ad hoc code comments when there's not a single comment in the original post.
Jun
30
comment How do I design a subclass whose method contradicts its superclass?
@KevinKrumwiede - This answer is explaining this in more detail, and more importantly, showing why it's often clearer to keep classes intended for derivation separate from classes intended for instantiation. However, contracts are more than just signatures and documentation and it is sometimes difficult to establish what they are in real, underdocumented software coded by someone who didn't believe in its reuse.
Jun
29
awarded  Good Answer
Jun
29
awarded  Mortarboard
Jun
29
awarded  Yearling
Jun
29
awarded  Nice Answer
Jun
29
answered How do I design a subclass whose method contradicts its superclass?
Sep
24
awarded  Autobiographer
Jun
6
awarded  Yearling
Feb
25
awarded  Caucus
Feb
25
awarded  Constituent
Sep
2
awarded  Citizen Patrol
Sep
2
revised Grading an algorithm: Readability vs. Compactness
updated because question updated
Sep
2
answered Grading an algorithm: Readability vs. Compactness
Aug
26
revised Software developer interview questions: is speed everything?
stylistic fixes
Aug
26
awarded  Editor
Aug
26
revised Software developer interview questions: is speed everything?
mainly corrected typos and deleted a duplicate paragraph
Aug
26
answered Software developer interview questions: is speed everything?
Aug
25
answered Inventory management system design problem
Aug
10
comment Why is the use of abstractions (such as LINQ) so taboo?
@MatthewPatrickCashatt - Performance drop is simply a kind of an abstraction leak. It's an extra prolific case because standards generally leave detailed performance levels undefined and it is not always clear what is the "correct" way of coding or compiling a construct performance wise. Example? Compare a performance of a prepend-loop and append-loop with a StringBuilder in .NET 2. No difference. Compare the same code in .NET 4.0. Drammatic difference that you could not reasonably have expected as it is an implementation detail of the abstraction.