3,185 reputation
820
bio website
location
age
visits member for 3 years, 5 months
seen Mar 29 at 23:50

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?
Oct
31
revised Interface to enumerate over files
deleted 59 characters in body
Oct
31
answered Interface to enumerate over files
Oct
20
comment Implementation Coupling
Perhaps I am misunderstanding, but the question itself suggests the problem(s) I discussed. Further the chain of interface calls suggests potential problems discussed in the link at the very bottom of the post.
Oct
19
revised Implementation Coupling
added 14 characters in body
Oct
19
answered Implementation Coupling
Oct
17
comment How can I mock this architecture?
Seems to me that mock frameworks generally work because the class-that-is-to-be-laughed-at implements an interface and your code uses that-interface-type references. And I don't see why both key and value objects must be mocked. And if enums are essentially compile-time constants of integers then mocking it seems pointless (you really can't hurt an enums feelings). BUT in C# you can get away with casting an invalid value to that enum-type
Oct
14
awarded  Yearling