RSSAmplifier

Blog

Jacob Emcken

emcken.dkRSS feed ↗284 posts

Latest posts

A local AI setup using llama.cpp and Open WebUI

A little over a year ago I set up a local LLM with the expectation that I would use it for all kinds of cool things. So far, it has just replaced the need for ChatGPT (chat) and Grammarly, which is a little disappointing. To be honest, I didn’t really have the mental bandwidth to learn more about the world of LLMs and improve the setup. And the few times I set about diving in, a fear that my…

Urban Haven — a Lego modular build

I recently reawakened my interest in LEGO after months of not feeling the draw. The fact that sunlight discolors bricks over time, combined with the space they take up, had put a damper on my enthusiasm. But lately things have changed… It all started with new small LEGO MOC : Compared to the last MOC i shared , it is slightly bigger with the same relative amount of detail. You might have noticed…

Non-profit open source in the Danish public sector

I’ve been contracting in the public sector for several years now, and seeing how time and resources (money) are sometimes spent can make me queasy. The public sector seems immune to approaching problems with a long-term solution, no matter how brain-dead-obvious (I think) it is. Since I work with loads of clever people, it must be the incentive structures that cause decision-makers to prioritize…

Limit concurrent HTTP connections to avoid crippeling overload

Even the fastest web servers become bottlenecks when handling CPU-intensive API work. Slow response times can cripple your service, especially when paired with an API gateway that times out after 29 seconds. I solved this using a simple middleware that eliminated 504 - Gateway Timeout responses and significantly reduced unnecessary load on my service API. I assumed that if a single request takes 5…

Stumble upon in January 2026

AI tries to make everything easy… convenient, but life without discomfort is not something to desire. The label ‘PC compatible’ is a reminder of how complex (inconvenient) things can be. I can’t help but feel stupid with all the AI hype. What is it that everybody else sees that I cannot? So, obviously, it warmed my heart when Rich Hickey wrote a (sarcastic) “Thank you”-letter to AI . At least,…

2025 was the year I...

… did quite a lot, actually. Apparently, when you sit down and think about it, happenings start to surface. ‣ Hated on commercials and the attention-grabbing algorithms more than ever. The coming years will strongly need high-quality, tightly curated information sources to counter the AI slop. The hate fueled the idea for some sort of “Trust IDs” or a trust network. Maybe a bit like the original…

Rant: Updating Samsung NVMe firmware uncessarily complicated

The other day, I was taken back to the “good old days”, and not in a good way. I had assumed that a major hardware provider like Samsung nowadays would ensure a decent user experience during firmware updates, regardless of the operating system. But I was in for a disappointment. My home server running Linux has been crashing occasionally for a while. But since a reboot would temporarily “fix” it,…

Using idempotency for application interfaces like REST APIs

Applying retry strategies on API calls to make them more robust often brings its own set of problems. Occasionally, rather than losing an entity-creating call, you end up with multiple, and trust me — duplicates are a pain to clean up. However, idempotency can neutralise the inconveniences from retries, making the pair a powerful combo. 💪 More specifically, retries expose you to the “exactly once…

Exception handling differences between Clojure map & pmap

With this post, I am in deeper waters than usual. What might sound like a recommendation in the following could be a potential disaster in disguise. Be warned. Personally, I prefer not to know about implementation details about the function I’m calling. Although that was the situation I suddenly found myself in, when a function I call replaced map with pmap . Here is how I approached the weirdness…

Stumble upon in October 2025

I reflect on AI from time to time, and though I don’t see how it will replace me in the near future, it is worth keeping an eye on. Right now, I just want to share an AI-related Substack post called: The 4 Rare Leadership Skills We Need More Than Ever In The AI Era by Shane Snow. The post really resonated with me. Time will tell if he is actually on to something or if I just hope he is. 🤷 I do…

Scalable LEGO brick labels in SVG

It just looks amazing when things are neatly organized, so of course, I wanted some crisp-looking labels for my drawers with LEGO. There’s a cool solution for those in possession of an actual label printer, but since that isn’t me, I needed something a bit more “generic”. Having flirted with Inkscape in a previous lifetime, I turned to SVG . At Brick Architect by Tom Alphin you can find labels…

De-stressing with Lego

The last couple of years, I’ve been finding stress at work more often than I’d like. Apparently, experiencing problems, having the skill to address it, but not being allowed to, is something that really gets to me. So much that I don’t even feel like working on side projects, open source and writing posts on my blog. Enter Lego A year ago, I started buying mixed second-hand Lego collections. Then…

A local AI setup using Ollama and Open WebUI

