.NET R&D Digest (May, 2021)

May is almost ended, so as usual it is time to read something new 🙂 I introduce to you a new issue of .NET R&D Digest!

This issue contains bits of engineering, software development, security, tools, CSS and as usual – .NET.

Have a great weekend!


  1. Internal Combustion Engine (by Bartosz Ciechanowski)
    Internal combustion engines are everywhere. Most of the cars we see today are powered by such engines. That is why it is interesting and important to understand how these things work. In this post Bartosz Ciechanowski does exactly this. With help of amazing animations and detailed explanations he describes the internals of combustion engine starting from basics right to a complete engine. Besides being full of information, this post also includes links for further studying. 

Software Development

  1. Professional Open Source: Maintaining API, Binary, and Wire Compatibility (by Aaron Stannard)
    When you think about open source the first thing which usually comes in mind is an enthusiast writing code at night and … it is still true. However, nowadays there is an another side of open source, a professional one. With project used by a lot of products. In this post Aaron Stannard describes what is expected (well… ideally from any project) from open source projects when it comes to long term support and commitment. Besides detailed description of multiple types of compatibility strategies, Aaron also highlights important points of what makes project friendly and reliable in eye of users. 
  2. Bitemporal History (by Martin Fowler)
    The history is usually seen as an immutable, linear stream of events. However, when it comes to real world, it is obvious — information doesn’t spread momentarily and it isn’t send to all individuals. This creates situations when our, subjective history differs from the actual one, which of course affects our decisions. In this post Martin Fowler describes a concept of bitemporal history. A way to look at events from prospective of actual time when something happens and from recorded time when we acknowledged the changes.  


  1. The sudo bug (by Richard Kovacs)
    It is a general rule that things deeply integrated into operating systems are well written. However, they as all programs, are written by humans and therefore might have bugs. In this post Richard Kovacs describes a recent security issue with sudo on Linux which if used properly can lead to serious security breach.

