Recently I was looking through the github issues for the MariaDB nodejs connector project for some low hanging fruit. I came across [issue 347](https://github.com/mariadb-corporation/mariadb-connector-nodejs/issues/347). This is something that is common in projects written in Javascript that are consumed via a Typescript project. The crux of the problem is the difference between a `const…
On social media and YouTube I've been seeing a lot of influential developers complain about how LLM usage in programming has left them feeling. Mostly these complaints are along the lines of "I feel like my skillset is no longer important", "I feel no satisfaction when an LLM successfully writes a bunch of code for me", or "I feel like my career is over, the LLM will replace me". What a bunch…
Despite popular opinion, I still belive in the use of design patterns where applicable. I've been reading through Bob Nystroms [Game Programming Patterns](https://gameprogrammingpatterns.com/command.html) from 2014. The great thing about these sort of programming books is that they hold up really well. The patterns present are just as relevant today as they were in 2014.
Tailwind is great. It's a quick way to style a webpage and offers incredible flexibility. The problem is, despite Tailwind being incredibly customisable I can instantly tell when a site is using Tailwind. It has a certain look and feel that is hard to shake. A few years ago this "look and feel" was fresh and classy. Now thanks to LLMs prefering to use Tailwind to style a page rather than…
Every year I look forward to seeing the Redmonk language rankings. They are the only language rankings I pay any attention too, cough Tiobe. In recent years there has been very little movement in their top 20. It features all the usual candidates. Java, Javascript, Python, C# etc... the languages you may possibly get a job in. My interest lies in the outliers, seeing random languages fly up the…
I check Hacker News and Lobsters all the time. It's sort of like an addiction, or maybe just a bad habit. It started about three years ago when I would post blog links on the two platforms. Which Lobsters banned me for. Apparently self promotion is wrong. Well I have no friends or colleagues to post for me, so it's self promotion or no promotion. Anyway, there was a time when I would…
The sheep have finished lambing and I finally have some spare time. I've been AFK for a few weeks and during that time I've been reflecting on life as a programmer. Upon this reflection I have made a decision. I want to write C. Writing C feels like proper programming and I wish to be a proper programmer.
I've been working as a "Software Engineer" since 2014. Before that I studied a Master's Degree in Computer Science. Where I learned about C, C++, and how computers worked. This was all in preparation for a wonderous career in the software industry.
The html5 canvas api uses radians for rotation and drawing circles. But I, as an ape, use degrees. Because of this I find myself constantly writing the following methods to convert degrees to radians and vice versa.
Last week I ranted about the AI slop app "gamebot.studio". The rant resonated with some it's readers and has been included in the GameDev.js weekly newsletter.
Today we are going to look at an AI slop app. The type of app that a junior dev prompts into existence and tries to flog as a "platform". The case study today is gamebot.studio. Which I haven't linked to as I find the whole thing malicious.
Let's take a deep dive into GameDev in JS. I've been making games in javascript since 2014. It's super fun as you can build something and share the demo straight away. No need to compile or build for certain platforms. Just write the code and see it work in a web browser.
Well any link to my Github account from this blog is now broke. After years of steady decline and selling it's soul to the devil. I have decided I don't want to be a member of Github any longer.
"A man could use his back or use this brain..." that is a line from one of my favorite Eagles songs, Doolin Dalton. It springs to mind as the current rhetoric from AI pushers is that as machinery made the human back redundant, AI makes the brain so. Obviously that is complete bollox.
Back to comp-sci 101, as I'm currently re-exploring the fundamentals of programming. As others choose to hand over their hard earned programming skills to the LLM I've decided to double down. So let's take a look at the binary search algorithm.
Git comes with the concept of "hooks" which are scripts that get executed when and event occurs. A common use case for git hooks is to run a test suite before a commit (pre-commit) is made. If the script that is executed exits with a non-zero value (error) then the commit is prevented.
When working with a database it is a very common task to retrieve a sorted list of entities. What you might not realize is that this can be a very expensive operation.
I've been doing a lot of web scraping for various AI tools. This includes model training, and search functionality. One thing I find myself doing is generating lots of prototypes. Each prototype requires me to write a new db schema and one thing they share in common is the need for a `http_status_codes` table to record the final status response of a web page. You could store the…
When working with an instance of a MariaDB database I noticed that the [npm package](https://www.npmjs.com/package/mariadb) used to connect did not support Typescript generics. This was something I felt I could fix, so I sent in a PR.
I've been using rsync to deploy this blog. Because I live on the edge and don't need any deploy pipeline headaches. And tbh, this is blog is not critical software it's a static site hosted by a caddy server on UpCloud. Anyway here are some quick tips from my experience deploying on the edge.
2025 was a super busy year for me. Some of the highlights being, my wife is now pregnant (due date 02/01/2026), moving house (now on a 300 acre farm), becoming a part time farmer (150 sheep, inherited from my father in law). And on the tech side, as my techy life is the focus of this blog, an awful lot of wheel spin.
I'm working on a Raylib game in C. It's a Scoundrel clone, which is a card based dungeon crawler. Anyway, I thought I'd share a code snippet of how I am generating the deck of cards using C.
"Every developer should host their own blog". Is a statement repeated regularly across socials. I agree, they should. But I didn't untill now, so don't beat yourself up over it. Here is a quick run down of how this blog is hosted.
Phase one for day 6 only. Phase 2 beat me. Spent over an hour on it, but the left vs right justifying of numbers got me. I may come back to it, but I've spent all the time I want to on it tonight.
This is the first one where I've had to change a solution for performance. The logic here was fairly straight forward. The challenge was getting the program to complete before new years eve.
2025 has been a strange year for me in regards to programming. Throughout my career I have worked on many differents "stacks". I started off in dotnet in 2012, then php at now defunct "digital agencies", then into java and C++ at the dreaded fintechs. My last role involved using python, to integrate "ai" into an insurance company's website. So I'd like to think I have a broad range of…
It's a pain having to use external plugin managers for vim. It's always ircked me, and now I'm glad to see the neovim has added a builtin plugin manager as of 0.12.
I'm currently writing an extension for the Caddy web server which is written in Go. Becuase of this I needed to install go on my wsl Ubuntu instance. For future Brian, I have created a bash script to install other versions of Go.
Today was my last day at work. I work as a short term contractor, although sometimes it's not short term. I onced worked a rolling 6 month contract for 4 years. It paid for my house and wedding, those were the days. Often I am happy to accept extensions. But sometimes I don't. When I don't it's always been down to the same cause. Managers or mismanagement.
Everything should be rewritten in rust. Or so I'm told by all the vibe coders. `mise` is a _dev tool manager_ that is super handy. I currently use it to manage my dev projects. So the context of this article is my wsl ubuntu 24.04 instance.
Bun has an sqlite interface built in. It make for some great dev-ex. One thing that ircks me when dealing with sql and Typescript however, is that when I run queries I often have to model the db table that I am querying in Typescript. This usually involves a manual effort, but not anymore. I have written a short script to auto generate Typescript types for table definitions.
I introduce to you "literal-templates", a lightweight, flexible template engine for Node.js. Offering dynamic registration and rendering of template views, includes, and helpers.
I've been thinking some more about using template strings as a view engine. This blog for example now uses the template engine shown below. It's quite simple to implement and it's usage in html files is super intuitive. You just need to remember that the html you are writing will be intepretted as a template string, and you already know how to use template strings, so there is no…
Template strings in JS can be used to create a view engine without adding any extra libraries. So if you are creating a server side js app, think before you reach for handlebars, ejs, or god forbid pug. Not becuase those are bad, pug is, but becuase it's so easy to leverage template strings as a view engine.
Before you pull in the next hot new validation library. Ask yourself this question. Do I need it? The answer is no, field validation is quite easy. Let me show you how to create an extensible object field validator.