In today’s post: Reducing the scope of each pull request; rules for better powerpoint presentations; a welcome to C# 9.0; Chrome has a new feature to manage your tabs; we’re all bad programmers; five ideas for eliminating bad code; thunderbolt ports are insecure; an unattributable data breach; kudos for Ashley Bloomfield; and The Clean Code Talks.
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.
How to Scope Down PRs
Ever discovered a bug while working on a feature and thrown the fix into the same PR? While that’s fine for one bug, it can become a problem when too many extras are thrown into the PR, making it unfocused and difficult to review. This post discusses the problem and offers some guidance on how to keep things small.
Rules to better PowerPoint presentations
Here’s an interesting set of guidance from Sydney based SSW on building better PowerPoint slide decks. As with many lists of this kind, there’s value in reviewing them to see what can be useful for your context and then ignoring the rest. I don’t agree with all of this guidance, particularly the suggestions around the use of a template - though if you’re speaking for your employer, this can be important.
Software & Updates
A new or upgraded tool can be a beautiful thing.
Welcome to C# 9.0
The C# team is closing in on the final features for the next version of the C# language and Mads Torgersen recently blogged on all the goodies they’re wanting to bring us. It’s a great list:
- Init-only properties.
- Records (incl With-expressions).
- Top-level programs.
- Enhanced pattern matching.
- More Target-Typing.
- Covariant returns.
Target typing and covariant returns will be extraordinarily useful when needed, but I suspect that init-only properties and records will have the biggest impact.
Tab-Groups is Chrome’s best new feature in years
Have you ever felt that the Tabs bar at the top of your Chrome window is just a little out of control? It’s really easy to end up with so many open tabs that finding the page you want is nigh on impossible. So we open another new tab instead. Tab Groups provide some structure to your tabs, hopefully making them easier to manage.
A great developer does more than just write great code.
You’re a Bad Programmer. Embrace It.
Jared Richardson thinks we’re all bad programmers. I think he’s right. We all make mistakes. What differs is what we do about those mistakes. His advice mirrors my own - part of the solution is in choosing good tooling.
5 Practices to Eliminate Bad Code
We’ve all been there. We think the work is done, the feature is complete, and then we spot the problem. Or, worse, someone else identifies the problem. Here are five suggestions from industry leaders on how to do better:
- Automate everything.
- Treat code like art.
- Collaborate and learn.
- Write for humans.
- Use the right tools.
Staying safe online and writing secure systems are both harder than we think.
Thunderbolt flaws expose millions of PCs to hands-on hacking
If you have a Thunderbolt port on your laptop - and many of us do - then it’s highly likely that your machine is vulnerable to this new exploit. Realistically, because the attack requires physical access to the machine, most of us will be safe. It does highlight, however, how there can still be flaws in systems that have already been thoroughly analysed and vetted.
The unattributable “db8151dd” data breach
Troy Hunt blogs about a data breach he received back in February 2020. Initially, he was unable to identify which organization had been breached. After the post went live, the source was narrowed down.
Sometimes the answer is random.
The extremely competent, somewhat boring civil servant who has New Zealanders’ hearts a-flutter
During New Zealand’s Alert Level 4 lock-down, there was one constant that came up while chatting with friends and colleagues who live outside of New Zealand: their appreciation of the extreme competence with which New Zealand handled their COVID-19 response. Central to that response, our Director-General of Health, Dr Ashley Bloomfield. He’s become a bit of a celebrity.
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.