Reputation
6,778
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 21 30
Newest
 Nice Answer
Impact
~182k people reached

Apr
30
revised Tester/Doer pattern: Assume the caller conforms to the pattern or be defensive and repeat the check?
added an alternative approach
Apr
27
comment Two way communication between Form and plugins
No time to go into any detail now, so comment instead of answer. They way you make every Panel (or UserControl as suggested by CurtisHx) able to receive information from the main form, and/or to add menu items to the main form is to turn it onto its head: make all panels/UserControls implement an interface that allows the mainform to ask each one for any menu items it wants to add and allows the mainform to "broadcast" information from other panels to anyone interested. The latter is the published-subscriber pattern: every panel automatically becomes a subscriber of the mainform.
Apr
17
answered Global / Application settings and testing
Apr
8
comment Should one use Dependency Injection even if the class is used only once?
dependency injection need not be centralized at all (see other answers). And even though this class may be used only once, it still needs to be tested for its behavior. Plus, more importantly, the class using it needs to be tested. And though you could test both classes through the outer one (the one aggregating the other class), your test classes and cases will be much simpler if you focus them on a single class. Which means that the outer class needs to be tested only for its own behavior and its interaction with the inner class. And that automatically is an argument for some form of DI.
Apr
8
comment Unit testing and reusing extracted class
DO test this class to check that it actually uses the classes it is aggregating/composing and to ensure that it keeps doing that. Injecting your creator classes is going to make that a lot easier. I'd even go as far as to see that without a mocking framework that can fake on the fly, you have no option but to use injection. So your option 3.
Apr
8
comment Abstract Web API from validation and configuration management in embedded system
You seem to be on a nice track, but could you please enlighten me wrt the meaning of TAD? Google is bringing up stuff that doesn't make much sense in the context of your question.
Apr
6
comment Unit test strategy for layered (or derived) method calls
Almost two years on, I am in a more lenient mood :) Here's a discussion with a code example: Testing strategy for validation and action methods. C# example, but shouldn't be too difficult to adapt to language of choice.
Apr
3
answered Why are objects instantiated this way?
Apr
3
answered When and how to apply application settings in .Net
Mar
30
awarded  Nice Answer
Mar
28
comment TDD - Outside In vs Inside Out
Interesting. How did you reach the conclusion that outside in TDD is "mockist" TDD? I very much prefer Outside-In thinking and design and thus testing (see softwareonastring.com/2015/01/10/…) yet the Fowler article firmly puts me with Fowler in the classicist camp. While mockist may always use an outside-in approach, you can't turn it around and say that outside-in design and testing is mockist TDD. Outside-in can be and very much is practised by classicist TDD-ers as well.
Mar
16
comment Should we test all our methods?
Why would you check that your DAL has only been called once?
Feb
20
comment Cheap implementations in fundamental TDD
@alfe and to answer your question of how strict you should apply something: dogma is never the answer to anything. Keep using your brain. When you start to rely on strict dogmatic application of anything, everybody loses.
Feb
20
comment Cheap implementations in fundamental TDD
@alfe What then: you add more test cases. TDD doesn't require you to be complete from the start. In fact it specifically allows for requirements and implementations to change over time and to be refactored / added to with changes in perception of what the behavior should be. Test cases that test for behavior that is later found to be redundant can and should be removed. Test cases are a living breathing code base, just like the production code. Think of them as the dynamic documentation of your requirements (which change over time) and as a history of bugs solved.
Feb
20
comment Cheap implementations in fundamental TDD
@alfe instead of expanding an existing test case, you can always add an extra one. Each test should cover just one aspect of a function/method. Doesn't mean there can only be one assert (it often takes more than one assert to verify an aspect); but your second scenario should probably have its own test method within the testclass instead of being added to the first.
Feb
20
comment Cheap implementations in fundamental TDD
@Alfe "... or write the correct solution anyway" How would you know it is correct and more importantly that it remains correct? Quite often ensuring proper test cases before hand may seem "over the top" for the initial implementation, but they start shining when someone inadvertently makes a change that introduce a bug and that bug goes unnoticed because the test cases where done after the fact and may well suffer from myopia by the developer who thought (s)he was already done.
Jan
26
comment Two contradicting definitions of Interface Segregation Principle – which one is correct?
Cool @user61852 :) (and thanks for the credit)
Nov
7
comment In an Agile Environment, who is responsible for software architecture
Because of the questions like @DaveHillier poses, I tend to use "s/he"... (Thanks for this great answer by the way, puts reality back into the "the team is/does/has/owns ..." cliches)
Sep
27
comment Are any top software products outsourced? (offshore or otherwise)
@RossPatterson: Where does it say that they our outsourcing development of their virtualization solution? I may be reading it wrong (just scanned it really), but I see MS outsourcing the operation of their virtualization platform, not the development of it?
Sep
27
revised Are any top software products outsourced? (offshore or otherwise)
added 411 characters in body