samwalpole.comI wrote this article using the Hashnode API! Here's how...In case you didn't know, Hashnode has it's own GraphQL API! Catalin Pit wrote a great article about how you can use the API to display your published articles on your own website. However, the API can do so much more than this, such as following a u...Nov 14, 2021ยท10 min read
samwalpole.comMy Top 5 JavaScript Tips & Tricks for Writing Cleaner Code1. Destructuring Assignment Destructuring assignment allows one or more object properties to be assigned to variables in a single expression. The created variable will have the same name as the property. let myObj = { id: 1, name: 'My Object' }; ...Aug 8, 2021ยท7 min read
samwalpole.comA Practical Guide to Higher Order Functions in C#If you have been programming for any length of time, you may well have come across higher order functions, but (like me) may not have fully appreciated just how powerful they can be. If you've not heard of them before, never fear, I have an explanati...Jul 3, 2021ยท3 min read
samwalpole.comLINQ: Beware of deferred executionIf you've spent much time around C# and .NET, it's likely that you will have come across LINQ (Language-Integrated Query), which allows you to use a range of powerful querying capabilities directly in the C# language. The example below demonstrate a ...Apr 25, 2021ยท6 min read
samwalpole.comHandling Dependency Injection in Inherited ClassesDependency injection (DI) is a wonderful thing. Simply add your dependency as a parameter to the constructor (most commonly) of your class, register it with you DI container, and away you go - the DI container will manage the rest. Some of the key be...Apr 11, 2021ยท4 min read