Lev Yastrebov’s Blog

馃憢 Welcome to my blog! I’m a software engineer with decade+ experience, specializing in backend and algorithms, preferably using .NET. I love creating effective, robust, and maintainable software systems.

Let’s get to know each other:

I enjoy writing tests

Why? Because they help me implement features faster. But it wasn鈥檛 always that way. Let me show you how I went from aversion to actually enjoying tests, and why they鈥檙e so helpful now. Bad experience My first experience with tests was awful. Back in 2015, I worked on a team that had strict code coverage requirements. The workflow looked like this: They didn鈥檛 have integration tests; unit tests were mostly trivial, with tons of manually initialized mocks....

February 24, 2025 路 4 min 路 Lev Yastrebov
Screenshot of code in ILSpy

.NET: How AOTed trimmed application can read data from another assembly

I will show you ways to read string data from arbitrary .NET assembly in case when you don鈥檛 have: Reflection, i.e when you operate from a trimmed or AOTed application Full set of app dependencies. This is conceptionally wrong - why do we need to load everything, when we only need raw data from a library, also, I wanted a way to read data from damaged distributions. Let鈥檚 imagine we have an assembly, where we have this code:...

October 12, 2024 路 5 min 路 Lev Yastrebov
Error diagram

Windows Application Packaging Project: Solving Cryptic Error When Referencing a .NET Project

I have a Windows desktop application that I distribute using MSIX packages, making them easily installable and automatically updated on modern Windows machines. To create such a package, the most straightforward method is to use the Windows Application Packaging (WAP) project, although it does have its quirks. Additionally, I have a utility project that doesn鈥檛 require access to Windows APIs but needs to support trimming and be as compact as possible....

September 19, 2024 路 5 min 路 Lev Yastrebov
RAG diagram

GenAI on your Data: What is RAG and Semantic Search and Why It's Hard for Code

Recently, I came across a one-year-old Youtube tutorial, that showed how to run ChatGPT on my own data in ~15 minutes. That sparked my interest, I thought - what if I fed ChatGPT with my codebase, so it could respond to queries like: Where in the code is the order total compared to what鈥檚 returned by the vendor? And it would show me code fragments with class names (I鈥檓 in C#)....

August 23, 2024 路 17 min 路 Lev Yastrebov
Screenshot of build failures and one successful run

Obscure error during switching of Azure SWA Functions from in-process to isolated mode

A couple of years ago I crafted an internal-use utility for one of my clients that uses Azure Static Web Apps with Blazor and some Functions. That worked well, but the client asked to extend functionality, so I decided to refresh the code along the way. Back in the day, I wrote the utility using .NET 6 and in-process functions, since the out-of-process mode was not yet available. The current ....

August 2, 2024 路 6 min 路 Lev Yastrebov