.NET R&D Digest (July, 2021)

Two quarters away and still two quarters to go. What does it mean? 🙂 As usual, it means it is time for a new issue of .NET R&D Digest – July 2021.

This issue includes bits of computer science, software development, tips & tricks, mathematics, diagnostics and of course – .NET.

Have a nice read and a great weekend!

Computer Science

  1. WCF #5: A Most Elegant Data Structure (by Dave Thomas)
    Data structures are core of software development. They are everywhere but what is interesting we almost never implement them ourselves because they are already implemented in almost any modern platform. I this post Dave Thomas describes an implementation of well-known data structure – a list and demonstrates an elegant move which allows you to avoid corner cases in its implementation. 

Software Development

  1. Microservices (by James Lewis and Martin Fowler)
    Microservices have been around for years, however there are still questions of what microservice is or how large should it be? In this post James Lewis and Martin Fowler define a microservices architecture style, explaining why it is a good approach of building applications, highlighting benefits and stating concerns. This is a 2014 article, but it is still relevant.
  2. Will deep understanding still be valuable? (by Eric Sink)
    We have abstraction to simplify things. We have interfaces to separate abstraction from implementation. These two helps us to use something without understanding of how «something» works. But does it mean we shouldn’t try to dive deeper and understand what is underneath? To dig into thing? These are tough questions. In this post Eric Sink reasons about the direction of the industry and what should we do – keep digging or just go with the flow?

Operating Systems

  1. Processes, Threads, and Windows (by Pavel Yosifovich)
    Every Windows Desktop application has a UI thread. But how thread becomes UI thread? Is there a way to find a UI thread of a window? In this post Pavel Yosifovich describes the relationship between processes, threads and windows and desktops. The post is full of code snippets which you can use to experiment and try all the described things yourself.

.NET

  1. Migration of Bing’s Workflow Engine to .NET 5 (by Ben Watson)
    Search engines produce results in a fraction of a second which is amazing. Bing is one of these things. It is written in .NET and it is still fast 🙂 In this post Ben Watson describes a process, challenges and results of migrating Bing workflow engine to .NET 5. This post includes a lot of interesting numbers and general overview of workflow application architecture.
  2. Conversation about networking (by David Fowler, Geoff Kizer, Karel Zikmund, Sam Spencer, Stephen Toub and Rich Lander)
    In a last few years .NET network stack had come through a lot of changes including a complete rewrite in C#, support for new protocols like gRPC and so on. What else was introduced? What is coming next? Why some of these things were done in a first place? In this conversational post David Fowler, Geoff Kizer, Karel Zikmund, Sam Spencer, Stephen Toub and Rich Lander talk about networking in .NET, its implementation, challenges and future plans.
  3. Conversation about containers (by Brigit Murtaugh, David Fowler, Glenn Condron, Manish Godse, Maoni Stephens, Michael Simons and Rich Lander)
    Nowadays containers have become an inevitable part of application deployment and development flows. In this post Brigit Murtaugh, David Fowler, Glenn Condron, Manish Godse, Maoni Stephens, Michael Simons and Rich Lander share a view of .NET on containers world highlighting the important part of what should be expected from containers and how they can be used.
  4. Using SSH and localhost.run to test GitHub webhooks locally (by Andrew Lock)
    Ability to run things locally is a fundamental part of successful development. However, in many situations it is hard or even impossible i.e., when you need to test how your app process request from a server (because you need a public endpoint for that). In this post Andrew Lock demonstrates how you can use localhost.run service to create a HTTP tunnel (free, no sms) to test you GitHub webhooks locally. While this post is particularly about GitHub webhooks you can use the same approach for any situation when you need to tunnel external requests to local machine.
  5. Memory Anti-Patterns in C# (by Christophe Nasarre)
    High level languages like C# empower us to write complex code faster, easier, and in more readable way. However, abstraction always has a cost and here it comes from the fact that we aren’t always understand what is happening underneath. In this post Christophe Nasarre shares a set of memory anti-patterns you might have seen or even written yourself. Each pattern is accompanied by a solution. The post includes a lot of code samples and is fun and easy to read.
  6. Conditional compilation for ignoring method calls with the ConditionalAttribute (by Andrew Lock)
    What backward compatibility and multi-targeting have in common? Both require the same API surface to work in different circumstances. Usually such things are implemented using so-called conditional compilation. In this post Andrew Lock describes how you can leverage conditional compilation in .NET and shares his discovery of not widely known [ConditionalAttribute] and its application.
  7. Top 10 New .NET 6.0 API (by Patrick Smacchia)
    Each version of .NET brings a lot of new things – classes, API and methods. In this post Patrick Smacchia does an overview of 10 changes upcoming in .NET 6 including new basic types (date-, time only), new LINQ methods (ex. min, max) and even a new collection – priority queue. The post contains detailed description of all changes and code samples.
  8. «A deep dive on StringBuilder» (Part 1, Part 2 and Part 3) and «How does the StringBuilder work in .NET?» (Part 1, Part 2 and Part 3) (by Andrew Lock and Steve Gordon)
    StringBuilder is a fundamental part of BCL. It is hard to imagine a code working with strings without it. A lot of posts in the internet are dedicated to its usage but have you ever asked yourself – how it works? Looks like this question stroked two great minds at the same time. In these series Andrew Lock and Steve Gordon dive into StringBuilders’ implementation explaining what is really happening underneath. While these series are dedicated to the same topic they are not mutually exclusive, so I highly recommend to read them both.

Tips and Tricks

  1. Showing unresolved functions in PerfView (by Kevin Gosse)
    In this short blog post Kevin Gosse shares a tip of how you can prevent PerfView from automatically grouping all unresolved references under «?!» group.

Watch and Learn 

  1. How Not to Be Wrong: The Power of Mathematical Thinking (by Jordan Ellenberg)
    Mathematics is everywhere and I don’t mean school, university and so on. What I mean is everything we see around us can be explained with help of mathematics. Mathematics also allows us to look at things from a different angle and ask the right questions. In this video Jordan Ellenberg tells two stories about how mathematics intersects with a real life in a fun and unexpected ways.

Tools

  1. dotnet-wtrace (by Sebastian Solnica)
    How many diagnostic tools you need to find an issue? The answer is “it depends”. Of course we can use monsters like WinDbg to debug all issue we can possible imagine but probably this won’t be a most effective way of spending our time. That is why we need different tools for different cases. This tool created by a Sebastian Solnica comes handy on the initial phase of application diagnostics. It captures .NET events in real time, extracts import parts and displays them to you in a friendly manner. One more tool into a toolbox.

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 )

Google photo

You are commenting using your Google 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