<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Juha-Matti Santala - Community Builder. Dreamer. Adventurer.</title>
  <subtitle></subtitle>
  <link href="" rel="self" />
  <link href="https://hamatti.org" />
  <updated>2026-11-15T00:00:00Z</updated>
  <id></id>
  <author>
    <name>Juha-Matti Santala</name>
    <email>juhis@hamatti.org</email>
  </author> 
  
  <entry>
    <title>Djangonaut Log 5: Traveling amongst the stars!</title>
    <link href="https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/" />
    <updated>2026-11-15T00:00:00Z</updated>
    <id>https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;This blog post is a weekly update of my journey in
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;
    &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;, an 8-week mentoring program for future open source developers in the Django ecosystem.&lt;/i&gt;
&lt;/p&gt;
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/&quot; class=&quot;notion-text-href&quot;&gt;3… 2… 1… becoming a Djangonaut&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log
        1: Lift-off and first week in Djangonaut Space&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot;&gt;Debugging a flaky test — how I
        methodologically tamed an annoying bug&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot;&gt;Assumptions are sneaky&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/&quot;&gt;Djangonaut Log 2: Leaving the
        atmosphere and first merged contributions&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-3-into-the-orbit&quot;&gt;Djangonaut Log 3: Into the orbit!&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids&quot;&gt;Djangonaut Log 4: Avoiding asteroids&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot;&gt;Designing a simple audit log&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      Djangonaut Log 5: Traveling amongst the stars!
      &lt;b&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
  After last week’s pondering and finding good balance, this week was all about getting back in to the saddle and get
  myself back into good rhythm of getting stuff done.
&lt;/p&gt;
&lt;p&gt;
  My main focus for this week was finishing the work on a bug fix for RSVP status and designing an audit log to accompany
  it. I wrote
  &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot; class=&quot;notion-text-href&quot;&gt;a separate blog post about it&lt;/a&gt;
  this Friday.
&lt;/p&gt;
&lt;figure&gt;
  &lt;img src=&quot;https://hamatti.org/assets/img/posts/djangonaut-log-5-traveling-amongst-the-stars/1.png.webp&quot; alt=&quot;Four pane comic. In the first pane, a boss is asking: How is the project going. In the second, a frog sitting behind
      a computer desk replies: great and excellent. In the third, boss walks away and says: amazing forg. In the last pane, the
      frog is searching online: what is a &#39;project&#39;?&quot; /&gt;
  &lt;figcaption&gt;
    &lt;p&gt;
      “When your Navigator asks how things are going on Monday team meeting” — comic
                    by
      &lt;a href=&quot;https://socel.net/@heyheymomo/117598992777781451&quot; class=&quot;notion-text-href&quot;&gt;Heyheymomo!&lt;/a&gt;
    &lt;/p&gt;
  &lt;/figcaption&gt;
  &lt;p&gt;
    Making code contributions to our projects is probably main reason why most of the Djangonauts initially join this
    program but it’s truly the community activities, learning from each other and helping each other out where the program
    truly shines.
  &lt;/p&gt;
  &lt;p&gt;
    &lt;a href=&quot;https://2027.djangocon.eu/&quot; class=&quot;notion-text-href&quot;&gt;DjangoCon Europe&lt;/a&gt;
    is coming soon and this week was the deadline for call for proposals so the community got together to brainstorm and
    provide feedback to each other for proposals. It was so great to see. I can’t join the conference myself this year so I
    didn’t have any proposals of my own to write but had a bunch of great discussions with those who did. We did this both
    in async Discord discussions but also during a group call on Friday.
  &lt;/p&gt;
  &lt;p&gt;
    Week after week, our team meetings and my 1:1s with our captain are getting more and more fun as we get to know each
    other. This week, we had a nice discussion about the darkness and winter here in Finland and learned more about the
    areas others live in.
  &lt;/p&gt;
  &lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Stories from fellow Djangonauts&lt;/b&gt;
  &lt;/h2&gt;
  &lt;p&gt;
    Goodluck landed his first commit to Django by fixing documentation on
                ImageField’s validation.
    &lt;a href=&quot;https://medium.com/@igbokwegoodluck8/landing-my-first-commit-in-django-core-cb99c825a959&quot; class=&quot;notion-text-href&quot;&gt;He wrote an insightful blog post about it too&lt;/a&gt;.
  &lt;/p&gt;
  &lt;p&gt;
    Wasif
    &lt;a href=&quot;https://wasif-shahzad.github.io/djangonaut-space-log-3-js-one-liners-backend.html&quot; class=&quot;notion-text-href&quot;&gt;
      continued sharing the journey he’s having with his ticket&lt;/a&gt;.
  &lt;/p&gt;
  &lt;p&gt;
    Tim visited
    &lt;a href=&quot;https://realpython.com/podcasts/rpp/319/&quot; class=&quot;notion-text-href&quot;&gt;Real Python podcast to discuss mentoring&lt;/a&gt;. It’s a really good episode!&lt;b class=&quot;notion-text-bold&quot;&gt;&lt;/b&gt;
  &lt;/p&gt;
&lt;/figure&gt;
    </content>
  </entry>
   
  
  <entry>
    <title>Designing a simple audit log</title>
    <link href="https://hamatti.org/posts/designing-a-simple-audit-log/" />
    <updated>2026-11-13T00:00:00Z</updated>
    <id>https://hamatti.org/posts/designing-a-simple-audit-log/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;This blog post is an update of my journey in
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;
    &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;, an 8-week mentoring program for future open source developers in the
    Django ecosystem.&lt;/i&gt;
&lt;/p&gt;
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/&quot; class=&quot;notion-text-href&quot;&gt;3… 2… 1… becoming a Djangonaut&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log 1: Lift-off and first week in Djangonaut Space&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot;&gt;Debugging a flaky test — how I methodologically tamed an annoying
        bug&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot;&gt;Assumptions are sneaky&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/&quot;&gt;Djangonaut Log 2: Leaving the atmosphere and first merged
        contributions&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-3-into-the-orbit&quot;&gt;Djangonaut Log 3: Into the orbit!&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids&quot;&gt;Djangonaut Log 4: Avoiding asteroids&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      Designing a simple audit log
      &lt;b class=&quot;notion-text-bold&quot;&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/&quot;&gt;Djangonaut Log 5: Traveling amongst the stars!&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
  One of the first bigger fixes I was interested in from the issues list when I
  started working on Django Girls+ project in Djangonaut Space was
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/issues/1068&quot;&gt;a bug fix for admins being able to change the RSVP status of an applicant
    from an admin view&lt;/a&gt;
  . In the beginning, I got sidetracked many times to fix other things so that
  we could get the development environment all good to go for new contributors
  (including me).
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;The situation&lt;/h2&gt;
&lt;p&gt;
  Over the past 3 weeks, I’ve been experimenting with this ticket here and there
  while waiting for reviews on other PRs.
&lt;/p&gt;
&lt;p&gt;
  When a person applies to a Django Girls event, they are added to a list of
  applications that the organisers then go through to decide who gets a spot. If
  an applicant is accepted, they receive an email with links to RSVP either yes
  or no. Sometimes, people click the wrong link accidentally or something comes
  up later and they need to change their RSVP.
&lt;/p&gt;
&lt;p&gt;
  The event organisers have a view listing all the applications and their status
  and there was a dropdown for changing the RSVP on behalf of the applicant but
  something had gone awry and it didn’t work anymore, hence the ticket.
&lt;/p&gt;
&lt;p&gt;
  The original, now broken implementation was a Boostrap/jQuery dropdown from a
  previous era of web development. I had a chat with Anna, the maintainer and
  our Djangonaut Space Navigator for the project, and we came to a conclusion
  that this is a good moment to not only fix the bug but to start taking out the
  old Bootstrap/jQuery bits and rewrite them in more modern means.
&lt;/p&gt;
&lt;p&gt;
  I rewrote the HTML and Javascript responsible for the interactions on that
  page, ripping out the old solutions and replacing them with native
  &lt;code class=&quot;notion-text-code&quot;&gt;select&lt;/code&gt;
  elements and vanilla Javascript event listeners and DOM manipulation. It was
  an interesting journey into seeing how much the tooling has improved over the
  past decade or so after the heights of jQuery/Bootstrap dropdowns. To be
  honest, I was also very happy I didn’t have to debug the old solution and
  learn how to write decade old Boostrap code.
&lt;/p&gt;
&lt;p&gt;
  As I was working on the fix, I started thinking ways to mitigate potential
  future issues: what if an organiser accidentally clicks on someone’s RSVP
  turning it from “yes” to “no” and nobody notices until the person appears in
  the workshop and they weren’t counted to appear. Alternatively, what if
  someone does it maliciously? I’ve been an event organiser for long enough to
  know these things happen every now and then and it’s nice to able to figure
  them out.
&lt;/p&gt;
&lt;p&gt;
  My proposed solution I started working on was a simple audit log: a record of
  every change for both the RSVP status and the general application status. A
  database entry that states what the state was, what it was changed to and
  how/by whom.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  The different states and transitions
&lt;/h2&gt;
&lt;p&gt;
  For the
  &lt;b class=&quot;notion-text-bold&quot;&gt;application status&lt;/b&gt;, we have five different
  states:
&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Application submitted (initial state)
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Application accepted
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Application rejected
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Application on waiting list
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Applicant declined
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  When an applicant fills in a form on the website, a new application is created
  with the first status of being submitted. An organiser can then accept, reject
  or put the applicant to a waiting list. Or the applicant can decline/withdraw
  their application.
&lt;/p&gt;
&lt;p&gt;
  For the
  &lt;b class=&quot;notion-text-bold&quot;&gt;RSVP status,&lt;/b&gt;
  we have three different states:
&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Waiting for response (initial state)
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Confirmed attendance / yes
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Rejected invitation / no
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  When an applicant is accepted, they are emailed a link to either accept or
  reject the invitation. Alternatively, an admin can change it from the
  organiser applications page if for example someone accepts and later withdraws
  or accidentally reject when they meant to accept.
&lt;/p&gt;
&lt;p&gt;
  When thinking about the audit log, we have two items (RSVP and application
  status), 3 or 5 different states they can be in and a couple of different
  sources (automatic, applicant or organiser) for how they can change.
&lt;/p&gt;
&lt;p&gt;
  (The systems guy inside my head would be thrilled to turn this into some sort
  of a finite state machine as well but that feels a bit overkill — maybe some
  day?)
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Analysis paralysis and fear of perceived skill level
&lt;/h2&gt;
&lt;p&gt;
  There are so many ways one can build a system like this (and even more
  alternative solutions that don’t involve an idea of an audit log). It’s one
  thing to build such a thing for a personal project or anything private but
  exposing your ideas on a public forum like GitHub for an open source project
  can lead to all sorts of feelings.
&lt;/p&gt;
&lt;p&gt;
  Am I making a “right decision” and am I implementing it the “right way”? What
  will others think of my proposal? What if I make a mistake?
&lt;/p&gt;
&lt;p&gt;
  In general, this can be a problem especially in open source projects where
  (based on my experience and understanding) a lot of the discussion about ideas
  are based on proposals and implementation ideas on an open forum.
&lt;/p&gt;
&lt;p&gt;
  In my specific case, a lot of those mental barriers have been bulldozed by
  Djangonaut Space. I still have them nagging at the back of my head but the
  fact that I’ve gotten to know Anna, the lead maintainer, so well and have a
  direct line to discuss ideas with her makes such a big difference. I don’t
  have to worry about what Anna would think of my ideas — I’ve learned to trust
  that we can have a great constructive discussion and go back and forth to find
  a good solution. That’s also why smaller fixes were a great starting point to
  get into the project as that allows me to learn the “ways of working” of the
  project and people responsible.
&lt;/p&gt;
&lt;p&gt;
  I’m not sure if I’m any kind of expert to give advice on this but two things I
  try to keep in mind to battle my own worries:
&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Ask questions, be open to discussion and take small steps. I probably should
    have followed that even more with this feature myself because I found myself
    going around circles with my thoughts a few times and it would have been
    beneficial to bring early ideas to the discussion earlier.
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Treat a PR as a proposal, a start of a discussion, rather than a perfect,
    ready solution. Of course, it’s a good and polite habit to do your best and
    explore options and ideas and test implementations before dumping them to
    the maintainers but there’s a lot of spectrum in between.
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  A fellow Djangonaut
  &lt;a href=&quot;https://medium.com/@igbokwegoodluck8/landing-my-first-commit-in-django-core-cb99c825a959&quot;&gt;Goodluck touched on this in his blog post&lt;/a&gt;
  this week as well:
&lt;/p&gt;
&lt;blockquote class=&quot;notion-quote notion-color-default&quot;&gt;
  Early in the review process,
  &lt;b class=&quot;notion-text-bold&quot;&gt;Johannes Maron &lt;/b&gt;dropped a piece of Python
  wisdom that completely changed how I view open-source collaboration:
  &lt;b class=&quot;notion-text-bold&quot;&gt;EAFP&lt;/b&gt;
  (&lt;i class=&quot;notion-text-italic&quot;&gt;Easier to Ask for Forgiveness than Permission&lt;/i&gt;). Instead of waiting around asking if an approach is okay in theory, push
  the commit. Give reviewers a concrete diff to react to, and trust the review
  pipeline to refine it.
&lt;/blockquote&gt;
&lt;p&gt;This summarises what I was trying to say in a very nice and concise way.&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Building the audit log&lt;/h2&gt;
&lt;p&gt;
  I spent a lot of brain cycles in trying to figure out how to balance
  generality (one
  &lt;code class=&quot;notion-text-code&quot;&gt;AuditLogEntry&lt;/code&gt;
  for everything) and specificity (one for each combination of source and state,
  ie
  &lt;code class=&quot;notion-text-code&quot;&gt;ApplicantChangedRSVP&lt;/code&gt;
  or
  &lt;code class=&quot;notion-text-code&quot;&gt;OrganiserChangedApplicationStatus&lt;/code&gt;
  as an extreme example).
&lt;/p&gt;
&lt;p&gt;
  A generic one makes it easy to list them: we can show all logs for a specific
  application with one query. On the other hand, it can make the model itself
  complex if you have to have different fields for different things and check
  which ones have been filled.
&lt;/p&gt;
&lt;p&gt;
  A specific one makes the models themselves simpler but then you need to
  combine objects from different models and implement a lot of the branching
  logic when reading and rendering the data.
&lt;/p&gt;
&lt;h3&gt;I got sidetracked a bit with rabbit holes&lt;/h3&gt;
&lt;p&gt;
  The other question that popped up — and made my remember why it’s so valuable
  to make small changes one step at a time — was if we should inform the
  applicant when changes have happened, kind of like receipts so that they’d
  know and would be able to react to something. I decided that it was a rabbit
  hole that could lead to never-ending considerations and that could be done
  later and especially not part of this fix.
&lt;/p&gt;
&lt;p&gt;
  When I was pondering that, I thought it would have been better to just fix the
  bug in the organiser view and leave the audit log as a separate ticket to be
  implemented as well but since I was already so long down the road, I decided
  to finish it as part of this fix even if it went a little bit against my
  general idea of bug fixes only fixing the bug at question.
&lt;/p&gt;
&lt;p&gt;
  It’s more important to get a broken thing fixed than try to solve all related
  problems that often require a lot more discussions and design.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Back to the audit log implementation
&lt;/h2&gt;
&lt;p&gt;
  One of the reasons why I kept going in circles was that we have two different
  types of sources for changes: unauthenticated applicants RSVPing and the
  authenticated organisers making changes on behalf of the applicants.
&lt;/p&gt;
&lt;p&gt;I ended up with a simple model:&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;class AuditLogCategory(models.TextChoices):
    STATE = &quot;STATE&quot;, _(&quot;Application State&quot;)
    RSVP = &quot;RSVP&quot;, _(&quot;RSVP Status&quot;)

class ApplicationAuditLog(models.Model):
    &quot;&quot;&quot;An audit log to keep track of changes to 
    application&#39;s state and RSVP status.&quot;&quot;&quot;

    application = models.ForeignKey(Application, on_delete=models.CASCADE)
    category = models.CharField(choices=AuditLogCategory.choices, default=AuditLogCategory.STATE, max_length=255)
    old_value = models.CharField(blank=True, max_length=255)
    new_value = models.CharField(blank=True, max_length=255)
    user_source = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True)
    other_source = models.CharField(blank=True, max_length=255)
    created = models.DateTimeField(auto_now_add=True)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  When creating a log entry, you can optionally attach it to a user (an event
  organiser) in a way that helps keep track of things.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/designing-a-simple-audit-log/1.png.webp&quot; alt=&quot;Application view with a dummy application showing answers, a form for scoring this application and an audit log
    showing state changed from submitted to accepted and then RSVP changed from waiting to yes and from yes to now.&quot; /&gt;
&lt;p&gt;
  The audit log can then be viewed by event organisers and admins on the
  application’s details page.
&lt;/p&gt;
&lt;p&gt;
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1177&quot; class=&quot;notion-text-href&quot;&gt;The pull request for this change&lt;/a&gt;
  still requires some work and cleaning up but I’m really glad for how it turned
  out in the big picture and that I managed to ground myself and make a decision
  to steer myself out of the roundabout I had been going around in my head.
&lt;/p&gt;
&lt;p&gt;
  Is this the best possible design and implementation? Probably not but it’s a
  functional one and one that I can stand behind and make arguments for. Most
  importantly, it’s a step forward in a progress and one that can hopefully act
  as a starting point for future improvements either by me or someone else who
  contributes to the project.
&lt;/p&gt;
&lt;p&gt;
  It’s still an open PR: an invitation for the maintainers and contributors to
  review, request changes and suggest improvements. By the power of teamwork, it
  will shape into a great new addition to the project and a long-awaited bug fix
  for the community organisers.
&lt;/p&gt;


    </content>
  </entry>
   
  
  <entry>
    <title>There’s a blog post for everything</title>
    <link href="https://hamatti.org/posts/theres-a-blog-post-for-everything/" />
    <updated>2026-11-11T00:00:00Z</updated>
    <id>https://hamatti.org/posts/theres-a-blog-post-for-everything/</id>
    <content type="html">
      
&lt;blockquote class=&quot;notion-quote notion-color-default&quot;&gt;
  Also, for those new to Juhis: It’s almost scary how this guy here has a blog post about whatever it is you’re thinking
  about, and a good one too! -
  &lt;a href=&quot;https://marijkeluttekes.dev/&quot; class=&quot;notion-text-href&quot;&gt;Marijke Luttekes&lt;/a&gt;
&lt;/blockquote&gt;
&lt;p&gt;
  When I joined Djangonaut Space Discord a month ago and introduced myself, Marijke posted the above to my intro thread.
  It’s a high praise but also funny how it’s often true.
&lt;/p&gt;
&lt;p&gt;
  In a way, it’s not that surprising though: when you write a lot of things over many years. This blog sits at 639 blog
  posts at the time of writing, not including this one. That’s not all I’ve written though: especially for pre-2018 posts,
  I’ve only brought in a portion from old blogs to this site, I have other blogs and publish my notes elsewhere and so on.
&lt;/p&gt;
&lt;p&gt;
  Marijke’s comment inspired me to ramble a bit about blogging so here we go.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Why and what to write about
&lt;/h2&gt;
&lt;p&gt;
  I’ve earlier written about how
  &lt;a href=&quot;https://hamatti.org/posts/three-is-a-pattern/&quot; class=&quot;notion-text-href&quot;&gt;three is a pattern&lt;/a&gt;
  as a guideline for when is the last moment I write about something. I’ve spent years in the developer communities and
  especially with early learners, juniors, students and alike so the same topics come up constantly.
&lt;/p&gt;
&lt;p&gt;
  I’ve always encouraged people to participate in meetups also outside their daily technologies because the problems are
  universal and sometimes you get good new perspectives when you look and think of them from a different view point.
&lt;/p&gt;
&lt;p&gt;
  These days when I talk about
  &lt;a href=&quot;https://notes.hamatti.org/writing/why-developers-should-blog&quot; class=&quot;notion-text-href&quot;&gt;why developers should
    blog&lt;/a&gt;
  , I don’t even count to three. If you did something where you learned a new thing or had to do some googling, asking
  questions and exploring documentation, that’s the point when you should write things down for yourself and most of those
  can be turned into published blog posts.
&lt;/p&gt;
&lt;p&gt;
  Imagine having a resource that has been written specifically for you, based on research, documentation and other
  people’s experiences. That’s what my technical notes and blog posts are. I return back to them regularly because the
  same (or similar enough) challenges come up regularly in my day-to-day. It feels wasted to always start from the scratch
  — and especially painful when you kind of remember that you’ve seen this before but can’t remember where.
&lt;/p&gt;
&lt;p&gt;
  Once you start writing these down, whether in a blog post or personal notes, it’s a good habit to include your own stuff
  to when you’re searching for information. In
  &lt;a href=&quot;https://hamatti.org/posts/search-your-notes-first/&quot; class=&quot;notion-text-href&quot;&gt;Search your notes first&lt;/a&gt;
  I touched on this briefly (I should write a longer post focused on this one day). Every time I search anything online on
  my laptop, I see results from my own notes. I’m a lazy man: years of conditioning to write search queries to browser’s
  url bar is so deeply engrained to me that I found including the results there is more effective than trying to change my
  workflow to search in a different app first.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Writing and reading as a learning tool
&lt;/h2&gt;
&lt;p&gt;
  I’ve
  &lt;a href=&quot;https://hamatti.org/posts/a-lot-of-what-ive-learned-ive-learned-from-open-web/&quot; class=&quot;notion-text-href&quot;&gt;learned so much from
    other people’s blog posts&lt;/a&gt;
  . “Obligated” is a strong word and I’m using it as a bit of a hyperbole here but I do feel a sense of obligation to not
  pull the ladder up after me but to help contribute to future generations by blogging and sharing what I’ve learned.
&lt;/p&gt;
&lt;p&gt;
  Even if I just write for myself, I often see that writing improves my technical/development work as well. Sometimes I
  use it as
  &lt;a href=&quot;https://hamatti.org/posts/blogging-is-my-new-favorite-refactoring-tool/&quot; class=&quot;notion-text-href&quot;&gt;a refactoring tool&lt;/a&gt;: I build
    something and when I write about it, I spot bad code, inconsistencies, things I want to explain for them to make sense
    and it gives me an opportunity to go back and fix my code. Other times, I do something akin to documentation-driven
    development where I start a new feature development by writing end user documentation. Occasionally, I write a blog post
    from a “how I would like the story about it to be” and then that helps me get over some hurdles that I’m stuck with.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Communication as a skill&lt;/h2&gt;
&lt;p&gt;
  I would lie if I’d say I’m doing this completely from altruistic motivations. Far from it. I write because I’ve fallen
  in love with writing. It’s also a strong career move in multiple ways.
&lt;/p&gt;
&lt;p&gt;
  First, writing is communication and communication is a crucial skill in knowledge industry like software development.
  The way you become better at it is to practice and blogging is a great, low-threshold, low-stakes way to do that on your
  own terms. Every now and then I hear a sentiment of “we can’t all be great writers” in a way that communicates that
  writing is some kind of innate talent rather than a learned skill.
&lt;/p&gt;
&lt;p&gt;
  Second, writing is a good way to let people know what you know and where your interests are. It takes time but if you’re
  doing it consistently and get better at your writing, people start to notice. Tim Schilling has a great post about
  &lt;a href=&quot;https://www.better-simple.com/career/2026/10/28/looking-for-a-job-start-a-blog/&quot; class=&quot;notion-text-href&quot;&gt;why
    blogging is a great tool in job hunting&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  It took me at least a decade of blogging with some sort of regularity until it started to bear fruit but I’ve gotten a
  lot of interesting opportunities in life — both as career opportunities as well as other, less career-focused things —
  because I’ve been actively writing about my learning and experience.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Advent of Code as an entry point
&lt;/h2&gt;
&lt;p&gt;
  If you’re a software developer thinking “how do I get started?”, I have good
      news.
  &lt;a href=&quot;https://adventofcode.com/&quot; class=&quot;notion-text-href&quot;&gt;Advent of Code&lt;/a&gt;
  starts again December 1st and you’ll get a puzzle to solve every day for a couple of weeks. Solve the puzzle and write
  about it. I’ve been
  &lt;a href=&quot;https://hamatti.org/adventofcode/&quot; class=&quot;notion-text-href&quot;&gt;writing educational posts about solving them with Python for years now&lt;/a&gt;
  . I like AoC as a springboard to technical blogging is that you don’t have to come up with topics. Eric Wastl has
  created these puzzles for you and that gives a nice framework for a blog series.
&lt;/p&gt;
&lt;p&gt;
  Advent of Code is also good topic because there’s a lot of us writing about the solutions and even more people
  interested in reading them. In addition to daily puzzles, I often find interesting more general topics arise from them
  that I can write about in a more evergreen note format — which also helps you in the future years of solving the puzzles
  as you build a knowledge base.
&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
    </content>
  </entry>
   
  
  <entry>
    <title>Djangonaut Log 4: Avoiding asteroids</title>
    <link href="https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids/" />
    <updated>2026-11-08T00:00:00Z</updated>
    <id>https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;This blog post is a weekly update of my journey in
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;
    &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;, an 8-week mentoring program for future open source developers in the Django ecosystem.&lt;/i&gt;
