3,250 reputation
820
bio website
location
age
visits member for 3 years, 7 months
seen 8 hours ago

Mar
27
answered When to make a method part of an interface or a concrete implementation?
Mar
27
comment Should I initialize a member variable in declaration when it is initialized by a constructor parameter?
+1. IMHO it boils down to if you care that the field is null after Foo is instantiated. public X x - this guy is public AND we have a constructor that <strike>does</strike> did not check for null. This tells me we don't care. Caveat emptor!
Mar
27
revised Should I initialize a member variable in declaration when it is initialized by a constructor parameter?
null-coalescing operator
Mar
14
comment Observer pattern without state change?
dittos. Certainly client state changed - it now has a new/different connection. Think about your layers of abstraction - somewhere changed state. I wonder if a new connection is merely a component of a "higher perspective" state change; perhaps there is an abstraction that needs a more formal/concrete presence. Finally, mega-dittos on the observation of over-thinking pattern implementation and use.
Feb
16
comment How can I ask my boss (in a polite way) to comment his code?
Start commenting the code yourself. Why should we treat comments like holy scripture? Who better to make comments than one who is unfamiliar - who knows where comments are needed. Besides good commenting takes practice and is harder than you'd think. Strive for a balance of needed detail and big picture. Finally, I hate realizing that I'm the nth person to re-learn a particular uncommented code bit over the years. (we have 100's of k's of uncommented LOC). Follow the Boy Scouts rule: leave your code-site better than you found it.
Feb
8
awarded  Good Answer
Feb
8
awarded  Nice Answer
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