In today’s post: Avoiding shotgun surgery; why too many parameters is a bad thing; upgrading to .NET 5; Creating a DSL using a Source Generator; Common sense practices to avoid; Why people write bad code; Rethinking passwords; The curious case of the Great Suspender; The importance of checking in with people; and how reviewing a Strangers’ Code can make you smarter.

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.

Shotgun Surgery: What It Is and How to Stop It

From the NDepend blog, Erik Dietrich talks about the design smell “shotgun surgery” and why it indicates your codebase may be in poor condition. As always, the first step in fixing a problem is to recognize that it exists.

Read more

Avoid Too Many Parameters

During a code review, Oren Eini noticed something concerning about a couple of the changes. Even though they were just adding some simple parameters to existing methods, he foresaw the changes could lead to problems. Find out what he saw, and how he intends to fix the problem.

Read more

Software & Updates

A new or upgraded tool can be a beautiful thing.

From .NET Standard to .NET 5

The new release of .NET brings changes to the way targeting works. Driven by the introduction of a single codebase across multiple platforms, netcoreapp and netstandard are gone. They are replaced by net for cross platform libraries and by a number of platform specific targets.

In this article from Code Magazine, Immo Landwerth (a program manager on the .NET team) goes into all the details you need to know.

Read more

Using C# Source Generators to create an external DSL

Source Generators are an extremely powerful way to extend the C# compiler. They allow you to generate additional C# code, at compile time, to suit any requirements you have. In this article from the .NET Blog, Luca describes how to implement an external DSL that gets compiled into C# code automatically.

Read more

Being Professional

A great developer does more than just write great code.

5 Common-Sense Practices Dev Teams Should AVOID

In this provocative post from the Axosoft blog, Hamid Shoajaee argues that these five practices should be avoided, not embraced:

  • Treat Team Members the Same
  • Follow Established Procedures or Processes
  • Create a Detailed Design Before Starting Development
  • Make it Difficult to Change Requirements Mid-way
  • Assign Tasks Based on Resource Availability

To find out why Hamid thinks these practices can sometimes be a problem, read their original post.

Read more

3 Reasons Why People Write Insanely Bad Code

Why is it that some people write bad code? Deepak Karanth has some ideas. In this Dzone article, he outlines three possibilities:

  • The Obvious Reason (they’re bad programmers)
  • Low Expectations
  • Programming Books (poor examples)

Read more

Security

Staying safe online and writing secure systems are both harder than we think.

The tyranny of passwords – is it time for a rethink?

It’s a bit of a puff piece, but this article from The Guardian does make some good points about the pitfalls of passwords. The advice to use a password manager is sound - I use LastPass, and I’ve heard 1Password recommended frequently. Also of interest is the fact, almost glossed over, that the flaw of biometrics is that they can’t be changed. Unlike a password, if your fingerprint is compromised, you can’t change it.

Read more

Google disables and removes The Great Suspender extension for containing malware

The curious case of a popular open source Chrome plugin that was sold by the original developer to a new owner, who then decided to do something at least slightly dodgy.

Read more

Wildcard

Sometimes the answer is random.

Staying Connected

Movember Country Director for New Zealand, Robert Dunne, shared this post in April 2020 about the importance of connecting with those we care about. All these months further on, I think his message is still spot on. Robert shares the idea of calling on ALEC (Ask/Listen/Encourage/Check-In) when you connect with someone who might be doing it tough.

Read more

How Reviewing Strangers’ Code on GitHub Can Make You a Better Programmer

Reading an unfamiliar codebase is a particular skill, one that can be worth investing in developing. Taking the time to do this will make you a better developer - in this article, Ryan Pinkham explores why.

Read more

Comments

blog comments powered by Disqus