Blog posts index page 3

Read code to get better at writing code

Midjourney prompt: A young and content boy sitting crosslegged reading a book. A simple solid teal color background. There are a few stacks of books in all colors and sizes around him. The style is Pixar.

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. My younger self had assumed that the best way to get better at writing would be:
To write.

But it wasn’t.

Read more...

Stumble upon in late May 2024

Midjourney prompt: A sheep is standing away from its flock on a grass field with trees in the far background. A small bird is sitting on the sheep's back. The style is of John Carson.

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 put a big grin on my face. If I had a bad day, I no longer remember. Apparently, my stumblings aren’t confined to the digital world. Though with my limited “getting outside”, I guess that is where it mostly happens, as the following can testify to.

Read more...

Optimizing & resizing images for Jekyll posts using Babashka

Midjourney prompt: A man sitting at a desk in an apartment with a blank page in front of him. Camera angle is top down above the man. Sunny daytime, soft and smooth, subtle highlight. The style is water colors or oil painting.

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 want a “featured image”. But images tend to affect webpage load speed… and speed matters. The featured image needed to be responsive and optimized, although doing it by hand made me shiver. Any manual repetitive process is boring and prone to errors. On top, it would remove the focus from writing. Suddenly I found myself scouring the internet for information about responsive images and semi-automating the image optimization process with a Babashka script interfacing with TinyPNGs API.

Read more...

Stumble upon in May 2024

Midjourney prompt: Two people walking towards each other and bumping into each other. One person is looking down at their smartphone the other person is looking at the sky. Subtle highlight. concept art, oil on canvas painting.

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?

Read more...

S3 presigned URL generation with Babashka

Midjourney prompt: A cute steampunk rabbit with googles holding a worn feather pen in its paw signing old documents in colourful cloud surroundings. The image is in water color style --ar 2:1 --v 6.0 - Upscaled (Creative)

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 presigning URLs.

— Java interop, oh joy 😣😅

Being forced to use AWS Java SDK would mean a no-go for Babashka. Also, based on how often similar questions pop up, I felt it deserved a better solution.

Read more...