In today’s post: How to choose between a static factory method and a constructor; What not to do with async; Meeting with Skype for free; How to stop wasting your time; What you don’t know about names; New static analysis features in GCC prove their worth; Making your C# more functional; Coding bootcamps for veterans; and, How to crash an airplane.
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.
Static Factory Methods vs Constructors In C
While it’s sometimes obvious, it’s not always clear when to use a public constructor or a static factory method for a new class. Gustav used to lean heavily on public constructors but now he takes a more nuanced position. He includes some widely applicable guidelines at the end that I think are very useful.
C# Async Antipatterns
When C# introduced the await and async keywords, it was a revolutionary approach to writing asynchronous code. Unfortunately, they don’t completely absolve you of responsibility - you still need to pay attention to what you’re doing. Here’s a good discussion of some antipatterns - things you should not be doing in your async code.
Software & Updates
A new or upgraded tool can be a beautiful thing.
Host A Quick Meeting With Skype’s ‘Meet Now’, No Login Needed
Isn’t it interesting how quickly “Zooming” entered the vocabulary as a verb for making a video conference call? Given some of the well-publicised concerns with the security and privacy of Zoom, it’s useful to be aware of alternatives.
For example, you can have a quick meeting with Skype without needing to have an account - and their limit of 4 hours per video call is a lot more generous than 40 minutes. Even better, you don’t get completely cut off when your time expires, the call just drops to audio-only.
A great developer does more than just write great code.
How to stop wasting your life watching TV and do something worthwhile with your downtime
This one seems especially relevant in the times of COVID-19 and social distancing. Here are five strategies for making the most of your time, so that you don’t get to the end of the week and wonder why the only thing you did was work.
Falsehoods Programmers Believe About Names
When’s the last time you had to enter your name into a computer website? We do it all the time when we sign up for online shopping, or place an order for dinner. How did the website prompt you for your name? If it’s like most, it used the very western approach of prompting you for your first and last names. Don’t see the problem? Read this post. Names are hard - and most computer systems screw them up.
Staying safe online and writing secure systems are both harder than we think.
GCC 10 gets security bug trap
The latest version of GCC (the GNU Compiler Collection) includes a static analysis feature designed to detect the kinds of bugs that lead to security problems. Even before release, it’s started to prove it’s worth, revealing a recently-introduced security vulnerability in OpenSSL, the library used by much of the internet to secure network connections.
Sometimes the answer is random.
Your C# is already functional, but only if you let it
In this blog post, Igal Tabachnik shares a surprisingly concise and very readable implementation of Fizz-Buzz in C#, using some of the newest features of the language. A good illustration of the expressive power of the new features and how they can be used to good effect.
This veteran started a code boot camp for people who went to boot camp
After their time in the military, many veterans find it difficult to transition to civilian roles even though they are smart, disciplined and know how to work in a team. Jerome Hardaway was one of those vets. He learnt to code and has started a nonprofit dedicated to giving other vets a hand up by teaching them to code too.
Podcast bonus: Scott Hanselman interviews Jerome Hardaway Listen now
Length: 31 minutes
Take some time to feed your mind.
How to crash an airplane
The July 1989 crash of United Flight 232 is undoubtedly a tragedy. But it’s also a story of clear thinking, sound judgement and quite a lot of luck. Nickolas Means tells the story in an engaging and interesting way, with lessons we all can take forward.