Hugh Haworth - Developer Blog Writing about the cool things we do with connected computers A tale of two static site hosts A tale of two static site hosts 1 November 2025 Azure to Cloudflare pages Scripting Audacity with JavaScript Scripting Audacity with JavaScript 22 February 2025 More ear happiness with more automation Snippets everywhere on Windows with autohotkey Snippets everywhere on…
This site has been moved to Cloudflare pages. It used to be hosted on Azure blob storage behind Azure CDN. So what happened? Why move? One day I got an email from Azure "Hey, you need to migrate away from Azure CDN classic, and move to either Azure Front Door standard or premium". Okay fine, this is a personal site that gets very little traffic, so I'll use Front Door standard I guess. Not the…
It's always great to get back to the programmer‘s favourite hobby: Spending more time automating something than it would take to just manually do the thing. I’ve been looking into audio recently and going into deep dives on the open source tools for removing noise from audio such as RNNoise: a machine learning model developed by Mozilla foundation for removing everything but voice from audio. When…
One of the big problems with doing anything on computers is getting the information from your brain into the computer. This is opposed to the other (bigger) problem of solving/understanding the problem in your brain. As developers, the biggest thing that separates us from non-developers is that we communicate to the machine through text. Like Steve Yegge said: Text is king . Getting text into the…
You’re in Power BI. You’re in the Power Query editor getting data. Imagine you’ve got a CSV like this: id name salary EMP-1 Johnny Bravo 10000 EMP-2 Donald Duck 20000 EMP-3 Finn the Human 15000 EMP-4 Jake the Dog 5000 And another CSV like this: id country EMP-1 New Zealand EMP-2 China EMP-3 United Kingdom EMP-4 Australia And you want to combine the two to get: id name salary country EMP-1 Johnny…
In the times that I’ve had to implement Single Sign On authentication for ASP.NET Core apps, I’m always trying to do it as quickly as possible. I usually get it done in a single-minded period filled with anger at documentation and bewilderment around what I’ve configured incorrectly, then eventually I’ll achieve a signed in user (yay). The information online about OpenIDConnect in ASP.NET Core is…
Today, we're going to create a server-side Blazor app that uses Azure OIDC to authenticate. You’ll need the DotNetCore SDK . I’m going to be using DotNetCore 6 - the oldest possible version that's still supported. First I’m going to set things up. I’m not going to go into a whole lot of detail until we get into authorization section, so if this is your first time creating a DotNetCore app, you…
If you’ve been a computer person long enough, then you’ll eventually come to terms with the fact that all the files on a computer are made up of the same ingredients: lists of bytes. Whether you save a text file or a movie or an executable on your PC, the circuitry in the storage drive has no idea what it is. Even the operating system is just guessing based on context. If you give a file the…
The lingua franca of the government/enterprise world for communicating data is the excel file. SQL doesn’t have the same level of adoption for non-technical people. This means that if you’re an SQL person ( As I'm attempting to be ), you’re bound to get asked to translate between these two forms of tabular storage - from excel to an SQL db and vice versa. Often a big part of my job is that I get…
Reporting # For a large amount of my life I didn't really measure much. I'm bad at arts and crafts because I don't properly cut at the right angle. When I volunteered on farms I'd plant in weird lines. I like to cook a lot more than I like to bake. I’ve always considered myself an “artistic” person more than a “science” person. Now measurement, numbers and reporting are literally my job at a…
DotNetCore, Azure AD, and SAML are an odd mix of old and new tech I found myself needing to combine. You’ve got the newer cloudiness of Azure, the fresh C# runtime DotNetCore, but a crusty old authentication protocol with SAML. If you’re like me and have been working on a (mostly) greenfield C# project and find that you need to authenticate to Azure AD using SAML, this guide might come in useful…
There's a hill near my house, about ten minutes walk away. A steep windy road goes up for five more minutes of (hot) walking, then a gate takes you out of suburbia and into the bush. From there on it's a steep firebreak. The soil is a light brown clay. It gets slippery on rainy days, and it's broken and uneven. Going up the hill you have to duck through mānuka in some sections or tip-toe around…
A few of my posts on here have been about coding on the cheap. Static sites , EC2 instances with everything installed on them , Github actions , free plans. Sometimes it’s to my detriment as I sacrifice a whole lot of my time for a few less dollars per month. Buuuuuut my side-projects haven’t been aimed at making money, so I don’t want them to suck up money. Maybe after a few more years on a…
I've started a new blog! Gizmo Girls baby! I wanted to Spend all my innovation tokens and really try out a whole bunch of cool new tech. I also wanted a set up where someone non-technical would be able to make changes. Another thing I wanted was to be able to update the blog from my phone. This meant that the workflow for this blog you're reading (writing markdown files and pushing them up to…
You have a small site where you don’t expect many visitors, but you want dynamic server rendering and you want it cheap. My new favourite hosting for this use-case is Amazon Web Services’ EC2. You might struggle with the fact you're giving the richest people in an unequal world more money. And maybe your time is worth too much to waste on server configuration. But if you have a small passion…
In my last post , I wrote about building an Apache module written in C. In researching how to do this, I learnt about a the Apache Portable Runtime . What's that? It's a number of libraries and header files provided by the Apache Software Foundation which abstract away operating system operations, and allow your C code to become more portable. The Apache Portable Runtime (APR) was originally part…
Before we jump in, I should let you know these instructions are going to be for 64 bit Windows only. I'll be compiling on Windows and for Windows. If you're running Mac or Linux I'm afraid you'll have to find another (probably easier) tutorial. Compiling Apache for Windows is probably a pretty cooked thing to do anyway, as you'll usually want to deploy Apache on a nice cheap linux virtual machine.…
If you make a search for "SQL” on Seek , you’ll find thousands of jobs. IBM developed SQL in the early 70s and won the war of relational database management languages. There are millions of SQL databases running in data centres around the world. It’s an important tool to learn. Moving logic out of the application layer and into SQL can improve performance and make systems easier to understand. SQL…
I remember some of the first lines of JavaScript code I looked at were in Jon Duckett’s JavaScript & JQuery . This book and HTML & CSS are the canonical get-into-web-development books. They are truly singular in that they’re the only ever textbooks to actually LOOK GOOD. Anyway, I remember coming to the section of the book about adding click handlers. There was a code sample that looked something…
You’re making a JavaFX app and you want to render a collection properly by using a ListView or TableView . These components are great: you point them to an ObservableList and all you need to do is update this list and the views will automatically be updated. You can also generate a bunch of your favourite JavaFX UI elements for each item in the list — including buttons, labels, inputs — any…
lately I've been experimenting with C, C++, Win32, and SDL. The first thing I've noticed is we don't know how good we have it in the JavaScript/web development world: Blog posts and online resources # You can find great documentation for web stuff everywhere. JavaScript has blown up in a time when all kinds of people are becoming coders. There are a thousand accessible blog posts for any topic.…
requestAnimationFrame is the way to create complex animations with JavaScript. If you’re using an animation library, the chances are that it uses requestAnimationFrame under the hood. How do you use requestAnimationFrame ? We'll start by looking at a simple example to make a line to repeatedly grow: <-- HTML --> <div id="line"></div> /* CSS */ #line{ background-color:black; height:1px; } /* JS */…
We use web apps to make a ridiculous quantity of content every day; videos, blogposts, statuses, documents. We’re ceaselessly clicking “new post”, “upload video”, “start a new document”. I had an epiphany about what should happen when you click “create” on a web app these days. This epiphany mainly applies when the content takes a long time to create, like writing a document, making a codepen, or,…
Today I created my first Electron app. It was pretty cool to see something that would usually be stuck within a browser exist as its own unit on the operating system. Getting a "hello-world" going was really easy with the quick-start tutorial . To get your first electron application built you’ll need to install both: Electron to get the developer environment going Electron forge if you want to…
I've recently been getting into the new generation of development tools like wmr, Vite, esbuild and Snowpack. These are causing quite a bit of hype in the community. So I thought I'd start to get closer to the metal with these tools and how to configure them. Something interesting I found out is that both Vite and wmr have opted to support rollup plugins! The rollup plugin API is a hell of a lot…
In 2016, back when we could freely travel without being a virus vector, I went on a 6 month trip through Europe. I needed a cheap crappy laptop to check emails, read books, and go on the internet. I ended up with the Acer N15P2 . A little plastic thing with a tiny screen and a single core Intel Atom (slow) processor. It was nice and light and although it wasn't the fastest computer, it was exactly…
What do people mean when they say “use the platform” or “web fundamentals”? The web is well designed: It’s reliable, it’s consistent, and it’s open. Some sites built on it aren’t so great. But we keep coming back anyway. I’d maintain that the original design of the web is, and always has been, pretty damn good. If we have a deeper look into its basic building blocks, we can improve our websites.…
Over the last week or so I've migrated this website and blog from a custom PHP CMS I built to an Eleventy build hosted on an Azure storage container. So why did I go static? I did get partly inspired by this Eric Meyer post about going static . He's mainly addressing government agencies in a call for them to improve their web services to provide accessible information in the time of Covid 19 - So…
There are a thousand different ways to get a server up and running in different environments. For my Laravel programming I was using laragon , which has been working a charm - super easy to set up and configure. I've created a few create-react-app projects. This is awesome too, however it takes about 10 minutes for me to download all the packages for webpack, the live hot module reloading server,…
That's right you heard me! Plantr 2.0 Released! # Maybe it's more of a 1.0 and the last one was a 0.0. 🤔 Well anyway, this is my latest and greatest project, Plantr. I had heaps of fun building Plantr. Here's the stack it's built on: Heroku for hosting (the free version at the moment so a slow initial pageload) AWS postgres database (configured through Heroku) PHP Laravel Alpine.JS for front-end…
2020 was the worst year ever for a whole lot of people. I got off super easy being from New Zealand and having steady employment which I could do from home during lockdown. And thankfully we only had the one lockdown, unlike a whole lot of other countries. So I feel very lucky to have done anything at all in 2020. Some things I learnt in 2020 # I've learnt a WHOLE lot in 2020. Throughout 2019 I…
As you can probably see from my earlier post about Lit-HTML and Haunted , I've been looking at alternatives to React for adding interactivity to pages without a whole lot of technical debt and without shipping a gigantic package size to the client. One of the great ways of getting this done is with Alpine.JS . A framework by Caleb Porzio - a developer from the Laravel community. Alpine JS is…
I love using React. I love not having to query the dom every time I have to show or hide a modal. I love being able to know where the source of truth lives in an application. And I love hooks! A bunch of useful closures with escape hatches to the imperative world? Sounds good! React is based on a state-driven UI concept. This concept is powerful enough that React has been inching ahead in the…
I went to my second ever Javascript meetup last night. It was basically a free lesson from a senior frontend developer based in Wellington. I felt like I should be paying more for all the advice I was getting. ... Hopefully the guy who hosted the meetup doesn't read this and start charging! We were taking a look into building a React application. So far I have mainly been learning React in…
I've just started building my gardening application and thought I'd note down a few of my first impressions getting into using Eloquent models. Here are a few of my thoughts: They're easy to work with # Yup, I managed to do what I would had done with vanilla PHP and home-rolled CSV functions in 5 hours in about half an hour. Most of the code is already written # When you're using eloquent models…
One of the first full stack applications I built was a gardening app. You could register, log in and the app would tell you how long your vegetables would have before they were ready to harvest. My name for the app was originally "planter". But my partner said "lose the E. It's cleaner" in her best impression of Justin Timberlake/Sean Parker in the Social Network . Of course Plantr has not exactly…
I've been trying to work on my design skills lately. As much as some might be able to respect good code behind the scenes, everyone can tell when a website or application looks good. There are so many different aspects to good design: layout, typography, alignment, usability and responsiveness, but lately I've been taking a look into colour (yes, this is how we spell it in New Zealand). Having a…
Back in the bad old days of PHP we needed to interact with our databases with raw SQL queries through the crusty old mysql extension. We would build queries out of conctenated strings, attempt to escape user input, then execute these queries in our database. And then we'd pray our code wouldn't allow the user input to be assessed as SQL. What could possibly go wrong? Things, of course, did go…
Hey! This post is a little out of date! I had fun writing this PHP framework, but I've since moved to a static site archicture. This blog is built using Edoras - a barebones MVC framework I built with laravel as my inspiration. Here's a link to the source code . I have been trying to learn laravel recently, looking at books, documentation and laracasts. These were all great resources. I'd…