Programming Practices

Interview question - what's wrong with this code?

You can learn a lot about good code from reading bad code, and at least something about how well someone codes from what they can tell you about bad code. With this in mind I handed a print out of some bad code to the latest prospective developers I've interviewed, to see what they made of it. I'll write another blog with the things I think is wrong with the code soon (there's quite a few of them), but it'd be very interesting to hear what people think is wrong with it before I do :)

Self-Configuring Domain Event Handlers

I recently implemented Domain Events as a way of organising domain logic in our application; I really liked the way it worked out, so I wanted to share an overview of using Domain Events, as well as a class which automatically looks up all the available IDomainEventHandlers.

A Generic, IDisposable WCF Service Client

WCF clients need to be cleaned up properly, but as they're usually auto-generated they don't implement IDisposable. I've been doing a fair bit of WCF work recently, so I wrote a generic WCF client wrapper which effectively gives me a disposable service client.

Legacy Projects, Technical Debt and NDepend

Legacy systems are commonplace, but it's difficult to come up with anything concrete to justify the expense of an update to someone with an eye on their bottom line. Thankfully, the folks at NDepend have now built technical debt computation on top of their code analysis tools, giving you a much easier way to have these sorts of discussions. Here's a real-world example.

Mapper vs Mapper: The Performance Plot Thickens

The last mapper performance blog (for a while, at least), including updated versions of AgileMapper, AutoMapper and Mapster, and discussion of some performance nuances.

Mapper vs Mapper: Performance Revisited

I recently wrote a blog on the performance of various object-object mappers, but it turns out my tests weren't quite fair and equal at that point. Having updated the relevant mapper classes and re-measured, here are my results.

.NET Standard and Testing Partially Trusted Code

Because libraries written for .NET Standard can run on multiple platforms – with more to come in the future – it's worth considering how or if they run in partially trusted environments. Having implemented support in both ReadableExpressions and AgileMapper - here's pointers on how.

Mapper vs Mapper: Performance

The first in a series of posts comparing a subset of the available mappers. This blog is on that favourite thing we're not supposed to obsess too much about (in programming) - performance.

AgileMapper: a zero-configuration, highly configurable, transparent, id-aware object mapper

Regular readers of my blog (maybe even both of you) will have seen sporadic references to ‘my pet mapper project’. It’s now – finally! – in a beta stage I’m happy to talk about.

Interview Trivia Questions

There is a style of technical interview question which I think is more or less pointless. Here's some examples, with what I think is a question worth asking instead.

Full Programming Practices Archive