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...

10 years, 335 posts and counting

What looks good on the Symposium agenda?

Where are you likely to find me?

Having sorted out my travel plans for this October's Symposium and MVP Summit in Nashville, I've been having a think about what sessions I'd like to go and see. Here's a summary of my thoughts so far...

Sitecore Symposium ~5 min. read

Fun gotchas with Sitecore GraphQL and .http files

Learn from my pain if you're using this tool to test queries

I was having a chat recently about alternatives to Postman if you needed to send HTTP requests to arbitrary web endpoints. I mentioned using Visual Studio's support for .http files for this during that discussion, and then found myself trying it out for some work too. But it seems there's a couple of tricky little bugs hiding in here, which tripped me up when I tried to set up a call to one of Sitecore's XM Cloud GraphQL endpoints.

Scripting your data with SSMS

I've had to look this up once too often...

As developers we often need to move data between SQL Server instances. Some of the time database backups are fine for this, because you want to move everything. But on occasion what you need is a SQL script which can insert some rows of data you had on another server for you. And when I find myself needing this feature, I also find myself having to google how to do it. So to help my memory, here's how to generate scripts for your data:

SQL Server ~1 min. read

A key trick that makes search fast

It's interesting to think about internals sometimes

Recently I added a basic search page to my blog. This is a pure static site, hosted on Github Pages, so there's no Solr or Algolia here. Just some clever JavaScript (Lunr.js) acting on data generated by Statiq. Setting that up made me think about the internals of how a search can work efficiently, and I figured others might be interested in this...

General ~4 min. read

What happens if you duplicate field names?

We're told not to get into this state, but why?

Data Template inheritance. Most of the time it's great and a powerful tool to help you define your content schema effectively. But there are a few places where it can trip you up - and one of the interesting ones is duplicated field names. I found myself chatting about what actually happens and how this might affect PowerShell scripts and headless code recently, and it seemed worth writing down...

Automating Git

Because sometimes it's helpful to have code to push for you...

I've written a few times before about trying to smooth out the rougher edges of the process of blogging with some custom tooling. Both the site generator I'm using these days, and the simple editor tool I hacked together to suit my writing process. I realised recently that one of those rough edges that remained in the process was the need to manually commit my writing to source control, so I wondered what it might take to wire that into my editing tool...

C# Git ~5 min. read

Avoiding Display Name confusion

A trick to rememeber in Content Editor

I had a moment of frustration recently, when I spent a while looking for a Data Template in a particular Sitecore site and couldn't find it because a previous developer had set a Display Name. As a result of moaning about this Corey Smith reminded me of a way I could have helped myself here, and it seemed like something to share...

Sitecore ~2 min. read

Generating C# code with Roslyn APIs

Do you have to litter your generator code with literal strings of C#?

A while back I wrote about the transition from T4 templates to using Roslyn Source Generators for generating code in .Net Core solutions. While that worked for me, and I was able to get it to do what I needed, I was never really happy with all the output source as literal strings in the generator code. Recently I had another potential use for generated code, so I decided to try and fix this issue...

C# .Net ~7 min. read

Booting up an ancient VM image

This feels a bit like archaeology...

A very long time ago I managed a server with some websites on it. So long ago, in fact, that this "cutting edge" deployment was on Windows 2000 Server. I made a virtual machine backup of this server at the time, burned the files onto a DVD and filed this away in case I ever needed it. And recently I had reason to want some data off this ancient machine. I was able to get it fired up, but it took a little effort to get there. It feels like a minor miracle that I was able to make this run, so I wanted to write down some of the things I messed about with - partly so I'll remember if I ever have to do something similar again, and partly because this might be of interest to (a small number of) others too...

Blank white screen from local XM Cloud Rendering host?

No idea how I broke it, but do have one way to fix it...

There are some days when technology just doesn't want to play ball. And in my experience 99% of these days are when you're on a developer training course and its the exercise/labs machine that's being difficult. I had this recently on the XM Cloud developer intro course. I've no idea if anyone else would ever see this issue (or how it was caused) but it didn't return much useful info in Google, and I did find a way to fix for my problem. So it's documentation time...