Until recently, my AI usage has been limited to ChatGPT and a bit of Midjourney. No Copilot, no Claude, no nothing. The most serious thing I’ve used AI for, was getting ChatGPT to give feedback on paragraphs for new blog posts, and Midjourney to help create featured images for blog posts. The few times I’ve tried using AI (read ChatGPT) for programming related stuff, I very quickly got frustrated…

Stumble upon in June 2025

I have started a journey to disentangle myself from Big Tech — at least partly. So far, I’ve avoided boarding the Facebook train altogether (including Instagram, Snapchat and TikTok). And after finishing the book “Careless People” by Sarah Wynn-Williams (recommendable by the way), which describes her experiences from inside Facebook, my JOMO choice feels even better. Apparently, friends and family…

Consistent code style for Clojure function definitions

A Clojure function is often defined with name and arguments on a single line: ( defn some-function [ with-several arguments ] ... and the following post is about why I will advocate for a multi-line alternative: ( defn some-function [ with several arguments ] ... At first, everything on a single line looks like the only “right way” to do it. After all, if you squint, this is how it looks in other…

Trust, not surveillance, cultivates freedom

I remember the feeling it triggered when I heard a Danish politician claim: “With surveillance, freedom increases.” — Nick Hækkerup, 2019 Source: Tv fra Folketinget (around 9 minutes in). It was surreal that the words had even been uttered. I felt slightly sick and baffled — and at the same time, I couldn’t help but smile at the absurdity. It was tragically comical that someone supposedly…

Local S3 storage with MinIO for your Clojure dev environment

Simple Storage Service or S3 Cloud Object Storage is a versatile and cheap storage. I’ve used it for invoices, contracts, media, and configuration snapshots, among other things. It’s a perfect fit when the object key (or what many might think of as a filename or path) can be used as a unique key to retrieve what you need — and doing it from Clojure is no exception. 💡 This post assumes you have…

Stumble upon in April 2025

While doomscrolling on LinkedIn the other day, a comment linking to an article/essay about what to expect from the newly inaugurated U.S. president and his administration caught my eye. The essay, What Should the World Expect from Trump 2.0? , was written by Lene Rachel Andersen. I try not to react in the heat of the moment to avoid inadvertently “endorsing” something I might not stand by after a…

A Clojure Jekyll adventure: Jakel materializes from the mist (a Jekyll clone)

I’m flipping through my quest log to reflect on the trials I’ve faced recently. Most improvements to the Clojure-based Jekyll clone focused on making the blog navigable. This is the fourth part of the series: “A Clojure Jekyll Adventure” . If you’re curious about what happened in the previous chapter of my journey, check out: A Wet side quest . First, the work I’ve done so far on the Jekyll clone…

A Clojure Jekyll adventure: A Wet side quest (Wet 0.3.0 released)

I ventured far and wide on my Clojure Jekyll adventure right after the last check-in. Then, fatigue (and life) caught up with me, and I had to set up camp for a little while. The other day, I went on a little side quest and officially released my fork’s changes to the Liquid templating library Wet 💧 . This is the third part of the series: “A Clojure Jekyll adventure” . If you’re curious about…

Stumble upon in March 2025

We need electronic devices — like phones and computers — that we can trust, but with everything happening right now, America doesn’t exactly inspire trust. I think Thibault Martin captures what is needed spot on in his blog post: Prosthetics that don’t betray . I’ve always believed the public sector would benefit immensely from prioritizing Open Source — though not in the short term. Transitioning…

Stumble upon in Feb 2025

A little while ago, I was presented with an old 2016 blog post by Ricardo J. Mendez on Planet Clojure titled Complexity is the mind-killer . Planet Clojure occasionally resurfaces older posts when their ‘updated timestamp’ is refreshed, which is likely what happened. While not always ideal, this time, I felt lucky. 🍀 It wasn’t until I finished reading this brilliant piece, that I noticed its age…

Release 2.1.0 of Clojure lib for AWS presigned URLs & requests

With a little help, aws-simple-sign now supports PUT URLs and I have released a new version ( 2.1.0 ) of the library. I noticed a few issues with some of the examples in the README which are now also fixed. For those unfamiliar with aws-simple-sign , it generates presigned URLs for S3 objects and signs HTTP requests for AWS. It doesn’t require any dependencies (Java or otherwise) which is pretty…

Stumble upon in Feb 2025

Even if you’re open-minded and free from bad habits and addictions, I believe you’ll find the following a great source of inspiration, just as I did. Dr. Anna Lembke, a dopamine expert, is interviewed by Steve Bartlett on his podcast DOAC . Steve highlights this episode as particularly significant, and I completely agree — it offers valuable perspective on several important topics like addiction…

About fixing the right problem

It is fascinating how we humans often choose to treat the symptom instead of addressing the actual problem — like endlessly replacing water-filled buckets with empty ones instead of fixing the leaking roof. At least that is how it felt at work the other day… again. This time though, the problem was easier to spot in the code than usual. Our code needs to sort a map numerically ( :X29 , :X137 ,…

New release of Clojure lib for AWS presigned URLs & requests

The Clojure library aws-simple-sign was in pre-release for more than six months. With a modest download count of just above 2,000 and no reported issues, I finally found the time to promote the 2.0.0-alpha1 release of to a stable version. For those unfamiliar with aws-simple-sign , it generates presigned URLs for S3 objects and signs HTTP requests for AWS. The library is intended for those who for…

A Clojure Jekyll adventure: Getting my feet wet with Liquid

The Liquid templating language is essential for Jekyll and its themes. While a Clojure implementation exists in the form of a library named Wet 💧 , ironically, the library is missing most functionality categorized as Tags > Template in the Liquid documentation . Though we’ll touch on “writing code” in this next part of my adventure, it perfectly illustrates how problem-solving is more about…

How my Jekyll blog became a Clojure adventure

On the 10th anniversary of Jekyll being my blog engine of choice, my curiosity (and spare time during the holidays) got the better of me. I wanted to explore how well Clojure would fare compared to the original Jekyll implementation in Ruby. My reasons for having stuck with Jekyll for such a long time: No database simplifies infrastructure for running/hosting. Static files minimize the attack…

Reflecting on static types

Every time I heard people praise static types, I wondered why I didn’t share their enthusiasm. After careful reflection, I realized that static types don’t significantly influence how I approach or solve problems. I also didn’t experience fewer bugs, easier debugging, or greater team productivity when using them. As software grows and challenges our ability to reason about it, we seek ways to…

Read code to get better at writing code

Plus 30 years ago, probably around seventh grade, I remember my teacher asking the classroom: How do you get better a writing essays and short stories? She answered the question herself, and because it took me by surprise, I still remember it today. I had heard grown-ups with their wise words: If you want to be good at X, you have to practice X. X being anything from football to piano to cooking.…

Stumble upon in late May 2024

Summer or something resembling it has come to Denmark, and the winter blues is losing its grip. Grass fields with flocks of sheep have been a common sight along the motorway for a couple of months now. But the other day, I saw something that I don’t expect to see again any time soon. A fairly big bird sitting comfortably on the back of a sheep, and neither seemed to make a big deal about it. It…

Optimizing & resizing images for Jekyll posts using Babashka

I’ve been tumbling down a rabbit hole for a little while now. Feeling a desire to “write more” on my blog, motivated me to enhance the overall reading experience. However, customizing a Jekyll blog is not always easy due to the inherent limitations of the Liquid templating language and the modest amount of available plugins for GitHub Pages. Nevertheless, an improved reading experience led me to…

Stumble upon in May 2024

While roaming the internet for information on different topics, I also found a few totally unrelated posts, but interesting nevertheless. I guess that’s what happens when you indulge: I wonder what else they wrote about? Apparently, “AWS presigned URLs” led to Roko’s Basilisk: How My University Condemned Me to Eternal Torture? by Doğu Deniz Uğur . A little philosophy never hurt anyone? 🐉 Another…

S3 presigned URL generation with Babashka

A while back, I needed to generate presigned URLs for S3 objects in Amazon Web Services. I wanted to use Babashka (Clojure scripting), to avoid my painful friend from the past - Bash. I looked all the usual places for a Clojure-friendly approach, but even Cognitect’s AWS API did not have any means to presign URLs . Everybody seemed to reluctantly tolerate having to use AWS Java SDK directly for…

Upload files to SharePoint using Babashka

My team and I were publishing a specific set of files several times weekly and we were obligated to put them on Microsoft SharePoint for non-technical people to be able to find them. After all, it is fair to not assume everyone knows their way around GitHub or how to run small pieces of code. The tedious file upload to SharePoint was done manually until recently when Babashka came to the rescue…

How to compare JSON files offline

At work, I needed to compare some huge (almost identical) JSON data structures. Since the data was potentially sensitive, I wanted to do it offline. Sending data over the wire to one of the myriad of online services was a no-go. There are probably built-in tools for IDE’s like VS Code, Emacs and the like, but I wanted something I could use on the Linux CLI First I looked for a single tool. I read…

Who am I

I am many things. Upon reflecting the following words come to mind: husband, father, son, colleague, friend, philosophical, idealist, perfectionist, patient, empathetic, respectful, forgiving, fair, fearful, stubborn Fairness permeates almost every conscious decision I make. I try to split my person between all my roles, both family and otherwise, so everyone gets attention - that is fair. I…

Social media etiquette with the help of AI

There are many both really awesome and really horrible stories about how the internet is shaping our lives in the 21st century. Social media despite its cool aspects also provide us with at least two problems: The harsh tone often found in debates. The amount of (useless) content. Both problems have made me more or less quit social media, but I am hopeful that AI will be able to counter the harsh…

A very small PDF for testing

For testing, I often find myself prioritizing having small data sets because they are easier to comprehend. Also, the small size helps emphasize what is being tested when irrelevant data is absent. Today, I needed a PDF for testing. Following the same principles, I sought out “the smallest (valid) PDF” and ended up on StackOverflow. In most cases, the PDF size probably doesn’t matter much, but I…

Constructing dummy JSON Web Token (JWT) using ClojureScript

JWT seems broadly used around the internet for all kinds of services and I wanted to use it for a service of my own. To increase testing speed while interacting with the backend, I wanted to be able to rapidly create new JWTs to see the effect of different payload structures. I ended up writing a bit of code to be able to construct dummy tokens, without having to talk to a 3rd party service like…

Writing an app for Google Cloud Run using ClojureScript

As part of a project I needed to handle webhooks from Hubspot (a CRM), and since the implementation turned out nicely, I thought it would be worth blogging about. The reason why the app ended up in Cloud Run and written ClojureScript was to avoid the hard coupling to the main application. All the code is available on GitHub . A small, separate app, only responsible for receiving the events, would…

A recurring core.async pattern

I’ve found myself using Clojure core.async in a very specific way on several occasions, and I thought it might be worth sharing. ( require ' [ clojure.core.async :as async ]) ( def c ( async/chan )) ( async/go-loop [] ( when-let [ msg ( async/<! c )] ( do-stuff msg ) ( recur ))) To test the code do-stuff could be replaced with println . The cool thing about the above pattern is that the go-loop is…

MongoDB profiling

When running MongoDB in Docker, diagnostics logs are sent to STDOUT by default. Since MongoDB version 4.4 these logs have been in a structured JSON format, which makes it a little cumbersome to use the profiling tool in mtools . Use the Docker command to export Docker container logs (including the MongoDB ones) and jq to sanitize all non JSON logs (from potential other processes in the container):…

What I allow to shape me

It is impossible for any human to take in all the information available to us. As new technologies emerge, both the amount and pace at which information hits us keep increasing. With an abundance of information, how do we choose which we allow our attention to absorb and which to ignore? People in the “old days” might hungrily await news and gossip from a traveler passing through because of…

Neo4clj - an introduction

It started with a business idea a few years ago… a business idea that would require a graph database, specifically Neo4j . We did explore the existing libraries at the time, but decided to “roll our own” for reasons that now eludes me… and work began on Neo4clj . At first, we were trying to create a library that placed Clojure data structures first and center. Not only for return values, but also…

Becoming friends with Clojure protocols

I’ve been programming Clojure for several years, and yet I’ve managed to avoid protocols during all that time (I’ve also avoided macros, but that is another story). I found myself always having a colleague do the “dirty work” or some sad excuse as of why it wasn’t necessary right now. No more… this week I got my hands dirty. For me, Clojure protocols solves the same problem, that I previously used…

Stop micromanaging your code

This rant is about a bad habit some developers pick up and seem to have a hard time ditching again… even after gaining lots of experience. I guess it is to be expected. After having been burned one too many times by missing error handling, in the software they work on, they become overprotective. But it often overcomplicates the code and leaves room (extra lines of code) to place “a fix”, where…

Hosting ClojureScript SPA using Shadow-cljs on Netlify

Building ClojureScript Single Page Applications (SPA) on Netlify just works. The following instructions require no prior knowledge of neither Netlify nor build tools (like Shadow-cljs, WebPack etc.), but some knowledge about HTML and Git is expected. Setup a ClojureScript SPA project SPA projects come in all shapes and sizes, causing equal diversity in paths for compiled code and build commands.…

Heroicons from ClojureScript

Update 2022-02-20: Requiring single icons using :refer causes ALL Hero icons to be included in builds (even optimized). Instead, use :as (multiple times). Examples below have been updated. In my opinion, Clojure and ClojureScript is lacking in the documentation department, especially when it comes to integrations with things outside the Clojure ecosystem. I want to share how using Heroicons from…

Symptoms of lacking software quality

What makes up good software quality is different from person to person, making it somewhat subjective and hard to define measurably. It is discouraging working on projects where you feel that every time the team fixes a bug, it introduces two more. Having a hard time tracking down the bug and understand how it hit production in the first place makes matters worse. Unable to confidently give…