A fast query edge case that might bite you

There’s been a bit of discussion (I might even go as far as to say ranting 😉 ) on the subject of not using “fast query” in your website code recently. I’m a supporter of this idea – but I came across an issue recently that points out why it’s not always easy to be confident that you’re not making use of it indirectly…

So, for the benefit of Google: Continue reading

It’s never the runtime… (Except when it is)

BugSomething I’ve learned over the course of many years working in IT is that when you hit a difficult to explain problem it’s very easy to say “it’s the runtime’s fault!” or “that’s a compiler bug” to cover for the lack of explanation for your problem. The vast majority of the time, it’s not true though. It’s just a subtler bug in your own work that you can’t see yet.

Every so often, however, it is true. And it turns out the issue I discussed the other week about Sitecore rendering a Razor error when you asked for a media item may well be an example of this. Continue reading

My favourite confusing exception

Spending a lot of time developing websites with Sitecore means I’ve reported my fair share of bugs to support. One particular issue that I came across in 6.6 a while back stands out as my “favourite” issue I’ve reported – just because the error stops a lot of developers in their tracks thinking “how on earth can this happen?”. If you wrote this code, would you think it could crash?

private void doSomething(ShortID identifier)
    if(identifier == null)
        // handle the bad paramater

    // do things

Well it can crash. And to a less experienced developer it can be a very confusing error: Continue reading