Visual Studio Code

  1. .NET Interactive with SQL!| .NET Notebooks in Visual Studio Code and .NET Interactive Preview 3: VS Code Insiders and .NET Polyglot Notebooks (by Maria Naggaga)
    Visual Studio Code is not an IDE, it is a code editor. However, we use it to write projects in .NET, TypeScript, C++. We also can write PowerShell scripts, interact with Azure and well… I suppose we can write anything. In these posts Maria Naggaga describes a new plane of what we can write in Visual Studio Code – a multi language interactive notebooks (which is a bit different of previously introduced PowerShell notebooks). The posts are full of examples which demonstrate a lot of amazing features like Entity Framework Core integration or cross language variables sharing.


  1. Covariance and Contravariance in C# Explained (by Patrick Smacchia)
    Generics has been in .NET for years. However, some of the most used features of generics and subtyping are usually stay in shadow. In this post Patrick Smacchia explains what covariance and contravariance mean and how they apply to subtyping, generics, delegates and arrays. While post is mostly focused on consumers point of view all this knowledge is handy when need to write your generic. 
  2. Aggregate Design: Using Invariants as a Guide (by Derek Comartin)
    Modelling application domain involves both creating individual entities which manage theirs state and ensuring, changes to these entities are done in order. In this post Derek Comartin describes a way to think about aggregates in terms of identifying invariants between logically related entities to ensure changes don’t violate or break domain logic.
  3. Put a DPAD on that GC! (by Maoni Stephens)
    GC is a beating heart of the .NET runtime. Memory efficiency of our application depends on it (well… it also depends on us, however while we can hint GC or don’t create an extra work for it, we can’t really control how and it does). In this post Maoni Stephens describes a new feature, which will be available in .NET 6 as experimental feature and hopefully as permanent improvement in future release of .NET, which changes one of the fundamental parts of the GC – memory segments, replacing them with new, more granular memory regions. While this change won’t make itself a default for a significant time it is interesting to know what is coming.
  4. Understanding the impact of Roslyn Analyzers on the build time (by Gérald Barré)
    Roslyn analysers have become an immense part of development workflow. They help us find issues, apply best practices and look after code style. However, are there any side effects? In this post Gérald Barré demonstrates how you can measure impact of Roslyn analysers on project build time and how you can control when to execute them.
  5. Is the era of reflection-heavy C# libraries at an end? (by Marc Gravell)
    .NET is a platform with rich runtime type information and dynamic code generation capability. You can use reflection, expression trees, or pure IL. Thanks to this, there are a lot of libraries which make sometimes magical things like transforming queries to types, or generating proxies at runtime (ex. System.Dynamic.Linq library which I maintain). In this post Marc Gravell shares his vision of how new framework versions and language features are changing the way library authors might look at these problems now.  Migrate to source generators? Stay? Do both? These questions are hard to answer binary but it is interesting to read reasoning from a person who have created bunch of amazing things in this area.
  6. Getting Started With Github Actions for .NET Developers (by Steve Gordon)
    I believe any project which isn’t a basic prototype should have continuous integration pipeline configured to at least build and run tests for any commit or pull request. However, while this might sound quite reasonable, the overhead of configuring such a pipeline is not free — you have to configure the build and test phases, tie continues integration system to your repository, provide credentials and so on and so forth. Because of this it is always cool to have an ability to configure pipeline in the same surroundings as repository. GitHub Actions have been available for a while and make exactly this for GitHub repositories. In this post Steve Gordon does an introduction to how you can configure a simple continues integration pipeline for your GitHub repository with GitHub actions. As usual, the post contains code snippets and detailed explanations.
  7. Why should you care about .NET GC…? (by Konrad Kokosa)
    The question of whether develops need to dive into technology they use is an eternal one. There is always “it just works” and “it can work much better”. I think there is no binary answer here. However there are definitely reasons to know more. In this post Konrad Kokosa shares his understanding of the question in regard to .NET memory management and provides a plenty of reasons to know more (as well as useful resource to follow up).
  8. Creating a Simple Moving Average calculator in C# (by Andrew Lock)
    Have you ever heard about SMA (simple moving average)? If you are like me and never heard of it, then this is a chance to learn something new 🙂 In this series or three posts Andrew Lock demonstrates how you can write a thread safe SMA calculator in C#. Beside SMA description the posts contain source code samples and detailed explanations.


  1. A Guide To Newly Supported, Modern CSS Pseudo-Class Selectors (by Stephanie Eckles)
    Users expect a lot from modern web applications and this includes not only such things as performance but also visualisation and accessibility, which we express through CSS. So it is always a good news to see more and more stuff gets support. In this post Stephanie Eckles describes new pseudo-class selectors proposed in the latest css draft, which definitely solve some of current problems (just think of :where one). Beside a detailed description and code samples, the post also include demos you can play with.


  1. Cloud-Native learning resources for .NET developers (by Nish Anil)
    Cloud changed user experience by providing cross device synchronisation and a way to store our files, so we can access them from anywhere. However, Cloud also changed a way modern applications are implemented. To make sure developers can keep in touch with latest and greatest, in this post Nish Anil shares a list of free resources, composed by .NET team, which includes guidance of how to get started and develop new Cloud native applications, or modernise the existing.

Watch & Learn

  1. .NET GC Tips & Tricks – Choosing the best GC mode for your app (by Konrad Kokosa)
    .NET GC has two modes — workstation and server, which also can operate to use or don’t use background collection. However, it isn’t easy to find out which mode to use and when it will be beneficial. In this webinar Konrad Kokosa describes both modes and provides guidance for selecting the right one.
  2. The .NET Docs Show – Getting Started with Elasticsearch.NET (by Cam Soper, Luis Quintanilla, Cecil L. Phillip and Steve Gordon)
    Search functionality is an important part of many application. However, while it might looks simple from user prospective (just type and click) internally it faces a lot of challenges. One of the popular platform to implement such functionality is ElasticSearch. In this video (hosted by Cam Soper, Luis Quintanilla, Cecil L. Phillip) Steve Gordon does an introduction into ElasticSearch functionality and demonstrates how you can put data in, search it, update index and for sure — query it. Besides the demonstration itself, the video includes Q&A section.

Did you know?

  1. Microsoft Docs have interactive tutorials on how to start with C#?
  2. You can try, I think, any Azure REST API endpoint right from Microsoft Docs? If you have an Azure subscription.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s