My C# naming conventions

I have opinions! I've been meaning to write this article for a while. I have various opinions about code formatting, and they may or may not conform to the norm. Also, they change occasionally as and when I get a good explanation of why a different way is better, or…

On Screen Shortcut keys for presentations and recordings

I used this tool a while ago that let me show on-screen what keyboard shortcuts and combinations I was pressing so that others could see them, especially during presentations, and on video recordings. But for the life of me today, on a new machine, I couldn't remember what it was…

A PowerShell Watch Command

I use dotnet-watch a bunch and have used a version via grunt/gulp a little in the past as well. In front of me, I had some TypeScript, tsc and an app.ts file. I wanted to watch it and trigger tsc automatically. But there was no csproj, no NuGet,…

There can be only one return; 0 RLY?

My opinions and choices on style of coding evolves and changes over time. By blogging about this now, I can refer back later when I change my mind. I can also elicit the opinions of others to influence me to change my ways if I happen to be wrong and…

In C#, your structs should be immutable.

I wrote some code. It was simple code. I had a collection. I iterated over the collection and updated the values. I did this several times in an outer loop. The code didn't work. Why didn't it work? My collection was an array of Structs. When I pulled an item…

"failed to peek context header from STDIN" and how to fix

The docker guidance says you can run docker build piping the dockerfile: #On linux $ docker build - < Dockerfile and on Windows it says to do this: #PowerShell Get-Content Dockerfile | docker build - Nice. But I've been getting this error all day... > Get-Content Dockerfile | docker build - unable to…