In today’s post: The story of the Visual Studio Code team turning on strict null checking; Eric Lippert talks about why null is not false; Analyzers for Fluent Assertion users; the PowerToys for Windows are back; Make sure you have five reasons to do anything; Remember IDEAL CHALK when writing code; how to choose a good password generator; retailers need to take responsibility for data breaches; more on programming fonts; fixing your inconsistent sleep schedule; and unit testing at Google.
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.
Strict null checking Visual Studio Code
The Visual Studio Code team just finished a major change - enabling strict null checking across their codebase. They didn’t do this to fix bugs they knew about - but to address a specific category of recurring bugs that kept causing problems in their codebase.
… understanding bugs not as isolated events but as symptoms of larger hazards in our source code.
Their story has lessons that we all can learn and apply to our own projects.
Null is not false
A trio of interesting posts from the famed Eric Lippert, talking about how C# handles null values, why a nullable bool is not false, and more. One of his key observations is that a value of null means “I don’t know”, and this drives the semantics of everything else, including why 100 + null == null, not 100.
Software & Updates
A new or upgraded tool can be a beautiful thing.
If you’re working with FluentAssertions, here’s an analysis package that you might find useful - it provides best practice guidance right there in Visual Studio. This is a good example of a growing (and very useful) trend, where popular NuGet packages provide automated guidance packages.
Microsoft reboots the PowerToys for Windows 10
Back in the days of Windows XP, the Power Toys was a great set of semi-official extensions for Microsoft Windows. Recently, Microsoft announced that the project is being rebooted, with a whole new set of tools … and they’re all going to be open source, hosted on GitHub.
A great developer does more than just write great code.
Five reasons for doing anything
Choosing how to prioritize your time can be challenging. Which of the forty-seven things that I’ve got on my list for today deserves my time? In this blog post, Tom Lorusso shares their technique for decision making.
Two words to code by… IDEAL CHALK
Greg highlights a CodeProject post taking the ideas of SOLID to the next level by suggesting a new acronym. SOLID CHALK is guidance for your next software development project. I can’t decide whether this is a useful original idea or just a piece of fluff - but I suspect it has just enough value to be worth sharing.
Staying safe online and writing secure systems are both harder than we think.
Use a good password generator
From the department of “more detail than I ever thought I wanted to know”, Aaron Toponce has done an impressive audit of various online password generators. Even though I don’t agree with all of his scoring methodology, this is a good reminder that security is hard.
Let’s stop giving retailers a free pass on data breaches
It seems that retailers are currently getting away with lax security and negligent practices because they don’t seem to be adversely affected when they are breached - unlike the people whose details are revealed. We should collectively be changing our online habits to punish online retailers who screw up - especially those who don’t improve, and those who try to cover up the problem.
Sometimes the answer is random.
Top 10 programming fonts
I’m a bit of a heretic who programs with proportional fonts. Why? I find them easier to read and the code ends up narrower overall, allowing me to easily work two files side by side - often a class on the left and its unit tests on the right.
For the majority of you who use a monospaced font, here’s a treat - Dan Benjamin wrote a review of some dedicated programming fonts that you might want to consider using. FWIW, I use Deja Vu Sans in my console windows, but we’ve already established that I’m odd. Make your own choices.
Don’t miss his update on the font Anonymous Pro:
Why you should fix your inconsistent sleep schedule
The value of a good nights sleep can’t be overstated. The more we learn about the role of sleep, the more we learn that it is a vital part of staying healthy in both body and mind.
Take some time to feed your mind.
The clean code talks: unit testing
This talk might be over a decade old - but it’s a discussion on writing untestable code that’s worth the watch. There’s good advice here.