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.

Technique

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 .Equals() badly.

Read more

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

Read More

Being Professional

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.

Read more

Wildcard

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.

Read more

Security

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.

Read more

Video

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.

https://channel9.msdn.com/Shows/On-NET/Understanding-how-to-use-Task-and-ValueTask

Length: 27m Audience: API developers

Watch Now

Comments

blog comments powered by Disqus
Next Post
Dependency Injection: ViewModels  10 Aug 2019
Prior Post
Dependency Injection: Core  27 Jul 2019
Related Posts
Using Constructors  27 Feb 2023
An Inconvenient API  18 Feb 2023
Method Archetypes  11 Sep 2022
A bash puzzle, solved  02 Jul 2022
A bash puzzle  25 Jun 2022
Improve your troubleshooting by aggregating errors  11 Jun 2022
Improve your troubleshooting by wrapping errors  28 May 2022
Keep your promises  14 May 2022
When are you done?  18 Apr 2022
Fixing GitHub Authentication  28 Nov 2021
Archives
August 2019
2019