.NET R&D Digest (January, 2020)

It is 2020, it is the end of January, it is time for new issue of .NET R&D Digest! πŸ™‚

This issue contains bits of story, .NET, performance , security and much more (just follow the links).

Have a nice read!

Attention!

This post might contain links from 2019 or earlier!

Author’s joke

Life & Story

  1. Become a better developer through blogging and reading source code (by Steve Gordon)
    Motivating posts by Steve Gordon about how blogging and source code curiosity can help you become a better developer. In these posts you will find story, answers, tips and links to useful resources to get started.

Performance

  1. Gathering Intel on Intel AVX-512 Transitions (by Travis Downs)
    It is always interesting to read performance related posts because you never know what to expect. Why this was executing so long? What causes this behavior? There is always a small mystery πŸ™‚ That is why it is important to not spoil it in description. In this post Travis Downs examines how Intel CPU executes AVX-512 instructions. This post contains lot of low level details, graphics and … footnotes!

.NET

  1. ConfigureAwait FAQ (by Stephen Toub)
    In this post Stephen Toub describes what exactly ConfigureAwait method does, when to use it and how SynchronizationContext and TaskScheduler are related to async-await infrastructure. Besides implementation details Stephen also talks about design decisions and infrastructure expectations. If you are interested in some more details about asynchronous execution flow I also recommend you to check another post by Stephen from 2012 about relations between ExecutionContext and SynchronizationContext.
  2. Building a self-contained game in C# under 8 kilobytes (by Michal Strehovsky)
    Most of the time when we talk about optimization we talk about performance. If discussion includes networking we also talk about data transfer size. But what about application size? Is this still a thing? In this post Michal StrehovskΓ½ explores how far it is possible to go in reducing the size of .NET self-contained “snake” game. Besides low-level hacks this post also demonstrates how much you can reduce application size simply using tools from .NET SDK.
  3. Optimizing string.Count all the way from LINQ to hardware accelerated vectorized instructions (by Sergio Pedri)
    I love doing performance optimization and (not a surprise) read about how others do it. In this post Sergio Pedri shares his journey of optimizing a very simple method of counting number of occurrence of a given character in a string. The story starts from the naive implementation using System.Linq and ends up with low-level vectorization stuff. All important code parts have comments (and link to other posts) which makes it easy to get even if you have never heard of vectorization in .NET Core.
  4. Why is reflection slow? (by Matt Warren)
    If you ask .NET developer “What do you know about reflection?” with very high probability the answer would be “it is slow”. But why is so slow? (and is it really slow?). In this quite old post (almost 4 years from now!) Matt Warren describes what reflection does (and why) and performs a benchmark to find out how much does reflection really cost.
  5. C# 8.0: Understanding using declarations (by Steve Gordon)
    C# 8.0 introduced a new usage for using keyword which allows us to declare a variable which would be automatically disposed at the end of the scope (sounds like RAII, isn’t it?). In this post 
    Steve Gordon describes how new using declaration is implemented and how it could be used to simplify things.
  6. Using Serilog.AspNetCore in ASP.NET (by Andrew Lock)
    Logging is probably one of the most simple (to understand) and complex (to implement) thing you can think of. It should have all required information but at the same time it should be very verbose πŸ™‚ It should be structured but still readable by human πŸ™‚ Serilog is a very powerful .NET library which can help you to find the balance but as any tool it requires a proper configuration. In this series Andrew Lock describes how you can configure the library to reduce amount of logs written, log useful MVC properties and more. As usual every post contains code samples, detailed explanation and source code on GitHub.

SQL

  1. SQL Murder Mystery
    There is a murder in SQL City! A very interactive self-thought SQL tutorial where you have to find a murder using SQL Queries πŸ™‚ If you aren’t a SQL guy, you can check out a walkthrough to get started. Don’t let the murder go away!

CSS

  1. Min and Max Width/Height in CSS (by Ahmad Shadeed)
    CSS is tricky, especially when you are not doing it every day. In this post Ahmad Shadeed describes how you can use min / max-width / height properties to achieve desired page / elements layout. Besides multiple placement example Ahmad also shares visualization tips & trick to make you UI look great.

Security

  1. The Difference Between Root Certificates and Intermediate Certificates (by Patrick Nohe)
    We interact with SSL certificates every day (or even every minute or less). They are everywhere. But why we trust them? How this “trust” works? In this post Patrick Nohe provides a very easy to understand explanation of how certificate trust chain works and what is the difference between root and intermediate certificates.

Learning

  1. So Many Ways to Learn .NET in 2020 (by Shayne Boyer)
    Learning something new can be frustrating when don’t know where to start from. In this post Shayne Boyer composed a set of free learning resources you can use to start learning .NET and all of its major aspects like ASP.NET, Entity Framework and more. Besides learning resources this post contains links to shows you can follow to keep learning πŸ™‚

Videos

  1. Dotnetos Conference 2019
    Love .NET performance talks? Then these videos from Dotnetos Conference 2019 are for you. I won’t describe the talks here (it could require a separate blog post or two), so just enjoy the presentations.

Tools

  1. Python Tutor (by Philip Guo)
    This great tool created by Philip Guo allows you to visualize execution of python (and more!) program in a very neat and understandable way. Besides visualization, Python Tutor allows you to collaborate with other users by either asking for help or providing help for other users.
  2. PascalABC.NET
    Pascal was the first programming language I learnt in the university, then it was Delphi Object Pascal and at last I ended up with C (not C++, I am quite bad at it) and .NET (C# language). Since then I didn’t hear much about Delphi and Pascal except stories when people switch to .NET and Java. So it was a pleasant surprise to discover a version of Pascal that actually compiles to .NET! This project is free and is actively developed (here is a GitHub repository).
  3. dotnet-outdated (by Jerrie Pelser)
    Updating NuGet packages is so simple when using Visual Studio but when it gets to console and code editor the things gets a bit more complicated. Should you check each package manually on feed? Risk and update to latest? Sounds tough. Here is where dotnet-outdated by Jerrie Pelser comes in. This dotnet global tool allows to list all package which has new version available in one carriage return. Same comes for the updating them. So if you have never heard of it – try and give it a star!
  4. Overleaf
    Nowadays I think most of the developers know what Markdown is. It is widely used to write documentation, personal blogs and so on. But sometimes you need to create a PDF, well, may be a research paper πŸ™‚ Here is where LaTeX can help you – and overleaf is the online LaTeX editor πŸ™‚

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