&lt;/p&gt;
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/&quot; class=&quot;notion-text-href&quot;&gt;3… 2… 1… becoming a Djangonaut&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log
        1: Lift-off and first week in Djangonaut Space&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot; class=&quot;notion-text-href&quot;&gt;Debugging
        a flaky test — how I methodologically tamed an annoying bug&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot; class=&quot;notion-text-href&quot;&gt;Assumptions are sneaky&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/&quot; class=&quot;notion-text-href&quot;&gt;
        Djangonaut Log 2: Leaving the atmosphere and first merged contributions
      &lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-3-into-the-orbit/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log 3: Into the orbit!&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      Djangonaut Log 4: Avoiding asteroids
      &lt;b class=&quot;notion-text-bold&quot;&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot;&gt;Designing a simple audit log&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/&quot;&gt;Djangonaut Log 5: Traveling amongst the stars!&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
  Honestly, this week wasn’t a great one for me. I tend to be the type of person who gets very excited about things I’m
  passionate about and Djangonaut Space — as you may have noticed through my blog posts — is definitely one of those. What
  I sometimes fail to balance properly though is how to make sure that my enthusiasm and desire to participate and share
  doesn’t drain the oxygen out of the room for others.
&lt;/p&gt;
&lt;p&gt;
  When I eventually realise that, I tend to overcorrect which leads to anxiety and not doing much of anything and that’s
  what happened this week. I got a couple of small things done at the start of the week but had a hard time finishing one
  of the fixes I’ve been working on and my creative juices dried up quite a bit so I also didn’t find my enthusiasm to
  write about what I’ve been working on during the week. I also decided to tone down my activity in Discord towards the
  end of the week to give more room to others.
&lt;/p&gt;
&lt;p&gt;
  One wonderful benefit of being part of a program like Djangonaut Space is the access to the community and specifically
  having an assigned Captain with whom I could discuss these topics and feelings in a constructive way.
&lt;/p&gt;
&lt;p&gt;
  One of the cool things being part of communities like these is that interesting opportunities to do fun things and meet
  new people pop up. A fellow Djangonaut, Alex, was going to deliver a talk in a meetup and I got to see the talk over
  video call earlier that day and we ended up having a great chat about public speaking and meetups.
&lt;/p&gt;
&lt;p&gt;
  My note taking habits have also come up in various discussions with people in the community so I promised to do a
  fireside chat with the community later this month. I’m planning to showcase a few types of notes that I take and share
  some tips on how to document your work. It’s gonna be built around my habit of
  &lt;a href=&quot;https://notes.hamatti.org/note-taking/running-notes&quot; class=&quot;notion-text-href&quot;&gt;writing running notes&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>I was wrong about Pokémon TCG Live economy</title>
    <link href="https://hamatti.org/posts/i-was-wrong-about-pokemon-tcg-economy/" />
    <updated>2026-11-05T00:00:00Z</updated>
    <id>https://hamatti.org/posts/i-was-wrong-about-pokemon-tcg-economy/</id>
    <content type="html">
      
&lt;p&gt;
  Back in the day, when Pokémon TCG Live was announced in 2021, I was worried that the economy would make it hard to keep
  building decks. In the older client, PTCG Online, you could trade cards but that was removed in Live and replaced with a
  much anticipated crafting where you can exchange in-game currency to purchase cards you wanted.
&lt;/p&gt;
&lt;p&gt;
  My main worry was that you could not (and still can’t) decide to
  &lt;i class=&quot;notion-text-italic&quot;&gt;dust&lt;/i&gt;
  a card, ie. turn any card you want into credits to purchase other cards. You could only get the credits through in-game
  awards or when you added a fifth card into your collection. Anything beyond 4 cards gets dusted and turned into credits
  on a ratio that’s not great.
&lt;/p&gt;
&lt;p&gt;
  5 years later, I’m ready to admit I was completely wrong. To be fair, I play a lot but I stopped converting code cards
  from boosters into the game years ago.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/i-was-wrong-about-pokemon-tcg-economy/1.png.webp&quot; alt=&quot;Pokemon TCG Live currency menu showing 314146 purple currency, 433111 yellow currency and 13 Battle Pass tokens. &quot; /&gt;
&lt;p&gt;
  I’m currently at 314k of the purple currency (used for buying packs) and 433k in yellow currency (used to craft cards)
  and I have pretty much complete collections of all sets that have been published since the game came out. I can play
  whatever decks I want.
&lt;/p&gt;
&lt;p&gt;
  I don’t know what the numbers look like for a super casual player or someone who starts from the scratch. I got quite a
  good start by converting my old Online collection to Live and making smart moves up front. My main worry was that
  because of the low rate for dusting, it would eventually fizzle out. It clearly didn’t. I asked around in my local
  gaming group on the numbers were somewhat similar: ie. at least tens of thousands of credits.
&lt;/p&gt;
&lt;p&gt;
  Having enough of credits to purchase the cards I need has been very helpful in playing fun custom formats. We played a
  fun
  &lt;a href=&quot;https://notes.hamatti.org/gaming/board-games/pokemon/pokemon-tcg-progression-series&quot; class=&quot;notion-text-href&quot;&gt;
  Progression Series&lt;/a&gt;
  through live with Scarlet and Violet sets and recently I’ve been trying to get my friends to play a tournament with
  random
  &lt;a href=&quot;https://bulbapedia.bulbagarden.net/wiki/Start_Deck_100_Battle_Collection_(TCG)&quot; class=&quot;notion-text-href&quot;&gt;Start
    Deck 100&lt;/a&gt;
  decks. Spending a couple of thousand credits at max to get a new silly deck makes it possible to play more than just one
  or two decks and experience the game in a way that is most fun.
&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
    </content>
  </entry>
   
  
  <entry>
    <title>Djangonaut Log 3: Into the orbit!</title>
    <link href="https://hamatti.org/posts/djangonaut-log-3-into-the-orbit/" />
    <updated>2026-11-01T00:00:00Z</updated>
    <id>https://hamatti.org/posts/djangonaut-log-3-into-the-orbit/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;This blog post is a weekly update of my journey in
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;
    &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;, an 8-week mentoring program for future open source developers in the Django ecosystem.&lt;/i&gt;
&lt;/p&gt;
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/&quot; class=&quot;notion-text-href&quot;&gt;3… 2… 1… becoming a Djangonaut&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log
        1: Lift-off and first week in Djangonaut Space&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot; class=&quot;notion-text-href&quot;&gt;Debugging
        a flaky test — how I methodologically tamed an annoying bug&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot; class=&quot;notion-text-href&quot;&gt;Assumptions are sneaky&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/&quot; class=&quot;notion-text-href&quot;&gt;
        Djangonaut Log 2: Leaving the atmosphere and first merged contributions
      &lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      Djangonaut Log 3: Into the orbit!
      &lt;b class=&quot;notion-text-bold&quot;&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids&quot;&gt;Djangonaut Log 4: Avoiding asteroids&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot;&gt;Designing a simple audit log&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/&quot;&gt;Djangonaut Log 5: Traveling amongst the stars!&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
  This week was a bit slower week for me. I caught a mild fever last weekend and decided to take it easy for the first few
  days: staying in bed, taking a few extra naps and watching cartoons.
&lt;/p&gt;
&lt;p&gt;On Tuesday, we had two shared sessions with Djangonauts.&lt;/p&gt;
&lt;p&gt;
  For the first one, Annabelle Wiegart, a Djangonaut alumn herself, joined us to share her experience of finding her
  community in tech industry and how she transitioned from a librarian to an open source developer. The talk was recorded
  and you can watch it from
  &lt;a href=&quot;https://www.youtube.com/watch?v=JErZItEjOdM&quot;&gt;Djangonaut Space&#39;s Youtube channel&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  For the second one, Dan Shernicoff, the Navigator of team Corvus and
          maintainer of
  &lt;a href=&quot;https://github.com/render-engine/&quot; class=&quot;notion-text-href&quot;&gt;Render Engine&lt;/a&gt;
  hosted a session to show us and discuss the wonders of
  &lt;a href=&quot;https://docs.pytest.org/en/stable/&quot; class=&quot;notion-text-href&quot;&gt;pytest&lt;/a&gt;, a test runner used in a lot of Python
    projects. I learned a few new tricks and was able to share a few myself too. It was a really lovely, chill session where
    in addition to learning new tech stuff, we also got to know each other better.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Tech &amp; contributions&lt;/h2&gt;
&lt;p&gt;
  After last week’s dev environment setup session with a fellow Djangonaut, I
          started working on
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1150&quot; class=&quot;notion-text-href&quot;&gt;updating our documentation&lt;/a&gt;
  and that change got merged in this week. I also fixed
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1130&quot; class=&quot;notion-text-href&quot;&gt;another PR of mine&lt;/a&gt;
  from earlier that had broken due to updated libraries. That got merged in as
          well.
&lt;/p&gt;
&lt;p&gt;
  As I was working with documentation, I noticed we had
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1151&quot; class=&quot;notion-text-href&quot;&gt;a little bit inconsistent way of
    handling different boolean values from environment variables&lt;/a&gt;
  so I made a PR to streamline them and the PR exposed us to some implicit stuff from how the CI was set up and it’s
  waiting for all of those to get solved.
&lt;/p&gt;
&lt;p&gt;
  Rest of the week I was focused on a bug fix for
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/issues/1068&quot; class=&quot;notion-text-href&quot;&gt;a bug in how organisers can
    manage applicants’ RSVP status&lt;/a&gt;
  which continues into the next week as well. I’ve got the bug itself fixed and a few nice improvements along the way but
  am still working on an extra feature on top of the fix.
&lt;/p&gt;
&lt;p&gt;
  As a team, we continued fixing issues related to the updates with libraries and how the project is setup and I
  participated in those, doing experimentation and writing them down into other issues and pull requests.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Stories from fellow Djangonauts
&lt;/h2&gt;
&lt;p&gt;
  Django Packages published a post of
  &lt;a href=&quot;https://www.djangopackages.org/changelog/what-our-djangonauts-shipped-on-django-packages/&quot; class=&quot;notion-text-href&quot;&gt;the work Djangonauts in their team contributed in summer of 2024&lt;/a&gt;
  which was a great read.
&lt;/p&gt;
&lt;p&gt;
  &lt;a href=&quot;https://wasif-shahzad.github.io/djangonaut-space-log-2-struggles-to-find-the-issue.html&quot; class=&quot;notion-text-href&quot;&gt;Wasif continued sharing his experience on his journey to fixing an issue in Django Debug Toolbar&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  Tim Schilling, one of admins and founders of Djangonaut Space, published a
          great blog post about
  &lt;a href=&quot;https://www.better-simple.com/career/2026/10/28/looking-for-a-job-start-a-blog/&quot; class=&quot;notion-text-href&quot;&gt;why
    blogging is beneficial if you’re a developer looking for a job&lt;/a&gt;.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Sharing notes with Hermes and Agora</title>
    <link href="https://hamatti.org/posts/sharing-notes-with-hermes-and-agora/" />
    <updated>2026-10-28T00:00:00Z</updated>
    <id>https://hamatti.org/posts/sharing-notes-with-hermes-and-agora/</id>
    <content type="html">
      
&lt;div class=&quot;callout-blog&quot;&gt;
  &lt;p&gt;
    &lt;i class=&quot;notion-text-italic&quot;&gt;
      This project is in its infancy state and I’m sharing my early experiments
      with hopes that my ideas spark discussions, improvement ideas or inspires
      someone else to build similar things for themselves. The plugin is not
      currently installable anywhere but if you want, you can take the code
      below and build your own. I might publish it at some point in Obsidian
      plugin directory if it reaches a good enough state.&lt;/i&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
  &lt;strong&gt;Update Oct 29:&lt;/strong&gt; I have been told that Hermes is unfortunately
  also a name of an AI agent project and I want to clarify that my projects have
  nothing to do with gen AI, LLMs or agents. I may have to reconsider the name
  going forward.
&lt;/p&gt;
&lt;p&gt;
  The concept of sharing individual notes with people is a topic that comes up
  constantly in my discussions with friends who also take notes. It’s a built-in
  feature to many commercial SaaS notetaking tools like Notion and Apple Notes
  but if you’re using something more local and private like Obsidian or Emacs,
  there’s no built-in option because that would require there to be a
  centralised server.
&lt;/p&gt;

&lt;p&gt;
  While I already have a setup of publishing a subset of my notes in
  &lt;a href=&quot;https://notes.hamatti.org/&quot; class=&quot;notion-text-href&quot;&gt;Garden of Learning&lt;/a&gt;
  from Obsidian, I consider that a more permanent place and notes being
  available to everyone to browse.
&lt;/p&gt;

&lt;p&gt;What I want — and ended up building a first prototype of — is as follows:&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Write my note in Obsidian
  &lt;/li&gt;

  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Run a command from within Obsidian
  &lt;/li&gt;

  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    The currently open note gets copied into a project and published on a
    website
  &lt;/li&gt;

  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    The URL is copied to my clipboard to be shared with a friend
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  These pages and URLs will be short-lived by nature. They are meant to be
  shared privately in discussions and not meant to be linked to permanently.
  There’s no promise that the page the URL points to will exist permanently.
&lt;/p&gt;

&lt;p&gt;
  I have one example note up at
  &lt;a href=&quot;https://share.hamatti.org/notes/584178d8/&quot;&gt;https://share.hamatti.org/notes/584178d8/&lt;/a&gt;
  to demo it.
&lt;/p&gt;

&lt;p&gt;
  That’s exactly what I’m building. The project is still in its early phases so
  I don’t have a ready made, installable system to share yet because it needs
  way more polish to be useful to someone else and not rely on my internal
  project and folder structure and deployment setup as it does now.
&lt;/p&gt;

&lt;p&gt;
  Since naming projects is a big reason to even build projects, after a long
  careful pondering on a sleepless night, I decided to call the website
  &lt;a href=&quot;https://en.wikipedia.org/wiki/Agora&quot; class=&quot;notion-text-href&quot;&gt;Agora&lt;/a&gt;
  and the plugin
  &lt;a href=&quot;https://en.wikipedia.org/wiki/Hermes&quot; class=&quot;notion-text-href&quot;&gt;Hermes&lt;/a&gt;. I don’t know if naming a project that spreads my ideas after the “messenger
  of gods” is narcissist or grandiose but that’s what I decided to go with.
&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Technical overview&lt;/h2&gt;
&lt;h3&gt;Hermes - Obsidian plugin + shell script&lt;/h3&gt;
&lt;p&gt;
  I’ve never built an Obsidian plugin before so the first hurdle was to figure
  out how those are built. Lucky for me, they are built with Javascript so at
  least I had a familiar language to work with.
&lt;/p&gt;

&lt;p&gt;
  Obsidian has
  &lt;a href=&quot;https://docs.obsidian.md/Plugins/Getting+started/Build+a+plugin&quot; class=&quot;notion-text-href&quot;&gt;documentation for how to build plugins&lt;/a&gt;
  but I found it either lacking or hard to find stuff so a lot was just trial
  and error to get myself into a working prototype. I started with
  &lt;a href=&quot;https://github.com/obsidianmd/obsidian-sample-plugin&quot; class=&quot;notion-text-href&quot;&gt;the sample plugin code&lt;/a&gt;
  and started removing bits and pieces until I had a minimal setup that still
  ran.
&lt;/p&gt;

&lt;p&gt;
  I went through multiple iterations of the design as I was trying to figure out
  the system. I’m not expecting this plugin at this point to be generally usable
  but I’m trying my best to separate it from the website project.
&lt;/p&gt;

&lt;details&gt;
  &lt;summary&gt;Here’s my current plugin code (main.ts):&lt;/summary&gt;
  
  &lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;import {
	Notice,
	Plugin,
	Editor,
	MarkdownFileInfo,
	MarkdownView,
} from &#39;obsidian&#39;;
import {
	DEFAULT_SETTINGS,
	HermesSettings,
	HermesSettingsTab,
} from &#39;./settings.js&#39;;
import { exec, ExecException, spawn } from &#39;child_process&#39;;
import crypto from &#39;crypto&#39;;

function handleExecOutput(
	error: ExecException | null,
	stdout: string,
	stderr: string,
) {
	if (error) {
		console.log({ error });
		new Notice(`ERROR in Hermes: ${error}`);
	}
	console.log({ stdout });
}

