Blog
Null is often described as the million dollar problem or billion dollar mistake. There are so many times when a null check is needed in code that it can be easy to forget them. Javascript compounds this with the additional special case of undefined. With Typescript, strong typing helps catch these errors. However, in Typescript that safety comes with the added complexity of having to do null checks a lot. Thankfully, in Typescript, there are several shorthand ways to deal…
Typescript has become my favorite language to use during web development. Most of all, I love the type safety. However, there are so many features to the language it's easy for little useful tidbits to get forgotten about. I'm going to be writing some brief posts on some little features that have really been helpful during web development. The first of these is destructuring assignments. Destructuring Arrays For example: While this is a trivial example, the opritunity here is…
One thing I've been jealous of scripting languages over the years is how easily they can be used to build out small and simple applications. For example, Node.js has the express library whereby a complete API can be built out in a single file. While more complex projects necessitate more framework than that, the required scaffolding for a simple program is fairly low. In languages such as C#, prior to .NET 6, to build out a simple API requires some degree of pomp and…
With .NET 6 arriving this fall, there are a wealth of new features being introduced that I'm really excited about. With most new .NET versions come new features added to the C# language. As part of this article, I'm going to pick out a few of my favorites being introduced in C# 10 related to namespaces that I'll use often. Keep in mind, .NET 6 is still in preview, so it's always possible they could get cut or changed in the final release. However, I've seen them demoed by…
A few years ago, I started placing SmartThings sensors around my home. Mainly, I have a few around doors around the house with contact sensors to know if they've been opened. I've wanted to integrate with them for some time to build various applications around them, or to be able to audit things in my house such as if I leave a door open for too long. SmartThings allows building web hooks (Smart Apps) to react to data and events. So, I built a small Azure Function as a…
In a previous post I introduced my project to take pictures with my Raspberry Pi. So far, this is a two part project. Build an image microservice I can use to snap pictures of the outside world. Build a machine learning microservice which has the capabilities to recognize objects in those pictures. For the next part of my project, I wanted to mount my camera on my Raspberry Pi. Rather than having it be in a fixed positon, I wanted it to move. So, I decided to build a pan/tilt…
One of my favorite features of .NET Core / .NET 5+ is it's dependency injection (DI) framework. If you've been stuck in .NET Framework, or old ASP.Net, it is one of the biggest fundamental changes with how applications are pieced together. I had started using a now abandoned IoC container, Ninject close to ten years ago. It radically changed the way I approached writing software. I was very happy to see .NET Core embrace this DI pattern. What is Dependency Injection In short…
I've always found machine learning interesting, but never taken the time to implement something. The best way to do that? Involve my Raspberry Pi of course. I created an application to detect objects in images captured by my Raspberry Pi. The application is an ASP.Net Core WebApi which hosts two services. The first draws boxes around objects in the image returning the modified image. The second returns a JSON representation of the objects that were found. Here's a picture of…
Family Minecraft was recently taken to a new level in my household. We built our own family resource pack. I changed the faces of various mobs in Minecraft to be that of our family. I was a spider, my wife a pillager, my oldest son an endermite, my daughter an enderman, and my youngest son a skeleton. Here's part of our family Minecraft mob: While there were quite a few steps, the process wasn't difficult. I was able to accomplish the feat in less than an hour. How to Build…
About a year ago, I wrote an application that displayed COVID-19 Statitics in a web application. It was a fun little practical Angular project to write. Last week, The COVID Tracking Project stopped collecting and reporting new data. This is the primary data source for my application's numbers. While it is possible to get data directly from the CDC now, the information isn't as easily available to access as the APIs for the COVID Tracking Project. So, I will be taking the…