Feed jon-skeets-coding-blog Jon Skeet's coding blog

Favorite IconJon Skeet's coding blog

Link https://codeblog.jonskeet.uk/
Feed http://codeblog.jonskeet.uk/feed/
Updated 2024-03-29 14:33
DigiMixer – the app
This wasn't the post I'd expected to write, but after reading two comments in close succession on an old post when I first started playing with the X-Touch Mini I decided to spend some time effectively shuffling code around (and adding a primitive configuration dialog) so I could publish a standalone app for DigiMixer. I ... Continue reading DigiMixer - the app
DigiMixer: Protocols
Despite this blog series going very slowly, the DigiMixer project itself has certainly not been stalled. Over the last year, I've added support for various additional mixers, as well as improving the support for some of the earlier ones, and performing quite a lot of refactoring. DigiMixer now supports the following mixers, to a greater ... Continue reading DigiMixer: Protocols
Variations in the VISCA protocol
Nearly three years ago, I posted about some fun I'd been having with VISCA using C#. As a reminder, VISCA is a camera control protocol, originally used over dedicated serial ports, but more recently over IP. Until this week, all the cameras I'd worked with were very similar - PTZOptics, Minrray and ZowieTek all produce ... Continue reading Variations in the VISCA protocol
SSC Protocol
I'm aware that I haven't been writing as many blog posts as I'd hoped to about DigiMixer. I expect the next big post to be a comparison of the various protocols that DigiMixer supports. (I've started a protocols directory in the GitHub repo, but there isn't much there yet.) In the meantime, I wanted to ... Continue reading SSC Protocol
DigiMixer: Introduction to digital mixers
While I'm expecting this blog post series to cover a number of topics, the primary purpose is as a vehicle for discussing abstraction and what it can look like in real-world projects instead of the toy" examples that are often shown in books and articles. While the DigiMixer project itself is still in some senses ... Continue reading DigiMixer: Introduction to digital mixers
Handling times for an EV charger
This morning (October 30th 2022), the clocks went back in the UK - the time that would have been 2am fell back to 1am. This is just the regular fall back" transition - there's nothing special about it. As it happens, I'd driven my electric car for quite a long journey yesterday, so I had ... Continue reading Handling times for an EV charger
Introduction to DigiMixer
This is the first of what I expect to become a series of maybe a dozen blog posts about a hobby project I've started, called DigiMixer. Back in January 2021 I posted about controlling an XR-16 using Open Sound Control, and then later using an X-Touch Mini to control the XR-16 using the same underlying ... Continue reading Introduction to DigiMixer
Taking .NET MAUI for a spin
I've been keeping an eye on MAUI - the .NET Multi-platform App UI - for a while, but I've only recently actually given it a try. MAUI is essentially the evolution of Xamarin.Forms, embracing WinUI 3 and expanding from a mobile focus to desktop apps as well. It's still in preview at the time of ... Continue reading Taking .NET MAUI for a spin
What’s up with TimeZoneInfo on .NET 6? (Part 2)
In part 1, we ended up with a lot of test data specified in a text file, but without working tests - and with a conundrum as to how we'd test the .NET Core 3.1 data which requires additional information about the hidden" AdjustmentRule.BaseUtcOffsetDelta property. As with the previous blog post, this one is fairly ... Continue reading What's up with TimeZoneInfo on .NET 6? (Part 2)
Diagnosing an ASP.NET Core hard crash
As part of my church A/V system (At Your Service), I run a separate local web server to interact with the Zoom SDK. Initially this was because the Zoom SDK would only run in 32-bit processes and I needed a 64-bit process to handle the memory requirements for the rest of the app. However, it's ... Continue reading Diagnosing an ASP.NET Core hard crash
Displaying NDI sources on Stream Decks
In the course of my work on our local church A/V system, I've spent quite a lot of time playing with Elgato Stream Decks and NDI cameras. It only occurred to me a week or so ago that it would be fun to combine them. The Stream Deck screens are remarkably capable - they're 96*96 ... Continue reading Displaying NDI sources on Stream Decks
Diagnosing a VISCA camera issue
As I have mentioned before, I’ve been spending a lot of time over the last two years writing code for my local church’s A/V system. (Indeed, I’ve been giving quite a few user group talks recently about the fun I’ve had doing so.) That new A/V system is called “At Your Service”, or AYS for … Continue reading Diagnosing a VISCA camera issue →
What’s up with TimeZoneInfo on .NET 6? (Part 1)
.NET 6 was released in November 2021, and includes two new types which are of interest to date/time folks: DateOnly and TimeOnly. (Please don’t add comments saying you don’t like the names.) We want to support these types in Noda Time, with conversions between DateOnly and LocalDate, and TimeOnly and LocalTime. To do so, we’ll … Continue reading What’s up with TimeZoneInfo on .NET 6? (Part 1) →
Book updates for July 2021
Just a quick post with some updates around books and related events… Software Mistakes and Tradeoffs: MEAP update In June, I posted about the book that Tomasz Lelek and I are writing. (Well, Tomasz is doing the bulk of the work – only two of the thirteen chapters are by me, but I’ll take any … Continue reading Book updates for July 2021 →
New book: Software Mistakes and Tradeoffs
I’m delighted to announce that I’ve been hard at work contributing to a new book. The book is called “Software Mistakes and Tradeoffs: How to make good programming decisions” and the principal author is Tomasz Lelek. The book was Tomasz’s idea, and he’s written the vast majority of the material, but I’ve contributed a chapter … Continue reading New book: Software Mistakes and Tradeoffs →
Playing with an X-Touch Mini controller using C#
Background As I wrote in my earlier blog post about using OSC to control a Behringer XR16, I’m working on code to make our A/V system at church much easier to work with. From an audio side, I’ve effectively accomplished two goals already: Remove the intimidating hardware mixer with about 150 physical knobs/buttons Allow software … Continue reading Playing with an X-Touch Mini controller using C# →
OSC mixer control in C#
In some senses, this is a follow on from my post on VISCA camera control in C#. It’s about another piece of hardware I’ve bought for my local church, and which I want to control via software. This time, it’s an audio mixer. Audio mixers: from hardware controls to software controls The audio mixer we’ve … Continue reading OSC mixer control in C# →
VISCA camera control in C#
During lockdown, I’ve been doing quite a lot of tech work for my local church… mostly acting in a sort of “producer” role for our Zoom services, but also working out how we can enable “hybrid” services when some of us are back in our church buildings, with others still at home. (This is partly … Continue reading VISCA camera control in C# →
A Tour of the .NET Functions Framework
Note: all the code in this blog post is available in my DemoCode GitHub repo, under Functions. For most of 2020, one of the projects I’ve been working on is the .NET Functions Framework. This is the .NET implementation of the Functions Framework Contract… but more importantly to most readers, it’s “the way to run … Continue reading A Tour of the .NET Functions Framework →
Posting to wordpress.com in code
History I started blogging back in 2005, shortly before attending the only MVP summit I’ve managed to go to. I hosted the blog on msmvps.com, back when that was a thing. In 2014 I migrated to wordpress.com, in the hope that this would make everything nice and simple: it’s a managed service, dedicated to blogging, … Continue reading Posting to wordpress.com in code →
Travis logs and .NET Core console output
This is a blog post rather than a bug report, partly because I really don’t know what’s at fault. Others with more knowledge of how the console works in .NET Core, or exactly what the Travis log does, might be able to dig deeper. TL;DR: If you’re running jobs using .NET Core 3.1 on Travis … Continue reading Travis logs and .NET Core console output →
V-Drum Explorer: Blazor and the Web MIDI API
Blazor and the Web MIDI API Friday, 9pm Yesterday, speaking to the NE:Tech user group about V-Drum Explorer, someone mentioned the Web MIDI API– a way of accessing local MIDI devices from a browser. Now my grasp of JavaScript is tenuous at best… but that’s okay, because I can write C# using Blazor. So in … Continue reading V-Drum Explorer: Blazor and the Web MIDI API →
V-Drum Explorer: Planning notes for MVVM
My current clunky “put all the code in the view” approach to V-Drum Explorer is creaking at the seams. I’m really not a WPF developer, and my understanding of MVVM is more theoretical than practical. I’ve read a reasonable amount, but quite a lot of aspects of V-Drum Explorer don’t really fit with the patterns … Continue reading V-Drum Explorer: Planning notes for MVVM →
V-Drum Explorer: Memory and 7-bit addressing
So, just to recap, I’m writing an explorer for my Roland V-Drums set (currently a TD-17, but with a TD-27 upgrade on the way, excitingly). This involves copying configuration data from the module (the main bit of electronics involved) into the application, displaying with it, editing it, then copying it back again so that I … Continue reading V-Drum Explorer: Memory and 7-bit addressing →
New and improved JonSkeet.DemoUtil
It’s amazing how sometimes small changes can make you very happy. This week I was looking at how DragonFruit does its entry point magic, and realized I had a great use case for the same kind of thing. Some of my oldest code that’s still in regular use is ApplicationChooser – a simple tool for … Continue reading New and improved JonSkeet.DemoUtil →
Reducing my international speaking
I’ve been immensely privileged to be invited to speak at various international developer conferences, and until now I’ve usually tried to accept the majority of those invitations. I’ve had a wonderful time, and made many dear friends – who I’ve often then caught up with at other events. However, I’ve recently found that travelling has … Continue reading Reducing my international speaking →
V-Drum Explorer: MIDI interface
If this is the first blog post about V-Drum Explorer you’ve read, see the first post in this series for the background. In this post we’ll look at the MIDI interface I use in V-Drum Explorer to send and receive configuration information. MIDI basics (Apologies to anyone who really knows their stuff about MIDI – … Continue reading V-Drum Explorer: MIDI interface →
V-Drum Explorer: Introduction
This is the first in what I expect to be quite a long series of blog posts, meandering over a fairly wide range of topics as they crop up. There’s nothing particularly technical in this introductory post. It’s really just a starting point. V-Drums In July 2019, inspired/encouraged by a friend name Alice, I bought … Continue reading V-Drum Explorer: Introduction →
Options for .NET’s versioning issues
This post revisits the problem described in Versioning Limitations in .NET, based on reactions to that post and a Twitter discussion which occurred later. Before getting onto the main topic of the post, I wanted to comment a little on that Twitter discussion. I personally found it frustrating at times, and let that frustration leak … Continue reading Options for .NET’s versioning issues →
Why I don’t start versions at 0.x any more
(I’m writing this post primarily so I can link to it in an internal document on Monday. There’s nothing sensitive or confidential here, so I might as well get it down in a blog post.) SemVer is pretty clear about pre-releases. Any version with a major version of 0 is considered “initial development”, and anything … Continue reading Why I don’t start versions at 0.x any more →
Using “git bash” from AppVeyor
Update: I don’t know whether it was partially due to this blog post or not, but AppVeyor has fixed things so that you don’t (currently, 20th October 2019) need to use the fix in this post. You may want to include it anyway, for the sake of future-proofing. TL;DR: If your AppVeyor build starts breaking … Continue reading Using “git bash” from AppVeyor →
Versioning limitations in .NET
This is a blog post I’ve intended to write for a very long time. (Other blog posts in that category include a recipe for tiramisu ice cream, and “knights and allies”.) It’s one of those things that’s grown in my mind over time, becoming harder and harder to start. However, there have been three recent … Continue reading Versioning limitations in .NET →
Lying to the compiler
This morning I tweeted this: Just found a C# 8 nullable reference types warning in Noda Time. Fixing it by changing Foo(x, x?.Bar) to Foo(x, x?.Bar!) which looks really dodgy… anyone want to guess why it’s okay? This attracted more interest than I expected, so I thought I’d blog about it. First let’s unpack what … Continue reading Lying to the compiler →
Storing UTC is not a silver bullet
Note: this is a pretty long post. If you’re not interested in the details, the conclusion at the bottom is intended to be read in a standalone fashion. There’s also a related blog post by Lau Taarnskov – if you find this one difficult to read for whatever reason, maybe give that a try. When … Continue reading Storing UTC is not a silver bullet →
Hosting ASP.NET Core behind https in Google Kubernetes Engine
Side-note: this may be one of the clumsiest titles I’ve ever written for a blog post. But it does what it says on the tin. Oh, and the space after “ASP” in “ASP .NET Core” everywhere it to avoid auto-linking. While I could use a different dot or a zero-width non-breaking space to avoid it, … Continue reading Hosting ASP.NET Core behind https in Google Kubernetes Engine →
NullableAttribute and C# 8
Background: Noda Time and C# 8 Note: this blog post was written based on experimentation with Visual Studio 2019 preview 2.2. It’s possible that some of the details here will change over time. C# 8 is nearly here. At least, it’s close enough to being “here” that there are preview builds of Visual Studio 2019 … Continue reading NullableAttribute and C# 8 →
Farewell, Daisy Shipton
This is more of a quick, explanatory “heads-up” post than anything else. On March 31st 2018, I started an experiment: I created a new Stack Overflow user called “Daisy Shipton” with no picture and a profile that just read “Love coding in C#” (or similar). I wanted to see how a new user presenting with … Continue reading Farewell, Daisy Shipton →
First steps with nullable reference types
This blog post is effectively a log of my experience with the preview of the C# 8 nullable reference types feature. There are lots of caveats here: it’s mostly “as I go along” so there may well be backtracking. I’m not advising the right thing to do, as I’m still investigating that myself. And of … Continue reading First steps with nullable reference types →
Backward compatibility and overloading
I started writing a blog post about versioning in July 2017. I’ve mostly abandoned it, because I think the topic is too vast for a single post. It potentially needs a whole site/wiki/repository devoted to it. I hope to come back to it at some point, because I believe this is a hugely important topic … Continue reading Backward compatibility and overloading →
Stack Overflow Culture
This blog post was most directly provoked by this tweet from my friend Rob Conery, explaining why he’s giving up contributing on Stack Overflow. However, it’s been a long time coming. A while ago I started writing a similar post, but it got longer and longer without coming to any conclusion. I’m writing this one … Continue reading Stack Overflow Culture →
Implementing IXmlSerializable in readonly structs
Background There are three things you need to know to start with: Operations on read-only variables which are value types copy the variable value first. I’ve written about this before on this blog. C# 7.2 addresses this by introducing the readonly modifier for structs. See the language proposal for more details. I was touched to … Continue reading Implementing IXmlSerializable in readonly structs →
NuGet package statistics
For a while, I’ve been considering how useful nuget.org statistics are. I know there have been issues in the past around accuracy, but that’s not what I’m thinking about. I’ve been trying to work out what the numbers mean at all and whether that’s useful. I’ve pretty sure an older version of the nuget.org gallery … Continue reading NuGet package statistics →
Diagnosing a Linux-only unit test failure
This is an odd one. I’m currently working on Cloud Firestore support for C#, and I’ve introduced a GeoPoint struct to represent a latitude/longitude pair, each being represented by a double. It implements IEquatable and overloads == and != in the obvious way. So far, so good, and I have working tests which have passed … Continue reading Diagnosing a Linux-only unit test failure →
Diagnosing a VS-only build problem
I do most of my work in the google-cloud-dotnet github repo (That’s the repo for the Google Cloud Client Libraries for .NET, just to get a quick bit of marketing in there.) We try to keep our build and test dependencies up to date, so I recently updated to the latest versions of Microsoft.NET.Test.Sdk and … Continue reading Diagnosing a VS-only build problem →
Diagnosing a corner-case tooling bug
Unlike the previous tests which have been based on Noda Time, this post is based on some issues I’ve had with my main project at work: the Google Cloud Client Libraries for .NET. Background This is somewhat detailed for those of you who really care about the chain of events. If you don’t, skip to … Continue reading Diagnosing a corner-case tooling bug →
Diagnosing a single slow test
In the last blog post, I investigated why my Noda Time tests on Travis were running much slower than those on AppVeyor. I resolved a lot of the problem just by making sure I was running release builds on Travis. That left a single test which takes up about half of the test time though: … Continue reading Diagnosing a single slow test →
Diagnosing slow tests (again)
I’ve previously blogged about a case where tests on .NET Core on Linux were much, much slower than the same tests on Windows. Today I’ve got a very similar problem – but I suspect the cause isn’t going to be the same. This is my reasonably raw log – skip to the end for a … Continue reading Diagnosing slow tests (again) →
Diagnostics everywhere!
For a long time, I’ve believed that diagnostic skills are incredibly important for software engineers, and often poorly understood. The main evidence I see of poor diagnostic skills is on Stack Overflow: “I have a program that does 10 things, and the output isn’t right. Please fix.” “I can’t post a short but complete program, … Continue reading Diagnostics everywhere! →
Using .NET Core 2.0 SDK on Travis
This is just a brief post that I’m hoping may help some people migrate to use .NET Core 2.0 SDK on Travis. TL;DR: see the end of the post for a sample configuration. Yesterday (August 15th), .NET Core 2.0 was fully released. Wonderfully, Travis already supports it. You just need dotnet: 2.0.0 in your YAML … Continue reading Using .NET Core 2.0 SDK on Travis →
Upcoming speaking engagements
I’ve got a few speaking engagements coming up that I thought it might be worth publicising a bit further. They’re all within just over a week of each other, which is going to be somewhat tiring, but… Here they are, in chronological order: Progressive .NET 2017 Progressive .NET 2017 will be held on September 13th-15th … Continue reading Upcoming speaking engagements →
12