Solving Google Prettify Excessive DOM Size
Solving Google Prettify Excessive DOM Size
JavaScript, Regular Expressions

Solving Google Prettify Excessive DOM Size

Lately I’ve been tinkering around with my blog to see if I could get a better score in Google Web Vitals. The “Avoid Excessive DOM Size” attracted my attention. The details showed that my code fields were to blame. I use Google Prettify as it is lightweight and does a pretty good job, but… it renders way too much span elements. Let’s see if we can make it spit out less.

Dependency Injection based on request headers
Dependency Injection based on request headers
.NET Core / C#, Dependency Injection

Dependency Injection based on request headers

Dependency Injection (DI) helps us to change the behavior of parts of our program on the fly. This is especially neat when you want to test your domain services against a mocked data-store. But what if you need to change the behavior of your API based on a request header?

Yesterday I had a discussion with my colleague Robert Kranenburg about this. He showed an example of a console application changing its behavior based on an argument. I took the idea and converted it into .NET Core 3.1 code to change behavior based on a cookie.

Visual Studio Code + Docker + Python using WSL in Windows on Boot Camp
Visual Studio Code + Docker + Python using WSL in Windows on Boot Camp
Automation, Boot Camp, Docker, Python, WSL

Visual Studio Code + Docker + Python using WSL in Windows on Boot Camp

I imagine your first thought is: why? Well, at Wehkamp we do a lot of cross platform development, but sometimes we end up with shell scripts that do stuff with Docker and Python. Usually that’s not a problem for Mac, but for Windows it’s a different thing. I have a MacBook Pro, but I’m a .NET developer, that’s why I prefer Windows, so I run Bootcamp. This article will show how to do Python development in the Windows Subsystem for Linux (WSL) using Visual Studio Code and Docker.