In todays post: Checking for nulls in C#; performance improvements in .NET 3.0; proving stereotypes aren’t true when working remote; blocking the worst passwords; and understanding ValueTask.
Sharpen the Saw used to be an email newsletter of information I published for the professional development of software developers. Now it’s a series of blog posts. While targeted primarily at developers working with the Microsoft technology stack, content covers a wider range of topics.
“is null” versus “== null” in C
Testing for null values is pretty common in C# code (though it’s likely to become less common when nullable reference types arrive in C# 8). The pattern matching syntax introduced in C# 7 gives a different way to test for null, by using the
is null syntax. In this blog post, Jax argues that this is a better way to test for null - both because the different syntax calls out the different nature of null, and because you can’t mess with it by implementing
Software & Updates
Performance Improvements in .NET Core 3.0
One of the key goals for the 3.0 release of .NET Core is performance. This post by Stephen Toub goes into exhaustive detail about many of the improvements that have been made. a
Technical Debt Quadrant
Over on his bliiki, Martin Fowler has an insightful post on the subject of technical debt, arguing that there are different kinds of debt to be considered. While there are undoubtedly different ways to achieve it, I quite like the way he breaks the possibilities down into a useful set of quadrants.
How To Be The Remote Employee That Proves The Stereotypes Aren’t True
From the Trello blog, some advice on how to make remote work, well, work. Working remotely brings with it considerable flexibility, but not without cost. Staying connected to the rest of your team has to be deliberate - you can’t leave it to chance.
Pwned Passwords in Practice: Real World Examples of Blocking the Worst Passwords
In May 2018, Troy Hunt posted about how sites were using his Pwned Password service to ensure their customers were using safe passwords. Pay particular attention to the k-anonymity model he’s used for the service, making it possible to check a password without revealing it.
Understanding how to use Task and ValueTask
For the case where the return value is usually already available,
ValueTask provides a low overhead alternative to
Task - one that allows you to avoid allocation in the common case. This can ease pressure on the garbage collector and improve performance.
Length: 27m Audience: API developers