657 reputation
711
bio website
location Poole, United Kingdom
age
visits member for 2 years, 4 months
seen Oct 8 at 9:13

Jul
29
asked How to allow multiple plugins to provide data for multiple aggregation processes?
Jun
20
awarded  Yearling
Mar
3
awarded  Good Answer
Sep
23
awarded  Notable Question
Jun
20
awarded  Yearling
Jun
3
awarded  Booster
Jun
1
awarded  Announcer
Apr
3
comment Negative test cases confusion
Sure, in that example an error is not the right option, but there are plenty of cases where it would be. For example, what if the database that an application relies upon is inaccessible or corrupted? In that case the best thing you could do may be to display an error to the user, in which case your negative test would be to make sure that a "nice" error message is presented as opposed to, say, dumping out a stack trace to the screen.
Apr
3
awarded  Commentator
Apr
3
comment Negative test cases confusion
"it should not crash or throw an unexpected error" - I disagree, in many cases crashing or throwing an error is exactly what should happen.
Mar
21
comment What's the right balance between code consistency and code improvement?
@Peri I meant just basic LINQ - I guess my example should have been about working with IEnumerables rather than a DAO.
Mar
21
awarded  Popular Question
Mar
19
revised What API design for storing generic data in a more specific format?
Further clarified the problem
Mar
19
comment What API design for storing generic data in a more specific format?
It is only the WidgetMessage that gets converted to and from XML - the specialised DTOs will only ever be converted to and from WidgetMessages. In my current design they are still called 'messages', even though it is only the WidgetMessage that gets put onto a queue, so I can understand your confusion. I've updated my question to better explain the problem I'm trying to solve.
Mar
19
revised What API design for storing generic data in a more specific format?
Added a summary to better explain the problem at hand
Mar
19
awarded  Enlightened
Mar
18
comment Joda Time vs Java Time
The vast majority of the Joda library, including the DateTime class, is immutable and therefore thread-safe. However there are a few mutable classes that are not thread-safe. See joda-time.sourceforge.net/faq.html#threading.
Mar
18
awarded  Critic
Mar
18
comment Unit Testing in a “no setter” world
-1: Scrapping your testing framework and going back to test methods inside the class would be going back to the dark ages of unit testing.
Mar
18
comment Joda Time vs Java Time
By 'internal', it could be internal to the application as a whole (as in Michael's example), but it could be internal to a class or just a particular method. Say for example that you have a utility method that takes two Java Date objects and calculates the number of working days between them, but it contains a bug. To fix it, it may very well be easier to rewrite that method using JodaTime instead but you may not be able to afford the time to refactor all the code that calls the method, so you leave the method signature unchanged. In this case you're using Joda "internally" in that method.