1,064 reputation
514
bio website
location Toronto, Canada
age
visits member for 2 years, 9 months
seen 22 hours ago

22h
comment Why do methods that take an unlimited amount of parameters often define overloads with fewer parameters
Another thing to note is that passing Combine with zero or one path segments does not even make sense, yet the params version allows you to do this.
Apr
22
awarded  Citizen Patrol
Apr
15
comment TDD Red-Green-Refactor and if/how to test methods that become private
Making private methods is the result of the refactoring of public methods in the TDD refactoring step.
Apr
14
accepted Calling RESTful service from browser and handling 4xx class responses
Apr
14
comment Calling RESTful service from browser and handling 4xx class responses
This was one of my thoughts on the subject, and it sounds like it's the way to go, however, I'm going to wait a bit to see if there's any opposing viewpoints.
Apr
14
comment Calling RESTful service from browser and handling 4xx class responses
The intended end-user is the general public, I'm more concerned about possible unintended consequences of having 404 represent a valid response. If the consumer was not a browser I would not be concerned.
Apr
14
asked Calling RESTful service from browser and handling 4xx class responses
Apr
9
comment is there a cleaner / simpler way to code this?
I sometimes do this and make an array of where predicates, then I join the array with ' AND '
Apr
9
comment Unit testing and reusing extracted class
@DocBrown I ended up going with this solution, the QuickOrderService I ended up mocking out the dependencies ensure its correctness.
Apr
9
accepted Unit testing and reusing extracted class
Apr
9
comment Unit testing and reusing extracted class
@Euphoric Thanks for the blog post, looks to be a useful pattern to follow.
Apr
8
comment Should one use Dependency Injection even if the class is used only once?
I never took the reading comprehension 101 course.
Apr
8
comment Unit testing and reusing extracted class
Not sure what you mean about rules of usage, but we use it primarily to group operations to ensure they're done atomically. Primarily it's an abstraction over a a database transaction and fires domain events when the tx completes.
Apr
8
revised Unit testing and reusing extracted class
added 33 characters in body
Apr
8
answered Should one use Dependency Injection even if the class is used only once?
Apr
8
asked Unit testing and reusing extracted class
Apr
2
comment Fixing class Hierarchy design mistakes due to incorrect inheritance
The consumer of the interface may be a machine that holds onto tails and wags them.
Apr
2
comment Fixing class Hierarchy design mistakes due to incorrect inheritance
Right, it all depends on what the expectations there are around that method. I made some assumptions and labelled it as an LSK violation based on the fact that OP never defined what the expectations were.
Apr
2
comment Fixing class Hierarchy design mistakes due to incorrect inheritance
slightly off-topic, but not all terrestrials are mammals.
Apr
2
comment Fixing class Hierarchy design mistakes due to incorrect inheritance
You can still have all classes inherit from mammal, but you need to move the WagTail out of it.