Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/

A blog about technology that catches my attention

It's a bit like a swap-file for my brain...

11 years, 352 posts and counting

For once, it is a bug in C#!

99% of the time it's not - but that 1% when it is can be extra fun...

Having been in development for a long time I've come across a lot of headscratching odd behaviour in code. Those issus have lead to a fair few conversations where people have looked at the odd behaviour and asked "is it a compiler/runtime bug?". And in all these years it never has been that sort of bug. But for the first time I have recently found a situation where some odd behaviour is C#'s fault...

So here's some info about the issue I saw this time, and what Microsoft are fixing as a result:

C# .Net Bug ~5 min. read

A trick for working with PowerPoint's Designer

When you want to do better than slide roulette

The other day I was working on some slides for a user group presentation when I hit an issue. PowerPoint's "random slide design" tool had thrown up a style I liked and wanted to reuse. But there were things it added to the slide I could not select. And hence I couldn't see a way to copy them so different slide types could share the same look. It took me a while to work out how to sort this, so it needs writing down so I can remember for next time...

General ~1 min. read

Querying product data and images in Content Hub

Last time we put custom products in - now lets get them out for delivery

In a previous post I looked at how you can customise schema for Products in the Product Content Management feature of Content Hub. But getting data in is only half the story - how can we go about getting it back out for use elsewhere in our tech ecosystem? Well the answer is a fun combination of GraphQL and how Content Hub can serve images. Read on for my notes on one approach on configuring all of this:

SUGCON EU Excitement!

The most interesting announcements from the Sitecore team

There was a lot going on at SUGCON EU in Antwerp last week. A lot of great community content, the usual fun bar/corridor conversations with other attendees, and plenty of (way too much?) food. But I want to single out some of the announcements Sitecore made in their keynotes and sessions, because there's some really important stuff there for our future work on the platform.

Customising product data in Content Hub

Chances are you need to store some non-standard stuff...

Content Hub is a product I don't get to use too often, so I find myself digging about a bit to remember the details of some customisation and setup. So having had to do some investigations into how to customise the Product Content Management features recently I figured both myself and search engines might benefit from some notes on the subject for the future. And maybe you will too...

Memory issues might really be cache issues

Looking at a different sort of resource leak

I've written a few things about diagnosing memory issues in Sitecore over the years, but one topic I've not covered in detail is anything around "how to spot when it's not piles of your own objects that's causing the issue". Problems like leaking handles can have an obvious link back to the custom code that you can spot fairly easily in diagnostic data. But not all memory issues do. I was discussing a possible example of this with a colleague recently, and it seemed like another thing to write down...

Memory diagnostics for Sitecore under Docker

It's more manual, but it still works...

When I was writing about dealing with memory analysis for Sitecore recently I focused on a site running under Auzre PaaS. But what if you're working in Docker locally? A good question it turns out...

Oi Docker, where did my forms go?

Rediscovering a classic (yet still confusing) issue

Recently I got a fun question from a fellow dev: After pulling some changes and doing a sync of serialised data they were expecting to see some forms in the Experience Forms editor so they could work on them. But nothing was showing up... The root cause here is a bit of a classic issue that many people will have seen before, but it still seemed worth writing it up. Even if just to emphasise that this has been around for a while and it's still a thing even if you're using containers.

Reference counting for debugging resource leaks

A way you can spot leaks without a memory dump

I wrote about diagnosing some issues with static event bindings in a previous post, and talked about finding these issues of "subscribing more than you unsubscribe" with memory dumps. But finding this sort of a problem before it becomes an issue is better if you can, so what techniques might we use for that?

LINQPad is great!

And this isn't even a sponsored post...

Over the festive break I spent a bit of time trying some of the challenges in this year's Advent of Code. I wrote the logic for my answers using LINQPad, and it struck me that this has become one of my favourite developer tools. So here are a few of the reasons why it's become a key part of my toolkit, and why it might be a useful thing to add to yours too.

.Net C# ~4 min. read