RSSAmplifier

Blog

Volodymyr Gaevoy's blog | Expert Web Development Services

Get simple and helpful tips on .NET, c#, web programming and professional software development on Volodymyr Gaevoy's blog

gaevoy.comRSS feed ↗10 posts

Latest posts

Contract-First Modular Frontend: Enforcing Boundaries in React

The shared/ folder and I have a complicated relationship: I keep adding to it, and it keeps making my app harder to reason about. This post is my attempt at couples therapy. The whole post fits in one sentence: split the app by business feature, let features depend only on...

Evolving a Frontend Schema with Upcasting

Backend and frontend developers are supposed to be different species. I’ve spent enough time on both sides of the same products to suspect we mostly just borrow each other’s tricks and rename them. Something I reach for constantly on the backend keeps turning out to be exactly what I needed...

Modular Monolith in .NET: Enforcing Boundaries with Dependency Inversion

I have been writing .NET for the better part of two decades now, across dozens of projects. Different domains, different teams, different decades — and yet there is one thing I can almost always count on finding when I open a solution: a project called Core. Or Kernel. Or Shared,...

Using C# 12 Features in .NET Framework

Ah, .NET Framework - our trusty old friend that refuses to retire! While it might be considered legacy, there are still tons of .NET Framework projects out there in the wild. And let’s be honest, moving to the latest .NET isn’t always a walk in the park, especially when your...

Exception Rethrow traps in .NET Framework

In my investigation of a production issue in a .NET Framework application, I faced a challenge while trying to match the stack trace from error logs to the source code. Despite .NET documentation stating to keep the original stack trace information with the exception, use the throw statement without specifying...

Learn C# Enum Flags by Doing

Ever tried naming your favorite things using enums in C#/.NET, like choosing between Dog, Cat, or Bird for your favorite pet, or picking your top language from English, German, Ukrainian? Enums are fantastic for this - like a personal pick-n-mix of named values. But here’s the twist: what if you’re...

Handling of unknown enums in .NET serialization for API integration

Enumerations, or Enums, serve as a comprehensive method for representing named values, such as currencies (e.g., EUR, USD, NOK) and languages (e.g., English, German, Spanish). They are integral to the vast majority of programming languages. Additionally, OpenAPI (Swagger) accommodates Enums through its utilization of JSON, a subset of JavaScript. However,...

Speed up NUnit tests in one-line

Nowadays, software developers use laptops with lots of CPU cores. The same on server frames - the number of CPUs grows. As a developer, I expect that the libraries I use are optimized to distribute workload across multiple CPU cores by default. But it is not the case for NUnit...

Compute SHA hash for streams

We have a generic logic to log all requests towards API. Due to security reasons, we cannot log the request body because it can contain sensitive data or personal identifiable information (PII) such as customer emails, names, passwords, etc. To distinguish requests, we have decided to hash a request body...

Beware of decimals in Microsoft SQL Server

Every year, we adjust prices for services according to the inflation rate and some business requirements. This year we have got new requirements to increase and round the prices according to specific business rules. We use Microsoft SQL Server and the prices are stored there. To update prices we should...