Reputation
1,924
Next privilege 2,000 Rep.
Edit questions and answers
Badges
4 12 28
Newest
 Yearling
Impact
~229k people reached

Apr
14
revised What is “Soft Coding”, really?
clarification
Apr
14
suggested approved edit on What is “Soft Coding”, really?
Apr
14
comment Principle of least astonishment (POLA) and interfaces
I like separation of the interface. But I'm inclined to think that your suggestion about enforcement (e.g. WriteTrailerAndClose()) is verging on a violation of SRP. (This is something that I have struggled with on a number of occasions, but your suggestion seems to be a possible example.) How would you respond?
Mar
20
awarded  Yearling
Nov
17
awarded  Popular Question
Oct
22
comment What is the Mars Curiosity Rover's software built in?
Unfortunately, Caltech is (apparently) no longer hosting/archiving any of the material from that conference, so your links are all broken. That's a real shame. If anyone knows of an alternate source for this material, it would be very much appreciated!
Oct
7
awarded  Notable Question
Sep
30
comment Does class inheritance (in C#) violate the Open/Closed Principle?
Great points, thanks! But consider this: I've got an Encabulator class which knows how Encabulators should function. Client says, "Now we want it backwards compatible with the previous version of DingleArm_v1. I don't want to muck up the Encabulator with special-case code logic. (I could make an IEncabulator interface, but that seems too intrusive.) My solution: sub-class Encabulator (in this case Encabulator_v1) and override the methods that need different logic. So now, when User needs compatibility with DingleArm_v1, I inject Encabulator_v1. Seems elegant to me. Your take?
Sep
30
awarded  Curious
Sep
29
accepted Does class inheritance (in C#) violate the Open/Closed Principle?
Sep
29
asked Does class inheritance (in C#) violate the Open/Closed Principle?
Jun
8
revised Understanding dependency injection
added 116 characters in body
Jun
4
revised Clean Code comments vs class documentation
modified formatting slightly
Jun
4
suggested approved edit on Clean Code comments vs class documentation
May
26
answered Similar multidimensional array detection
Mar
19
awarded  Yearling
Feb
12
comment How can I ask my boss (in a polite way) to comment his code?
ditto to @Phil. You'll be amazed how many questions you figure out the answer to on your own, just by carefully crafting a clear question in email. Just the process of explaining your confusion with precision can turn lights on. Can't tell you how many times I've written emails of that sort that were never sent because I figured it out.
Nov
17
comment How can I mock this architecture?
Perhaps I'm missing something but "insert into dictionary" is precisely the step that I can't figure out how to do. I can't just alter the characteristics of H2O because (1) I need a naming convention to identify the unique characteristics of each Mock Component (otherwise it would be terribly confusing to maintain the tests), and (2) I still want to test H2O (and CO2, and Na, etc) so I can't just arbitrarily change their characteristics for the tests.
Nov
17
revised How can I mock this architecture?
update in response to suggestions.
Nov
17
comment How can I mock this architecture?
I wouldn't mock away Int32 because it is already a simple value. In my case, the enums are functioning as keys which "point" to specific complex data structures. For my tests, I want to be able to point to simplified data structures. So it is not the Container that needs an interface so much, as the ChemicalComponents within the Container