6,671 reputation
32130
bio website softwareonastring.com
location Netherlands
age 53
visits member for 4 years, 7 months
seen 23 hours ago

Software developer since 1985. Started in Cobol, moved via Clipper/VB to Delphi. Delphi developer since 1998. Sniffing at C# and playing around with javascript and some php for websites. Coaching new employees and less experienced developers. Focused on software architecture and SOLID design. Keenly interested in user experience and usability.

Questions

When you ask a question, show your effort, provide all the details that will help someone to help you and be precise.

Answers

When you answer a question, don't just paste your code. Your answers will be much better when you explain why your code is doing what it does and how it achieves the asker's goal. It makes it a whole lot easier to follow along. As it is I am much more inclined to up-vote answers that have explanatory text about what the code is doing and why it is written as it is.

Answers that just contain links aren't likely to get an up-vote from me either

Other

Obligatory link whenever someone thinks they are improving security by imposing all sorts of rules on password composition: Password strength


1d
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
comment Receive data using TcpListener and TcpClient and distinguish between file and raw data
In the server you can read from the client stream (ns in your example) in the same way as the client reads from fileStream. IIRC the second argument to the fileStream.Read call is the starting position. You could easily look that up using the documentation on the Stream classes and interfaces.
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
Sep
19
revised Why is aggregation function bad idea for RESTful?
Added a section on algorithmic uri's