3,220 reputation
820
bio website
location
age
visits member for 3 years, 6 months
seen 6 mins ago

Feb
8
revised Why is instance creation the way it is?
added 121 characters in body
Feb
8
revised Why is instance creation the way it is?
added 91 characters in body
Feb
8
revised Why is instance creation the way it is?
added 91 characters in body
Feb
7
answered Why is instance creation the way it is?
Jan
27
answered Proper way to refactor multiple if based conditions
Jan
24
revised Why is there no generic implementation of OrderedDictionary in .net?
deleted 1 character in body
Jan
15
awarded  Nice Answer
Jan
11
answered How do I avoid cascading refactorings?
Dec
23
answered How to model the dependencies between fields in very complex forms
Dec
23
comment How do you unit test a function that clears properties?
Dittos, @KonradMorawski. "one test, not one assertion" I say. I often Assert test data initial state. How else can you possibly prove reset() works if the initial state is not known/proven? FURTHER, in the sense that I'm setting "state", then there may be several objecs/object-properties to test for the proper state.
Dec
15
revised Is it misleading to label code as a particular design pattern if it only loosely fits the definition?
added 149 characters in body
Dec
15
answered Is it misleading to label code as a particular design pattern if it only loosely fits the definition?
Dec
6
answered Getters and Setters unclear example
Nov
6
comment Why is OOP difficult?
dittos on the "leap" learning: When I began to perceive OOP as "merely" modular/structured/step-wise construction, but on steroids; when I rewrote some very old and mangled-beyond-maintainability COBOL programs. COBOL's global scope notwithstanding I had essentially applied OO principles with custom record structures, single-purpose variables, and tightly focused, modular, & structured paragraphs (methods).
Nov
6
comment Why is OOP difficult?
<strike>Programming</strike> OOP basically is managing abstractions.
Nov
4
comment Does it make sense to express reliability as a ratio of number of tests and system failures?
+1 for the 1st word; then the rest of the 1st line.
Nov
3
comment Reverse relationships for smaller/better Aggregates?
When designing a specific "view" a tailored "model" is designed for that specific view. But this must be consistent with the class design. If the Question-Choice design is a "composite" the choices do not "live" independent of the containing Question - that's what "composite" means. If our view displays choices only, one might write SQL to fetch only rows from the choices table. But if you want to maintain data integrity, apply business rules, etc. then, to the extent that Question class contains the business logic that it should, you must have a question object.
Nov
3
comment Reverse relationships for smaller/better Aggregates?
Yes, Choice.getVotes(). Clearly a "choice" has votes, per the problem description. Aside: to get "top3Choices()" this function belongs in the Question class because a question contains the choices.
Nov
3
comment Reverse relationships for smaller/better Aggregates?
Specific syntax varies for a given language. But sure, "sorting" is ubiquitous. And even in C# you could sort using LINQ or passing a sort function - these 2 variations can give you run-time flexibility for what/how to sort.
Nov
2
answered Reverse relationships for smaller/better Aggregates?