Blog

Minimal APIs in .NET Core 6

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…

June 11, 2021
|
approximately 3 minutes to read
New Namespace Features in C# 10

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…

June 06, 2021
|
approximately 2 minutes to read
Creating a Web Hook for SmartThings via Azure Functions

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…

May 23, 2021
|
approximately 6 minutes to read
Raspberry Pi Camera: 3D Printing a Pan / Tilt Arm

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…

April 17, 2021
|
approximately 5 minutes to read
Design Patterns: Dependency Injection

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…

April 10, 2021
|
approximately 5 minutes to read
Object Detection with ML.Net

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…

April 05, 2021
|
approximately 3 minutes to read
Building a Minecraft Resource Pack

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…

March 21, 2021
|
approximately 3 minutes to read
COVID-19 Statistics Web Application: The End

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…

March 12, 2021
|
approximately 1 minutes to read
Running a Minecraft Server in Docker

I've been playing Minecraft for years with my kids. I don't know if we will ever stop. We have routine "family Minecraft" sessions where we will sit down and all of us will play together in a world. It's a great way for all of us to play a game together. Minecraft is also one of those unique games that you can play across tablet, PC, and console. It also is a great game for different age ranges too. My youngest kids love it right along with my older kids. When we play…

February 13, 2021
|
approximately 2 minutes to read
Reading COVID-19 Statistics in .NET

As part of my new COVID-19 application I've been writing, I had to import statistics from a data source. The COVID Tracking Project maintains daily records of various statistics regarding the pandemic for each state and at a nation level. It publishes this data as an API and also as a set of CSV files. While the API worked, it did not provide the type of extensibility I wanted in order to serve up the data. As such, I decided to read the raw data from a CSV file to import…

February 12, 2021
|
approximately 3 minutes to read
© 2024 - Built and designed by Jeremy Honl with Gatsby. Images are from Unsplash