Upload works!
I re-did the attempts from the last time in a less ambitious way, leading paradoxically to a working upload mechanism that allows me to replace the images in...
This must be the most boring part of the project so far, and I either find some exciting stuff or at least interesting problems, or I’ll have to speedrun this whole thing somehow.
Today’s goal was to take the list of Pictures from a database, instead of from being hardcoded in a controller. Well, taking exactly the pieces I either know by heart, or that I mostly know how they work, I got this running in approximately one hour, including the largest problem - figuring out how to connect IntelliJ’s database tool to the Neon database.
Let’s start from the top then. For database I picked Neon - I’ve been using it for some time now for my local environment at work. The free tier gives me a database that’s not breaking any speed records, but has some super cool capabilities like auto-scaling all the way to zero, branching and did I mention it’s free? So far so boring, one opportunity here is to set up local branching to automatically create database branches.
Next up: migrations. What feels like milion years ago, I was working on the super old versions of the work app by comparing my database structure to the production structure, and that… was the script to execute together with the version release. Needless to say, I am vaccinated since a long time ago, and today was an opportunity to try out a database that needs the very first migration to even get its second table (the first being flyway_schema_history of course). This is probably a chance to try out some better ways of seeding databases with non-trivial data - but at the moment, I literally have just the two tables. In any case, the first migration now has all the 25 URLs that are lucky to no longer be hardcoded in Java.
Finally, talking to this database from Spring. Pure Spring Data is super low-code, as in, you barely have to write any code to make it work, once you get past the initial setup hurdles. Good to see Hikari Connection Pooling, it’s not like we have it at work 🤷♂️ Having converted the PictureDto to a proper entity now, the opportunity here is around reducing boilerplate via Lombok, or just sitting down and figuring out my take on the philosophy of entities x DTOs.
Oh, and instead of an intlong autoincrement table ID column, I finally am playing with a GUID-based approach - after years of just talking about them in technical interviews! Time to put the money where the mouth is, I guess.
Apart from my ranting, this is actually the part of development that is ridiculously simple, as long as you somehow know what you are doing. We have it way too complicated at work due to technical debt and overall inertia (before you ask, yes, most of it is on me) - MyBatis with XML repositories, Postgres cluster with a read-only node, and fighting the occasional timeout, pool size and deadlock is not something I expect to ever reach in TwentyFive.
Two basic options:
…probably the former, but a few free days are coming up, so I should stop stalling and take a much larger bite!
I re-did the attempts from the last time in a less ambitious way, leading paradoxically to a working upload mechanism that allows me to replace the images in...
The time, energy and motivation I can muster for the project in the past weeks is dwindling, which is probably obvious also from the gap since the last blog ...
Rant
Goal
Goal
Goal
Premise
Let’s face it, the CI/CD we set up last time was pretty lame, in that it did absolutely no building and just published a static HTML. So the goal today is to...
The goal today is to reach Milestone 1, in other words, have a trivial HTML file in my repository, and a hosting set up to receive it via a CI/CD process.
As you can plainly see, the blog is available online on blog.twentyfive.tech! It’s been that way since yesterday, and it was mostly smooth sailing to get her...
Challenge
Organization challenges
Architectural & Infrastructural challenges
Development challenges
Challenges
The End Goal
The Methodology
This blog & project x AI
The Motivation
A.k.a., what are we even trying to solve, and why?
Welcome to this blog! It started out in December 2024 as a way to write technically about a pet project to sharpen some of my skills.