§ Writing

Why I built this site instead of using a template

A personal site is a small project, which makes it a good one to build properly rather than buy.

I could have put this blog on a hosted platform in ten minutes. I built it in Spring Boot instead, and the reason is simple: a personal site is small enough to finish, and real enough to be worth showing.

What's actually in here

It's a normal Spring Boot application, nothing exotic:

  • Spring MVC + Thymeleaf renders the pages on the server
  • Spring Data JPA stores posts, projects, and the About page
  • Spring Security guards /admin, where I write everything
  • commonmark turns Markdown into HTML for post bodies

The interesting decisions were the small ones. Slugs have to stay stable when a post is edited, or every link to it breaks — so the publish date is stamped once, on first publish, and left alone afterwards:

boolean wasPublished = post.isPublished();
post.setPublished(form.isPublished());
if (form.isPublished() && (!wasPublished || post.getPublishedAt() == null)) {
    post.setPublishedAt(Instant.now());
}

Three lines, but they're the difference between a blog that behaves and one that reshuffles itself every time you fix a typo.

Why it matters

Interviews ask what you've built. "A blog" is a weak answer. "A blog where I can explain why the slug generation handles collisions the way it does" is a conversation — and conversations are what get you the offer.

Delete this post whenever you like. It's just here so the page isn't empty.