function handleCommand(
	ctx: MarkdownFileInfo | MarkdownView,
	hermes: Hermes,
): boolean {
	const { projectPath, websiteURL, folder } = hermes.settings;

	if (projectPath === &#39;&#39;) {
		new Notice(&#39;Project path is not defined. Aborting...&#39;);
		return false;
	}

	if (websiteURL === &#39;&#39;) {
		new Notice(&#39;Website URL is not defined. Aborting...&#39;);
		return false;
	}

	const file = ctx.file;
	if (!file) {
		new Notice(&#39;No file open to share&#39;);
		return false;
	}

	// @ts-ignore
	const path = `${file.vault.adapter.basePath}/${file.path}`;
	const filename = crypto.randomUUID().split(&#39;-&#39;)[0];
	const outpath = `${projectPath}/${folder}/${filename}.md`;

	exec(`${projectPath}/bin/execute &quot;${path}&quot; &quot;${outpath}&quot;`, handleExecOutput);

	const shareURL = `${websiteURL}/${folder}/${filename}`;
	let proc = spawn(&#39;pbcopy&#39;);
	proc.stdin.write(`${shareURL}`);
	proc.stdin.end();

	new Notice(shareURL);

	return true;
}

export default class Hermes extends Plugin {
	settings!: HermesSettings;

	async onload() {
		await this.loadSettings();
		const hermes = this;

		this.addCommand({
			id: &#39;hermes-share-note&#39;,
			name: &#39;Share note&#39;,
			editorCallback(
				editor: Editor,
				ctx: MarkdownFileInfo | MarkdownView,
			) {
				handleCommand(ctx, hermes);
			},
		});

		this.addSettingTab(new HermesSettingsTab(this.app, this));
	}

	onunload() {}

	async loadSettings() {
		this.settings = Object.assign(
			{},
			DEFAULT_SETTINGS,
			(await this.loadData()) as Partial&amp;#60;HermesSettings&amp;#62;,
		);
	}

	async saveSettings() {
		await this.saveData(this.settings);
	}
}
&lt;/code&gt;&lt;/pre&gt;
  
  &lt;p&gt;and its accompanying settings code&lt;/p&gt;
  
  &lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;import { App, PluginSettingTab, Setting, TextComponent } from &#39;obsidian&#39;;
import Hermes from &#39;./main.js&#39;;

export interface HermesSettings {
	projectPath: string;
	websiteURL: string;
	folder: string;
}

export const DEFAULT_SETTINGS: HermesSettings = {
	projectPath: &#39;&#39;,
	websiteURL: &#39;&#39;,
	folder: &#39;&#39;,
};

export class HermesSettingsTab extends PluginSettingTab {
	plugin: Hermes;

	constructor(app: App, plugin: Hermes) {
		super(app, plugin);
		this.plugin = plugin;
	}

	display(): void {
		const { containerEl } = this;

		containerEl.empty();

		new Setting(containerEl)
			.setName(&#39;Project path&#39;)
			.setDesc(&#39;Absolute path to your website project&#39;)
			.addText((text: TextComponent) =&amp;#62;
				text
					.setPlaceholder(&#39;/path/to/project&#39;)
					.setValue(this.plugin.settings.projectPath)
					.onChange(async (value: string) =&amp;#62; {
						this.plugin.settings.projectPath = value;
						await this.plugin.saveSettings();
					}),
			);

		new Setting(containerEl)
			.setName(&#39;Folder&#39;)
			.setDesc(&#39;Where your notes go&#39;)
			.addText((text: TextComponent) =&amp;#62;
				text
					.setPlaceholder(&#39;notes&#39;)
					.setValue(this.plugin.settings.folder)
					.onChange(async (value: string) =&amp;#62; {
						this.plugin.settings.folder = value;
						await this.plugin.saveSettings();
					}),
			);

		new Setting(containerEl)
			.setName(&#39;Base URL&#39;)
			.setDesc(&#39;Where your website lives&#39;)
			.addText((text: TextComponent) =&amp;#62;
				text
					.setPlaceholder(&#39;https://example.com&#39;)
					.setValue(this.plugin.settings.websiteURL)
					.onChange(async (value: string) =&amp;#62; {
						this.plugin.settings.websiteURL = value;
						await this.plugin.saveSettings();
					}),
			);
	}
}&lt;/code&gt;&lt;/pre&gt;
  
&lt;/details&gt;

&lt;p&gt;
  When you run the command Hermes Share Note, it runs a
  &lt;code class=&quot;notion-text-code&quot;&gt;bin/execute&lt;/code&gt; command that lives in the
  website project and is eventually responsible for deciding what to do when
  Hermes runs. Hermes is agnostic of everything, it’s simply a
  &lt;i class=&quot;notion-text-italic&quot;&gt;messenger (of gods)&lt;/i&gt;.
&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Agora - share.hamatti.org&lt;/h2&gt;

&lt;p&gt;
  Agora is an 11ty website project with a
  &lt;code class=&quot;notion-text-code&quot;&gt;bin/execute&lt;/code&gt; shell script that Hermes
  activates. All the 11ty project does is that it turns Markdown files in
  &lt;code class=&quot;notion-text-code&quot;&gt;notes/&lt;/code&gt; into a webpage.
&lt;/p&gt;

&lt;p&gt;
  The execute script (mine is in written in zsh but the system is intentionally
  designed so that you can build it with any language you want) then copies the
  file to Agora as defined in Hermes’ settings. It then does a few things (it’s
  very WIP still as I’m figuring stuff out):
&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    It finds all
    &lt;code class=&quot;notion-text-code&quot;&gt;![[image.webp|alt]]&lt;/code&gt; image references,
    copies the files to &lt;code class=&quot;notion-text-code&quot;&gt;assets/notes/&lt;/code&gt; and
    replaces the links with standard markdown of
    &lt;code class=&quot;notion-text-code&quot;&gt;![alt](assets/notes/note-id/image.webp&lt;/code&gt;.
  &lt;/li&gt;

  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    It removes all internal links in format of
    &lt;code class=&quot;notion-text-code&quot;&gt;[[note]]&lt;/code&gt; because this is a single-note
    sharing system and internal links don’t make any sense.
  &lt;/li&gt;

  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    It then adds the changes to git and pushes to remote repository from where
    it gets built.
  &lt;/li&gt;
&lt;/ol&gt;
&lt;details&gt;
  &lt;summary&gt;My current &lt;code&gt;bin/execute&lt;/code&gt; script&lt;/summary&gt;
  
  &lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;#!/bin/zsh

# Companion script for Obsidian plugin HERMES. This is run when a note
# is shared from HERMES and defines how to deal with it.
#
# HERMES calls this as
# `bin/execute &amp;#60;source&amp;#62; &amp;#60;target&amp;#62;`
#
# author: Juha-Matti Santala &amp;#60;juhis@hamatti.org&amp;#62;

set -euo

# Copy file from Obsidian to this project
cp &quot;$1&quot; &quot;$2&quot;

original_file_name=$(basename &quot;$1&quot;)
new_file_name=$(basename &quot;$2&quot;)
folder_name=$(print ${new_file_name:t:r})

cd /Users/juhis/code/share.hamatti.org/

# Replace image references
## Find all images for copying
images=( $(grep -E  &quot;&#92;!&#92;[&#92;[(.*)&#92;]&#92;]&quot; &quot;$2&quot; | sed -r &#39;s/!&#92;[&#92;[(.*)&#92;]&#92;]/&#92;1/g&#39; | cut -d&quot;|&quot; -f1) )

## If found, create a folder in assets
if (( ${#images[@]} != 0 )); then
    mkdir -p &quot;assets/notes/$folder_name&quot;
fi

for image in &quot;${images[@]}&quot;; do
    cp &quot;/Users/juhis/Documents/Juhisland/999 - Assets/$image&quot; &quot;assets/notes/$folder_name/$image&quot;
done 

## Replace links to standard markdown
sed -ri &#39;&#39; &quot;s/!&#92;[&#92;[(.*)&#92;|(.*)&#92;]&#92;]/![&#92;2](&#92;/assets&#92;/notes&#92;/${folder_name}&#92;/&#92;1)/g&quot; &quot;$2&quot;
sed -ri &#39;&#39; &quot;s/!&#92;[&#92;[(.*)&#92;]&#92;]/![](&#92;/assets&#92;/notes&#92;/${folder_name}&#92;/&#92;1)/g&quot; &quot;$2&quot;

# Remove Wikilinks

sed -ri &#39;&#39; &quot;s/&#92;[&#92;[(.*)&#92;]&#92;]/&#92;1/g&quot; &quot;$2&quot;

# # Add it to git and publish
git add &quot;notes/$new_file_name&quot; 
if (( ${#images[@]} != 0 )); then
    git add &quot;assets/notes/$folder_name&quot;
fi
git commit -m &quot;New note: $original_file_name -&amp;#62; $new_file_name&quot;
git push origin main&lt;/code&gt;&lt;/pre&gt;
  
&lt;/details&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Djangonaut Log 2: Leaving the atmosphere and first merged contributions</title>
    <link href="https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/" />
    <updated>2026-10-25T00:00:00Z</updated>
    <id>https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;This blog post is a weekly update of my journey in
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;
    &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;, an 8-week mentoring program for future open source developers in the Django ecosystem.&lt;/i&gt;
&lt;/p&gt;
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/&quot; class=&quot;notion-text-href&quot;&gt;3… 2… 1… becoming a Djangonaut&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log
        1: Lift-off and first week in Djangonaut Space&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot;&gt;Debugging a flaky test — how I
        methodologically tamed an annoying bug&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot;&gt;Assumptions are sneaky&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      Djangonaut Log 2: Leaving the atmosphere and first merged contributions
      &lt;b&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-3-into-the-orbit&quot;&gt;Djangonaut Log 3: Into the orbit!&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids&quot;&gt;Djangonaut Log 4: Avoiding asteroids&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot;&gt;Designing a simple audit log&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/&quot;&gt;Djangonaut Log 5: Traveling amongst the stars!&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
  Last week, I started making my first contributions and first two of them got merged in on Wednesday. We had a bit of
  outdated versions for Python and libraries in the codebase which had broken the development environment setup and pull
  request pipeline in GitHub so a lot of this second week was focused on discussions and contributions to fix them.
&lt;/p&gt;
&lt;p&gt;
  I had a couple of really good discussions with people in our team that helped me confirm my ideas of focusing on help
  bring the system to a working status before focusing deeply on other fixes.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  A peek behind the curtain: how does Djangonaut Space work
&lt;/h2&gt;
&lt;p&gt;
  Djangonaut Space is organised as sessions, each lasting 8 weeks. We are currently in Session 7 so there’s been a nice
  amount of brilliant people who have gone through the program before me. It’s been a joy to see many of them return later
  in different roles. To me, that’s a great sign of the good work people running the program have done.
&lt;/p&gt;
&lt;p&gt;
  Participants of a session are then split into teams: I’m part of Pyxis, a team
        focused on
  &lt;a href=&quot;https://djangogirls.org/&quot; class=&quot;notion-text-href&quot;&gt;Django Girls+&lt;/a&gt;
  project together with with two fellow Djangonauts Carmen and Ayka, our
        Navigator Anna and our Captain Jim.
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Djangonauts&lt;/strong&gt;
  are the mentees who are here to learn how to get started with contributing to Django ecosystem and to connect with
  people in the community.
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Navigator&lt;/strong&gt;
  is the person representing the project. A maintainer or core contributor whose job is to guide the team through
  technical and procedural discussions to empower us Djangonauts to get a good start over these 8 weeks that will last for
  a long time. Our Navigator is
  &lt;a href=&quot;https://github.com/amakarudze&quot; class=&quot;notion-text-href&quot;&gt;Anna Makarudze&lt;/a&gt;
  who is the lead maintainer of the project.
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Captain&lt;/strong&gt;
  (&lt;a href=&quot;https://www.youtube.com/watch?v=3X81np_9QlE&quot; class=&quot;notion-text-href&quot;&gt;O Captain! My Captain&lt;/a&gt;) is a mentoring role not specific to the project at hand. Ours is
  &lt;a href=&quot;https://github.com/jima80525&quot; class=&quot;notion-text-href&quot;&gt;Jim Anderson&lt;/a&gt;
  with whom I’ve already had multiple wonderful discussions: both about the topic at hand but also everything under the
  sun. We have a lot in common and share many interests and our weekly one-on-ones always feel like we could sit there for
  hours to discuss.
&lt;/p&gt;
&lt;p&gt;
  For the first weeks, our communication has settled in to a good rhythm: we chat daily in our team’s Discord channel and
  every Monday, we have a team call where people can bring up issues, ask questions and share their progress. Following
  that, I have my 1:1 call with Jim. These two calls give me a great kickoff to a new week and help me figure out my
  plans. When needed, we have extra sessions: I asked Anna to show around the project from the perspective of users and I
  had a call with Carmen going through the development environment setup. Other times, we communicate asynchronously
  through Discord and GitHub.
&lt;/p&gt;
&lt;p&gt;
  On every other Wednesday, the entire Djangonaut Space community has an Open Mic session: an opportunity to share short
  lightning talks or art performances. I’ve participated in two so far and delivered talks on
  &lt;a href=&quot;https://hamatti.org/posts/tame-your-pesky-little-scripts/&quot; class=&quot;notion-text-href&quot;&gt;pesky little scripts&lt;/a&gt;
  and comparing version numbers. Others have done poetry and music or showcasing
        projects they have worked on.
&lt;/p&gt;
&lt;p&gt;
  Next week, we have our first guest talk. I’ve been
  &lt;a href=&quot;https://www.youtube.com/@djangonautspace/videos&quot; class=&quot;notion-text-href&quot;&gt;following these along in Youtube&lt;/a&gt;
  over the years and they are all fantastic so I’m looking forward to this one as well. First ad-hoc sessions focusing on
  a single topic people want to share, hosted by Djangonaut Space members have started to emerge as well. I’m looking
  forward to learning more about pytest from Dan next week!
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Tech &amp; contributions&lt;/h2&gt;
&lt;p&gt;This week, my first pull requests got merged, yay 🚀.&lt;/p&gt;
&lt;p&gt;
  First one
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1134&quot; class=&quot;notion-text-href&quot;&gt;fixed the functionality and
    improved styling of the cookie banner&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  Second was a smaller
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1133&quot; class=&quot;notion-text-href&quot;&gt;clean up PR removing duplicate
    and commented out code&lt;/a&gt;. (-51, +0 is the best kind of PR statistic.)
&lt;/p&gt;
&lt;p&gt;
  As I mentioned earlier, we’ve had some issues with the developer environment as especially the Docker build hadn’t been
  touched in a long time and due to old Python 3.10 lock-in, some of the pipeline actions started breaking down. Anna has
  been working on
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1137&quot; class=&quot;notion-text-href&quot;&gt;bringing those to more modern
    versions&lt;/a&gt;
  and I’ve been helping with smaller broken things like
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1141&quot; class=&quot;notion-text-href&quot;&gt;localisation errors in
  &lt;/a&gt;
  &lt;code class=&quot;notion-text-code&quot;&gt;
    &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1141&quot; class=&quot;notion-text-href&quot;&gt;compilemessages&lt;/a&gt;
  &lt;/code&gt;
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1141&quot; class=&quot;notion-text-href&quot;&gt;
    step&lt;/a&gt;
  that prevented the Docker from building the projects.
&lt;/p&gt;
&lt;p&gt;
  Couple of other fixes I’ve been working on has to do with management commands:
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1130&quot; class=&quot;notion-text-href&quot;&gt;one to update Patreon data
    fetching&lt;/a&gt;
  as the API had changed and another to
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1136&quot; class=&quot;notion-text-href&quot;&gt;get more specific errors when
    the ingestion of blog posts come in&lt;/a&gt;
  instead of always failing at the parsing step.
&lt;/p&gt;
&lt;p&gt;
  Once we got a lot of the infrastructure issues out of the way, I started looking into fixing more feature level
  functionality that matters to our users. RSVP management in the event admin view
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/issues/1068&quot; class=&quot;notion-text-href&quot;&gt;wasn’t working&lt;/a&gt;
  so I started figuring that out. While at it, I decided it would be a good idea to add an audit log for changes so if an
  applicant’s status becomes something unexpected, event admins can figure out where the changes came from.
&lt;/p&gt;
&lt;p&gt;
  At the same time as I was working on these, I started bit by bit phasing out jQuery usage and replacing the little
  frontend Javascript we had with modern vanilla Javascript with the goal of eventually being able to take out jQuery.
  That work will take at least next week still as it’s interspersed with other work.
&lt;/p&gt;
&lt;p&gt;
  The beginning has been dealing a lot with getting the fundamentals down: understanding the project, helping work on
  making the new developer experience easier and once we get all that polished, I’m hoping to move to building bigger,
  desired new functionality.
&lt;/p&gt;
&lt;p&gt;
  On Friday, I helped a teammate with their development environment setup which helped me make good notes for an upcoming
  documentation update and surfaced
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1146&quot; class=&quot;notion-text-href&quot;&gt;a bug in a test&lt;/a&gt;. I love
    these kinds of working sessions with other people and solving problems to which I don’t have answers before hand. At the
    same time, they are great bonding sessions and you learn so much about other people when you closely work with them on
    problems.
&lt;/p&gt;
&lt;p&gt;
  I spent a good chunk of Friday and most of Saturday banging my head to the wall until it (luckily, the wall and not my
  head) cracked and I think I made
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1140#issuecomment-6385179678&quot; class=&quot;notion-text-href&quot;&gt;progress
    with our Docker upgrade process&lt;/a&gt;
  . I’m excited of how we’re finally reaching a moment where the setup and documentation should be all in place and it
  should be easy for new developers to pick the project up and get up and running quickly.
&lt;/p&gt;
&lt;p&gt;
  I also found some rhythm in writing about my work now that it started picking up. This weekend, I shared two very
  different experiences of debugging broken tests:
  &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot; class=&quot;notion-text-href&quot;&gt;Debugging
    a flaky test — how I methodologically tamed an annoying bug&lt;/a&gt;
  and
  &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot; class=&quot;notion-text-href&quot;&gt;Assumptions are sneaky&lt;/a&gt;. I believe in
  &lt;a href=&quot;https://notes.hamatti.org/learning/learning-in-public&quot; class=&quot;notion-text-href&quot;&gt;learning in public&lt;/a&gt;
  and I think it’s important to share not only the victories and polished outcomes but the messy process and mistakes made
  on the way to those outcomes.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Stories from fellow Djangonauts
&lt;/h2&gt;
&lt;p&gt;
  I’m not the only one blogging about my experience. Linda wrote about
  &lt;a href=&quot;https://lindangulopez.github.io/djangonaut-session7/&quot; class=&quot;notion-text-href&quot;&gt;her plans for the program last
    week&lt;/a&gt;
  &lt;b class=&quot;notion-text-bold&quot;&gt;&lt;/b&gt;and Wasif published a post about
  &lt;a href=&quot;https://wasif-shahzad.github.io/djangonaut-space-session-7-so-far.html&quot; class=&quot;notion-text-href&quot;&gt;the
    exploration he did for his first ticket&lt;/a&gt;.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Assumptions are sneaky</title>
    <link href="https://hamatti.org/posts/assumptions-are-sneaky/" />
    <updated>2026-10-24T00:00:00Z</updated>
    <id>https://hamatti.org/posts/assumptions-are-sneaky/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;This blog post is a weekly update of my journey in
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;
    &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;, an 8-week mentoring program for future open source developers in the Django ecosystem.&lt;/i&gt;
&lt;/p&gt;
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/&quot; class=&quot;notion-text-href&quot;&gt;3… 2… 1… becoming a Djangonaut&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log
        1: Lift-off and first week in Djangonaut Space&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot; class=&quot;notion-text-href&quot;&gt;Debugging
        a flaky test — how I methodologically tamed an annoying bug&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      Assumptions are sneaky
      &lt;b class=&quot;notion-text-bold&quot;&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/&quot;&gt;Djangonaut Log 2: Leaving the
        atmosphere and first merged contributions&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-3-into-the-orbit&quot;&gt;Djangonaut Log 3: Into the orbit!&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids&quot;&gt;Djangonaut Log 4: Avoiding asteroids&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot;&gt;Designing a simple audit log&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/&quot;&gt;Djangonaut Log 5: Traveling amongst the stars!&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
  The number 1 thing I always talk and write about in regards to debugging is to leave assumptions at the door and
  validate everything before following your assumptions. Yesterday, I failed miserably to follow my own advice.
&lt;/p&gt;
&lt;p&gt;
  I fell into the classic trap:
  &lt;b class=&quot;notion-text-bold&quot;&gt;I thought I knew how a thing works&lt;/b&gt;.
&lt;/p&gt;
&lt;p&gt;
  While I was helping a team mate to set up her development environment, we discovered a broken test. I had seen it before
  and had done a workaround for my own setup but I felt it was a good idea now to fix it so others wouldn’t have to. I
  hate telling people “just do this trick and ignore it” while ignoring the issue. These things have a tendency to pile up
  and become problematic down the line.
&lt;/p&gt;
&lt;p&gt;Here’s what we had:&lt;/p&gt;

  &lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;import pytest
from django.test import override_settings
from django.urls import reverse


STRIPE_PUBLIC_KEY = os.environ.get(&quot;STRIPE_PUBLIC_KEY&quot;, &quot;test_public&quot;)
STRIPE_SECRET_KEY = os.environ.get(&quot;STRIPE_SECRET_KEY&quot;, &quot;test_public&quot;)


def test_donate(client):
    with override_settings(STRIPE_PUBLIC_KEY=STRIPE_PUBLIC_KEY, STRIPE_SECRET_KEY=STRIPE_SECRET_KEY):
        resp = client.get(reverse(&quot;donations:donate&quot;))
        assert resp.status_code == 200

        # Check if it returns a list of past and future events
        assert &quot;form&quot; and &quot;STRIPE_PUBLIC_KEY&quot; in resp.context&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  And the test was failing. The function at
  &lt;code class=&quot;notion-text-code&quot;&gt;donations:donate&lt;/code&gt;
  was:
&lt;/p&gt;

  &lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;def donate(request):
    context = {
        &quot;patreon_stats&quot;: FundraisingStatus.objects.first(),  # TODO: This isn&#39;t used
    }
    if settings.STRIPE_PUBLIC_KEY:
        context.update({&quot;form&quot;: StripeForm(), &quot;STRIPE_PUBLIC_KEY&quot;: settings.STRIPE_PUBLIC_KEY})
    return render(request, &quot;donations/donate.html&quot;, context)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  Hence, if the &lt;code class=&quot;notion-text-code&quot;&gt;STRIPE_PUBLIC_KEY&lt;/code&gt; was not
  set, we’d skip setting up the form and public key in context.
&lt;/p&gt;

&lt;p&gt;Reading through this code, here’s what goes through in my mind:&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    In the test, if a key is missing, we set it to a default test value
  &lt;/li&gt;

  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    With &lt;code class=&quot;notion-text-code&quot;&gt;django.test.override_settings&lt;/code&gt; ,
    we change the
    &lt;code class=&quot;notion-text-code&quot;&gt;settings.STRIPE_PUBLIC_KEY&lt;/code&gt; value to
    the test value
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  Here’s where I made my mistake by assuming: I thought I knew how
  &lt;code class=&quot;notion-text-code&quot;&gt;os.environ.get&lt;/code&gt; works and only ever
  tested the values at &lt;code class=&quot;notion-text-code&quot;&gt;settings&lt;/code&gt; object.
  They never changed.
&lt;/p&gt;

&lt;p&gt;
  I even went down the rabbit hole of finding that instead of using
  &lt;code class=&quot;notion-text-code&quot;&gt;override_settings&lt;/code&gt;, with
  &lt;a href=&quot;https://pytest-django.readthedocs.io/en/latest/configuring_django.html#overriding-individual-settings&quot; class=&quot;notion-text-href&quot;&gt;pytest-django you can use &lt;/a&gt;&lt;code class=&quot;notion-text-code&quot;&gt;&lt;a href=&quot;https://pytest-django.readthedocs.io/en/latest/configuring_django.html#overriding-individual-settings&quot; class=&quot;notion-text-href&quot;&gt;settings&lt;/a&gt;&lt;/code&gt;&lt;a href=&quot;https://pytest-django.readthedocs.io/en/latest/configuring_django.html#overriding-individual-settings&quot; class=&quot;notion-text-href&quot;&gt;
    fixture&lt;/a&gt;
  and change that. I thought that was the solution because a test temporarily
  passed but when I started setting up a pull request for the fix, they started
  failing again.
&lt;/p&gt;

&lt;p&gt;
  That’s when I realised I should check what
  &lt;code class=&quot;notion-text-code&quot;&gt;STRIPE_PUBLIC_KEY&lt;/code&gt; was and found out, it
  was always empty string. It was never set to “test_public”.
&lt;/p&gt;

&lt;p&gt;
  The thing is, &lt;code class=&quot;notion-text-code&quot;&gt;os.environ.get&lt;/code&gt; doesn’t
  fall to default value on falsy values as I imagined but only if the value is
  &lt;code class=&quot;notion-text-code&quot;&gt;None&lt;/code&gt; which makes so much sense now but
  never crossed my mind while debugging this.
&lt;/p&gt;

&lt;p&gt;I changed it to check for falsy value with&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;STRIPE_PUBLIC_KEY = os.environ.get(&quot;STRIPE_PUBLIC_KEY&quot;) or &quot;test_public&quot;
STRIPE_SECRET_KEY = os.environ.get(&quot;STRIPE_SECRET_KEY&quot;) or &quot;test_public&quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which now properly uses those values when testing if the key is missing.&lt;/p&gt;

&lt;p&gt;
  Remember kids:
  &lt;b class=&quot;notion-text-bold&quot;&gt;always validate your assumptions! &lt;/b&gt;Never go
  chase a wild goose before covering all your bases at home. You can save so
  much time and effort.
&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Debugging a flaky test — how I methodologically tamed an annoying bug</title>
    <link href="https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/" />
    <updated>2026-10-23T00:00:00Z</updated>
    <id>https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;This blog post is an update of my journey in
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;
    &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  &lt;/i&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;, an 8-week mentoring program for future open source developers in the Django ecosystem.&lt;/i&gt;
&lt;/p&gt;
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/&quot; class=&quot;notion-text-href&quot;&gt;3… 2… 1… becoming a Djangonaut&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log
        1: Lift-off and first week in Djangonaut Space&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      Debugging a flaky test — how I methodologically tamed an annoying bug
      &lt;b&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot;&gt;Assumptions are sneaky&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/&quot;&gt;Djangonaut Log 2: Leaving the
        atmosphere and first merged contributions&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-3-into-the-orbit&quot;&gt;Djangonaut Log 3: Into the orbit!&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids&quot;&gt;Djangonaut Log 4: Avoiding asteroids&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot;&gt;Designing a simple audit log&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/&quot;&gt;Djangonaut Log 5: Traveling amongst the stars!&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
  A flaky is a automated test in software development that seemingly non-deterministically fails. I hate them with passion
  because they erode your trust to your test suite, can cause people to start ignoring test failures and are annoying as
  heck to deal with.
&lt;/p&gt;
&lt;p&gt;
  Yesterday, I spent an afternoon dealing with one as part of my Djangonaut Space work for the Django Girls+ project.
  Here’s an exploration report for how I narrowed it down, found the root cause and fixed it. I followed my debugging
  process that relies to almost no prior knowledge about a project (other than knowing how to use your test runner) and
  that leaves all assumptions at the door.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Crime scene&lt;/h2&gt;
&lt;p&gt;
  We had a test called
  &lt;code class=&quot;notion-text-code&quot;&gt;test_it_sorts_applications_by_score_excluding_hidden&lt;/code&gt;
  that sometimes failed. Like a good Schrödinger’s cat, every time you ran it in isolation trying to replicate it so you
  could figure out what was happening, it succeeded. It also succeeded sometimes when running the full suite.
&lt;/p&gt;
&lt;p&gt;
  In a situation like this, my first intuition is that I need to find a way to make it fail and hopefully succeed
  consistently to learn what the root cause is.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Discovery and investigation
&lt;/h2&gt;
&lt;p&gt;
  We use
  &lt;a href=&quot;https://docs.pytest.org/en/stable/&quot; class=&quot;notion-text-href&quot;&gt;pytest&lt;/a&gt;
  as our test runner.
&lt;/p&gt;
&lt;p&gt;
  The first thing I did was start running it with the
  &lt;code class=&quot;notion-text-code&quot;&gt;
    &lt;a href=&quot;https://docs.pytest.org/en/stable/reference/reference.html#cmdoption-x&quot; class=&quot;notion-text-href&quot;&gt;-x&lt;/a&gt;
  &lt;/code&gt;
  &lt;a href=&quot;https://docs.pytest.org/en/stable/reference/reference.html#cmdoption-x&quot; class=&quot;notion-text-href&quot;&gt;
    flag&lt;/a&gt;
  that reads:
&lt;/p&gt;
&lt;blockquote class=&quot;notion-quote notion-color-default&quot;&gt;
  Exit instantly on first error or failed test.
&lt;/blockquote&gt;
&lt;p&gt;
  This way, our almost 300 tests don’t have to run every time. I decided to run it multiple times in a row without making
  any changes to see if I could spot a pattern.
&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Fails at
    &lt;code class=&quot;notion-text-code&quot;&gt;with user&lt;/code&gt;
    case with the
    &lt;code class=&quot;notion-text-code&quot;&gt;result&lt;/code&gt;
    having all
    &lt;code class=&quot;notion-text-code&quot;&gt;was_scored_by_user&lt;/code&gt;
    as
    &lt;code class=&quot;notion-text-code&quot;&gt;False&lt;/code&gt;
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;Succeeds&lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Fails at
    &lt;code class=&quot;notion-text-code&quot;&gt;with user&lt;/code&gt;
    case with the
    &lt;code class=&quot;notion-text-code&quot;&gt;result&lt;/code&gt;
    having all
    &lt;code class=&quot;notion-text-code&quot;&gt;was_scored_by_user&lt;/code&gt;
    as
    &lt;code class=&quot;notion-text-code&quot;&gt;False&lt;/code&gt;
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;Succeeds&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  In our
  &lt;code class=&quot;notion-text-code&quot;&gt;pytest.ini&lt;/code&gt;, we’ve defined options as
&lt;/p&gt;

  &lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;[pytest]
DJANGO_SETTINGS_MODULE=djangogirls.settings
addopts = --ff --nomigrations&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  The
  &lt;code class=&quot;notion-text-code&quot;&gt;--ff&lt;/code&gt;
  flag, also known as
  &lt;code class=&quot;notion-text-code&quot;&gt;--failed-first&lt;/code&gt;
  means that when you re-run your tests, any tests that failed the previous run are ran first. This explains the 50/50
  behaviour I noticed above: it fails when it’s ran in the middle of the suite, then it’s picked up as the first test and
  it passes.
&lt;/p&gt;
&lt;p&gt;
  This is an indication that something in it is dependent on other tests being
            ran before it.
&lt;/p&gt;
&lt;p&gt;
  Next, I tried running
  &lt;code class=&quot;notion-text-code&quot;&gt;pytest -x --clear-cache&lt;/code&gt;
  to run without any caching — which also clears the “failed on last run” memory. My initial idea was to test it with that
  flag to see if something weird was happening with caching but I ended up learning that since it reset the order, it
  started failing consistently every time.
&lt;/p&gt;
&lt;p&gt;Now, I started digging deeper and moving outwards.&lt;/p&gt;
&lt;p&gt;
  I ran
  &lt;code class=&quot;notion-text-code&quot;&gt;pytest --cache-clear tests/applications/test_services.py&lt;/code&gt;
  and confirmed it succeeds when ran alone — this confirmed my conclusion from
            the earlier.
&lt;/p&gt;
&lt;p&gt;
  Then I stepped up one folder.
  &lt;code class=&quot;notion-text-code&quot;&gt;pytest --cache-clear tests/applications/&lt;/code&gt;
  which gave me a consistently failing test:
&lt;/p&gt;

  &lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;tests/applications/models/test_applications.py ..........[ 19%]
tests/applications/models/test_email.py ... [ 25%]
tests/applications/models/test_forms.py ..... [ 34%]
tests/applications/models/test_questions.py . [ 36%]
tests/applications/test_forms.py ... [ 42%]
tests/applications/test_services.py F [ 44%]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  I now knew that the issue was in one of the five test files being run before it. I started from the bottom and moved
  up.
&lt;/p&gt;
&lt;p&gt;
  With
  &lt;code class=&quot;notion-text-code&quot;&gt;pytest --cache-clear tests/applications/ -k &quot;not models&quot;&lt;/code&gt;
  , I excluded the first four tests and only ran the two at the bottom. Green.
&lt;/p&gt;
&lt;p&gt;
  Continuing that way step by step, I discovered that I could include all but
  &lt;code class=&quot;notion-text-code&quot;&gt;test_applications.py&lt;/code&gt;
  to keep it passing but when I brought that test into the mix, we got a fail. Wonderful, I managed to narrow the issue
  down to a combination of two files.
&lt;/p&gt;
&lt;p&gt;
  In that file, we have 10 tests. To start, I added
  &lt;code class=&quot;notion-text-code&quot;&gt;@pytest.mark.skip(reason=None)&lt;/code&gt;
  above each test to tell pytest to skip them. I then took it out from one test and reran the test suite and recorded how
  it went into my notes. Repeat with all 10 and I got a list of three tests that caused the original one to fail:
&lt;/p&gt;
&lt;ul class=&quot;notion-bulleted_list&quot;&gt;
  &lt;li class=&quot;notion-bulleted_list_item notion-color-default&quot;&gt;
    &lt;code class=&quot;notion-text-code&quot;&gt;test_average_score&lt;/code&gt;
  &lt;/li&gt;
  &lt;li class=&quot;notion-bulleted_list_item notion-color-default&quot;&gt;
    &lt;code class=&quot;notion-text-code&quot;&gt;test_is_scored_by_user&lt;/code&gt;
  &lt;/li&gt;
  &lt;li class=&quot;notion-bulleted_list_item notion-color-default&quot;&gt;
    &lt;code class=&quot;notion-text-code&quot;&gt;test_score_str&lt;/code&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  At this point, I created
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/issues/1143&quot; class=&quot;notion-text-href&quot;&gt;an issue to our issue tracker&lt;/a&gt;
  because I didn’t know how long it would take me to figure out how to fix it. I let my team know I’m on it and shared in
  the ticket my discoveries. I documented it this way for a couple of reasons:
&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    To let people know I’ve been investigating it.
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    To document what I had discovered in case I had to drop this and do something else, helping someone else (including
    future me) get started with it.
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  At this point, I had a couple of pages of notes, following
  &lt;a href=&quot;https://notes.hamatti.org/note-taking/running-notes&quot; class=&quot;notion-text-href&quot;&gt;my Running Notes concept&lt;/a&gt;. I
    do this with anything non-trivial I ever work on. In past, they have become so useful because down the line, I (or
    someone else in the team) might have to figure out a similar thing and having notes on what I did helps a lot. Another
    good reason is that if I need to argue and defend my decisions down the line, I have more to go on than just the end
    result or intermediate commits. I have my reasoning and what I’ve tried.
&lt;/p&gt;
&lt;p&gt;
  I highly highly highly recommend every developer to start keeping notes for
            themselves.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Repairs&lt;/h2&gt;
&lt;p&gt;
  I now knew
  &lt;b class=&quot;notion-text-bold&quot;&gt;how
  &lt;/b&gt;it happened and had figured out the first step: how to consistently run it so that it fails and succeeds. Before you
  get to such state, it’s going to be difficult to reliably fix things because especially with flaky tests, you never
  really know otherwise if you succeeded or if you’re just running on a lucky streak.
&lt;/p&gt;
&lt;p&gt;Next up, I switched tools and started debugger sessions.&lt;/p&gt;
&lt;p&gt;
  I added
  &lt;code class=&quot;notion-text-code&quot;&gt;breakpoint()&lt;/code&gt;
  as the first line into the test.
&lt;/p&gt;

  &lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;def test_it_sorts_applications_by_score_excluding_hidden(
    future_event, scored_applications, admin_user, scores_by_other_users
):
    &quot;&quot;&quot;Tests if, when the user sorts the applications by average score, we don&#39;t include the ones they
    haven&#39;t scored yet.

    For example, consider [these applications](https://cln.sh/JAoo8H) sorted by average score with the
    previous implementation. We know #1 is higher than 4.375 and #3 is lower than 4.375 and higher than
    4.25 just because of the sorting.&quot;&quot;&quot;
    breakpoint()&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  I ran it in both scenarios: failing and passing and inside the Python
            debugger, I ran the following:
&lt;/p&gt;

  &lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;for score in Score.objects.all():
	print(score.pk, score.score, score.user)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I recorded the output and started comparing.&lt;/p&gt;
&lt;p&gt;For the passing case, I got&lt;/p&gt;

  &lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;1 1.0 admin@example.com
2 2.0 admin@example.com
3 3.0 admin@example.com
4 4.0 admin@example.com
5 5.0 admin@example.com
6 1.0 user-1@test.com
7 2.0 user-2@test.com
8 4.0 user-1@test.com
9 5.0 user-2@test.com
10 1.0 user-1@test.com
11 2.0 user-2@test.com
12 4.0 user-1@test.com
13 5.0 user-2@test.com
14 1.0 user-1@test.com
15 2.0 user-2@test.com&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  and for the failing case, I got (I can’t exactly remember which of the culprit test cases I had enabled at this
  point):
&lt;/p&gt;

  &lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;3 1.0 admin@example.com
4 2.0 admin@example.com
5 3.0 admin@example.com
6 4.0 admin@example.com
7 5.0 admin@example.com
8 1.0 user-1@test.com
9 2.0 user-2@test.com
10 4.0 user-1@test.com
11 5.0 user-2@test.com
12 1.0 user-1@test.com
13 2.0 user-2@test.com
14 4.0 user-1@test.com
15 5.0 user-2@test.com
16 1.0 user-1@test.com
17 2.0 user-2@test.com&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  &lt;b class=&quot;notion-text-bold&quot;&gt;BOOM!&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
  We have discrepancy! Everything else is the same but the primary keys have
            been shifted.
&lt;/p&gt;
&lt;p&gt;
  I had been working on this for a few hours at this point and this was basically the first time I started to look at what
  the failing test actually does. Everything until now was just asking questions and following breadcrumbs: “what is
  happening”, “when does this happen”, “what is causing it”.
&lt;/p&gt;
&lt;p&gt;In the test, we did:&lt;/p&gt;

  &lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;# Delete some of the scores given by the admin user so we can test the sorting
Score.objects.filter(
	user=admin_user,
	application__in=scored_applications,
	pk__gt=scored_applications.count() / 2,
).delete()&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  We were using the primary keys as absolute values to delete the second half of the Scores to create our test
      data.
&lt;/p&gt;
&lt;p&gt;
  This meant that if there were 5 scores by admins, on a fresh run, we’d find the last three and remove them. But if the
  primary keys had been shifted by 2, we’d delete them all and thus, ruining our test data.
&lt;/p&gt;
&lt;p&gt;
  The fix was the easy part: I ended up hardcoding the amount in the test
            instead of using the
  &lt;code class=&quot;notion-text-code&quot;&gt;pk__gt&lt;/code&gt;
  filter option.
&lt;/p&gt;

  &lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;scored_by_admin = Score.objects.filter(user=admin_user, application__in=scored_applications)
to_delete = scored_by_admin[2:].values_list(&quot;id&quot;, flat=True)
Score.objects.filter(pk__in=list(to_delete)).delete()&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  It’s not quite as elegant and I think it hits the database an extra time (although I didn’t confirm that) but given it’s
  a small test and only run when a developer or CI runs the tests (and not in production), it’s a good enough trade-off
  for me.
&lt;/p&gt;
&lt;p&gt;
  Once I got that done and tested, I created
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1144&quot; class=&quot;notion-text-href&quot;&gt;a pull request&lt;/a&gt;
  and now we have one less failing test in the project.
&lt;/p&gt;
&lt;p&gt;
  It’s always a good day when a flaky test is retired and you can start trusting
            your test suite again.
&lt;/p&gt;
&lt;p&gt;
  There’s probably more that could be done to improve this test. I’ll leave that to another day though because often it’s
  good to keep changes small and it’s always better to get a thing done and fixed than go down the perfection rabbit hole
  (no matter how tempting it is) and never reach a fix.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>A new notebook day</title>
    <link href="https://hamatti.org/posts/a-new-notebook-day/" />
    <updated>2026-10-21T00:00:00Z</updated>
    <id>https://hamatti.org/posts/a-new-notebook-day/</id>
    <content type="html">
      
&lt;p&gt;
  Marisabel is hosting this month’s
  &lt;a href=&quot;https://indieweb.org/IndieWeb_Carnival&quot; class=&quot;notion-text-href&quot;&gt;IndieWeb Carnival&lt;/a&gt;
  on a theme of
  &lt;a href=&quot;https://marisabel.nl/public/blog/Indieweb_Carnival_October_2026_Pages&quot; class=&quot;notion-text-href&quot;&gt;Pages&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  It’s no secret
  &lt;a href=&quot;https://hamatti.org/posts/as-a-developer-my-most-important-tools-are-a-pen-and-a-notebook/&quot; class=&quot;notion-text-href&quot;&gt;I love
    notebooks&lt;/a&gt;. Whenever I start a new job, one of the best parts is going to the book shop
      and
  &lt;a href=&quot;https://mastodon.world/@hamatti/114380995730298313&quot; class=&quot;notion-text-href&quot;&gt;picking up a new notebook to
    accompany me&lt;/a&gt;. As the luck happened to line up, this month I filled up my previous
  &lt;a href=&quot;https://hamatti.org/posts/a-peek-into-my-pocket-notebook/&quot; class=&quot;notion-text-href&quot;&gt;pocket notebook&lt;/a&gt;
  and get to start a new one.
&lt;/p&gt;
&lt;p&gt;
  In the Field Notes fan subreddit FieldNuts, people have built
  &lt;a href=&quot;https://www.reddit.com/r/FieldNuts/?f=flair_name%3A%22In%2FOut%22&quot; class=&quot;notion-text-href&quot;&gt;a beautiful ritual
    out of it, called In/Out&lt;/a&gt;
  . With Field Notes, there’s the fun of picking a new cover — I’m a bit more boring because I’ve used the exact same
  pocket notebook with a black cover for multiple iterations but the joy of moving from one to another is still the same.
  I also use notebooks with more pages than they do so I get to experience In/Out days more rarely.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/a-new-notebook-day/1.png.webp&quot; alt=&quot;Two Moleskine pocket notebooks: one used with a Firefox sticker on the cover, other still in plastic wrap. &quot; /&gt;
&lt;p&gt;
  For me, a pocket notebook has a special place in
  &lt;a href=&quot;https://hamatti.org/posts/different-notebook-sizes-for-different-ideas/&quot; class=&quot;notion-text-href&quot;&gt;all my notebooks&lt;/a&gt;: it lives a
    tough life. It comes with me everywhere, it spends a lot of time in various pockets exposed to the elements and it lands
    on many surfaces from pub tables to mossy forests. As it fills up, not only do the pages collect words of lived life, it
    physically wears out.
&lt;/p&gt;
&lt;p&gt;
  A new, pristine notebook is stiff and well-formed but over the months of its service, its spine loosens up, the back
  pocket fills up with index cards, stickers and fun mementos and shapes the rest of the notebook.
&lt;/p&gt;
&lt;p&gt;
  I have my practical ritual with this transition: I copy
  &lt;a href=&quot;https://notes.hamatti.org/note-taking/rolling-index&quot; class=&quot;notion-text-href&quot;&gt;the rolling index&lt;/a&gt;
  of the old notebook into my digital notes’ Mega Index note so I can find my notes later from the archived pocket
  notebooks. I then take a new notebook from storage and set it up with my meta rules, start the first rolling index and
  move my extra trinkets from the old notebook’s back pocket to the new.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/a-new-notebook-day/2.png.webp&quot; alt=&quot;Page from my notebook titled Meta Notes with five rules: 1. Add a page number to the outside bottom corner of each
    new page. 2. Add a date to the inside bottom corner on the first page of each note. 3. Add the starting page of each note
    to the index. 4. Once the index is full, create new index on the next blank page. 5. Once the notebook is full, copy each
    index into the Main Index note. &quot; /&gt;
&lt;p&gt;
  Finally, the old one goes into the Box. I mostly travel light but I have a huge box of old calendars and notebooks that
  keeps filling up and I love it. If I ever settle in and find a place to live for a longer time, I’ll take out all my
  notebooks from the box and put them into bookshelves to form my own small library of thoughts and experiences.
&lt;/p&gt;
&lt;p&gt;
  A new notebook is exciting because you never know what adventures await in the empty pages. It’s like turning a new page
  in life.
&lt;/p&gt;
    </content>
  </entry>
   
  
  <entry>
    <title>Djangonaut Log 1: Lift-off and first week in Djangonaut Space</title>
    <link href="https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/" />
    <updated>2026-10-18T00:00:00Z</updated>
    <id>https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;This blog post is a weekly update of my journey in Djangonaut Space, an 8-week mentoring
    program for future open source developers in the Django ecosystem.&lt;/i&gt;
&lt;/p&gt;
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/&quot; class=&quot;notion-text-href&quot;&gt;3… 2… 1… becoming a Djangonaut&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      Djangonaut Log 1: Lift-off and first week in Djangonaut Space
      &lt;b class=&quot;notion-text-bold&quot;&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot;&gt;Debugging a flaky test — how I
        methodologically tamed an annoying bug&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot;&gt;Assumptions are sneaky&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/&quot;&gt;Djangonaut Log 2: Leaving the
        atmosphere and first merged contributions&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-3-into-the-orbit&quot;&gt;Djangonaut Log 3: Into the orbit!&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids&quot;&gt;Djangonaut Log 4: Avoiding asteroids&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot;&gt;Designing a simple audit log&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/&quot;&gt;Djangonaut Log 5: Traveling amongst the stars!&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
  I shared last week that I was accepted to
  &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  and last week was the prep week before the lift-off: we got to know each other, had a lot of fun discussions and I even
  got myself into making my first contributions.
&lt;/p&gt;
&lt;p&gt;
  There’s a lot of wonders in the space to admire and any trip there is better
                      with good company.
&lt;/p&gt;
&lt;p&gt;
  One of the first community experiences I got to join was last week’s Wednesday when I joined a fortnightly community
  Open Mic session. I gave
  &lt;a href=&quot;https://hamatti.org/posts/tame-your-pesky-little-scripts/&quot; class=&quot;notion-text-href&quot;&gt;a lightning talk about managing scripts&lt;/a&gt;
  and got to enjoy poetry and music by fellow community members. I’m looking forward to these sessions every other week.
  Another one was playing PlateUp! with a fellow Djangonaut and having a wonderful time cooking and serving customers
  while getting to know each other.
&lt;/p&gt;
&lt;p&gt;
  The community Discord was full of pre-flight chatter all week long as members introduced themselves. Turns out, in
  addition to wonderful people, we have quite a few cats and dogs joining our journey.
&lt;/p&gt;
&lt;p&gt;
  During our onboarding call on Sunday, we were asked to introduce ourselves and share what we’d bring with us to the
  space. My answer there was board games: they are
  &lt;a href=&quot;https://hamatti.org/posts/board-game-nights-are-my-favourite-way-to-socialise-and-make-new-friends/&quot; class=&quot;notion-text-href&quot;&gt;a
    great way to make new friends and pass time&lt;/a&gt;. Whether that’s fellow Djangonauts or anyone we meet on our way to the
                                          stars.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/1.png.webp&quot; alt=&quot;Three rubber ducks on top of a Playstation: one that looks like Sherlock Holmes, another is a hunter and third is
    unicorn. &quot; /&gt;
&lt;p&gt;
  My additional answer now is my rubber ducks. They are
  &lt;a href=&quot;https://hamatti.org/posts/debugging-python/&quot; class=&quot;notion-text-href&quot;&gt;wonderful helpers when things go wrong&lt;/a&gt;
  and on a trip to the unknown, unexpected problems are going to arise.
&lt;/p&gt;
&lt;p&gt;
  Last week, I visited my lovely friends at
  &lt;a href=&quot;https://www.hive.fi/&quot; class=&quot;notion-text-href&quot;&gt;Hive Helsinki&lt;/a&gt;, a peer-learning school for software
    developers, to talk about building a developer portfolio, blogging about their learning journey and how to get the best
    out of that when looking for jobs. It’s not part of this program but I got to also mention Djangonaut Space as an option
    for getting into open source.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/2.png.webp&quot; alt=&quot;A room of people listening to Juhis talk. Next to him, a big screen shows a quote from Austin Kleon: Imagine if your
    next boss didn’t have to read your resume because he already reads you blog. &quot; /&gt;
&lt;p&gt;
  This week started with a banger as my beautiful Djangonaut Space hoodies arrived from print. I can’t wait to bring these
  to my local meetups and conferences. I love flying the colours.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/3.png.webp&quot; alt=&quot;A photo of me from front and back, showing a black hoodie with Djangonaut Space logo in front and an illustration of
    an astronaut sitting down, typing on a laptop in the back. &quot; /&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/4.png.webp&quot; alt=&quot;Juhis speaking in a lecture hall to a room full of students. On the screen, there’s a slide with text: Build a body
    of work. &quot; /&gt;
&lt;p&gt;
  On Thursday of Week 1, I got an opportunity to talk to computer science students from all around the country about why I
  CS students
  &lt;a href=&quot;https://notes.hamatti.org/writing/why-developers-should-blog&quot; class=&quot;notion-text-href&quot;&gt;should study and
    practice writing&lt;/a&gt;
  . It was a lovely event and after the talk, I ended up having great discussions with students in the campus pub over the
  next few hours. About 30 hours after my talk, the first new blog that was inspired by my talk saw daylight with
  &lt;a href=&quot;https://anderswahlberg.github.io/blog/&quot; class=&quot;notion-text-href&quot;&gt;Anders publishing his first post on artificial
    intelligence&lt;/a&gt;.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Tech &amp; contributions&lt;/h2&gt;
&lt;p&gt;
  The pre-program week and this first week was mostly about getting set up and
                      ready to contribute.
&lt;/p&gt;
&lt;p&gt;
  While waiting for things to start, I added
  &lt;a href=&quot;https://github.com/djangonaut-space/wagtail-indymeet/pull/925&quot; class=&quot;notion-text-href&quot;&gt;a RSS autodiscovery
    link to Djangonaut Space’s blog&lt;/a&gt;.
    It’s no secret that I love blogs and RSS and this was a great way to get started.
&lt;/p&gt;
&lt;p&gt;
  I’m part of the Django Girls team and while I was setting up my development environment, I accidentally came across a
  bug (Patreon API’s response format had changed over the years), saw there was a ticket for it and
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1130&quot; class=&quot;notion-text-href&quot;&gt;made a fix&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  The first hurdle of contributing to any project is to get the environment set up and despite the technological
  advancements we’ve gotten over the years, it’s still often a huge roadblock at the start. It often makes me question my
  technical ability when I spend days trying to get through all the errors and mishaps that happen when setting up
  something new.
&lt;/p&gt;
&lt;p&gt;
  As I started picking up speed, I noticed small things to fix. Some were
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1133&quot; class=&quot;notion-text-href&quot;&gt;small code clean up fixes&lt;/a&gt;, other
  &lt;a href=&quot;https://github.com/DjangoGirls/djangogirls/pull/1134&quot; class=&quot;notion-text-href&quot;&gt;fixing broken functionality&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  My philosophy about onboarding myself and others to projects has always been focusing on small things that help people
  get through the entire flow quickly: setting up development environment, identifying issues, finding and implementing
  fixes, learning how the project does change requests and communication and what the expectations are.
&lt;/p&gt;
&lt;p&gt;
  With Djangonaut Space, one massive benefit is that I have direct line to the people maintaining the project which makes
  all of that so much easier. I’m so grateful for that opportunity.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;My hopes and dreams&lt;/h2&gt;
&lt;p&gt;
  There’s certain amount of social anxiety I have with contributing to open source. Outside of publishing my own stuff as
  open source, I haven’t made contributions to other’s projects. One reason is that I’m hesitant to commit to technical
  challenges I’m not sure if I can figure out.
&lt;/p&gt;
&lt;p&gt;
  Another, related reason, is that it’s intimidating to submit your code to people who are as experienced and skilled as
  the contributors and maintainers in these projects are. My hope is that through Djangonaut Space program, I get to meet
  these people and talk with them about coding and cats and board games and that will lower my self-imposed worries and
  anxiety.
&lt;/p&gt;
&lt;p&gt;
  I feel like that’s the best a program like this can offer and I intend to take everything out of the
      opportunity.
&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>I really like how Ultrapool calculates your money rewards</title>
    <link href="https://hamatti.org/posts/i-really-like-how-ultrapool-calculates-your-money-rewards/" />
    <updated>2026-10-16T00:00:00Z</updated>
    <id>https://hamatti.org/posts/i-really-like-how-ultrapool-calculates-your-money-rewards/</id>
    <content type="html">
      
&lt;p&gt;
  A surprise gaming extra on the blog. I’ve been recently mostly writing
  &lt;a href=&quot;https://notes.hamatti.org/tags/video-games&quot; class=&quot;notion-text-href&quot;&gt;about them in my digital garden&lt;/a&gt;
  but this one I wanted to share here.
&lt;/p&gt;
&lt;p&gt;
  I recently picked up
  &lt;a href=&quot;https://store.steampowered.com/app/4195110/Ultrapool/&quot; class=&quot;notion-text-href&quot;&gt;Ultrapool&lt;/a&gt;
  and have been playing it on my computer and phone a bit ever since. It’s a
  Balatro-esque pool game where each round, you need to reach a certain level of
  points, then you get money to buy upgrades and repeat until you win a run.
&lt;/p&gt;
&lt;p&gt;How much money you get to spend? That depends on how well you’ve done.&lt;/p&gt;
&lt;figure&gt;
  &lt;video src=&quot;https://hamatti.org/assets/video/ultrapool.webm&quot; controls=&quot;controls&quot;&gt;&lt;/video&gt;
  &lt;figcaption&gt;
    &lt;em&gt;Video is a 4 second clip of money calculation as described below in
      Ultrapool. The visuals show a pool table with a white cue ball, a blue
      ball with value 2, a total score of 34 and a goal of 15. As the money
      reward is counted, the score in the middle of the table counts down.&lt;/em&gt;
  &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;
  If the goal is 15 points and you score 34, here’s how money rewards are
  calculated:
&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li&gt;You start with a set amount for winning (in this case, 4 euros).&lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Subtract goal from your points (34-15=19)
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Then you get 1 euro and reduce your points by 1 (19-1=18)
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Then you get 1 euro and reduce your points by 2 (18-2=16)
  &lt;/li&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Then… you get the point. Each follow up euro costs one extra point until you
    can’t afford anymore.
  &lt;/li&gt;
&lt;/ol&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Double check your website’s alt texts with a bookmarklet</title>
    <link href="https://hamatti.org/posts/double-check-your-websites-alt-texts-with-a-bookmarklet/" />
    <updated>2026-10-14T00:00:00Z</updated>
    <id>https://hamatti.org/posts/double-check-your-websites-alt-texts-with-a-bookmarklet/</id>
    <content type="html">
      
&lt;p&gt;
  As web developers, we’re constantly working with websites with different types of content and ways to craft that
  content. Whether it’s a handcrafted blog, a WordPress site or a web app, these days you likely have a bunch of images
  out there: some decorative, others with meaningful messages.
&lt;/p&gt;
&lt;p&gt;
  I built
  &lt;b class=&quot;notion-text-bold&quot;&gt;Alt text debugging bookmarklet&lt;/b&gt;
  (ATDB among friends as it rolls off the tongue nicely), a quick tool for website developers and authors to check the
  status of alt texts of images on a site.
&lt;/p&gt;
&lt;p&gt;
  I use it daily with my own website and blog posts as a one last double check before I publish to make sure I didn’t
  forget to add alt texts to some images and that those that are decorative, have correct empty alt texts.
&lt;/p&gt;
&lt;p&gt;
  When run, it will outline images based on what kind of alt text they have:
&lt;/p&gt;
&lt;ul class=&quot;notion-bulleted_list&quot;&gt;
  &lt;li class=&quot;notion-bulleted_list_item notion-color-default&quot;&gt;
    No alt text at all? Red outline
  &lt;/li&gt;
  &lt;li class=&quot;notion-bulleted_list_item notion-color-default&quot;&gt;
    Empty alt text (&lt;code class=&quot;notion-text-code&quot;&gt;alt=&quot;&quot;&lt;/code&gt;
    or
    &lt;code class=&quot;notion-text-code&quot;&gt;alt=&quot; &quot;&lt;/code&gt;)? Yellow outline
  &lt;/li&gt;
  &lt;li class=&quot;notion-bulleted_list_item notion-color-default&quot;&gt;
    Non-empty alt text? Green outline
  &lt;/li&gt;
&lt;/ul&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/double-check-your-websites-alt-texts-with-a-bookmarklet/1.png.webp&quot; alt=&quot;Screenshot of an image with a green border and its alt text displayed in a grey box below it. &quot; /&gt;
&lt;p&gt;
  You can find the code at
  &lt;a href=&quot;https://github.com/Hamatti/alt-text-debugging-bookmarklet&quot; class=&quot;notion-text-href&quot;&gt;
    https://github.com/Hamatti/alt-text-debugging-bookmarklet&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
    </content>
  </entry>
   
  
  <entry>
    <title>3… 2… 1… becoming a Djangonaut</title>
    <link href="https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/" />
    <updated>2026-10-07T00:00:00Z</updated>
    <id>https://hamatti.org/posts/3-2-1-becoming-a-djangonaut/</id>
    <content type="html">
      
&lt;div class=&quot;djangonaut-series-toc&quot;&gt;
  &lt;p&gt;
    &lt;b class=&quot;notion-text-bold&quot;&gt;Series:&lt;/b&gt;
  &lt;/p&gt;
  &lt;ol class=&quot;notion-numbered_list&quot;&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      3… 2… 1… becoming a Djangonaut
      &lt;b&gt;(you are here)&lt;/b&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-1-lift-off-and-first-week-in-djangonaut-space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Log
        1: Lift-off and first week in Djangonaut Space&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;https://hamatti.org/posts/debugging-a-flaky-test-how-i-methodologically-tamed-an-annoying-bug/&quot;&gt;Debugging a flaky test — how I
        methodologically tamed an annoying bug&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/assumptions-are-sneaky/&quot;&gt;Assumptions are sneaky&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-2-leaving-the-atmosphere-and-first-merged-contributions/&quot;&gt;Djangonaut Log 2: Leaving the
        atmosphere and first merged contributions&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-3-into-the-orbit&quot;&gt;Djangonaut Log 3: Into the orbit!&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-4-avoiding-asteroids&quot;&gt;Djangonaut Log 4: Avoiding asteroids&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/designing-a-simple-audit-log/&quot;&gt;Designing a simple audit log&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
      &lt;a href=&quot;https://hamatti.org/posts/djangonaut-log-5-traveling-amongst-the-stars/&quot;&gt;Djangonaut Log 5: Traveling amongst the stars!&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;h2 class=&quot;notion-heading_1 notion-color-default&quot;&gt;Djangonaut Space&lt;/h2&gt;
&lt;blockquote class=&quot;notion-quote notion-color-default&quot;&gt;
  Djangonaut Space is a free, 8-week group mentoring program where individuals will work self-paced in a semi-structured
  learning environment. It seeks to help members of the community who wish to level up their current Django code
  contributions and potentially take on leadership roles in Django in the future.
&lt;/blockquote&gt;
&lt;p&gt;
  I’m beyond excited. I was accepted to join the 7th cohort of
  &lt;a href=&quot;https://djangonaut.space/&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space&lt;/a&gt;
  starting next Monday.
&lt;/p&gt;
&lt;p&gt;
  I first learned about the program when
  &lt;a href=&quot;https://www.youtube.com/watch?v=SO5GGTZYK70&quot; class=&quot;notion-text-href&quot;&gt;Sarah Boyce talked about it in DjangoDay
    Copenhagen 2023&lt;/a&gt;
  . I was immediately impressed by the work the team had put together to start this program. (If you want to hear about
  how it&#39;s going now, check out
  &lt;a href=&quot;https://www.youtube.com/watch?v=_zRmxQPutGg&quot;&gt;this great talk by Rachell Calhoun and Tim Schilling from this
    year&#39;s PyCon US&lt;/a&gt;.)
&lt;/p&gt;
&lt;p&gt;
  Oh how time flies. Over the years, a lot of people who I admire in our industry and community have been part of
  Djangonaut Space in various roles (like
  &lt;a href=&quot;https://marijkeluttekes.dev/&quot; class=&quot;notion-text-href&quot;&gt;Marijke&lt;/a&gt;). Some of the talks that have been delivered
    as part of the program are regular references when I talk to people about programming, blogging, learning and community
    — especially
  &lt;a href=&quot;https://www.youtube.com/watch?v=YOZWF86TGmo&quot; class=&quot;notion-text-href&quot;&gt;this one from Carlton Gibson&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  And when in late August, I saw
  &lt;a href=&quot;https://indieweb.social/@djangonaut/117190699410117997&quot; class=&quot;notion-text-href&quot;&gt;a toot by them about upcoming
    cohort&lt;/a&gt;
  , I decided to finally apply myself. I’ll be honest: I didn’t expect to get accepted (&lt;em&gt;my impostor syndrome says hi&lt;/em&gt;
  ). You can only imagine how happy I was when in the middle of a night, an email reached my inbox telling me I was
  accepted and I would become one in the growing lineage of Djangonauts.
&lt;/p&gt;
&lt;p&gt;
  I’m looking forward to starting my journey to contribute to Django and related projects. For the Djangonaut project, I’m
  part of a team focusing on Django Girls+ Website project. It’s a project very close to my heart as a former Django Girls
  coach.
&lt;/p&gt;
&lt;p&gt;
  I will be blogging about my journey throughout these 8 weeks so if you’re interested in learning about what it’s like to
  participate in such program and becoming a contributor to open source projects, stick around! You can find my Djangonaut
  Space related posts from the aptly named
  &lt;a href=&quot;https://hamatti.org/blog/djangonaut-space&quot; class=&quot;notion-text-href&quot;&gt;Djangonaut Space category page&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  If you’re not one who likes to wait, I’ve written quite a bit about Python in the past: two highlights have been my 2024
  series
  &lt;a href=&quot;https://hamatti.org/blog/batteries-included&quot; class=&quot;notion-text-href&quot;&gt;Batteries included&lt;/a&gt;
  and 2026 series
  &lt;a href=&quot;https://hamatti.org/blog/python-a-to-z&quot; class=&quot;notion-text-href&quot;&gt;Python A to Z&lt;/a&gt;. Every December, I solve
  &lt;a href=&quot;https://hamatti.org/adventofcode&quot; class=&quot;notion-text-href&quot;&gt;Advent of Code puzzles with Python and write educational explanations&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;Check out Djangonaut Space&#39;s official blog post about
  &lt;a href=&quot;https://djangonaut.space/comms/2026/10/07/2026-session-7-team-introductions/&quot;&gt;session 7 and people in the
    program&lt;/a&gt;.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  A quick introduction to who I am
&lt;/h2&gt;
&lt;p&gt;
  I expect joining this program will lead new people to my blog through this post, I think it’s time for another round of
  introductions.
&lt;/p&gt;
&lt;p&gt;
  &lt;b class=&quot;notion-text-bold&quot;&gt;Hi, I’m Juhis!
  &lt;/b&gt;Nice to meet you. I wrote my first program somewhere in the early years of 2000s, copying a number guessing game in
  Delphi character by character from a computer magazine. Over the years, my path with software has crossed in various
  ways: I’ve worked as a full-stack web developer, I’ve built communities for developers (like
  &lt;a href=&quot;https://archipylago.dev/&quot; class=&quot;notion-text-href&quot;&gt;our local Python community archipylago&lt;/a&gt;), I’ve spoken in
    meetups and conferences and I’ve taught programming in universities and various non-profits — including Django Girls.
&lt;/p&gt;
&lt;p&gt;
  My expertise areas are documentation and debugging and I hope I can bring some of those skills to the Djangonaut and
  larger Django community. I also want to bring in my contagious excitement and positive vibes and encouraging each other
  and a mindset of helping each other become better at what we do while having fun doing it.
&lt;/p&gt;
&lt;p&gt;
  I’m looking to learn more about how tools like Django are built and finally take the step to becoming an open source
  contributor for something more than just my own hobby projects.
&lt;/p&gt;
&lt;p&gt;
  I’ve been enjoying writing web backends in Django for quite a while. The first time I got paid to write Django was in
  2014 but at that point I had been using it a bit on my hobby projects but that job gave me the confidence to really
  learn it. (Thanks Justin for being an awesome mentor during that job ❤️.)
&lt;/p&gt;
&lt;p&gt;
  Most recently, I’ve been building a private toolkit for all sorts of Pokémon TCG tools (card finder, inventory
  management, deck builder, etc) using Django and htmx and have been enjoying building it a lot.
&lt;/p&gt;
&lt;p&gt;
  During my latest talk
  &lt;a href=&quot;https://notes.hamatti.org/my-projects/talks/love-letter-for-django-(talk)&quot; class=&quot;notion-text-href&quot;&gt;Love letter
    to Django&lt;/a&gt;, I started with a quote by Napoleon:
&lt;/p&gt;
&lt;blockquote class=&quot;notion-quote notion-color-default&quot;&gt;
  Since I left you, I have been constantly depressed. My happiness is to be near you.
&lt;/blockquote&gt;
&lt;p&gt;
  It’s originally from Napoleon Bonaparte’s love letter from 1796 but perfectly describes my feelings when working with
  other languages.
&lt;/p&gt;
&lt;p&gt;
  I’m also hoping that this program will help me relaunch myself into the industry after a few rocky
              years.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Two new tiny Home Assistant improvements I made recently</title>
    <link href="https://hamatti.org/posts/two-new-tiny-home-assistant-improvements-i-made-recently/" />
    <updated>2026-09-30T00:00:00Z</updated>
    <id>https://hamatti.org/posts/two-new-tiny-home-assistant-improvements-i-made-recently/</id>
    <content type="html">
      
&lt;p&gt;
  In our current attention economy, everything needs to be bigger and flashier so if you follow any content creators or
  influencers in the smart home scene, you’ll see big and expensive setups that are fueling your FOMO.
&lt;/p&gt;
&lt;p&gt;
  In reality, it’s the small things that bring most joy and actual utility. To counter balance that, I’m sharing two tiny
  adjustments I’ve made to my Home Assistant setup that have proved to be excellent quality of life improvements based on
  some new (as in, new to me) functionality I’ve discovered.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Single use “prevent an action” toggle
&lt;/h2&gt;
&lt;p&gt;
  Every morning, my home wakes up and the lights in my bedroom, hallway and kitchen light up to welcome me to a new day.
  At 22.00, all lights turn off to prep me for bed.
&lt;/p&gt;
&lt;p&gt;
  But some nights, I stay up writing or coding past 22 at my desk and don’t want the lights to go off. So far, it hasn’t
  been an issue as I can just turn them all on from my phone or Stream Deck with a push of a button.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/two-new-tiny-home-assistant-improvements-i-made-recently/1.png.webp&quot; alt=&quot;A on/off toggle called Skip next dim that is currently set to on. &quot; /&gt;
&lt;p&gt;
  This fall, I implemented a kind of an SR Latch solution: a toggle on my dashboard that when turned off, prevents a
  single evening turn off event and then resets itself to off. It’s pretty cool. I didn’t realise you can build such a
  system in Home Assistant but once I figured it out, it made so much sense.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/two-new-tiny-home-assistant-improvements-i-made-recently/2.png.webp&quot; alt=&quot;A if-then-else flow in Home Assistant. The condition is Skip next dim toggle being off. If it is, a couple of lights
    are turned on and then all lights are turned off. If it’s not, then the toggle is turned off. &quot; /&gt;
&lt;p&gt;
  Inside my automation, I use
  &lt;a href=&quot;https://www.home-assistant.io/docs/scripts/#if-then&quot; class=&quot;notion-text-href&quot;&gt;an if-then action&lt;/a&gt;.
&lt;/p&gt;

  &lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;alias: Go to sleep
description: &#39;&#39;
triggers:
  - trigger: time
    at: &#39;22:00:00&#39;
conditions: []
actions:
  - if:
      - condition: switch.is_off
        target:
          entity_id: input_boolean.skip_next_dim
        options:
          behavior: any
          for: &#39;00:00:00&#39;
    then:
      - action: light.turn_on
        metadata: {}
        target:
          entity_id:
            - light.bedroom
            - light.hallway
        data:
          brightness_pct: 20
      - action: light.turn_off
        metadata: {}
        data: {}
        target:
          area_id:
            - bedroom
            - kitchen
            - hallway
            - living
            - trio
    else:
      - action: input_boolean.turn_off
        metadata: {}
        target:
          entity_id: input_boolean.skip_next_dim
        data: {}
mode: single&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  What I really like about it is that I can set the switch at any time of the day and it always turns itself off in the
  evening so it doesn’t accidentally stay on and keep my lights up if I’m traveling or something.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Conditionally showing controls
&lt;/h2&gt;
&lt;p&gt;
  More and more, I control my living room’s entertainment systems through Home
    Assistant. For example,
  &lt;a href=&quot;https://notes.hamatti.org/my-projects/smart-home/automate-living-room-when-ps4-powers-on&quot; class=&quot;notion-text-href&quot;&gt;when I turn on my Playstation, projector and AV turn on and lights turn
        off&lt;/a&gt;. On my main
    dashboard, I also have a few presets: one for gaming, one for watching movies and one for listening music and they start
    the required devices at the right settings (for example, at night, the volume starts at a lower level so I can be a nice
    neighbour by default).
&lt;/p&gt;
&lt;p&gt;
  To manually adjust the volume of my AV receiver, I used to go to my Entertainment dashboard, open the device and adjust
  the volume. That got tiresome quite fast. Now, I have a section at the top of my main overview dashboard that shows the
  volume control only if the device is on.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/two-new-tiny-home-assistant-improvements-i-made-recently/3.png.webp&quot; alt=&quot;Home Assistant section Visibility settings. A section is visible if Denon AVR in Living room is on. &quot; /&gt;

  &lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;visibility:
  - condition: state
    entity: media_player.denon_avr_s660h
    state: &#39;on&#39;
&lt;/code&gt;&lt;/pre&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Make your website printable - a short guide</title>
    <link href="https://hamatti.org/posts/make-your-website-printable-a-short-guide/" />
    <updated>2026-09-23T00:00:00Z</updated>
    <id>https://hamatti.org/posts/make-your-website-printable-a-short-guide/</id>
    <content type="html">
      
&lt;p&gt;
  Have you ever printed a web page or thought about how your website looks like if someone were to print it? Let this
  short guide provide you a starting point on your journey to make the reader’s experience better if they decide to print
  your page.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Why should you make your web page printable?
&lt;/h2&gt;
&lt;p&gt;
  There are a lot of different reasons why someone would print a website in
      2026.
&lt;/p&gt;
&lt;p&gt;
  First is to read a longer piece in a better format. Reading from paper is generally better for your eyes than staring a
  screen. I don’t do it often but every now and then, when someone writes a post that really makes me think, I prefer to
  print it out, take my highlighter and pen and curl up in a nice comfy chair or sofa and read it, highlight passages and
  make notes to the margins.
&lt;/p&gt;
&lt;p&gt;
  Second is to print information as a backup in case your devices run out of battery or your internet goes down while
  you’re on an adventure. Hotel and travel reservations, maps with directions, addresses, phone numbers — heck, even a
  translated menu of a restaurant might become handy for someone in some case (been there, done that).
&lt;/p&gt;
&lt;p&gt;
  Third is for preservation of information. Sometimes, we want to preserve digital information by printing it out and
  storing it somewhere. If the information is only on a website, the print styles will have a big impact on how well they
  can be preserved.
&lt;/p&gt;
&lt;p&gt;These are the top three that come to my mind but there’s likely way more.&lt;/p&gt;
&lt;p&gt;
  In general, I think it’s all about providing the reader one more option and that’s important. You can’t imagine all ways
  people might want to interact with the information you provide so providing a good set of options (including but not
  limited to: responsive design for different sizes of screens, accessible website for different assisted technologies to
  interact with your site, RSS feeds, print styles) is a good way to help the reader enjoy it.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Designing and implementing print styles
&lt;/h2&gt;
&lt;p&gt;
  Implementing print friendly styles is not very complicated if you know the
      basics of CSS.
&lt;/p&gt;
&lt;p&gt;
  At the core is a feature called
  &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Media_queries/Using&quot; class=&quot;notion-text-href&quot;&gt;media
    queries&lt;/a&gt;. With them, we can define separate styles that are only applied when a page
          is printed.
&lt;/p&gt;
&lt;p&gt;
  I like to have a separate file
  &lt;code class=&quot;notion-text-code&quot;&gt;print.css&lt;/code&gt;
  where I keep all my print styles but there’s no need for a separate files. You can define these within your regular
  styles and you can have multiple media queries for print scattered across if you like to keep styles more on a component
  level than use-case level like this.
&lt;/p&gt;

  &lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;@media print { 
	/* Your styles go here */
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  This is all you need to define a media query for print. Everything inside the curly braces will be applied when
  printing.
&lt;/p&gt;
&lt;h3&gt;Most of print styles is hiding the unnecessary&lt;/h3&gt;
&lt;p&gt;
  The easiest place to start is figuring out what on your web page is
      unnecessary when printed.
&lt;/p&gt;
&lt;p&gt;
  Before we write a single line of CSS though, it’s good to take a look at your
      site.
&lt;/p&gt;
&lt;p&gt;Here’s an example of a recent blog post of mine.&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/make-your-website-printable-a-short-guide/1.png.webp&quot; alt=&quot;A screenshot of a blog post Moomin and nfo files for Jellyfin. The website has navigation bar at the top, blog
    article on the left and a secondary navigation on the side bar on the right. &quot; /&gt;
&lt;p&gt;
  There’s a lot there and on a website, most of it is useful (at least to
      someone).
&lt;/p&gt;
&lt;p&gt;
  First thing to remove is the website navigational elements. The header with my website’s title and main navigation
  should go because nobody is going to “click” those on paper. Same goes for the sidebar with latest and popular posts and
  the blogroll for the same reason.
&lt;/p&gt;
&lt;p&gt;
  I have these blog post images that I mostly use to build a consistent visual style when they are shared in social media
  or chat platforms that show previews. They don’t provide anything for a print user so we can save some ink there.
&lt;/p&gt;
&lt;p&gt;
  When it comes to images, you need to think about if they provide informational value to someone reading it out of
  context on a paper. Some images are to make the page more visually appealing to someone reading on the web but can be
  removed on print. Others convey crucial information that should be included.
&lt;/p&gt;
&lt;p&gt;
  There are two ways I approach this from code perspective. The first one is to declare common elements to be completely
  removed from print. We can use
  &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/display&quot; class=&quot;notion-text-href&quot;&gt;display&lt;/a&gt;
  CSS property to hide these elements. For example:
&lt;/p&gt;

  &lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;@media print {
  aside,
  #layout-top,
  footer,
  .webfeedsFeaturedVisual,
  .reach-out-cta,
  #blog-container #syntax-error {
    display: none;
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  This is an example from my own print style for this very page. I want to remove all the headers, footers, sidebars and
  some other specific elements like the hero image or call to action boxes.
&lt;/p&gt;
&lt;p&gt;Another example is to use a utility class.&lt;/p&gt;

  &lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;@media print {
	.no-print {
	  display: none
	}
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This way we can add it to individual elements when needed.&lt;/p&gt;
&lt;p&gt;
  I like a combination of both: the first one so I don’t have to remember to add
  &lt;code class=&quot;notion-text-code&quot;&gt;no-print&lt;/code&gt;
  class to the elements every
      time and the other so that I can have the flexibility to change the general
      rule.
&lt;/p&gt;
&lt;h3&gt;Make URLs visible&lt;/h3&gt;
&lt;p&gt;
  Sometimes, we want to add information instead of hiding it. Since you can’t click links on paper, it becomes important
  to visually show them to the reader so they can follow the sources even if the original website has disappeared from the
  web.
&lt;/p&gt;
&lt;p&gt;
  There’s an easy, CSS-only way, and a harder way that requires more technical
      work when building the page.
&lt;/p&gt;
&lt;p&gt;
  We can bring these URLs visible with just CSS using these two definitions
  &lt;a href=&quot;https://css-tricks.com/snippets/css/print-url-after-links/&quot; class=&quot;notion-text-href&quot;&gt;I learned from Chris
    Coyier years ago&lt;/a&gt;:
&lt;/p&gt;

  &lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;/* Show href of links after the links
 * from: https://css-tricks.com/snippets/css/print-url-after-links/
 */
a::after {
  content: &quot; (&quot; attr(href) &quot;) &quot;;
}

a[href^=&quot;/&quot;]::after {
  content: &quot; (https://hamatti.org&quot; attr(href) &quot;) &quot;;
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  The first one applies to every link. Using the
  &lt;code class=&quot;notion-text-code&quot;&gt;::after&lt;/code&gt;
  pseudo element and
  &lt;code class=&quot;notion-text-code&quot;&gt;attr(href)&lt;/code&gt;, we can add the URL into the
          DOM and I like to put it into parentheses after the link element.
&lt;/p&gt;
&lt;p&gt;
  The second one then applies to only relative links that start with
  &lt;code class=&quot;notion-text-code&quot;&gt;/&lt;/code&gt;
  and it adds my domain in front of the actual element so they become absolute links. It will look like this when
  printed:
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/make-your-website-printable-a-short-guide/2.png.webp&quot; alt=&quot; Luckily, Finnish Wikipedia has the right data
    (https://fi.wikipedia.org/wiki/Luettelo_televisiosarjan_Muumilaakson_tarinoita_jaksoista) and Jellyfin supports providing
    metadata through local .nfo files (https://jellyfin.org/docs/general/server/metadata/nfo). With a little bit of zsh,
    Javascript and Python magic, I was able to create a good set of metadata to make Jellyfin show the right information. &quot; /&gt;
&lt;p&gt;
  The alternative way, which I’m thinking about implementing on my site but haven’t yet, is to add a running tally as a
  superscript element after each link and then list all the URLs at the end of the page and then use CSS to only show
  those when printed.
&lt;/p&gt;

  &lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;#60;style&amp;#62;
.print-only {
  display: none;
}

@media print {
  .print-only {
    display: revert;
  }
  
  a:visited {
    color: blue;
  }
}
&amp;#60;/style&amp;#62;

&amp;#60;a href=&quot;https://example.com&quot;&amp;#62;Example&amp;#60;sup class=&quot;print-only&quot;&amp;#62;1&amp;#60;/sup&amp;#62;&amp;#60;/a&amp;#62;

&amp;#60;!-- other stuff --&amp;#62;

&amp;#60;div class=&quot;print-only&quot;&amp;#62;
	&amp;#60;h2&amp;#62;References&amp;#60;/h2&amp;#62;
	&amp;#60;ol&amp;#62;
	  &amp;#60;li&amp;#62;Example https://example.com&amp;#60;/li&amp;#62;
	&amp;#60;/ol&amp;#62;
&amp;#60;/div&amp;#62; &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This would result in a website on the left and print on the right:&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/make-your-website-printable-a-short-guide/3.png.webp&quot; alt=&quot;On the left, an example of a web page with heading Hello and link title Example. On the right, the same page but
    shows a superscript 1 after Example and has an added References section with item number 1 being Example
    https://example.com &quot; /&gt;
&lt;p&gt;
  This will make it easier to read through but requires more from your website’s implementation. If you want to take that
  route, I recommend starting with the CSS-only approach right now and then replace it with the new implementation when
  you’re done with it.
&lt;/p&gt;
&lt;p&gt;It’s better to have those URLs available than to create a perfect system.&lt;/p&gt;
&lt;h3&gt;Code blocks&lt;/h3&gt;
&lt;p&gt;
  Code snippets — like the ones in this post — are usually shown in a
  &lt;code class=&quot;notion-text-code&quot;&gt;&amp;lt;pre&amp;gt;&lt;/code&gt;
  block that preserves the
      white space and doesn’t wrap by default.
&lt;/p&gt;
&lt;p&gt;To make sure everything shows up in the print, you can add&lt;/p&gt;

  &lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;@media print {
  pre {
	  white-space: pre-wrap;
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  If you’re using some sort of syntax highlight library (like I use
  &lt;a href=&quot;https://prismjs.com/&quot; class=&quot;notion-text-href&quot;&gt;Prism&lt;/a&gt;), it can get
          a bit messy. I’ve added an
  &lt;code class=&quot;notion-text-code&quot;&gt;!important&lt;/code&gt;
  at
      the end of mine to override settings from Prism —
  &lt;code class=&quot;notion-text-code&quot;&gt;!important&lt;/code&gt;
  is usually not a good thing
      to use but I think for print styles and specific use cases it’s okay.
&lt;/p&gt;
&lt;p&gt;
  In my site, the line numbers (provided by Prism) get messed up when printing something that wraps like this. It’s still
  something I need to figure out and fix.
&lt;/p&gt;
&lt;h3&gt;Rest is more or less fine-tuning and polish&lt;/h3&gt;
&lt;p&gt;
  Open your page, hit print and see how it looks like in the preview or print to PDF and read it through. Does something
  look out of place? Is there still something unnecessary that could be removed to improve the experience?
&lt;/p&gt;
&lt;p&gt;
  For example, large tables might work on sideways scrollable media like browser but can break horribly on print. Adrian
  Roselli has a great article on
  &lt;a href=&quot;https://adrianroselli.com/2017/11/a-responsive-accessible-table.html&quot; class=&quot;notion-text-href&quot;&gt;how to create
    responsive tables&lt;/a&gt;
  which is helpful here as well.
&lt;/p&gt;
&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Tools&lt;/h2&gt;
&lt;p&gt;
  You don’t have to actually print the page to experiment on your print styles
      when you’re developing your site.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/make-your-website-printable-a-short-guide/4.png.webp&quot; alt=&quot;Screenshot zoomed into Firefox’s developer tool media query options with @media print toggled on. &quot; /&gt;
&lt;p&gt;
  In Firefox, you can open the Developer Tools (Tools → Browser tools → Web Developer Tools), navigate to Inspector tab
  and inside it, the Styles pane. By selecting the
  &lt;code class=&quot;notion-text-code&quot;&gt;@&lt;/code&gt;
  mode, you’ll get a list
      of media queries to toggle.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/make-your-website-printable-a-short-guide/5.png.webp&quot; alt=&quot;Screenshot of Google Chrome with CSS media type print selected in Rendering tab. &quot; /&gt;
&lt;p&gt;
  In Chrome, you can
  &lt;a href=&quot;https://developer.chrome.com/docs/devtools/rendering/emulate-css/#emulate_css_media_type_enable_print_preview&quot; class=&quot;notion-text-href&quot;&gt;find it in Rendering tab&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  Using these is handy for quick tinkering but it’s always good to confirm with an actual “print to PDF” preview because
  the print emulation does not affect the viewport so it might look okay on browser but break when printed to the page,
  depending on if the page size and orientation.
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Update Oct 30, 2026:&lt;/strong&gt;
  Brennen Puth also wrote a post about
  &lt;a href=&quot;https://brennenputh.me/blog/printable-websites/&quot;&gt;printable websites&lt;/a&gt;.
&lt;/p&gt;
    </content>
  </entry>
   
  
  <entry>
    <title>I’m not a big fan of movie theater experience</title>
    <link href="https://hamatti.org/posts/im-not-a-big-fan-of-movie-theater-experience/" />
    <updated>2026-09-19T00:00:00Z</updated>
    <id>https://hamatti.org/posts/im-not-a-big-fan-of-movie-theater-experience/</id>
    <content type="html">
      
&lt;p&gt;
  I’ve been going to the movies more this summer than the past 6 years combined.
  I had some expiring monetary credits to spend in May so I dumped all of them
  to purchase 25 tickets to my local movie theater.
&lt;/p&gt;

&lt;p&gt;
  I now can go to movies with a very low threshold. I need to spend them all
  before they in turn expire by the end of this year so whenever there’s
  something even slightly watchable, I use one of those tickets and go see a
  movie.
&lt;/p&gt;

&lt;p&gt;
  A movie theater experience is supposed be a premium experience compared to
  watching at home — that’s why they cost so much. Bigger screen, better audio,
  comfier chairs and the Experience of going outside to watch a movie.
&lt;/p&gt;

&lt;p&gt;
  I’m not very convinced though. Here, the first 15 minutes is ads. And they
  don’t rotate very often so if you go see a movie a week, you see the same f’n
  ads every week.&lt;a href=&quot;https://hamatti.org/posts/life-without-advertisements-is-a-great-life/&quot; class=&quot;notion-text-href&quot;&gt;
    I’m not a fan of advertisements.&lt;/a&gt;
  I hate them with passion.
&lt;/p&gt;

&lt;p&gt;At home, I can sit down on my couch and start watching a movie.&lt;/p&gt;

&lt;p&gt;
  Our local theater doesn’t allow snacks and drinks from outside so your options
  are smuggling them in or purchasing their ridiculously overpriced snacks and
  you can’t get alcohol other than a few special adult evening screenings.
&lt;/p&gt;

&lt;p&gt;
  At home, I can eat any snacks and drink any drinks (not to mention refills
  from kitchen if I run out) I want. And all of them will be at heavily
  discounted prices compared to what I’d pay in the movies.
&lt;/p&gt;

&lt;p&gt;
  I don’t have quite a movie theater experience for audio and visuals at home
  but I have a decently sized projector screen and decent speakers so I think
  the experience is comparable enough to me.
&lt;/p&gt;

&lt;p&gt;
  Paying 15-20 euros for a movie, then 10-15 euros for snacks and drinks to
  watch a movie without the option for bathroom breaks — or buying/renting a
  movie for 5 euros, buying snacks for 5 euros and enjoying a movie at home.
&lt;/p&gt;

&lt;p&gt;
  The only thing theaters are winning in at this moment is that you can see
  movies earlier than at home.
&lt;/p&gt;

&lt;p&gt;
  I do like the idea of movie theaters as an experience though so I would like
  to go there more but not like they currently operate.
&lt;/p&gt;

&lt;p&gt;
  This week, I went to see the excellent
  &lt;a href=&quot;https://letterboxd.com/film/the-invite-2026/&quot;&gt;The Invite&lt;/a&gt; based on
  &lt;a href=&quot;https://www.gordonmclean.co.uk/2026/09/14/the-invite-quick-review/&quot;&gt;a recommendation from Gordon&lt;/a&gt;. I highly recommend checking it out.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Why do we take notes?</title>
    <link href="https://hamatti.org/posts/why-do-we-take-notes/" />
    <updated>2026-09-16T00:00:00Z</updated>
    <id>https://hamatti.org/posts/why-do-we-take-notes/</id>
    <content type="html">
      &lt;p&gt;
  I frequent Obsidian Forum’s Knowledge Management section as a note geek. I
  want to read other people’s experiences and participate in discussion on how
  to write better notes.
&lt;/p&gt;

&lt;p&gt;
  Recently,
  &lt;a href=&quot;https://forum.obsidian.md/t/from-an-obsidian-vault-to-a-public-knowledge-network-my-current-approach/118081&quot; class=&quot;notion-text-href&quot;&gt;user perrinyong created a thread&lt;/a&gt;
  and in the lead up to the actual message, wrote:
&lt;/p&gt;

&lt;blockquote class=&quot;notion-quote notion-color-default&quot;&gt;
  As LLMs made knowledge easier to obtain, I started wondering whether
  maintaining those notes—and publishing a blog—still had value.
&lt;/blockquote&gt;

&lt;p&gt;The short answer is: yes.&lt;/p&gt;

&lt;p&gt;
  To understand the longer answer, we need to start by discussing
  &lt;b class=&quot;notion-text-bold&quot;&gt;why &lt;/b&gt;we take notes. Of course, there are
  different reasons and a lot of different types of notes. The goal of a grocery
  list (one type of a note) is very different from a daily journal (another type
  of note) and that’s different from a knowledge note based on research.
&lt;/p&gt;

&lt;p&gt;
  In this blog post, I will be mostly focusing on notes about knowledge and
  understanding. Maybe there’s a niche space somewhere for people to discuss how
  to make good grocery lists but I don’t hang out in them. And personal journals
  and diaries are very personal and I think for that, it’s even clearer “no,
  don’t use LLMs there” from me.
&lt;/p&gt;

&lt;p&gt;
  Let’s take a look at a question in the original message: “whether maintaining
  those notes still had value [in a world with LLMs]”.
&lt;/p&gt;

&lt;p&gt;
  &lt;b class=&quot;notion-text-bold&quot;&gt;The goal of taking notes is not to create more notes. &lt;/b&gt;The goal is to consume and retain new information and gain new understanding
  through &lt;b class=&quot;notion-text-bold&quot;&gt;a process of thinking&lt;/b&gt;.
&lt;/p&gt;

&lt;p&gt;
  A great note combines information from source material(s) with our own
  thoughts, filtered and processed through both conscious and conscious thinking
  processes. The cognitive act of transforming source information into our notes
  does not only help us remember it better but helps us build a larger
  understanding that crosses across the knowledge stored in multiple notes.
&lt;/p&gt;

&lt;p&gt;
  When we write a note and add it to our system and connect with other relevant
  notes, we learn about how pieces of knowledge we’ve acquired overlap,
  complement and interact with each other. These connections between ideas help
  us discover new thoughts and fill in the gaps.
&lt;/p&gt;

&lt;p&gt;
  I often do
  &lt;a href=&quot;https://notes.hamatti.org/writing/mini-essays/double-processing-information-for-notes&quot; class=&quot;notion-text-href&quot;&gt;double processing&lt;/a&gt;
  for this reason: I write the initial notes down with pen and paper and then
  rewrite them to my digital notes. Usually I don’t rewrite them word-for-word.
  Sometimes rewriting helps me find a better way to communicate the idea and
  sometimes the original thoughts end up being split between different notes.
&lt;/p&gt;

&lt;p&gt;
  If you use LLMs in the input phase, you skip the thinking process at entry.
  You accumulate notes but you don’t have a lot of idea what’s in them, how they
  relate to other notes and you don’t actively think about the ideas in them so
  your neurons don’t fire and accidentally find new connections.
&lt;/p&gt;

&lt;p&gt;
  If you use LLMs in the output phase, to generate some insights from your
  notes, you skip the thinking process again. You only get a result — and I’d
  argue not often a very good one either. A big part of learning is
  understanding how and why the outcome is as it is. Similarly, you can use a
  complex calculator like
  &lt;a href=&quot;https://www.wolframalpha.com/&quot; class=&quot;notion-text-href&quot;&gt;Wolfram Alpha&lt;/a&gt;
  to solve complex mathematical equations but you likely won’t gain much
  understanding from the results and thus you’ll always need to rely on that
  instead of over time accumulating understanding so that you can solve them
  yourself and understand if the results make sense.
&lt;/p&gt;

&lt;p&gt;
  Even if you ask the LLM to explain things, there’s a big difference between
  reading an explanation and doing the thinking and reaching the outcome through
  understanding. The second one is of course way slower, especially in the
  beginning, but it builds up knowledge and understanding. The more you know
  about a topic, the better thoughts you can conjure about it.
&lt;/p&gt;

&lt;p&gt;
  When I speak and write to software developers about writing a blog, I always
  talk about how documenting things for yourself is valuable because you end up
  with a specific guide for how to solve something that is written specifically
  to match your understanding. The same goes here. Even if you’d write about
  something that’s easily accessible knowledge (from documentation or
  encyclopedia), writing it in your own words is massively helpful.
&lt;/p&gt;

&lt;p&gt;
  It also exposes you to the gaps in your knowledge. Our brain is good with
  fuzzy things. It’s easy to think we understood something until we put it to a
  test. The first and easiest test is to write it in your own words. Your brain
  is excellent at fooling you while thinking but putting words on the paper
  makes them so tangible it’s hard to skip steps without noticing.
&lt;/p&gt;

&lt;p&gt;
  Writing a note thus becomes a litmus test for your understanding of a topic.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Moomin and nfo files for Jellyfin</title>
    <link href="https://hamatti.org/posts/moomin-and-nfo-files-for-jellyfin/" />
    <updated>2026-09-09T00:00:00Z</updated>
    <id>https://hamatti.org/posts/moomin-and-nfo-files-for-jellyfin/</id>
    <content type="html">
      &lt;p&gt;
  &lt;a href=&quot;https://en.wikipedia.org/wiki/Moomins&quot; class=&quot;notion-text-href&quot;&gt;Tove Jansson’s Moomins&lt;/a&gt;
  are an incredible piece of the Finnish cultural history and the Japanese tv
  show
  &lt;a href=&quot;https://en.wikipedia.org/wiki/Moomin_(1990_TV_series)&quot; class=&quot;notion-text-href&quot;&gt;Moomin (Tanoshî Mûmin ikka) from 1990s&lt;/a&gt;
  that was then dubbed into Finnish by Yleisradio is
  &lt;b class=&quot;notion-text-bold&quot;&gt;the&lt;/b&gt; kids tv show I grew up with.
&lt;/p&gt;

&lt;p&gt;
  Since I now have nephews, I figured it would be a good time to digitise the
  old collections to put into my personal media server in case we need emergency
  Moomins to watch with the kids since I won’t be bringing the DVDs (and a DVD
  player) with me on every trip.
&lt;/p&gt;

&lt;p&gt;
  I use Jellyfin to stream my personal files and usually it’s very hands off in
  discovering the metadata for tv shows and episodes. The challenge with Moomin
  is that when Yleisradio dubbed the Japanese animations to Finnish, they
  skipped three episodes because they felt they weren’t quite appropriate. So
  the information in sites like
  &lt;a href=&quot;https://www.imdb.com/title/tt0247117/&quot; class=&quot;notion-text-href&quot;&gt;IMDB&lt;/a&gt;
  is not quite as usable.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/moomin-and-nfo-files-for-jellyfin/1.png.webp&quot; alt=&quot;A screenshot from IMDB showing episodes 10 to 12 for Moomin, with episode 10 having Finnish title Ninni saa hymynsä takaisin, episode 11 having English title Snork flies in the sky and episode 12 having Japanese title Moomin kaizoku to tatakau. &quot; /&gt;
&lt;p&gt;
  The other problem is that IMDB has very interesting data. Episode 10 has a
  Finnish name, episode 11 has an English name and episode 12 (which is missing
  from the original Finnish one; it was later dubbed to Finnish by MTV when they
  remade all of the episodes later in the decade — with significantly worse
  quality than the originals) has a Japanese name.
&lt;/p&gt;

&lt;p&gt;
  Luckily, Finnish Wikipedia has
  &lt;a href=&quot;https://fi.wikipedia.org/wiki/Luettelo_televisiosarjan_Muumilaakson_tarinoita_jaksoista&quot; class=&quot;notion-text-href&quot;&gt;the right data&lt;/a&gt;
  and Jellyfin supports providing metadata through
  &lt;a href=&quot;https://jellyfin.org/docs/general/server/metadata/nfo/&quot; class=&quot;notion-text-href&quot;&gt;local .nfo files&lt;/a&gt;. With a little bit of zsh, Javascript and Python magic, I was able to create
  a good set of metadata to make Jellyfin show the right information.
&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Step 0: Understanding .nfo files
&lt;/h2&gt;

&lt;p&gt;
  The documentation for .nfo files is not very good. I’ve spent quite a lot of
  time and trial-and-error to figure out how these should work.
&lt;/p&gt;

&lt;p&gt;
  These .nfo files are XML files with a specific elements that media server
  softwares like Jellyfin, Plex and Kodi read.
&lt;/p&gt;

&lt;p&gt;Let’s say we have the following directory structure:&lt;/p&gt;

&lt;pre class=&quot;language-plain text&quot;&gt;&lt;code class=&quot;language-plain text&quot;&gt;Moomin (1990)/
| S01/
	| S01E01...mp4
	| S01E02...mp4
	| ... and so on
| S02/
	| S02E01...mp4
	| ... and so on&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  We need three types of nfo files:
  &lt;code class=&quot;notion-text-code&quot;&gt;tvshow.nfo&lt;/code&gt; in the root folder,
  &lt;code class=&quot;notion-text-code&quot;&gt;season.nfo&lt;/code&gt; in both of the season folders
  and &lt;code class=&quot;notion-text-code&quot;&gt;S01E01...nfo&lt;/code&gt; files per each episode
  where the filename matches the episode filename.
&lt;/p&gt;

&lt;p&gt;
  First, I created &lt;code class=&quot;notion-text-code&quot;&gt;tvshow.nfo&lt;/code&gt; by hand,
  following
  &lt;a href=&quot;https://kodi.wiki/view/NFO_files/TV_shows&quot; class=&quot;notion-text-href&quot;&gt;the instructions in Kodi wiki&lt;/a&gt;.
&lt;/p&gt;

&lt;pre class=&quot;language-xml text&quot;&gt;&lt;code class=&quot;language-xml text&quot;&gt;&amp;#60;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&amp;#62;

&amp;#60;tvshow&amp;#62;
  &amp;#60;title&amp;#62;Muumilaakson tarinoita&amp;#60;/title&amp;#62;
  &amp;#60;plot&amp;#62;
	  Muumilaakson tarinoita on vuosina 1990&amp;#8211;1992 Japanissa, 
	  Suomessa ja Alankomaissa tehty animoitu televisiosarja, 
	  joka kertoo Tove Janssonin luomien muumien ja heid&amp;#228;n 
	  yst&amp;#228;viens&amp;#228; seikkailuista Muumilaaksossa. 
	  Japanissa tuotettu sarja pohjautuu p&amp;#228;&amp;#228;osin Tove Janssonin 
	  Muumi-kirjoihin sek&amp;#228; Tove ja Lars Janssonin 
	  Muumipeikko-sarjakuviin.
  &amp;#60;/plot&amp;#62; 

  &amp;#60;actor&amp;#62;
    &amp;#60;name&amp;#62;Leena Uotila&amp;#60;/name&amp;#62;
    &amp;#60;role&amp;#62;Kertoja&amp;#60;/role&amp;#62;
  &amp;#60;/actor&amp;#62;

  &amp;#60;actor&amp;#62;
    &amp;#60;name&amp;#62;Rabbe Smedlund&amp;#60;/name&amp;#62;
    &amp;#60;role&amp;#62;Muumipeikko&amp;#60;/role&amp;#62;
  &amp;#60;/actor&amp;#62;
  
  // More actors...
&amp;#60;/tvshow&amp;#62;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  Jellyfin will fill in the missing information if it can from external metadata
  providers.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/moomin-and-nfo-files-for-jellyfin/2.png.webp&quot; alt=&quot;Screenshot of Jellyfin for Moomin with a Finnish title and plot information from the aforementioned nfo file as well as tags, genres and studio information that is not part of the nfo file. &quot; /&gt;
&lt;p&gt;
  I did the same for &lt;code class=&quot;notion-text-code&quot;&gt;S01/season.nfo&lt;/code&gt; and
  &lt;code class=&quot;notion-text-code&quot;&gt;S02/season.nfo&lt;/code&gt; but instead of wrapping
  the data in &lt;code class=&quot;notion-text-code&quot;&gt;tvshow&lt;/code&gt; tag, you use
  &lt;code class=&quot;notion-text-code&quot;&gt;season&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;Creating the episode specific nfo files, I did some programming.&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Step 1: zsh shell scripting to create nfo files
&lt;/h2&gt;

&lt;p&gt;
  For the first step, I used zsh shell script to create an NFO file for each
  episode file. This is kinda optional because you could do this directly in the
  Python script in step 3 but when I started this process, I didn’t know I was
  going to do that so I started with this.
&lt;/p&gt;

&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;#!/bin/zsh

for file in *.mp4
do
  nfo_name=&quot;$(print ${file:t:r}).nfo&quot; # print is zsh specific command
  touch &quot;$nfo_name&quot;
done&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  Here, I use
  &lt;a href=&quot;https://zsh.sourceforge.io/Doc/Release/Expansion.html#Modifiers-1&quot; class=&quot;notion-text-href&quot;&gt;zsh’s modifiers&lt;/a&gt;
  to craft a new filename and then touch to create empty nfo files.
&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Step 2: Crafting the XML from Wikipedia entry
&lt;/h2&gt;

&lt;p&gt;
  Since
  &lt;a href=&quot;https://fi.wikipedia.org/wiki/Luettelo_televisiosarjan_Muumilaakson_tarinoita_jaksoista#Sek%C3%A4_Yleisradion_ett%C3%A4_MTV:n_versioihin_sis%C3%A4ltyv%C3%A4t_jaksot&quot; class=&quot;notion-text-href&quot;&gt;Wikipedia had the information about each episode&lt;/a&gt;, I opened the page and Developer Console and wrote a bit of Javascript.
&lt;/p&gt;

&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;function getEpisodesInfo(sectionId) {
	const episodes = document.querySelectorAll(`section#${sectionId} section`)
	const nfos = Object.values(episodes).map(ep =&amp;#62; {
		const title = ep.querySelector(&#39;h4&#39;).textContent.split(&#39;/&#39;)[0].replaceAll(/&#92;d+&#92;./g, &#39;&#39;).trim()
		const plot = ep.querySelector(&#39;p&#39;).textContent
	    return `&amp;#60;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot; ?&amp;#62;&amp;#60;episodedetails&amp;#62;&amp;#60;title&amp;#62;${title}&amp;#60;/title&amp;#62;&amp;#60;plot&amp;#62;${plot}&amp;#60;/plot&amp;#62;&amp;#60;/episodedetails&amp;#62;`
	})
	
	return nfos
}

const first = getEpisodesInfo(&#39;mwBhY&#39;)
const second = getEpisodesInfo(&#39;mwB3w&#39;)

console.log([...first, ...second].join(&#39;&#92;n&#92;n&#39;)) // then copy-pasting that to a episode-infos.nfo file&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  In this case, there are two sections: one for the first 78 episodes (Tanoshii
  Mūmin Ikka series) and another for the rest (Tanoshii Mūmin Ikka: Bōken Nikki
  series). Both of them have similar structure so the function extracts the
  information for all episodes.
&lt;/p&gt;

&lt;p&gt;
  I chose to include the first paragraph after each episode’s title since the
  second usually adds some additional meta information about the characters or
  what they do for the first time in the series.
&lt;/p&gt;

&lt;p&gt;
  For each episode, I create an XML snippet with
  &lt;code class=&quot;notion-text-code&quot;&gt;episodedetails&lt;/code&gt; element with title and
  plot details.
&lt;/p&gt;

&lt;p&gt;
  I then console.log all of the episode snippets to the console and copy-pasted
  to a file for the next step. I split the snippets into two files: one for
  season 1 and another for season 2.
&lt;/p&gt;

&lt;p&gt;
  Here’s what the file looks like. Couple of important formatting notes: each
  section should be separated from each other by an empty line and that should
  be the only empty lines in the file.
&lt;/p&gt;

&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&amp;#60;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&amp;#62;
&amp;#60;episodedetails&amp;#62;
    &amp;#60;title&amp;#62;Vedenneito&amp;#60;/title&amp;#62;
    &amp;#60;plot&amp;#62;Nipsu l&amp;#228;htee etsim&amp;#228;&amp;#228;n kultaa Yksin&amp;#228;isilt&amp;#228; vuorilta ja p&amp;#228;&amp;#228;tyy lammelle, josta ilmestyy
        kuvankaunis vedenneito. Vedenneito aiheuttaa riippuvuuden Muumilaakson miehille, mink&amp;#228; takia
        he menev&amp;#228;t aikaisin aamusta lammelle ja saapuvat kotiin illalla v&amp;#228;synein&amp;#228;.&amp;#60;/plot&amp;#62;
&amp;#60;/episodedetails&amp;#62;

&amp;#60;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&amp;#62;
&amp;#60;episodedetails&amp;#62;
    &amp;#60;title&amp;#62;Timantti&amp;#60;/title&amp;#62;
    &amp;#60;plot&amp;#62;Mymmeli on l&amp;#246;yt&amp;#228;nyt timanttisormuksen, ja kun kukaan ei ole tullut etsim&amp;#228;&amp;#228;n sit&amp;#228;, antaa
        Poliisimestari sen Mymmelille. Vilijonkka saa Mymmelin uskomaan, ett&amp;#228; timanttisormuksen
        omistajan t&amp;#228;ytyy asua ja pukeutua hienosti ja hankkia palvelija. Niinp&amp;#228; Mymmeli ja Myy
        alkavat el&amp;#228;&amp;#228; hienosti, mutta kaikki ei suju niin kuin pit&amp;#228;isi.&amp;#60;/plot&amp;#62;
&amp;#60;/episodedetails&amp;#62;

&amp;#60;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&amp;#62;
&amp;#60;episodedetails&amp;#62;
    &amp;#60;title&amp;#62;Muumipapan toinen nuoruus&amp;#60;/title&amp;#62;
    &amp;#60;plot&amp;#62;Er&amp;#228;&amp;#228;n&amp;#228; aamuna Muumipappa l&amp;#228;htee aamuk&amp;#228;velylle ja huomaa unohtaneensa silinterihattunsa.
        H&amp;#228;n ep&amp;#228;ilee tulevansa vanhaksi ja ryhtyy kuntoilemaan pysy&amp;#228;kseen nuorena. Lopulta h&amp;#228;n tekee
        suuren el&amp;#228;m&amp;#228;nmuutoksen ja muuttaa y&amp;#246;n p&amp;#228;iv&amp;#228;ksi ja toisinp&amp;#228;in.&amp;#60;/plot&amp;#62;
&amp;#60;/episodedetails&amp;#62;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It’s not a valid XML file but rather a source file we use to create them.&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;
  Step 3: Python to write the data into nfo files
&lt;/h2&gt;

&lt;p&gt;
  Next step is to read this data and write it to the nfo files for each
  episodes. As I mentioned earlier, I precreated all the nfo files but you could
  as well just loop over mp4 files and then create files based on those names.
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;&quot;&quot;&quot;Write corresponding XML into a NFO file per episode.

NFO info should be in a file where each episode is split with an empty line.

License: MIT
Author: Juhis &amp;#60;juhis@hamatti.org&amp;#62;
&quot;&quot;&quot;

import os
from typing import List


def get_nfo_files() -&amp;#62; List[str]:
    &quot;&quot;&quot;Get a list of nfo files in current folder.&quot;&quot;&quot;
    nfos = []
    for _, _, files in os.walk(&quot;.&quot;):
        for file in files:
            if (
                not file.endswith(&quot;.nfo&quot;)
                or file == &quot;episode-infos.nfo&quot;
                or file.startswith(&quot;.&quot;)
                or file == &quot;season.nfo&quot;
            ):
                continue
            nfos.append(file)

		# Important for the filenames to be in same order 
		# as the sections in file we created in last step.
    return sorted(nfos) 


def read_nfo_info(filename) -&amp;#62; List[str]:
    &quot;&quot;&quot;Read from file with multiple NFO definitions, separated by empty lines.&quot;&quot;&quot;
    with open(filename, &quot;r&quot;) as nfo:
        data = nfo.read()
    return data.split(&quot;&#92;n&#92;n&quot;)


if __name__ == &quot;__main__&quot;:
    nfo_files = get_nfo_files()
    nfo_info = read_nfo_info(&quot;episode-infos.nfo&quot;)

    # Check that there&#39;s the same amount of files and NFO sections.
    assert len(nfo_files) == len(nfo_info)

    for filename, content in zip(nfo_files, nfo_info):
        with open(filename, &quot;w&quot;) as nfo_file:
            nfo_file.write(content)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  I first find all the episode specific nfo files and then read the data from
  the file we created in last step, splitting them by empty lines (&lt;code class=&quot;notion-text-code&quot;&gt;&#92;n&#92;n&lt;/code&gt;). Then, I use
  &lt;a href=&quot;https://docs.python.org/3/library/functions.html#zip&quot; class=&quot;notion-text-href&quot;&gt;zip&lt;/a&gt;
  to combine the two lists and iterate over each file with its corresponding
  episode info and write the content into the file.
&lt;/p&gt;

&lt;p&gt;
  With 101 episodes split to two seasons, it would have taken ages to copy-paste
  the information manually. Instead, I spent a good few hours in the middle of
  the night in my bed to write code to do it. I don’t know if I actually saved
  any time but I had way more fun writing code to solve it.
&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;
  I wanted to share this to show how being able to write a bit of code can make
  life easier and how you can do things in small bits, using different
  technologies rather than having to always write single application that does
  everything.
&lt;/p&gt;

&lt;p&gt;
  We live in an era where companies are removing previously purchased digital
  movies and shows from their users, claiming that digital purchases are not
  purchases. Owning media on DVDs and Blurays is more important than ever if you
  want to maintain a copy of what you own. For usability’s sake, storing them in
  a hard drive or local NAS and watching them through Jellyfin or similar helps
  you enjoy your media more easily and provides a nice backup in case physical
  discs become damaged.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>People and Blogs interview</title>
    <link href="https://hamatti.org/posts/people-and-blogs-interview/" />
    <updated>2026-09-07T11:50:00Z</updated>
    <id>https://hamatti.org/posts/people-and-blogs-interview/</id>
    <content type="html">
      &lt;p&gt;&lt;a href=&quot;https://zacharykai.net/&quot;&gt;Zachary Kai&lt;/a&gt; is running the wonderful &lt;a href=&quot;https://peopleandblogs.com/&quot;&gt;People and Blogs&lt;/a&gt; series where bloggers share stories about their blogs. He invited me to share mine and I was more than happy to join the wonderful cast of the series. You can find the original at &lt;a href=&quot;https://zacharykai.net/notes/pb/juhis&quot;&gt;https://zacharykai.net/notes/pb/juhis&lt;/a&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Let&#39;s start from the basics: can you introduce yourself?&lt;/h2&gt;
&lt;p&gt;Hi, I&#39;m Juhis! I&#39;m a community builder, writer, tech educator and software developer from Finland. I&#39;ve been writing on the web since my early teenage years and I love sharing ideas, experiences and knowledge openly to inspire others to learn and create things they are interested in.&lt;/p&gt;
&lt;h2&gt;What&#39;s the story behind your blog?&lt;/h2&gt;
&lt;p&gt;I&#39;ve been blogging since early 2000s and I&#39;ve had many blogs on many platforms. The current blog I&#39;ve been writing in since 2018 and in 2020 I decided to approach blogging more seriously and aimed for publishing a blog post once a week. Since then, I&#39;ve missed a handful of weeks and the last time I missed a week without blogging was in the summer of 2023.&lt;/p&gt;
&lt;p&gt;My decision to get back to regular blogging was partly a counter move against the growing popularity of video content. I have — like they say — a face for radio and a voice for a blog, so I decided to embrace writing as a medium rather than stress about not having a future on video.&lt;/p&gt;
&lt;h2&gt;What does your creative process look like when it comes to blogging?&lt;/h2&gt;
&lt;p&gt;It depends a lot on what type of post I&#39;m writing. Most of my technical writing starts their life because I learned something new while I was building software either at work or at hobbies. I document them first for myself so I can find it the next time and then I publish them in my blog or my digital garden so everyone can learn from them.&lt;/p&gt;
&lt;p&gt;For my lightweight stuff like reviews or sharing something interesting in the world, I mostly just sit down and write.&lt;/p&gt;
&lt;p&gt;Anything with deeper ideas start their life in my notes: I read a lot and when I read something interesting, I make notes about it and over time as I read more, these ideas start to accumulate and as I think them further and work on my notes, they start to take more form and eventually they might become a blog post. This is what I want to do more and become better at.&lt;/p&gt;
&lt;h2&gt;Do you have an ideal creative environment? Also do you believe the physical space influences your creativity?&lt;/h2&gt;
&lt;p&gt;I wrote about &lt;a href=&quot;https://hamatti.org/posts/nook-of-creativity/&quot;&gt;my creative environments&lt;/a&gt; a couple of years ago when I hosted IndieWeb Carnival on that topic.&lt;/p&gt;
&lt;p&gt;I love sitting in a library or a pub and write. Back in 2024, when I wrote about my environment, I wrote that I do most of my writing at home but feel most creative in public spaces. In 2026, it has shifted a bit in that I do most of my writing in these places as well.&lt;/p&gt;
&lt;p&gt;I love the life around me: the indistinct chatter in a pub, people walking past and every minding their own business. That kind of white noise around me has always helped me get into the flow. The worst environment for me to write in is in complete silence.&lt;/p&gt;
&lt;p&gt;A big chance in my writing environment has come from the fact that so much of my writing these days start from collecting my thoughts into notes. The final piece of the puzzle where I write the actual blog post is just a minor part of combining ideas from notes and polishing it. This approach enables me to do my writing in smaller pieces as thoughts form.&lt;/p&gt;
&lt;h2&gt;A question for the techie readers: can you run us through your tech stack?&lt;/h2&gt;
&lt;p&gt;My setup is a combination of existing tools and lots of homegrown bits and pieces in between. I currently use Notion as a headless CMS: I write my posts there and then import them through their API to my website project with custom scripts. The website is then built with Eleventy static site generator and the website is deployed on Netlify&#39;s servers.&lt;/p&gt;
&lt;p&gt;I have &lt;a href=&quot;https://hamatti.org/posts/how-i-write-and-publish-blog-posts-in-april-2025/&quot;&gt;a longer explanation&lt;/a&gt; in my blog for those who want to learn more about everything that happens in between.&lt;/p&gt;
&lt;p&gt;I&#39;m constantly improving my workflow and building more tools to make it both easier and more feature rich to build things. Currently I&#39;m designing improvements on the blogroll on my site to improve how people can find more interesting blogs through mine.&lt;/p&gt;
&lt;h2&gt;Given your experience, if you were to start a blog today, would you do anything differently?&lt;/h2&gt;
&lt;p&gt;Every blog I start (I have a couple in addition to my main blog) builds on the entire history of me blogging and what I&#39;ve learned. I&#39;m a bigger believer in continuous improvement and iterative design so whenever there&#39;s something I think I would do differently, I implement that to my current blog. I don&#39;t feel any urge or desire to do a full reset and fresh start.&lt;/p&gt;
&lt;p&gt;A lot of what I know now I only know because I&#39;ve gone through the long process of building websites and blogs and writing, so I don&#39;t think it would be possible to do those things from the very start if I was thrown through a wormhole to the past.&lt;/p&gt;
&lt;p&gt;I also take a lot of inspiration from other blogs that I read. A lot of ideas for writing themes and style comes from reading other people while discovering my own style. The same is true for features like popular posts (inspired by Jim Nielsen&#39;s blog) or blog stats (inspired by Robb Knight).&lt;/p&gt;
&lt;h2&gt;Financial question since the web is obsessed with money: how much does it cost to run your blog? Is it just a cost or does it generate some revenue? And what&#39;s your position on people monetising personal blogs?&lt;/h2&gt;
&lt;p&gt;My domain costs roughly $15/year but I use it for way more than just my blog.&lt;/p&gt;
&lt;p&gt;For hosting, I pay $19/month for the Pro tier because occasionally my posts are shared in sites that drive very high traffic and I&#39;ve increased my bandwith to not run into problems that would bankrupt me if a high spike happened.&lt;/p&gt;
&lt;p&gt;I do not monetise my website in any direct way but I do wish that it leads to more opportunities in my career to make a living doing interesting things. I don&#39;t want to do advertisements or sponsored posts out of respect to my readers.&lt;/p&gt;
&lt;p&gt;I also don&#39;t want to hide my writing behind a paywall as I&#39;m a strong believer in openly sharing knowledge and access rather than only offering it to people who have extra money to spend.&lt;/p&gt;
&lt;p&gt;I don&#39;t particularly care if other people monetise their blogs. If they do in a way that I find annoying, I simply stop reading them.&lt;/p&gt;
&lt;h2&gt;Time for some recommendations: any blog you think is worth checking out? And also, who do you think I should be interviewing next?&lt;/h2&gt;
&lt;p&gt;So many! A lot of these are people in tech industry as that&#39;s what I love to learn more about on a regular basis. The list is a tiny portion but something to give you a starting point to explore.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.bobvanvliet.com/notes/&quot;&gt;Bob van Vliet&lt;/a&gt; who teaches design and has written many great posts for IndieWeb Carnival.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ohhelloana.blog/&quot;&gt;Ana Rodrigues&lt;/a&gt; is a frontend developer who writes excellent pieces about technology and adjacent topics.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.joshwcomeau.com/&quot;&gt;Josh W. Comeau&lt;/a&gt;&#39;s technical deep dives are a great place to improve frontend skills. Every time he shares a new piece, I learn a ton of new things.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://lea.verou.me/&quot;&gt;Lea Verou&lt;/a&gt; is one of the people whose technical writing I&#39;ve admired way over a decade and from who I try to learn to improve my own writing.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://nikoheikkila.fi/&quot;&gt;Niko Heikkilä&lt;/a&gt; is a former colleague of mine who writes about technology and improving as a craftsperson.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://rknight.me/&quot;&gt;Robb Knight&lt;/a&gt; is a source of constant inspiration to me. He shares a very similar mindset towards building things and sharing them as I do.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.sarasoueidan.com/&quot;&gt;Sara Souiedan&lt;/a&gt; is an excellent communicator in the frontend space. Her blog is one of my go-to places for CSS and accessibility related topics.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://shellsharks.com/&quot;&gt;Mike of Shellsharks&lt;/a&gt; writes about web and his Scroll newsletter is a never-ending source of finding new, interesting blogs from across the personal web.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://zoeaubert.me/&quot;&gt;Zoe Aubert&lt;/a&gt; writes about tech and Warhammer 40K in a way that&#39;s a delight to read.&lt;/li&gt;
&lt;li&gt;Finally, &lt;a href=&quot;https://vhbelvadi.com/&quot;&gt;V.H. Belvadi&lt;/a&gt; is my favourite person online to read. We share a similar approach to thinking and writing while having differing opinions on details. That makes his posts always make my brain go brrrr as the gears of thinking start to turn and new ideas spark.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Final question: is there anything you want to share with us?&lt;/h2&gt;
&lt;p&gt;If you&#39;re reading this and you don&#39;t yet have a blog: start one. I highly encourage everyone to start one, no matter where you are in life. If you need help, get in touch and I&#39;m happy to help you. If you start a blog, send me a link, I&#39;m happy to become your first reader.&lt;/p&gt;
&lt;p&gt;Writing is a powerful exercise in thinking. It will give you benefits way beyond just having a blog that people read. It will help you clarify your thinking, process your thoughts, become a better communicator and become part of a community of other humans around the world.&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>What’s in my Magic the Gathering Battle Box</title>
    <link href="https://hamatti.org/posts/whats-in-my-magic-the-gathering-battle-box/" />
    <updated>2026-09-02T00:00:00Z</updated>
    <id>https://hamatti.org/posts/whats-in-my-magic-the-gathering-battle-box/</id>
    <content type="html">
      &lt;p&gt;
  &lt;a href=&quot;https://notes.hamatti.org/gaming/board-games/magic-the-gathering/mtg-battle-box&quot; class=&quot;notion-text-href&quot;&gt;Battle Box&lt;/a&gt;
  is one of my favourite Magic the Gathering formats. It’s a self-contained
  gaming environment for 2 players. Mine has 171 spells and 20 lands — 10 for
  each player. Players draw from a shared deck and the deck is focused on combat
  and combat tricks.
&lt;/p&gt;

&lt;p&gt;
  It’s perfect for quick and casual lunch time or afterwork gaming session.
  There’s no need to build and bring your own deck or learn deep strategies of a
  specific deck. You shuffle up, draw and start playing. You read the cards as
  you draw them into your hand and make decisions one at a time. Every session
  is different.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/whats-in-my-magic-the-gathering-battle-box/1.png.webp&quot; alt=&quot;A dark grey GameGenic Academic 133+ XL deck box with a Witchcraft Hanging out Battle Box sticker &quot; /&gt;
&lt;p&gt;
  I use
  &lt;a href=&quot;https://www.gamegenic.com/product/the-academic-133-xl/&quot; class=&quot;notion-text-href&quot;&gt;Gamegenic’s The Academic 133+ XL&lt;/a&gt;
  as the base for my box. I got a couple of those from the Kickstarter back in
  the day and it’s a perfect housing for my box. The main compartment fits most
  of my spells and the rest fit on the top token space on the side.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/whats-in-my-magic-the-gathering-battle-box/2.png.webp&quot; alt=&quot;Five uneven stacks of Magic the Gathering cards in blue sleeves face up. &quot; /&gt;
&lt;p&gt;
  The core of this &lt;a href=&quot;https://notes.hamatti.org/gaming/board-games/self-contained-gaming-environment&quot;&gt;self-contained gaming environment&lt;/a&gt; are of course the spells.
  It currently has 171 cards with mana costs between 1 and 3 and focused on
  combat and combat tricks.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/whats-in-my-magic-the-gathering-battle-box/3.png.webp&quot; alt=&quot;Four fanned out piles of five Magic the Gathering lands. &quot; /&gt;
&lt;p&gt;
  In the second token box, I keep 20 lands: 2 sets of 5 basics (one each colour)
  and 5 dual taplands. All of these are sleeved in different colours to make it
  easy to disassemble after a game: your lands all come from the Command Zone so
  they never go to the deck and thus can utilise the extra benefits of
  differently coloured sleeves.
&lt;/p&gt;

&lt;p&gt;
  Even if your opponent who is playing Battle Box for the first time shuffles
  their lands back into the deck out of habit, you can easily spot them thanks
  to sleeves.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/whats-in-my-magic-the-gathering-battle-box/4.png.webp&quot; alt=&quot;A stack of dry erase cards, four markers (black, red, green and blue) and a single card with text Battle Box - Enchanment Token and a poor drawing of a Magic battlefield with a deck and four cards. &quot; /&gt;
&lt;p&gt;
  I also have a stack of blank dry erase tokens so you can draw your own tokens
  when they come up.
  &lt;a href=&quot;https://zine.hamatti.org/issues/3/&quot; class=&quot;notion-text-href&quot;&gt;I love drawing my own tokens&lt;/a&gt;.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/whats-in-my-magic-the-gathering-battle-box/5.png.webp&quot; alt=&quot;A collection of small tokens next to their box. Two double-digit life counters, two bright green six sided dice, six black and white 3D printed chevron shaped counters and a blue box full of those same counters. &quot; /&gt;
&lt;p&gt;
  On the bottom token box, I have a collection of small things to help out. I
  designed and printed a three compartment box and in it, I have two &lt;a href=&quot;https://www.printables.com/model/1207754-ultimate-tabletop-counter&quot;&gt;3D printed
  HP counters&lt;/a&gt;, a couple of dice and &lt;a href=&quot;https://www.printables.com/model/1125716-magic-the-gathering-tokens&quot;&gt;3D printed black +1/+1 and white -1/-1
  counters&lt;/a&gt;. I used to have those in same colour but then I realised that it’s
  nicer if I can figure out what counters they are from their colours and not if
  they have a small + or - symbol on them.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/whats-in-my-magic-the-gathering-battle-box/6.png.webp&quot; alt=&quot;Two booklets: one showing a cover for Battle Box keyword reference guide and another showing a full spread with 10 Magic keywords explained. &quot; /&gt;
&lt;p&gt;
  In the “side department” of the main box, I have
  &lt;a href=&quot;https://hamatti.org/posts/my-custom-keyword-reference-guide-for-magic-the-gathering-battle-box/&quot; class=&quot;notion-text-href&quot;&gt;my custom keyword reference guides that I made&lt;/a&gt;. They list all the keywords with explanations that are present in this box
  in alphabetical order as well as a quick speed guide for when you can cast
  spells and activate abilities.
&lt;/p&gt;

&lt;p&gt;
  I like having a printed guide so players don’t have to take out their phones
  to check the wiki — I generally don’t enjoy bringing phones into game
  sessions.
&lt;/p&gt;

&lt;p&gt;
  I love the ability to bring this to game nights or lunches with friends and
  playing a game or two without having to own cards, build decks, spend time on
  drafting (the main downside of otherwise wonderful format) or ending up with
  two unevenly matched decks leading to a bad time.
&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>31st is for recap</title>
    <link href="https://hamatti.org/posts/31st-is-for-recap/" />
    <updated>2026-08-31T00:00:00Z</updated>
    <id>https://hamatti.org/posts/31st-is-for-recap/</id>
    <content type="html">
      &lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Python A-Z&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is a blog series about Python. Each day, I share insights, ideas and
    examples for different parts of Python development that match with the
    letter of the day. &lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Blaugust&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is an annual blogging festival in August where the goal is to write a blog
    post every day of the month.&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;
  “Wake me up when August ends”, to snowclone Green Day. We’ve reached the last
  day of Blaugust and it’s time to wrap up this month and look at what I did,
  how it went and what I learned this year.
&lt;/p&gt;

&lt;p&gt;
  This was my fourth year participating (see
  &lt;a href=&quot;https://hamatti.org/blog/blaugust-2023/&quot; class=&quot;notion-text-href&quot;&gt;2023&lt;/a&gt;,
  &lt;a href=&quot;https://hamatti.org/blog/blaugust-2024/&quot; class=&quot;notion-text-href&quot;&gt;2024&lt;/a&gt;,
  &lt;a href=&quot;https://hamatti.org/blog/blaugust-2025/&quot; class=&quot;notion-text-href&quot;&gt;2025&lt;/a&gt;) and like the
  previous three, I once again reached 31 posts in 31 days (+ a couple extras
  for good measure) and finished with the prestigious 🌈 Rainbow Diamond Award.
  Yay! You can find all posts in &lt;a href=&quot;https://hamatti.org/blog/blaugust-2026&quot; class=&quot;notion-text-href&quot;&gt;blaugust-2026 tag page&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
  This year, I decided I wanted to write on a theme again and I found my way to
  Python topics again. This time, I chose the theme to be “A to Z of Python”
  that I had been thinking of doing many times over the years.
&lt;/p&gt;

&lt;p&gt;
  A to Z offers a nice challenge and structure which helps in a fast-paced
  format like Blaugust. Writing technical stuff on a daily basis is challenging
  because coming up with good examples, writing and testing the code and
  crafting a story around it takes time. I started actively planning somewhere
  around early July by listing all the letters of the English alphabet into a
  note and every time I remembered something starting with that letter, I’d add
  it to a list for that letter.
&lt;/p&gt;

&lt;p&gt;
  Some letters are easier than others. Waaaaay easier. “W” is one of those:
  anything that happens in web is available and that’s a huge world. Letters
  like “X’, “Y” and “Z” were really hard. On the 24th day, as I was starting the
  last week and had no clue what to write about, I realised I can search my
  notes for words starting with a given letter.
&lt;/p&gt;

&lt;pre class=&quot;language-shell&quot;&gt;&lt;code class=&quot;language-shell&quot;&gt;tree ~/Document/Notes/Technology/ | grep -i &quot; z[a-z]&quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  would give me all the notes where there’s a word starting with “z” (and has at least one other letter after that). That’s how
  I actually discovered the topic for V, Y and Z because I had great notes as
  documentation for myself for those topics ready to transform into a blog post.
  I wish I had figured that out in July. Good to know for future A to Z theme
  months.
&lt;/p&gt;

&lt;p&gt;
  &lt;b class=&quot;notion-text-bold&quot;&gt;Doing A to Z was a blessing and a curse. &lt;/b&gt;
&lt;/p&gt;

&lt;p&gt;
  On the positive side, it offers a definitive structure and limitations to
  imagination. That’s always helpful. It’s way easier to pick a topic for “D”
  from a limited amount of options than choose something from infinite options.
  Even when I complained on multiple occasions that I’m struggling to come up
  with ideas for certain letters.
&lt;/p&gt;

&lt;p&gt;
  On the other hand, it lacks all cohesion and structure between the posts.
  Multiple times throughout the month, I was desiring more progression from one
  post to another as I felt that could be more useful for a reader who follows
  the full series. I already started planning for 2027 Blaugust with that in
  mind. It takes way more planning up front since coming up with coherent, well
  progressing ideas on the fly for a month is outside my cognitive capabilities.
&lt;/p&gt;

&lt;p&gt;
  Before August rolled in, I
  &lt;a href=&quot;https://hamatti.org/posts/on-blogging-blaugust-and-challenging-yourself/&quot; class=&quot;notion-text-href&quot;&gt;wrote about Blaugust and why I participate in challenges like this&lt;/a&gt;. The occasional feelings of discomfort were insignificant compared to the
  joy of learning new things about myself and seeing myself progress as a
  writer. Every year, the biggest wow effect comes from the fact that I can
  force myself to sit down and write as I generally consider myself as a very
  inspiration-driven writer.
&lt;/p&gt;

&lt;p&gt;
  Another nice thing Blaugust’s fast-paced format introduces is that it forces
  me to keep the scope small.
  &lt;b class=&quot;notion-text-bold&quot;&gt;A single idea, well executed and explained. &lt;/b&gt;That’s the goal at least for me — how I succeed is for the readers to judge.
  I have a tendency to want to explain everything comprehensively and that leads
  to never ending rabbit holes and never finishing. Blaugust doesn’t give me
  that comfort: to get 31 posts in 31 days, I need to start writing and finish
  writing within a day and push it out.
&lt;/p&gt;

&lt;p&gt;
  I love
  &lt;a href=&quot;https://medium.com/@bre/the-cult-of-done-manifesto-724ca1c2ff13&quot; class=&quot;notion-text-href&quot;&gt;Cult of Done Manifesto&lt;/a&gt;
  and its principle 13 is evident every time I participate in Blaugust:
&lt;/p&gt;

&lt;blockquote class=&quot;notion-quote notion-color-default&quot;&gt;
  Done is the engine of more
&lt;/blockquote&gt;

&lt;p&gt;
  Writing inspires more writing and maintaining momentum makes writing easier.
&lt;/p&gt;

&lt;p&gt;
  Some (many somes) days, I spent the entire day sitting in a library or a pub,
  writing, thinking, researching and planning. I’m glad this summer I’ve had a
  lot of time to focus on non-directed research and learning: reading about a
  variety of topics and following a lot of those rabbit holes where my interests
  lead and making notes about them to feed my notes so that I can write better
  posts in the future.
&lt;/p&gt;

&lt;p&gt;
  One downside of this strict theme means that I don’t have a good opportunity
  to participate in the community writing projects that Blaugust community comes
  up with. I would love be a more connected participant rather than kind of
  doing my own thing here on the side. Especially since there isn’t a lot of
  people participating in Blaugust who write about software development so
  occasionally I feel disconnected from the rest of the community. I try to
  balance that by being active in the Discord.
&lt;/p&gt;

&lt;p&gt;
  It’s a trade-off that I’ve decided to make when choosing a theme. There’s
  nothing preventing me from writing a mixture of the two but then I would
  likely feel that I’m not committing to either and I’m not sure that would be
  great either. Let’s see how I do next year.
&lt;/p&gt;

&lt;p&gt;
  A funny thing about writing and publishing ideas is that sometimes the ones
  that you think were quick and not so good as a result might end up with a
  bunch of people sending messages about how that was a great post that helped
  them discover something new that was helpful to them. I’m not gonna tell you
  which ones I’m least satisfied with this month but all of those got responses
  from people that they had a positive impact.
&lt;/p&gt;

&lt;p&gt;
  There are two outcomes from a blog post that I’m specifically excited about.
  First is when someone responds and shares they learned something from what I
  shared. The second is when someone responds and I learn something new about
  the topic from them. Both happened many many times this month and that makes
  this month such a special one every year.
&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>A lot of what I’ve learned, I’ve learned from open web</title>
    <link href="https://hamatti.org/posts/a-lot-of-what-ive-learned-ive-learned-from-open-web/" />
    <updated>2026-08-30T00:00:00Z</updated>
    <id>https://hamatti.org/posts/a-lot-of-what-ive-learned-ive-learned-from-open-web/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Blaugust&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is an annual blogging festival in August where the goal is to write a blog
    post every day of the month. &lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;IndieWeb Carnival &lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;is a monthly blogging event where one person chooses a topic and invites
    others to write about it.&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;
  For this month’s
  &lt;a href=&quot;https://indieweb.org/IndieWeb_Carnival&quot; class=&quot;notion-text-href&quot;&gt;IndieWeb Carnival&lt;/a&gt;, Chris invited us to
  &lt;a href=&quot;https://thoughts.uncountable.uk/august-2026-indieweb-carnival-purpose/&quot; class=&quot;notion-text-href&quot;&gt;write about purpose&lt;/a&gt;
  and there’s been quite a few excellent entries so far. With my Python A to Z
  series finished, I finally have time to ponder this very deep topic.
&lt;/p&gt;

&lt;p&gt;
  I got access to internet (through one of those 56K modems that cried like it
  was tortured every time we connected to the high way of internet) when I was
  maybe 10 years old, back in the 1990s. I grew up with three excellent sources
  of open knowledge: school, library and the internet.
&lt;/p&gt;

&lt;p&gt;
  I’ve learned so much over the years from the internet, thanks to other people
  who shared that information in open, public websites and discussion forums.
  Finnish programming forums like
  &lt;a href=&quot;https://www.ohjelmointiputka.net/&quot; class=&quot;notion-text-href&quot;&gt;Ohjelmointiputka&lt;/a&gt;
  and
  &lt;a href=&quot;https://fi.wikipedia.org/wiki/Mureakuha&quot; class=&quot;notion-text-href&quot;&gt;Mureakuha&lt;/a&gt;
  were instrumental in my early years of learning programming and later on,
  Stack Overflow and various blogs continued my learning journey.
&lt;/p&gt;

&lt;p&gt;
  I’ve been part of a lot of different forums and the blogosphere from the very
  early days of having access to the internet.
&lt;/p&gt;

&lt;p&gt;
  IRC was where I found other people outside the forums to chat about things I
  cared about and wanted to learn more. While it lost to more visually appealing
  and centralised solutions like Slack and Discord, its openness was crucial: I
  didn’t have to know someone to gain access to those discussions and that
  knowledge.
&lt;/p&gt;

&lt;p&gt;
  During my studies at the university, the computer science student
  organisation’s discussion moved from IRC to Discord and lots of smaller groups
  were formed in chat platforms like Whatsapp. This was a big shift in openness
  because now you needed a social connection with someone to be included in
  these discussions.
&lt;/p&gt;

&lt;p&gt;
  Over the years, the technology landscape has shifted a lot from open to
  closed. Social media platforms like Facebook, Instagram, Twitter/X and chat
  platforms like Slack and Discord are platforms that are not as discoverable
  (especially if you don’t have an account) and the information inside them
  disappears from the world — sometimes even for the people who are part of
  those chats.
&lt;/p&gt;

&lt;p&gt;
  This summer, I’ve been part of a newly formed community within which we had a
  long discussion about whether we should create a forum that’s open and public
  or closed and private (or a mix of the two). I wrote many passionate, long
  messages about the same things I’m sharing here: why openness matters to me.
&lt;/p&gt;

&lt;p&gt;
  For the sake of argument, let’s imagine that I’m starting place for people to
  discuss a craft that can have both personal and professional influence. I’m
  not a money person myself but let’s say it’s about trading in stock market as
  that can easily be seen as a thing where having access to information can have
  a big financial and influencial impact.
&lt;/p&gt;

&lt;p&gt;
  If I’d start this discussion platform as a closed, private platform (a private
  forum hidden from the world or a Slack group or something like that), it would
  severely limit the access to many demographics of people and skew who has an
  opportunity to benefit from it.
&lt;/p&gt;

&lt;p&gt;
  Someone would have to know me or another member, come into some sort of
  discussion about trading to even possibly learn about its existence. I know
  that my personal social circle is skewed towards highly educated, somewhat
  wealthy people with social capital. Without making a focused effort into
  reaching out to other groups, I would be perpetuating that demographic
  continuing to have more access to a community and knowledge that can increase
  their influence in society through wealth and social capital.
&lt;/p&gt;

&lt;p&gt;
  Next step towards openness could be that the community is public but the
  discussions are only for members. That way, if someone specifically is
  searching for a trading community, they might find the group and ask to join.
&lt;/p&gt;

&lt;p&gt;
  If I think back on my own life and learning journey, it’s a very rare occasion
  that I would be searching for such thing or asking about those from people I
  know. At least in comparison to times when I’ve been searching something
  specific: how to start trading, how to make better trades and so on (as you
  can see, I know absolutely nothing about trading).
&lt;/p&gt;

&lt;p&gt;
  Those kinds of searches have led me to a lot of great blogs and discussion
  forums which has led me to discover them and learn more and get to know people
  in there.
&lt;/p&gt;

&lt;p&gt;
  And I want to increase the amount of that kind of discovery and access in the
  world. I want to share myself but also build communities where we share with
  open doors and at least trying to do more to reach people in demographics that
  might not have access to that information and those social circles.
&lt;/p&gt;

&lt;p&gt;
  To me, doing the opposite often feels I would be pulling up the ladder after
  myself. I got a lot from this culture of open sharing but now I want to keep
  it to myself and the group I’m part of. Reality is somewhere in between of
  course.
&lt;/p&gt;

&lt;p&gt;
  I’m not perfect in that pursuit either: I’m part of dozens of Discord servers
  and Slack workspaces — some of which I’ve founded — where this discussion
  happens hidden from the public eye. More and more however, I want to be an
  active force in moving the needle to another direction.
&lt;/p&gt;

&lt;p&gt;
  Often, it’s the mundane, daily discussions about the craft that can be the
  important factor. Either in how people find more of the knowledge and people
  or by being the thing people were seeking and wanted to learn.
&lt;/p&gt;

&lt;p&gt;
  People talk about how forums are dead. Compared to early 2000s, sure. But for
  example, I’m somewhat active (either as daily reader of discussions or active
  participant in them) in a dozen or so forums on a weekly basis. The topics
  span from programming to blogging and websites to writing to social issues to
  sports to video games and more. I hope we’ll see even more in the future and I
  hope they remain open, public and accessible to people so that more people
  have the opportunity to learn and find people with similar interests.
&lt;/p&gt;

&lt;p&gt;There’s a strong purpose for open discussion forums.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;


    </content>
  </entry>
   
  
  <entry>
    <title>Z is for zip file mocking - Python A to Z</title>
    <link href="https://hamatti.org/posts/z-is-for-zip-file-mocking-python-a-to-z/" />
    <updated>2026-08-29T00:00:00Z</updated>
    <id>https://hamatti.org/posts/z-is-for-zip-file-mocking-python-a-to-z/</id>
    <content type="html">
      &lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Python A-Z&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is a blog series about Python. Each day, I share insights, ideas and
    examples for different parts of Python development that match with the
    letter of the day. &lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Blaugust&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is an annual blogging festival in August where the goal is to write a blog
    post every day of the month.&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;Welcome to Z. The last day of our journey through Python from A to Z.&lt;/p&gt;

&lt;p&gt;
  I initially considered writing about
  &lt;a href=&quot;https://docs.python.org/3/library/functions.html#zip&quot; class=&quot;notion-text-href&quot;&gt;zip&lt;/a&gt;
  but I
  &lt;a href=&quot;https://hamatti.org/posts/combine-iterables-with-zip/&quot; class=&quot;notion-text-href&quot;&gt;already wrote about zip in Batteries included two years ago&lt;/a&gt;
  and I don’t have anything new to say about it.
&lt;/p&gt;

&lt;p&gt;
  A while ago in a project, I had to test a function that downloaded a zip file,
  read an XML file from it and returned some value. I needed to figure out a way
  to mock an HTTP GET request to return a zip file.
&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Setup&lt;/h2&gt;

&lt;p&gt;
  In our project, there was a third party library that downloaded a zip file
  from a hard-coded URL, read a file inside it and returned some data for us. I
  couldn’t change the function but needed to write a test to keep us safe from
  changes in that function that would cause hard to catch bugs in our system.
&lt;/p&gt;

&lt;p&gt;
  For this example, I’ve created a simplification of that function because what
  it does is not important for this blog post’s main point.
&lt;/p&gt;

&lt;p&gt;Here are the required dependencies to run this:&lt;/p&gt;

&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;dependencies = [
    &quot;beautifulsoup4&amp;#62;=4.15.0&quot;,
    &quot;lxml&amp;#62;=6.1.2&quot;,
    &quot;pytest&amp;#62;=9.1.1&quot;,
    &quot;requests&amp;#62;=2.34.2&quot;,
    &quot;requests-mock&amp;#62;=1.12.1&quot;,
]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  If you want to run this thing for yourself, here’s a function that can be
  used:
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;# put this in a file: zip_handler.py

import io
import zipfile

from bs4 import BeautifulSoup
import requests

# also needs lxml installed but not imported
# for the xml parser

def handle():
    resp = requests.get(&quot;https://example.com/example.zip&quot;)
    with io.BytesIO(resp.content) as f:
        zf = zipfile.ZipFile(f)
        for filename in zf.namelist():
            if filename == &quot;timestamps.xml&quot;:
                break

        out_path = &quot;.&quot;
        zf.extract(filename, out_path)

    with open(filename, &quot;r&quot;) as xmlfile:
        soup = BeautifulSoup(xmlfile, &quot;xml&quot;) # xml parser comes from package lxml
        return soup.css.select(&quot;timeStamp&quot;)[0].text&lt;/code&gt;&lt;/pre&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Mock it&lt;/h2&gt;

&lt;p&gt;
  To mock calls to URLs, I used
  &lt;a href=&quot;https://pypi.org/project/requests-mock/&quot; class=&quot;notion-text-href&quot;&gt;requests-mock&lt;/a&gt;
  that provides a clean interface to deal with this.
&lt;/p&gt;

&lt;p&gt;First, let’s create our mock data.&lt;/p&gt;

&lt;p&gt;
  Create a file &lt;code class=&quot;notion-text-code&quot;&gt;timestamps.xml&lt;/code&gt; with the
  following
&lt;/p&gt;

&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&amp;#60;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&amp;#62;
&amp;#60;timeStamp&amp;#62;10:00:00&amp;#60;/timeStamp&amp;#62;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  and create a zip file &lt;code class=&quot;notion-text-code&quot;&gt;mock.zip&lt;/code&gt; with
  &lt;code class=&quot;notion-text-code&quot;&gt;timestamps.xml&lt;/code&gt; inside it
&lt;/p&gt;

&lt;pre class=&quot;language-shell&quot;&gt;&lt;code class=&quot;language-shell&quot;&gt;zip mock.zip timestamps.xml&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  Then create a test file
  &lt;code class=&quot;notion-text-code&quot;&gt;test_zip_handler.py&lt;/code&gt;
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;from zip_handler import handle
from requests_mock import Mocker


def test_timestamp_read_correctly():
    with Mocker() as m:
        with open(&quot;mock.zip&quot;, &quot;br&quot;) as zipfile:
            m.get(&quot;https://example.com/example.zip&quot;, body=zipfile)
            timestamp = handle()

            assert timestamp == &quot;10:00:00&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  Here we tell our mocker that we want any call to the specific URL to instead
  return the zipfile as the response body. Now, the
  &lt;code class=&quot;notion-text-code&quot;&gt;handle&lt;/code&gt; function will read our data
  instead of going to the Interwebs.
&lt;/p&gt;

&lt;p&gt;Now you can run this test with pytest&lt;/p&gt;

&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;uv run pytest # or however you&#39;ve installed pytest&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You should get a green test.&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>A fun debugging story from this weekend</title>
    <link href="https://hamatti.org/posts/a-fun-debugging-story-from-this-weekend/" />
    <updated>2026-08-29T00:00:00Z</updated>
    <id>https://hamatti.org/posts/a-fun-debugging-story-from-this-weekend/</id>
    <content type="html">
      &lt;p&gt;
  Yesterday, as Pokémon TCG World Championships started, we were following the
  tournament with friends. With 1500+ players, it’s not easy to quickly find the
  results of specific players from
  &lt;a href=&quot;https://rk9.gg/pairings/WCS01wI9lfI55wHtvrdy&quot; class=&quot;notion-text-href&quot;&gt;the long lists of results&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;I decided to build a simple bookmarklet:&lt;/p&gt;
&lt;ol class=&quot;notion-numbered_list&quot;&gt;
  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Define a list of players you want to follow
  &lt;/li&gt;

  &lt;li class=&quot;notion-numbered_list_item notion-color-default&quot;&gt;
    Every time you run the bookmarklet, it will show those players and their
    most recent win/loss records on an alert box and copy to clipboard.
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  At some point, it suddenly stopped working. It only found one person but
  nobody else. No matter how I ordered the people in the list, nothing. Even my
  debug console.logs didn’t show up while syntax errors did (to confirm it was
  running the newest code).
&lt;/p&gt;

&lt;p&gt;
  I probably spent a good 15-20 minutes trying to reason why my simple filter
  and map loops didn’t work.
&lt;/p&gt;

&lt;p&gt;
  Eventually, I found out that when I was trying to find one player from the
  list to copy their name, I had accidentally searched in the developer console
  which filters the output shown.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/a-fun-debugging-story-from-this-weekend/1.png.webp&quot; alt=&quot;Firefox Dev Console with a line of Javascript console logging Sander Wojcik and Tord Reklev but the output only shows Sander Wojcik. Above the console itself, there’s a filter line with input sander and a notice that says: 1 hidden. &quot; /&gt;
&lt;p&gt;
  I can’t remember the last time I’ve used that filter feature in dev console so
  it didn’t even cross my mind.
&lt;/p&gt;

&lt;p&gt;
  Debugging an issue that has nothing to do with your working code is so
  annoying.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>Y is for YAGNI - Python A to Z</title>
    <link href="https://hamatti.org/posts/y-is-for-yagni-python-a-to-z/" />
    <updated>2026-08-28T00:00:00Z</updated>
    <id>https://hamatti.org/posts/y-is-for-yagni-python-a-to-z/</id>
    <content type="html">
      &lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Python A-Z&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is a blog series about Python. Each day, I share insights, ideas and
    examples for different parts of Python development that match with the
    letter of the day. &lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Blaugust&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is an annual blogging festival in August where the goal is to write a blog
    post every day of the month.&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;
  While I like writing code to solve my technical problems and fulfill my
  software needs, I don’t like writing unnecessary code. Writing something
  because you thought it could be useful is often — unless you learned something
  from it — wasteful in terms of time and effort and added complexity.
&lt;/p&gt;

&lt;p&gt;
  &lt;a href=&quot;https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it&quot; class=&quot;notion-text-href&quot;&gt;YAGNI (You aren’t gonna need it)&lt;/a&gt;
  is a principle that arose from extreme programming methodology. While I have
  never worked in a project or company that followed any specific methodology to
  the letter, this one has been fundamental in my understanding of how to build
  software in a smart way. It hasn’t been without its faults though: one of my
  jobs ended due to a big clash with management around this idea.
&lt;/p&gt;

&lt;p&gt;
  The principle isn’t only helpful in focusing on what to do and by extent,
  saving money by not spending time and money on unnecessary things, it also
  brings about other positive effects. it’s not only about code we write but
  features we design.
&lt;/p&gt;

&lt;p&gt;
  Code you write stays simpler because less assumptions about future are
  introduced early. If you write code that is easy to extend and modify, you
  don’t need to prepare for every potential use case from day 1.
&lt;/p&gt;

&lt;p&gt;
  When it comes to designing software for its users (even if that’s just
  yourself), building something before you have a clear need for it and idea of
  how it needs to work, can lead to functionality that doesn’t match the
  expectations and can become more difficult to change in the future to match
  the actual expectations.
&lt;/p&gt;

&lt;p&gt;
  Remember,&lt;a href=&quot;https://xkcd.com/1172/&quot; class=&quot;notion-text-href&quot;&gt;
    there’s always someone who depends on already implemented workflows&lt;/a&gt;:
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/y-is-for-yagni-python-a-to-z/1.png&quot; alt=&quot;XKCD comic of a software changelog that states: The CPU no longer overheats when you hold down space bar. A comment from LongTimeUser4: This update broke my workflow! My Control key is hard to reach, so I hold spacebar instead, and I configured Emacs to interpret a rapid temperature rise as “control”. Admin responds: That’s horrifying. LongTimeUser4 replies: Look, my setup works for me. Just add an option to re-enable spacebar heating. &quot; /&gt;
&lt;p&gt;
  I have so often — both in commercial context and my one-user hobby projects —
  encountered a situation where we think something needs to be built in a
  specific way. Only to then build it and later learn from actual user(s) using
  it that it doesn’t fit the need at all or that (almost) nobody uses it.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>X is for XML parsing - Python A to Z</title>
    <link href="https://hamatti.org/posts/x-is-for-xml-parsing-python-a-to-z/" />
    <updated>2026-08-27T00:00:00Z</updated>
    <id>https://hamatti.org/posts/x-is-for-xml-parsing-python-a-to-z/</id>
    <content type="html">
      
&lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Python A-Z&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is a blog series about Python. Each day, I share insights, ideas and
    examples for different parts of Python development that match with the
    letter of the day. &lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Blaugust&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is an annual blogging festival in August where the goal is to write a blog
    post every day of the month.&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;
  Today I’m doing a bit of piggybacking: XML fits the “X” of the day but I’m
  also going to talk about HTML parsing because we can use the same tool. I’m
  also cheating a bit (honestly, I couldn’t come up with a new thing starting
  with X to write about) because I’ll mostly just point you towards my previous
  work. I’m doing this to bring new eyes to BeautifulSoup as my old blog posts
  don’t pop up so often in the feeds.
&lt;/p&gt;

&lt;p&gt;I’m starting with a story time:&lt;/p&gt;

&lt;p&gt;
  It’s probably one of the things I’ve written and spoken more about than
  anything else: parsing these formats with
  &lt;a href=&quot;https://beautiful-soup-4.readthedocs.io/en/latest/&quot; class=&quot;notion-text-href&quot;&gt;BeautifulSoup&lt;/a&gt;. My first ever
  &lt;a href=&quot;https://www.youtube.com/watch?v=Yi4uWzF6-Ug&quot; class=&quot;notion-text-href&quot;&gt;developer conference talk was in PyCon Finland 2016&lt;/a&gt;
  where I came with two slides: opening and closing and a demo without a backup
  that was using a live website in the Internet. Looking back now, I’m slightly
  happy I didn’t know better because there were so many things I would now be
  super stressed out but didn’t realise back then. Luckily, the demo went well.
  I haven’t dared to rewatch it in years though.
&lt;/p&gt;

&lt;p&gt;BeautifulSoup describes itself by saying&lt;/p&gt;

&lt;blockquote class=&quot;notion-quote notion-color-default&quot;&gt;
  Beautiful Soup is a Python library for pulling data out of HTML and XML files.
  It works with your favorite parser to provide idiomatic ways of navigating,
  searching, and modifying the parse tree. It commonly saves programmers hours
  or days of work.
&lt;/blockquote&gt;

&lt;p&gt;
  I
  &lt;a href=&quot;https://hamatti.org/posts/how-to-scrape-website-with-python-beautifulsoup/&quot; class=&quot;notion-text-href&quot;&gt;wrote about it six years ago&lt;/a&gt;
  and not a ton has changed to be honest.
&lt;/p&gt;

&lt;p&gt;
  One thing I didn’t write about six years ago that I use all the time now is
  &lt;code class=&quot;notion-text-code&quot;&gt;select&lt;/code&gt; that allows
  &lt;a href=&quot;https://beautiful-soup-4.readthedocs.io/en/latest/#css-selectors&quot; class=&quot;notion-text-href&quot;&gt;directly querying with CSS selectors&lt;/a&gt;.
&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Parsing HTML&lt;/h2&gt;

&lt;p&gt;I’m borrowing the examples from documentation.&lt;/p&gt;

&lt;p&gt;We have a simple HTML doc with a couple of paragraphs and links.&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;html_doc = &quot;&quot;&quot;
&amp;#60;html&amp;#62;&amp;#60;head&amp;#62;&amp;#60;title&amp;#62;The Dormouse&#39;s story&amp;#60;/title&amp;#62;&amp;#60;/head&amp;#62;
&amp;#60;body&amp;#62;
&amp;#60;p class=&quot;title&quot;&amp;#62;&amp;#60;b&amp;#62;The Dormouse&#39;s story&amp;#60;/b&amp;#62;&amp;#60;/p&amp;#62;

&amp;#60;p class=&quot;story&quot;&amp;#62;Once upon a time there were three little sisters; and their names were
&amp;#60;a href=&quot;http://example.com/elsie&quot; class=&quot;sister&quot; id=&quot;link1&quot;&amp;#62;Elsie&amp;#60;/a&amp;#62;,
&amp;#60;a href=&quot;http://example.com/lacie&quot; class=&quot;sister&quot; id=&quot;link2&quot;&amp;#62;Lacie&amp;#60;/a&amp;#62; and
&amp;#60;a href=&quot;http://example.com/tillie&quot; class=&quot;sister&quot; id=&quot;link3&quot;&amp;#62;Tillie&amp;#60;/a&amp;#62;;
and they lived at the bottom of a well.&amp;#60;/p&amp;#62;

&amp;#60;p class=&quot;story&quot;&amp;#62;...&amp;#60;/p&amp;#62;
&quot;&quot;&quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To parse that, we do&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;from bs4 import BeautifulSoup

soup = BeautifulSoup(html_doc, &#39;html.parser&#39;)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  We can then start querying into
  &lt;code class=&quot;notion-text-code&quot;&gt;soup&lt;/code&gt; with
  &lt;code class=&quot;notion-text-code&quot;&gt;select&lt;/code&gt; :
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;soup.select(&quot;title&quot;) # [&amp;#60;title&amp;#62;The Dormouse&#39;s story&amp;#60;/title&amp;#62;]
soup.select(&quot;p &amp;#62; a&quot;)
# [&amp;#60;a class=&quot;sister&quot; href=&quot;http://example.com/elsie&quot; id=&quot;link1&quot;&amp;#62;Elsie&amp;#60;/a&amp;#62;,
#  &amp;#60;a class=&quot;sister&quot; href=&quot;http://example.com/lacie&quot;  id=&quot;link2&quot;&amp;#62;Lacie&amp;#60;/a&amp;#62;,
#  &amp;#60;a class=&quot;sister&quot; href=&quot;http://example.com/tillie&quot; id=&quot;link3&quot;&amp;#62;Tillie&amp;#60;/a&amp;#62;]

soup.select(&#39;a[href$=&quot;tillie&quot;]&#39;)
# [&amp;#60;a class=&quot;sister&quot; href=&quot;http://example.com/tillie&quot; id=&quot;link3&quot;&amp;#62;Tillie&amp;#60;/a&amp;#62;]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  If you have done frontend development and are familiar with CSS selectors,
  this is a really nice way compared to traversing the tree manually step by
  step.
&lt;/p&gt;

&lt;h2 class=&quot;notion-heading_2 notion-color-default&quot;&gt;Parsing XML&lt;/h2&gt;

&lt;p&gt;
  The same selectors work with XML documents. To test it out, let’s take a look
  at my RSS feed (I redacted the actual content of the blog posts for brevity):
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;xml_doc = &quot;&quot;&quot;&amp;#60;feed&amp;#62;
&amp;#60;title&amp;#62;
Juha-Matti Santala - Community Builder. Dreamer. Adventurer.
&amp;#60;/title&amp;#62;
&amp;#60;subtitle/&amp;#62;
&amp;#60;link href=&quot;&quot; rel=&quot;self&quot;/&amp;#62;
&amp;#60;link href=&quot;https://hamatti.org&quot;/&amp;#62;
&amp;#60;updated&amp;#62;2026-08-26T00:00:00Z&amp;#60;/updated&amp;#62;
&amp;#60;id/&amp;#62;
&amp;#60;author&amp;#62;
&amp;#60;name&amp;#62;Juha-Matti Santala&amp;#60;/name&amp;#62;
&amp;#60;email&amp;#62;juhis@hamatti.org&amp;#60;/email&amp;#62;
&amp;#60;/author&amp;#62;
&amp;#60;entry&amp;#62;
&amp;#60;title&amp;#62;W is for walrus operator - Python A to Z&amp;#60;/title&amp;#62;
&amp;#60;link href=&quot;https://hamatti.org/posts/w-is-for-walrus-operator-python-a-to-z/&quot;/&amp;#62;
&amp;#60;updated&amp;#62;2026-08-26T00:00:00Z&amp;#60;/updated&amp;#62;
&amp;#60;id&amp;#62;
https://hamatti.org/posts/w-is-for-walrus-operator-python-a-to-z/
&amp;#60;/id&amp;#62;
&amp;#60;content type=&quot;html&quot;&amp;#62;
[ redacted for brevity ]
&amp;#60;/content&amp;#62;
&amp;#60;/entry&amp;#62;
&amp;#60;entry&amp;#62;
&amp;#60;title&amp;#62;V is for visible characters - Python A to Z&amp;#60;/title&amp;#62;
&amp;#60;link href=&quot;https://hamatti.org/posts/v-is-for-visible-characters-python-a-to-z/&quot;/&amp;#62;
&amp;#60;updated&amp;#62;2026-08-25T00:00:00Z&amp;#60;/updated&amp;#62;
&amp;#60;id&amp;#62;
https://hamatti.org/posts/v-is-for-visible-characters-python-a-to-z/
&amp;#60;/id&amp;#62;
&amp;#60;content type=&quot;html&quot;&amp;#62;
[ redacted for brevity ]
&amp;#60;/content&amp;#62;
&amp;#60;/entry&amp;#62;&quot;&quot;&quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To explore the XML document with CSS selectors:&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;from bs4 import BeautifulSoup
# You also need lxml installed to project

soup = BeautifulSoup(xml_doc, &quot;lxml&quot;)

soup.select(&#39;author&#39;)
# [&amp;#60;author&amp;#62;
# &amp;#60;name&amp;#62;Juha-Matti Santala&amp;#60;/name&amp;#62;
# &amp;#60;email&amp;#62;juhis@hamatti.org&amp;#60;/email&amp;#62;
# &amp;#60;/author&amp;#62;]

soup.select(&#39;entry id&#39;)
# [
# &amp;#60;id&amp;#62;https://hamatti.org/posts/w-is-for-walrus-operator-python-a-to-z/ &amp;#60;/id&amp;#62;, 
# &amp;#60;id&amp;#62;https://hamatti.org/posts/v-is-for-visible-characters-python-a-to-z/ &amp;#60;/id&amp;#62;
# ]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;


    </content>
  </entry>
   
  
  <entry>
    <title>W is for walrus operator - Python A to Z</title>
    <link href="https://hamatti.org/posts/w-is-for-walrus-operator-python-a-to-z/" />
    <updated>2026-08-26T00:00:00Z</updated>
    <id>https://hamatti.org/posts/w-is-for-walrus-operator-python-a-to-z/</id>
    <content type="html">
      &lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Python A-Z&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is a blog series about Python. Each day, I share insights, ideas and
    examples for different parts of Python development that match with the
    letter of the day. &lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Blaugust&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is an annual blogging festival in August where the goal is to write a blog
    post every day of the month.&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;
  Often in programming we end up in a situation where we want to check for an
  output of a function and then do something to it if it’s truthy.
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;if get_next_step() is not None:
	execute(get_next_step())&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  To avoid calling the function twice and saving computing cycles, we would then
  call it first, save it and test against it:
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;next_step = get_next_step()
if next_step is not None:
  execute(next_step)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  In Python 3.8, we got an assignment operator (&lt;code class=&quot;notion-text-code&quot;&gt;:=&lt;/code&gt;), nicknamed walrus operator because it looks like a cute walrus. It lets us
  shortcut this with
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;if (next_step := get_next_step()) is not None:
  execute(next_step)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It’s also handy in loops&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;while (next_step := get_next_step()) is not None:
  execute(next_step)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  Now we skip two assignments: one before the loop for initial check and another
  at the end of the loop for next check.
&lt;/p&gt;

&lt;p&gt;
  It’s a great example of relatively small syntax thing that makes the code
  cleaner and easier to follow and less error prone.
&lt;/p&gt;

    </content>
  </entry>
   
  
  <entry>
    <title>V is for visible characters - Python A to Z</title>
    <link href="https://hamatti.org/posts/v-is-for-visible-characters-python-a-to-z/" />
    <updated>2026-08-25T00:00:00Z</updated>
    <id>https://hamatti.org/posts/v-is-for-visible-characters-python-a-to-z/</id>
    <content type="html">
      &lt;p&gt;
  &lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Python A-Z&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is a blog series about Python. Each day, I share insights, ideas and
    examples for different parts of Python development that match with the
    letter of the day. &lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;&lt;b class=&quot;notion-text-bold&quot;&gt;Blaugust&lt;/b&gt;&lt;/i&gt;&lt;i class=&quot;notion-text-italic&quot;&gt;
    is an annual blogging festival in August where the goal is to write a blog
    post every day of the month.&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;
  I recently built a website to display my
  &lt;a href=&quot;https://pokedex.hamatti.org/&quot; class=&quot;notion-text-href&quot;&gt;Pokédex Binder&lt;/a&gt;. I have a physical binder where I collect Pokémon TCG cards in a way where I
  aim to have one card for each Pokémon and their regional variants (and some
  forms when applicable).
&lt;/p&gt;

&lt;p&gt;For each card, I can write a short note to tell why it’s in my binder.&lt;/p&gt;

&lt;p&gt;
  Here’s an example of my most recent addition: an Onix card that’s signed by
  all the players in our
  &lt;a href=&quot;https://notes.hamatti.org/gaming/board-games/pokemon/events/pokemon-tcg-worlds-2006-retro-tournament,-august-22nd-2026&quot; class=&quot;notion-text-href&quot;&gt;recent retro tournament&lt;/a&gt;
  where I finished 2nd.
&lt;/p&gt;
&lt;img src=&quot;https://hamatti.org/assets/img/posts/v-is-for-visible-characters/1.png.webp&quot; alt=&quot;A web ui that mimics a card binder showing 9 Pokemon cards from Sabrina&#39;s Gengar to Electrode. On the left page of the binder, a Onix card is selected and shown as full page size with a custom note sharing it was a prize from a retro tournament.&quot; /&gt;
&lt;p&gt;
  The box has limited size so I need a way to control that in data entry: it
  should tell me when I’ve written too much. At the same time, I want to allow
  myself to use Markdown to add formatting and links so I can’t simply count the
  characters of the input.
&lt;/p&gt;

&lt;p&gt;
  I needed a way to count the characters that a user actually sees in the final
  note box. To justify this as an entry for the V day, I’m calling those
  “visible characters”.
&lt;/p&gt;

&lt;p&gt;I asked around in Mastodon and found two solutions.&lt;/p&gt;

&lt;p&gt;
  The first solution, that I ended up using is
  &lt;a href=&quot;https://pypi.org/project/strip-markdown/&quot; class=&quot;notion-text-href&quot;&gt;strip-markdown&lt;/a&gt;
  library.
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;import strip_markdown

MAX_NOTE_LENGTH = 205

def is_valid_length(note: str) -&amp;#62; bool:
	visible = strip_markdown.strip_markdown(note)
	return len(visible) &amp;#60; 205

for card in pokedex:
  if not is_valid_length(card.note):
    raise ValueError(f&#39;{card.id} has too long note.&#39;
  
  add_to_binder(card) # imagine it exists	&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
  A bit later, Jan-Erik
  &lt;a href=&quot;https://fnordig.de/til/Python/strip-markdown-syntax.html&quot; class=&quot;notion-text-href&quot;&gt;shared his solution&lt;/a&gt;
  which uses
  &lt;a href=&quot;https://pypi.org/project/Markdown/&quot; class=&quot;notion-text-href&quot;&gt;Python-Markdown&lt;/a&gt;:
&lt;/p&gt;

&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;from markdown import Markdown
from io import StringIO

def unmark_element(element, stream=None):
    if stream is None:
        stream = StringIO()
    if element.text:
        stream.write(element.text)
    for sub in element:
        unmark_element(sub, stream)
    if element.tail:
        stream.write(element.tail)
    return stream.getvalue()

Markdown.output_formats[&quot;plain&quot;] = unmark_element

__md = Markdown(output_format=&quot;plain&quot;)
__md.stripTopLevelTags = False

def strip_markdown(text):
    return __md.convert(text)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

    </content>
  </entry>
  
</feed>
