11 karma · joined Apr 19, 2014 (12y ago) · 27 submissions
comment 12y ago · link · parent
comment 12y ago · link · parent
comment 12y ago · link · parent
Yeah, Null Ref Exception isn't as pretty as a more domain specific one, but the essential thing happens regardless: the program throws as soon as you try to access a member. And if you just pass your results on to another function, that function could be testing its inputs, and throwing your exception there as an explicit ArgumentNull instead of Null Ref.
I prefer less to more code, especially for an error I wont even expect to ever see. If it something I do expect, then sure, make a fancy exception and throw that.
comment 12y ago · link · parent
I think the notion that you (eventually) get to broad code coverage in a full test pass with a single pushbutton test, that Fowler talked about, is the best idea.
I think that whether to use mocks is really dependent on your particular environment, and the penalty of not using them. I've had to mock legacy servers that I couldn't touch in testing, and they helped there a lot. Also ones with really slow IO, or bizarre security requirements that make impersonation in test difficult or impossible.
comment 12y ago · link · parent
Sounds like a steaming pile of BS to me. MS could have done a far better job supporting both user levels by leaving the win7 gui alone, and adding in the start screen, and allowing this specific option during setup.
Don't believe the arguments of "individual contributor" level employees. They are lied to as much as we are.
comment 12y ago · link · parent