Ever since I stumbled upon the Scrutor project, I wanted to write a blog about building latency and exception logging decorators. At Wehkamp we used StructureMap in the past, but as it became obsolete and swapped out, I missed the decorators. What I love about Scrutor is how it is an extension on the way […]
At Wehkamp we use Redis a lot. It is fast, available and implemented as a managed AWS service called ElastiCache. Sometimes we need to extract data from Redis, and usually I use the redis-cli to interact from the command-line. But what if you need to get the values of 400k+ keys? What would you do? Is there an effective way to query multiple key/values from Redis?
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.
I love attribute validation! They can be used for a myriad of things. In .NET Core MVC we use them to validate models that come into our controllers. In one of our projects we kept running into the same thing: we need to validate a value against an array of pre-defined values. So we wrote some base validation attributes.
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.