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.
Always a way to improve the code you write every day.
“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
A new or upgraded tool can be a beautiful thing.
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
A great developer does more than just write great code.
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.
Sometimes the answer is random.
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.
Staying safe online and writing secure systems are both harder than we think.
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.
Take some time to feed your mind.
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