January 2009 Blog Posts
Apparently Simon is already pining for home and is worried that I'm yet to mention his new blog A Gamer's Odyssey. I have these things to say: You haven't taken any kind of gaming system with you. I challenge your gaming credentials. A single post on an alleged game for the iPhone does not a gaming blog make. You should be referring to yourself as Oddity if you're on an Odyssey. You haven't even left Australia yet. Get a move on. ...
The project I'm on recently had a broken build due to a failing unit test. This is relatively unremarkable except the unit test in question would pass consistently on the developers machine but fail on others including our build server. This unit test relied on an external resource (an LDAP server) that was not visible to some of our development machines but was to others. This behaviour meant the test was of negative value as a failure could be attributed either to a legitimate bug or simple unavailability of the external resource. In general it would not be worth tracking...
Bwian wishes people to know of his "Linked .Net Users Group - Deepen your Debugging: Tips and Tricks for the Visual Studio 2008 Debugger" virtual event thingy. He'll get all sulky if no one virtually attends. Which could be amusing so there's no downside.
My previous post discussing using use of Enumerable.Select to map collections fails to cover some potentially unexpected behaviour you may encounter in practice. I noticed this when unit testing some code recently where my tests were failing due to violated expectations. The tests in question mock the mapper and set expectations as to how it will be called. The test was failing because the mapper was being invoked more than expected. This is due to the deferred execution behaviour that Enumerable.Select and other such methods exhibit. This effectively means that the majority of the select logic is not executed...
Modern programming languages provide many advanced features that many developers will not be familiar with. Often this is because the features are not applicable to a problem domain or the developer uses an alternate approach to problems addressed by the feature. This is rarely a criticism, there are no prizes in production code for how many advanced features you're taking advantage of. Use of advanced features should be governed by whether they make the code more maintainable, extensible, flexible, testable and correct. If you are not getting these benefits then you are unlikely to be using them legitimately and should...
The Enumerable.Select method is used in LINQ to perform query magic. It may also be used in scenarios where you wish to transform a collection. The most common use to which I put this is in mapping between domain and message objects. The system I'm currently working with maintains a clear distinction between the wire format and the domain. This requires that there be a mapping between the formats. This is performed by a series of mapper classes that handle mapping between different message and domain types. This is composable, for instance an address mapper may be injected into...