Recent Posts
A pure T-SQL replace-all function using PATINDEX
Although SQL Server is a powerful and fully-featured database engine, one of the things it has always lacked is support for regular expressions. This isn't a super big deal, because you don't (or at least shouldn't) need regexes in your database all that often, and if you do need them you can always write a trivial C# extension for it thanks to the SQL CLR. Or, well, at least you can if you're running SQL Server on prem. In Azure, it's another story. In the ... read full post
A template for Dependency Injection and Configuration in .NET Core console apps
One of the nice things about working with ASP.NET Core is that dependency injection (DI) and configuration is wired up right out of the box. Working with console apps, you don't have this luxury. However, it turns out it's very easy to set this up yourself. In this post, I'll set up a minimal template for using DI and appsettings.json configuration from a .NET Core console app. I'll be using .NET Core 3.1, which is the current latest LTS version. The first thing ... read full post
Creating a Companion Cube in Blender 2.8
The Vital Apparatus Vent will deliver a Weighted Companion Cube in three, two, one... I've been learning Blender recently, and after following along with some courses I wanted to try and make something on my own. What better first project than an iconic object from one of my favorite video games? Plus, it's just a cube, so how hard could it possibly be? Well, not all that hard, really. This ... read full post
Visual Studio 2019 is kind of a disappointment
Microsoft Visual Studio is over 2 decades old at this point, and is currently still the way to work with the .NET ecosystem. It's a solid IDE, arguably one of the best around. Earlier last month Visual Studio saw the release its latest major version: version 2019. Despite having been around for such a long time, this is actually the first release of Visual Studio that took place in the face of genuine competition ... read full post
Security Analysis of the Aperture Science Turret Production Line Turret Integrity Arbiter Integrity Judgment Protocol
Abstract We analyze the behavior of the Integrity Judgment Protocol, which is used by the Turret Integrity Arbiter on the Aperture Science Turret Production Line to determine the integrity of assembled Aperture Science Sentry Turrets. This analysis is primarily an assessment of the security of the Integrity Judgment Protocol. Overview The Turret Integrity Arbiter is a junction on the Turret Production Line where freshly assembled Aperture Science Sentry ... read full post
How much Pi do you really need?
Last Thursday was Pi day, at least in those parts of the world with a month-before-day date format. Google celebrated this event by computing a record-breaking 31.4 trillion digits of Pi. There's no practical applications for this whatsoever, but it did get me wondering: how much Pi is enough? Let's figure this out by using ... read full post
Why I don't have a very active GitHub profile
I was approached by a recruiter on LinkedIn the other day with yet another unsolicited job offer. I get these every week, and usually I just ignore them. This one stood out to me, however, due to the way the candidate profile was described. This guy was unironically looking for a "rockstar developer" who "lives and breathes code," maintains an "active GitHub profile," and spends a lot of time on reddit and hackernews. Yeah. I don't see ... read full post
SHENZHEN IRL: BRING OUT THE BARON!!
There's an early-game puzzle in SHENZHEN I/O called "BRING OUT THE BARON!!" that has you designing a simple personal scorekeeper for a drinking game. This assignment comes in through Joe, obviously. The scorekeeper is a fairly simple device. It has two input buttons called "point" and "foul", and a multi-digit ... read full post
Unlocking SQL Server Management Studio's hidden dark theme
If there's one minor annoyance I have with SQL Server Management Studio, it's how it looks. Specifically how bright it looks. This becomes obvious when using SSMS side-by-side with Visual Studio. Of course, Visual Studio has come with a dark theme since version 2012, which is how it should be for all IDEs. I mean, look at it: So dark. So soothing. Like a warm bath for your eyeballs. Then you alt-tab over ... read full post
Static variables, constructors, and JIT optimizations
We ran into an interesting problem at work the other day. A unit test was always passing locally, but failing on the build server. Here's a minimal reproduction of the code involved, so we can take a look at what went wrong. The (relevant bits of the) class that was being tested looked something like this: public class Foo { private static readonly ConcurrentDictionary<int, Foo> _map = new ConcurrentDictionary<int, ... read full post