Notes for Week 15 of 2021

I discovered that some people misinterpret my weekly notes and started to think that I am productive. I thereby feel obliged to clarify that I spent a significant portion of this week trying to add a primary key to a table.

I’ve been also generally low energy. It may be attributed to the fact that I started training. The problem is I tend to go back to my “usual training” as I remember it. My memory is stuck in times when I was 15 and had four teams training a week with some activities on the side. It seems that results do not replicate after 30.


  • I’ve walked 25 km and rode 19 km. I’ve been active for 7.8 hours during 7 activities. This week’s max speed was 52.6 km/h.
  • My terminal scripts on macOS got broken for no good reason. I then realized that somehow, the permissions to network volumes got revoked. Tinkering with Privacy settings fixed that.

This Blog: Hugo

  • I’ve redone the homepage a bit, putting more emphasis on essays and listing weekly notes at the bottom. This forced me to learn Hugo a bit more.
  • While at it, I’ve added a dark mode to my very minimalistic theme.
  • How to list pages from a section „Notes“ with a tag „weekly-notes“:
    {{ $weekly := slice "weekly-notes" }}
    {{ range first 3 (where (where (where .Site.Pages.ByDate.Reverse "Section" "notes") ".Title" "!=" "Notes") "Params.tags" "intersect" $weekly)}}
        <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
    {{ end }}

The .Title != Notes is needed for excluding the page.

Graveyard: Django & MySQL

  • Python has a handy time formatting string for printing dates without leading zeroes using dash: „%-d. %-m. %Y“. One slight detail: it produces ValueError on Windows
  • The handy chart for the above is at
  • Data design note to self: if there is a significant user choice (e.g. skin selection) and it has a default value that can change over time, it’s a really good idea to mark somewhere whether the user is coasting on the default settings or made a conscious choice
  • Django still can’t do composite primary keys, making the work with imported models very entertatining. In the same fashion, it seems it still can’t do many to many relationships that would have attributes on the relationship. This caused me a lot of fun this week and is worth a separate blog post

Published in Weekly Notes and tagged

All texts written by . I'd love to hear your feedback. If you've liked this, you may want to subscribe for my monthly newsletter, RSS , or Mastodon. You can always return to home page or read about the site and its privacy handling.