.NET R&D Digest (March, 2020)

In this by no means difficult time we all spend a lot of time at home. Besides bad sides of isolation it is also a good chance to spend some extra time on self-development and learn something new. As usually this is the end of the month and this is a new issue of .NET R&D Digest – this time with bits of .NET, PowerShell and leaning materials 😊

Enjoy and stay safe!

Life Story

  1. Exploring Different Disciplines in Your Career with Stephen Toub
    If you have ever used async-await then you in some sort meet Stephen Toub a Partner Architect from .NET team. In this interview Stephen talks about his career path, various events and decisions which lead him to his current position. In case you like listening to such interviews (as I do) here is one more with David FowlerBecoming the ASP.NET Architect with David Fowler.

Visual Studio

  1. Visual Studio recent productivity features (by Kendra Havens)
    Are you aware of all recent productivity features of Visual Studio? Would it be nice to have a sample project which demonstrates and explains what exactly these features do? If this questions sounds interesting to you then this GitHub repository by Kendra Havens is what you need. Inside it you will find a sample project where each class demonstrate various features introduced in a corresponding Visual Studio update.

.NET

  1. How to correctly count the number of characters of a string (by Gérald Barré)
    The question raised in this post sounds trivial because, you know, we have string.Length property which essentially does counts number of characters of a string. However as it always with strings, there is more than meet the eye, especially when it comes to different locales, encoding and so on. In this post Gérald Barré walks through different peculiarities of Unicode support in .NET using a single emoji as an example.
  2. This goes to eleven (by Dan Shechter)
    Vectorization is an amazing approach to improve application performance, especially if your application multiplies matrices, or it is for loop which increments array elements. These problems are native for vectorization, but what about something that could involve branching or more complex computations? Is it possible to vectorize them? In this series Dan Shechter accepts the challenge to vectorize Quick Sort algorithm and create an in-place replacement of Array.Sort method from .NET Core BCL. These posts contains description of Quick Sort, processor intrinsics, beautiful animations and code snippets with detailed explanations. All posts are quite large but they totally worth reading (you can also checkout this video from DotNext Moscow 2019)
  3. Dos and Don’ts of stackalloc (by Kevin Jones)
    .NET always was a safe place. All memory is managed by the runtime and the most complex thing to do was a proper call of Dispose method (which was significantly simplified with using keyword). However, such safety comes at cost and by cost I mean performance. Prior to  .NET Core 2.1 there were no clear way, except unsafe and stackalloc, to properly implement many high performance scenarios without putting extra pressure on GC and therefore suffering from performance penalties. This is why Span<T> was introduced. But does this mean we can replace local array allocation with it? In this post Kevin Jones shares a comprehensive list of what you should and shouldn’t do with a new Span<T> type and “safe” stackalloc.
  4. Provisional Mode (by Maoni Stephens)
    The interesting moment about .NET GC is that almost everyone knows something about it. But when it comes to details there are so many surprises. In this post Maoni Stephens talks about one of such interesting dynamic behaviors called “Provisional mode”.
  5. Creating an endpoint from multiple middleware in ASP.NET Core 3.x (by Andrew Lock)
    ASP.NET Core middleware is very powerful and can be used for many purposes. In the ASP.NET Core 3.0 with the introduction of endpoint routing middleware pipeline has changed significantly. In this post Andrew Lock describes how you can create an application endpoint with custom middleware pipeline using only… middleware. As usual the post is full of code snippets and detailed description (don’t forget to check links inside the post!).
  6. Creating Common Intermediate Language projects with .NET SDK (by Filip W)
    It is widely known that you can write .NET assemblies right in the intermediate language, but is it possible to utilize dotnet build infrastructure for this? In this post Filip W describes an approach to use Microsoft.NET.Sdk.IL to build .NET assembly from scratch using only IL.

PowerShell

  1. Secret Management (by Sydney Smith and Paul Higinbotham)
    Storing secrets in a secret store is a very good security practice. However the main problem is usually – how can I easily consume these secrets? Can I do this in a generic way, so this script would work in multiple environments? Previously there was no simple answer, but now there is a way 🙂 In these posts (one, two, three) Sydney Smith and Paul Higinbotham from PowerShell team shares a first information about new PowerShell secret management module! Even if you aren’t using PowerShell on daily basis it is still important to know about such huge improvements.

Blog

  1. Adding Staticman Comments (by Travis Downs)
    Having a personal blog as static web site is a modern and quite popular approach (especially when there are such platforms like GitHub Pages). However while being fast and simple static web sites have some limitations in form of accepting user input. For blogs it is usually a lack of comment system. In this post Travis Downs shares a detailed guide about how you can enable commenting system for your GitHub Pages blog using staticman project.

Security

  1. Injections, where code meets data (by Daniel Szpisjak)
    Injection is an everlasting topic in software development. It is so popular that probably every developer has heard about injections (at least in context of “SQL Injection”) and how to protect from them. However, most of the guidelines (at least that I have met) are focused on practical aspects (which, BTW is very handy) i.e. use certain classes or methods but usually don’t pay a lot attention to reasons why injection really happens. In this post Daniel Szpisjak focuses on injects in general and describes the mechanism of how injections become possible.
  2. Inside a crypto black-​box (by Daniel Szpisjak)
    Encryption is everywhere. We usually don’t see it and, being frankly, in most cases we don’t understand how it works, except it uses some N-bit key to protect our data. However, encryption algorithms have their own “elegance” of relative simplicity and outcome efficiency that it worth spending time exploring how they work. But digging into encryption stuff by yourself can be tricky, that is why it is great to have someone to assist you 🙂 In this post Daniel Szpisjak explains of how AES encryption works. Besides detailed explanations, this post contains link to code repository, papers and whitepapers related to encryption and AES in particular.

Learning

  1. WebGL Fundamentals and WebGL2 Fundamentals (by Gregg Tavares)
    On these web sites you will find a set of articles which will definitely help you to learn WebGL from the ground up. Articles are full of code snippets, interactive examples (just look at this interactive diagram by Gregg Tavares) and (what is very important) contain detailed description of how WebGL really works.
  2. Math for Game Dev – An Improvised Live Course (by Freya Holmér)
    This improvised course by Freya Holmér covers a lot of fundamental math essential to game development including vectors, radians, space transformation and more. Be prepared it is about 3 and a half hours long and what is nice there are much more videos about game development on the YouTube channel. But that isn’t all I encourage you to check very cool math animation on Freya’s twitter (here is an example)
  3. 306 samples for ASP.NET Core 2.1, 2.2, 3.0 and 3.1 fundamentals (by Dody Gunawinata)
    Learning by samples is probably the most natural way of getting into things. In this GitHub repository by Dody Gunawinata you will find more than 306 working samples for ASP.NET Core including SingnalR, Blazor, Razor Pages and more.

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