Reputation
1,922
Next privilege 2,000 Rep.
Edit questions and answers
Badges
4 11 28
Impact
~219k people reached

Feb
2
comment Is excessive technical debt a valid reason to quit a dev job?
I think I have some great advice for you, but unfortunately, this question was closed before I could post my answer. Contact me via my profile and I will send it to you personally if you'd like.
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
Nov
17
comment How can I mock this architecture?
It's not some "dependency" I want to ignore in this case, it's "complexity". The actual Materials in this Container have complex physical characteristics (e.g., atomic weight, specific gravity, etc). For my tests, I want to "invent" arbitrarily simple materials (i.e., "fake" elements, so to speak, with manually selected physical values that are chosen to test boundary conditions and so on). And, btw, I'm looking for a solution precisely because it will make my life simpler.
Oct
17
comment How can I mock this architecture?
@RobertHarvey: "Mocking" my title, are you? I guess I should have unit tested that too. :)
Oct
17
comment How can I mock this architecture?
@Euphoric: Great question. I guess I am being inconsistent there, aren't I? I intended it to be just predefined values in the program itself, but I wanted to be able to use diferent values in the Unit Tests. Hmm, I'll have to think abou that...