The power of implicit conversions

There are bits of the C# language that we don’t think about too much when writing websites – and implicit conversions are one of those things. But while I’ve been messing about with some ray-tracing code in evenings recently, I found a couple of examples they patterns they can be a help with… Continue reading

Repeatable delays from data

I had an interesting discussion recently, about how some code could calculate a “random” but deterministic numeric value based on some data. This made me think of the classic old concept of “checksums” as a possible solution. Here’s what I was thinking about: Continue reading

A second pass at async pipelines

Last time out I was looking at applying async/await patterns to some pipeline patterns for C#. After I came up with the initial solution I outlined in that post, there was some more back-and-forth in the discussion thread that prompted all this. And that discussion made me realise there was an interesting side effect of the code I wrote, which might lead to some confusing bugs. So back to the drawing board… Continue reading

Pipelines and async

Ages ago I wrote some posts about an approach to pipeline-style code patterns for C# code. Recently I got a question on a gist I’d written to go with that article, because someone was having issues adding async code into pipeline components. Async patterns are much more common now, but this wasn’t something I’d actually tried. Cue some interesting experiments… Continue reading

Peeking into search queries

An issue I’ve bumped into a number of times over the years, is that sometimes developers want to be able to look at the query that got generated when they did something with Sitecore’s ContentSearch APIs. The traditional answer of “go look in the logs” is one way to deal with this, but some recent project work got me wondering if there were alternatives… Continue reading

Broken Unicorn synchronisation

Ever had a tool that works reliably suddenly not work? I had a problem like that recently, and it lead to some experimentation that I think I may need to come back to later. So this is mostly so I can remember what I was doing when I get back to this. But as we move toward a more “platform agnostic” with more use of .Net Core on Linux, maybe there’s something here that might help you too… Continue reading

An interesting diversion into procedural generation…

Outside of work I’ve been looking for non-Sitecore things to experiement with recently, and my eye was caught by a bit of interesting game development technology. I came across a discussion of using code to generate game data with a technique called “Wavefunction Collapse”. It’s a simple concept, but it has some interesting results, so I thought I’d have a go at an implementation myself. Continue reading