Notes from the field

Blog

Practical solutions, lessons learned, and ideas from a life in software and technology.

Solved: Why Async/Await does not work with .forEach

The Problem Javascript offers a number of different ways to iterate over an array. Recently while using the array.forEach syntax, I came across some interesting behaviour when using them with the async/await syntax. To demonstrate. Lets take the following Javascript code which simply prints some messages to the console every 2 seconds. function waitForTwoSecs(i) { […]
Read article

How To: Deep Clone a JavaScript Object

Overview JavaScript is becoming ever increasingly more popular as time goes by. While JavaScript has many advantages, it also has many interesting quirks or nuances that can catch out new beginners. In this post I’ll show you how to deep clone a JavaScript object. Problem Okay … before we go any further … lets take […]
Read article

Visual Studio: Close Current Tab Keyboard Shortcut

Overview It’s common today to use the CTRL+W in various applications including most web browsers. If you’ve used Visual Studio you’ve probably noticed that this keyboard shortcut does not work when trying to close the currently opened tab. In this article, I’ll show you how you can easily configure Visual Studio to close the currently […]
Read article

Solved: Azure Functions Can’t Bind Parameter ‘data’ to Type Error

Problem Recently I came across an unusual error whilst working with C# Azure Functions. When the Function was executed, the console window showed the following error. The ‘XXXXXX’ function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method ‘XXXXXX ‘. Microsoft.Azure.WebJobs.Host: Can’t bind parameter ‘data’ to type ‘XXXXXX’. I checked the Activity function parameter bindings however couldn’t […]
Read article

How To: Set Default Terminal In VS Code

Overview By default Visual Studio Code will open a PowerShell session when you launch a new terminal window. But what if you want something else instead? Well you’re in luck because in this article I’ll show you how you can easily change the default shell in Visual Studio Code.
Read article

How To: Debug Angular apps with Google Chrome in VSCode

Overview VSCode is a fantastic IDE for editing <insert your favourite language here> source code. Likewise Angular is a great framework for developing front-end web apps. When developing applications, we developers usually spend most of our time in the debugger. However, out of the box there is a little bit of setup required to enable […]
Read article

How to: Deploy Azure Functions Using Github Actions

Overview GitHub has really opened the doors for collaboration across the wider software development community. If you are already using GitHub then it makes sense to make the most of the GitHub ecosystem and use of all of it’s available features, including GitHub Actions; a powerful workflow engine that enables developers to automate repetitive tasks. […]
Read article

Solved: Set SharePoint Person Field to Null in Power Automate

Problem Whilst trying to update a SharePoint Online List Item through Power Automate I noticed that I was unable to clear a Person field within a given List Item. After some research it turns out that the Power Automate SharePoint Online connector currently does not support this operation when performing an ‘update’ operation. In this […]
Read article

Visual Studio: Generate Class From JSON String

Overview If you work JSON documents, I’m sure you’ve probably had to create a class file from a JSON string. Doing this manually can be a real pain in the proverbial, especially if you are working with a large JSON document. It can also be very error-prone. Therefore it’s best to automate this conversion. In […]
Read article

Visual Studio: Show Current File in Solution Explorer

Overview Have you ever worked on a large Visual Studio project that contained many projects and become somewhat disorientated, unable to find the currently open file within the Solution Explorer pane? I did just that recently … I started work on a large Visual Studio solution for a client which contained over 180 projects within […]
Read article