RSSAmplifier

Blog

Adriaan Knapen

Recent content on Adriaan Knapen

aknapen.nlRSS feed ↗16 posts

Latest posts

Lines of Code is a Bad Productivity Metric, also for AI

“One Amazon engineer said his team was roughly half the size it had been last year, but it was expected to produce roughly the same amount of code by using A.I.” — New York Times, May 25, 2025 Generative AI is transforming software engineering. Used well, it can boost productivity, uncover solutions faster, and streamline development workflows. I’m all for that. But in the rush to adopt AI, we’re…

How I Backup My Entire GitHub Account

I’ve spent a lot of time building everything which I store in GitHub, so I want to make sure I have a backup of it. Here’s how I have been doing it for years now, and it has worked like a charm! The Problem With the increasing reliance on GitHub for storing code and managing projects, it’s crucial to have a backup strategy to prevent loss of data. GitHub provides redundancy and…

Unit Testing Cross-Fetch, TypeScript and Jest

Writing unit-tests for a library which overwrites the global fetch function can be a bit tricky. This post will show you how to do it. The Problem When using cross-fetch in TypeScript, you will most likely import it like this: import crossFetch from "cross-fetch" This is because the cross-fetch package is not the default export, but rather a named export. However, when you want to mock the…

Global declarative Cronjobs in Nest.js with Bull

There are several ways on how to schedule repeatable jobs in Nest.js. The official documentation suggests using @nestjs/schedule. This library offers an elegant CRON-based API, which should be familiar to most Nest.js developers. Look at how neat and simple this declarative API is: @Injectable() export class MyService { @Cron("* * * * * *") handleCron() { console.log("CRON is triggered"); } } With…

Optimizing Docker container image size when using Yarn

In this post, I’m briefly going over how installing dependencies in your Docker image using yarn install can cause unnecessary bloat, why it happens, and the simple steps to take on how to fix it. Backstory time The other day, I was containerizing a simple Node.js project. The MVP Dockerfile was as simple as it gets: FROM node:16.18.0-alpine COPY ./package.json ./yarn.lock ./ RUN yarn…

Rendering Azure Log Analytics make-series in Grafana

Not too long ago I got into building a metrics dashboard for our resources in Azure. Specifically, we’re running our applications in Azure Kubernetes Services and want to have a dashboard to track how everything is doing. Since we already have our logs emitted to Azure Log Analytics we could use that to build our metrics. Writing the queries to fetch our data from Log Analytics is rather…

Collect Emails from NextJS Form in HubSpot

Collect Emails from NextJS Form in HubSpot HubSpot is an awesome platform to centrally track all the contacts your company is doing business with. At ClaimR we have been using HubSpot with great success, as it allows all our team members to have a single source of truth. During the last few weeks I have been working on our renewed website. NextJS is a no-brainer at this point, as it is an amazing…

How to Build a Plugin for Docusaurus v2

Cool stuff: This blogpost got featured on the official Docusaurus blog! 🎉 Now, go read on about creating your own Docusaurus plugin 🚀. At ClaimR we have been using Docusaurus v2 for our developer and documentation website for a while now. After a couple of months of using it we can confidently say that we’re very happy with our choice. Docusaurus comes batteries-included, so you immediately get…

Always-Free Managed PostgreSQL Databases Reviewed

Edit: This content in this post is already a couple of years stale. Heroku Postgres is not free anymore. However, in the mean time Fly.io now features Fly Postgres. It’s a bit more hands-on than many managed Postgres services. However, it does fit within your free-tier and does not oversell your shared database. So, if you don’t mind getting your hands dirty, then it’s a very…

Prod++[3]: Leaner Search Using DuckDuckGo !Bangs

In this mini-series I will walk you through some habits I replaced in recent times, which have shown to pay off and make me a more productive programmer/power-user of my computer. All these changes should be easy to gradually adopt, so I would highly recommend checking them out. If you’ve any suggestions ☝️ or improvements ✍️, then email me at hi@aknapen.nl or reach out using any of the social…

Server Sided GraphQL with Apollo Client

During development of the dashboard I’m making for ClaimR I found myself in the position where I wanted to query a GraphQL endpoint from my backend. (It’s a NextJS powered project, hence the server sided logic is written in Node.) So, I started looking for GraphQL clients but with little success. graphql-request seemed like a match, with what looked like a recent release earlier this year.…

Prod++[2]: Managing Kubernetes Context Files

In this mini-series I will walk you through some habits I replaced in recent times, which have shown to pay off and make me a more productive programmer/power-user of my computer. All these changes should be easy to gradually adopt, so I would highly recommend checking them out. If you’ve any suggestions ☝️ or improvements ✍️, then email me at hi@aknapen.nl or reach out using any of the social…

Prod++[1]: Master Git

In this mini-series I will walk you through some habits I replaced in recent times, which have shown to pay off and make me a more productive programmer/power-user of my computer. All these changes should be easy to gradually adopt, so I would highly recommend checking them out. If you’ve any suggestions ☝️ or improvements ✍️, then email me at hi@aknapen.nl or reach out using any of the social…

Prod++: A Mini-Series on How to be More Productive

In this mini-series I will walk you through some habits I replaced in recent times, which have shown to pay off and make me a more productive programmer/power-user of my computer. All these changes should be easy to gradually adopt, so I would highly recommend checking them out. If you’ve any suggestions ☝️ or improvements ✍️, then email me at hi@aknapen.nl or reach out using any of the social…

Containerizing Secret Hitler.io

Game Night Some weeks ago I found myself wanting to play the social deduction game Secret Hitler. There’s an excellent online version Secret Hitler.io, which during the ongoing Corona related lock-down is a great find. There was one issue: Sign-ups were disabled that night because of excessive demand. So instead of a game night we went on to see if we could deploy our own version, as the website…

Continuous Deploy your own Matrix instance

Bye Whatsapp A while ago I decided to move away from Whatsapp and Telegram in favor of Matrix, mostly to improve my privacy and get more control over my own data - yes Whatsapp, I’m looking at your limited backup options. But enough about the idealistic tech vision and more about tech itself. To get the most out of Matrix it is best to deploy an instance for yourself. It’s quite an…