<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>timomeh.de All</title>
  <subtitle>Posts and shorts from Timo Mämecke.</subtitle>
  <link href="https://timomeh.de/all/feed.atom" rel="self"/>
  <link href="https://timomeh.de/"/>
  
  <updated>2026-11-21T15:31:00Z</updated>
  <id>https://timomeh.de/all/feed.atom</id>
  <author><name>Timo Mämecke</name></author>
  
    
  
  





  
  


  




    <entry>
      <title>What if social media was just websites?</title>
      <link href="https://timomeh.de/posts/what-if-social-media-was-just-websites/?utm_source=rss"/>
      <updated>2026-11-21T15:31:00Z</updated>
      <id>https://timomeh.de/posts/what-if-social-media-was-just-websites</id>
      <content type="html">
&lt;p&gt;I’ve mentioned my dislike of social media &lt;a href=&#34;https://timomeh.de/posts/torn-between-speaking-up-and-staying-silent/&#34;&gt;a&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/posts/reading-less-short-message-social-media/&#34;&gt;couple&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/shorts/1757885217047/&#34;&gt;of&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/shorts/1759982997545/&#34;&gt;times&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/shorts/1790330921323/&#34;&gt;in&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/shorts/1758054887765/&#34;&gt;the&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/posts/thought-leaders/&#34;&gt;past&lt;/a&gt;. At the same time, I didn’t know what a good alternative would look like.&lt;/p&gt;
&lt;p&gt;Social Media platforms all have the same few features that were introduced in a very different time. Nowadays these features are unhealthy. They exist for the sake of driving engagement and keeping people on the platform as long as possible. We measure ourselves based on views and likes and comments and engagement, even though we aren’t gaining anything from it. And new decentralized social media platforms just copied all the same outdated and bad features, with the promise that the people and their culture are different. But at the same time, many of our friends are not on there.&lt;/p&gt;
&lt;p&gt;Today I had a thought: imagine a feed, swipeable like Reels or TikTok, but you’re swiping through a timeline of websites by your friends and other people you like to follow. A post may be a photo like on Instagram, a short video like Stories, a short text like a Tweet, a longer text like on a blog, news by an outlet you like to read, or any other unique way someone wants to express themselves. Each post is just a website.&lt;/p&gt;

&lt;p&gt;This feed has no built-in likes or commenting system. Interactions can only happen inside your own content. You can add social features to your content, but you can also choose not to.&lt;/p&gt;
&lt;p&gt;You can’t open this feed and add a post to it. It’s not a social media platform where you can post something. Your profile merely tracks who you’ve subscribed to, what you’ve already seen, and what’s new. It could even just run locally on your device.&lt;/p&gt;
&lt;p&gt;To post, you can just host your own site. But you also don’t have to host your own stuff. Naturally, there could be hosting providers that work nicely with a feed. The feed and the hosts are two separate entities that can integrate nicely with each other through an open protocol. Like RSS but with a modern twist.&lt;/p&gt;
&lt;p&gt;This open protocol can verify your identity. If you leave a comment or a like on a friend’s site, the feed reader passes your identity to the site, so you don’t have to log in and identify yourself before leaving a comment. If a friend’s content is private, the site can check if you’re allowed to view that content.&lt;/p&gt;
&lt;p&gt;And it doesn’t need to be a single app that’s your feed reader. Since it’s an open protocol, everyone can try to build a better feed reader. Or a feed reader that’s only optimized for a specific kind of content, like photos on Instagram.&lt;/p&gt;
&lt;p&gt;Does this already exist? Maybe &lt;a href=&#34;https://atproto.com/&#34;&gt;ATProto&lt;/a&gt;, and I like the technical idea behind ATProto. However, ATProto standardizes data so that apps can present it however they want and with the social features they want. My take is to standardize discovery and identity, so publishers (you and I) can decide how they want to present their content and which social features they want to add. I don’t think we need a data protocol. We already have websites.&lt;/p&gt;
&lt;p&gt;Today’s social media platforms make money by keeping people engaged. They control where we publish, how that content is distributed, and how other people consume it. In my alternative, these responsibilities are separated: Hosts compete by offering better publishing tools and customization, while feed readers compete by offering a better reading experience. When a host or feed reader optimizes too heavily for engagement, users can switch without losing the people they follow or their followers. These unhealthy features wouldn’t fully disappear, but we’re no longer locked into one definition of good social media.&lt;/p&gt;
&lt;p&gt;It’s pure chaos. Different websites, different feeds, different ways of interacting. But maybe that’s a good thing. As argued in &lt;a href=&#34;https://geohot.github.io/blog/jekyll/update/2026/11/01/pray-for-chaos.html&#34;&gt;“Pray for Chaos”,&lt;/a&gt; the alternative to chaos isn’t necessarily something better.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Saturday, November 21, 2026 at 12:41 PM UTC</title>
      <link href="https://timomeh.de/shorts/1795264872772/?utm_source=rss"/>
      <updated>2026-11-21T12:41:00Z</updated>
      <id>https://timomeh.de/shorts/1795264872772</id>
      <content type="html">&lt;p&gt;This is probably the most infuriating translation in an app.&lt;/p&gt;
&lt;p&gt;For my non-german readers: “Zur Warteschlange” (go to queue) has the same meaning as “In die Warteschlange” (add to queue) in everyday language.&lt;/p&gt;
&lt;p&gt;Just call it “Zur Warteschlange hinzufügen” (add to queue) and “Warteschlange aufrufen” (open queue) please. It would even be more aligned to the wording of the other translations! You’re welcome, Spotify.&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/b39LowM4vy-960.jpeg&#34; alt=&#34;Spotify App Screenshot, Song menu with items &amp;#34;In die Warteschlange&amp;#34; and &amp;#34;Zur Warteschlange&amp;#34;&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>What about Web Components?</title>
      <link href="https://timomeh.de/posts/what-about-web-components/?utm_source=rss"/>
      <updated>2026-11-16T14:41:00Z</updated>
      <id>https://timomeh.de/posts/what-about-web-components</id>
      <content type="html">
&lt;p&gt;Are &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Web_components&#34;&gt;Web Components&lt;/a&gt; actually usable nowadays? Could they replace frameworks and bundlers for small to medium sites? Honest question! After only using frameworks and bundlers for too many years, I’m totally out of the loop what’s now natively possible.&lt;/p&gt;
&lt;p&gt;I’ve built a few interactive islands on this site as custom elements, mostly for the sake of encapsulating logic. Like my navigation bar, that floats when you scroll up.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Writing this, I realize that this sentence will be outdated as soon as I change the design of this site, and future readers will think “what floating navigation bar?” If that’s the case, then: whoopsie sorry!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Using custom elements for these JavaScript islands also has the advantage that event listeners can initialize when elements mount or unmount:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;document
  .querySelector(&#39;main-nav&#39;)
  .addEventListener(&#39;click&#39;, () =&gt; {
    // Only fires when `main-nav` was mounted during
    // initial page load. When it mounts later, it won&#39;t fire.
  })

class MainNav extends HTMLElement {
  connectedCallback() {
    this.addEventListener(&#39;click&#39;, () =&gt; {
      // Also fires when `main-nav` mounts later.
    })
  }
}
customElements.define(&#39;main-nav&#39;, MainNav)
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Ignore the fact that the code sample is a bit stupid. You shouldn&#39;t have a click listener on a navigation.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Most of my JavaScript on this site is currently defined inside custom elements.&lt;/p&gt;
&lt;p&gt;It’s useful! I vibe more with that. And I need it, because with &lt;a href=&#34;https://swup.js.org&#34;&gt;swup&lt;/a&gt;, elements will mount and unmount when transitioning between pages. Without the custom element, I’d have to listen on a document click and then check the element inside the event listener… I don’t vibe with that.&lt;/p&gt;
&lt;p&gt;But besides encapsulating interactivity into a class, could I use Web Components for even more? Like, could I replace much of the template engine of my static site generator with just Web Components? For encapsulating styles and markup?&lt;/p&gt;
&lt;p&gt;And with encapsulating styles, I don’t care that much about fighting the CSS cascade. I stick to my own CSS conventions and I rarely fight against the cascade. But, let’s say I’m writing CSS as a bunch of utility classes: could I write HTML components and reuse them as custom elements, and then use the CSS utilities inside them? Without repeating the class names over and over again? Like you would do with React or Svelte and whatnot? Or another type of style encapsulation?&lt;/p&gt;
&lt;p&gt;For my own small or medium-sized sites, I like the idea of using native web platform features. It means that I will always be able to run the site. Nothing will break because a library didn’t follow semver, or a build-tool depends on a bunch of old executables and &lt;code&gt;node-gyp&lt;/code&gt; that refuses to compile because of other whacky dependencies.&lt;/p&gt;
&lt;p&gt;Here’s my wishlist:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It should work with server rendering (or static rendering). No flash of unstyled content.&lt;/li&gt;
&lt;li&gt;It needs to work with JavaScript disabled. I like progressive enhancement.&lt;/li&gt;
&lt;li&gt;I want to encapsulate markup. I want to only write the markup of a component once, and ship it once (because if I need to ship the markup multiple times, I need an external template engine again).&lt;/li&gt;
&lt;li&gt;Declarative templating and rendering would be cool.&lt;/li&gt;
&lt;li&gt;Custom attributes, specifically to easily define component variants.&lt;/li&gt;
&lt;li&gt;When I have a manageable amount of Web Components, I should be able to load them as individual files without performance issues. It would be cool to ship exactly what I have in development to production, without any build steps.&lt;/li&gt;
&lt;li&gt;Also, if a JS file could only be fetched when its custom element is actually used, in combination with some preloading hints, that would be cool.&lt;/li&gt;
&lt;li&gt;Being able to define my whole UI as native reusable components, even if there’s no interactivity. (As always, there are exceptions, I don’t want literally everything to be a reusable component)&lt;/li&gt;
&lt;li&gt;Widely available today in all browsers.&lt;/li&gt;
&lt;li&gt;Probably more that I forgot to add and will notice after a good walk.&lt;/li&gt;
&lt;/ul&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Saturday, November 14, 2026 at 12:13 PM UTC</title>
      <link href="https://timomeh.de/shorts/1794658391501/?utm_source=rss"/>
      <updated>2026-11-14T12:13:00Z</updated>
      <id>https://timomeh.de/shorts/1794658391501</id>
      <content type="html">&lt;p&gt;&lt;em&gt;…and a day after he publicly ranted about his plateau, the plateau was over.&lt;/em&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, November 13, 2026 at 11:43 AM UTC</title>
      <link href="https://timomeh.de/shorts/1794569472548/?utm_source=rss"/>
      <updated>2026-11-13T11:43:00Z</updated>
      <id>https://timomeh.de/shorts/1794569472548</id>
      <content type="html">&lt;p&gt;My weight loss has been plateauing for the past 6 weeks or so. Well, that’s not entirely accurate, I’ve still lost around 2 kg during that time. But it’s still way too slow. I can’t tell whether it’s water retention, muscle mass, or if I’m simply not making any progress.&lt;/p&gt;
&lt;p&gt;Plateaus happen every now and then. Weight loss isn’t linear, and this is my 4th plateau so far. But it’s by far the longest one, and I’m just waiting for the day the scale finally starts moving again. Usually, there’s a sudden whoosh, and my weight drops by several kilos over just a few days.&lt;/p&gt;
&lt;p&gt;I still feel like &lt;em&gt;something&lt;/em&gt; is happening. My clothes feel looser, and I think my waist has actually continued to decrease over the last weeks. But measuring that accurately is difficult. I never know whether I pulled the tape tighter or left it looser last time, or how I was breathing when I measured. Seeing a number on a scale is just so much easier. And I’m just waiting for it to finally go down again. I’m not cheating, still have the same deficit, so I know it has to go down eventually.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Torn Between Speaking Up and Staying Silent</title>
      <link href="https://timomeh.de/posts/torn-between-speaking-up-and-staying-silent/?utm_source=rss"/>
      <updated>2026-11-12T17:00:00Z</updated>
      <id>https://timomeh.de/posts/torn-between-speaking-up-and-staying-silent</id>
      <content type="html">
&lt;p&gt;For the past few months, I have been more silent. I was less present online, and generally spent less time in front of a computer. I feel relaxed and at peace with myself. It has been a very good time, and still is. I needed that time to find myself.&lt;/p&gt;
&lt;p&gt;Now that I feel at ease with myself, I want to share my thoughts and opinions online again more often. I want to write more, participate more in discussions, and generally find my voice and have a voice.&lt;/p&gt;
&lt;p&gt;But at the same time, I’m not sure if I actually want to.&lt;/p&gt;

&lt;p&gt;I’m more and more disappointed with the “software engineering community” online. I’ve been part of this community for years, I’ve met lots of great people, I’ve learned a lot from them, found inspiration, and I am who I am because people in this community had shaped me with good opinions.&lt;/p&gt;
&lt;p&gt;Lately, though, I feel ashamed to be part of this bubble.&lt;/p&gt;
&lt;p&gt;There is so much asshole behavior on social media. Many of them are strangers, but what’s disappointing is that I see it from people I used to think are good people, have good opinions, similar opinions to me, who spread joy, or at least who I thought were generally nice and pleasant people, even if I didn’t knew them personally.&lt;/p&gt;
&lt;p&gt;People in this bubble are behaving like absolute assholes online. Slandering others, making assumptions, twisting words, being super hostile, seemingly forgetting that &lt;a href=&#34;https://x.com/markimbriaco/status/2118204357212786994&#34;&gt;there are other humans on the other side of usernames&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Of course there has always been some drama and odd discussions, but I can’t see the normal and nice side of this community anymore. The negative hateful side is so overwhelming that the other side has disappeared. I don’t recognize that community anymore, and I don’t want to be associated with that behavior.&lt;/p&gt;
&lt;p&gt;What bothers me particularly is how often these discussions don’t even happen &lt;em&gt;with&lt;/em&gt; the people involved. Instead of talking directly to someone about something they said, people talk &lt;em&gt;about them&lt;/em&gt; with others. It happens in quote posts, separate threads, as replies to someone else’s opinion about the original opinion. Rather than asking the author for clarification or more context, they ask someone else what their take on it is. And suddenly, an entire discussion unfolds around wrong assumptions and lopsided opinions.&lt;/p&gt;
&lt;p&gt;I find that cowardly. And I say that knowing that I’ve done it myself in the past. That I myself quote-tweeted something or discussed it in other threads, because I was too much of a coward to talk to the original poster. Looking back, I’m not particularly proud of it.&lt;/p&gt;
&lt;p&gt;Social media ruined us. It gave us all the wrong tools to be a good society.&lt;/p&gt;
&lt;p&gt;And I know: “But not everybody! ☝️” Of course it’s not everybody. I know too many genuinely wonderful people to believe that. There’s always a “not always” and “not everybody”. It doesn’t change my disappointment with what feels like an increasingly visible trend.&lt;/p&gt;
&lt;p&gt;Which brings me back to my dilemma.&lt;/p&gt;
&lt;p&gt;Part of me wants to be more present online precisely &lt;em&gt;because&lt;/em&gt; of all this. I want to share my thoughts and contribute something positive, and to be a small counterpoint to all the hostility and lopsided opinions. I don’t want to leave it to the loudest and most aggressive voices.&lt;/p&gt;
&lt;p&gt;But another part of me wants nothing to do with it. Because being visible online also means exposing myself to the very behavior that I’m sick of. I had too many idiotic discussions from people who maybe just wanted to ragebait, or troll, or are just assholes. And right now, after having spent some time away from all of this, I’m not very eager to invite that back into my life.&lt;/p&gt;
&lt;p&gt;And frankly, I don’t even know what being a good counterpoint would look like.&lt;/p&gt;
&lt;p&gt;Calling people out publicly for how they’re behaving online doesn’t feel right either. Putting someone on the spot and making them the subject of yet another discussion would just contribute to the same problem.&lt;/p&gt;
&lt;p&gt;Whenever I see some idiotic argument online, I often find myself thinking: &lt;em&gt;Why do you even care so much?&lt;/em&gt; People have incredibly strong opinions about situations even though they have absolutely no stake in it. They’re not involved, they’re not affected, and often simply don’t have the full context. Yet they feel this need to weigh in and spread hate. It feels like they’re more invested in the argument itself, rather than in whatever they’re arguing about.&lt;/p&gt;
&lt;p&gt;I catch myself wanting to jump into these dumb arguments. To offer a different perspective, push back against the hostility, ask them if their employer knows how much of an asshole they are online, or simply remind them that they’re talking about actual human beings.&lt;/p&gt;
&lt;p&gt;But before I take part in that discussion, when I think about it for a moment, I realize that I often don’t care that much about the actual topic either. I care about how people are discussing it. I care about the wrong assumptions, their blind spots, how fucking hostile they’re behaving, and their lack of any respect towards people. But I don’t really care about the argument itself.&lt;/p&gt;
&lt;p&gt;So, what would I actually contribute by joining in?&lt;/p&gt;
&lt;p&gt;Would I make things better, or would I just become another person taking part in a discussion they don’t really have a stake in? Isn’t that somehow exactly what frustrates me about other people?&lt;/p&gt;
&lt;p&gt;I don’t know. Like, genuinely, I don’t know.&lt;/p&gt;
&lt;p&gt;I realize I can also just write about things I enjoy, and share what I’m working on, and engage with people who make this community worth being part of in the first place. I don’t need to respond to toxicity to be a positive presence online.&lt;/p&gt;
&lt;p&gt;But… it won’t make the disappointment go away. I will still think about it, and I will feel an urge that I should raise my voice against the toxicity. I more often feel ashamed to be part of this community, but I will also feel ashamed that I hadn’t raised my voice.&lt;/p&gt;
&lt;p&gt;Maybe spending less time online has simply made me more sensitive to all of this. Maybe I’ve changed, too. Maybe it would help all of us to spend less time on social media.&lt;/p&gt;
&lt;p&gt;There’s no conclusion to this. No grandiose revelation while I’m writing these lines. I’m just disappointed in what I’m observing, and torn between wanting to be more involved and wanting to keep my distance.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, November 12, 2026 at 12:09 AM UTC</title>
      <link href="https://timomeh.de/shorts/1794441685545/?utm_source=rss"/>
      <updated>2026-11-12T00:09:00Z</updated>
      <id>https://timomeh.de/shorts/1794441685545</id>
      <content type="html">&lt;p&gt;There’s something very meditative and relaxing about refactoring large parts of a codebase by hand. The repetitive hand movements of looking up code, cutting, pasting, typing, changing, cleaning up, and tackling the next file. Piece by piece, file by file, until everything is done. With some nice house grooves playing in the background.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>No compilers. No bundlers. Just a generator.</title>
      <link href="https://timomeh.de/posts/no-compilers-no-bundlers-just-a-generator/?utm_source=rss"/>
      <updated>2026-11-11T14:39:00Z</updated>
      <id>https://timomeh.de/posts/no-compilers-no-bundlers-just-a-generator</id>
      <content type="html">
&lt;p&gt;This site is now a static site using &lt;a href=&#34;https://www.11ty.dev&#34;&gt;Eleventy&lt;/a&gt;, meaning it’s just a bunch of generated HTML, CSS and JavaScript files. It used to be a server-rendered Next.js app. Now, there’s no TypeScript, no PostCSS, no module bundler, no frameworks, and no server. The mean response time went down from 1.7 seconds to 130ms. And yet, when I fix a typo or publish a post, it’s updated pretty much instantly, as if it were a server-rendered app.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;And rewriting it was so much fun!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Tinkering was fun until it wasn’t anymore&lt;/h2&gt;
&lt;p&gt;I was getting sick of taming dependencies, especially with the increasing amount of CVEs over the last months. Next.js updates were constantly breaking something. To make the site fast, I had to use experimental features, which of course kept breaking with updates. But not updating meant I couldn’t apply new performance improvements. Not mentioning that not updating sometimes meant dealing with security issues. And despite using all the performance optimization tricks, the site still felt slow. Because it was slow!&lt;/p&gt;
&lt;p&gt;I spent more and more time configuring tools, updating dependencies, and fixing things that broke, instead of actually doing some fun tinkering. At some point, it just wasn’t fun anymore.&lt;/p&gt;
&lt;p&gt;So I decided to rewrite it with Eleventy, turn it into a static site that doesn’t need its own server, and get rid of pretty much everything I didn’t actually need and didn’t enjoy.&lt;/p&gt;
&lt;p&gt;I’m now writing and shipping vanilla CSS and JavaScript. No compilation, no bundling, no PostCSS. I simply ship a bunch of individual CSS files and JavaScript files, just how I write them locally as well. I don’t even minify them, because it’s fine without minifying.&lt;/p&gt;
&lt;p&gt;The little progressive enhancements I have are totally fine to maintain in plain JavaScript. I’m using &lt;a href=&#34;https://swup.js.org/&#34;&gt;swup&lt;/a&gt; for seamless page transitions, and Eleventy’s image plugin for image optimization and dynamic OpenGraph images.&lt;/p&gt;
&lt;p&gt;I didn’t even install a linter or formatter. My editor already does linting and formatting automatically, so why even bother?&lt;/p&gt;
&lt;p&gt;It’s a breath of fresh air to not care about configuring lots of different tools, installing dozens of dependencies, or figuring out which experimental feature broke this time. Instead, I can just write code.&lt;/p&gt;
&lt;h2&gt;But what about instant deployments?&lt;/h2&gt;
&lt;p&gt;One thing I really liked about the old site, and was a hard requirement for me, was how quickly I could publish changes. When I fixed a typo or published a post, it took just a few seconds for the changes to be live. I didn’t want to wait minutes for a new build just because I fixed a typo.&lt;/p&gt;
&lt;p&gt;And I thought that wasn’t really possible with a static site generator. After all, the entire point is to generate the whole site without a server ahead of time, right?&lt;/p&gt;
&lt;p&gt;Turns out, it works just as well.&lt;/p&gt;
&lt;p&gt;I have a small stateful standalone service running that uses &lt;a href=&#34;https://github.com/adnanh/webhook&#34;&gt;webhook&lt;/a&gt; to receive a GitHub webhook and call a bash script. The script pulls the latest content repo, runs an Eleventy build, and uploads the static site to a self-hosted &lt;a href=&#34;https://codeberg.org/git-pages/git-pages&#34;&gt;git-pages&lt;/a&gt; instance.&lt;/p&gt;
&lt;p&gt;I’ve added a small cache to Eleventy so it only rebuilds changed files, and git-pages only uploads files that actually changed. There’s no complicated deployment pipeline, no ephemeral CI/CD that needs to spin up and download some caches, just a stateful service and a bash script.&lt;/p&gt;
&lt;p&gt;By the time I click “save” in my CMS (or push to git) and switch tabs to see the changes on the site, it’s already finished deploying.&lt;/p&gt;
&lt;p&gt;So I still get the same near-instant publishing experience I had before, just without a server-rendered application running all the time.&lt;/p&gt;
&lt;h2&gt;Everything is replaceable&lt;/h2&gt;
&lt;p&gt;One decision from the old site that really paid off was keeping all the content as Markdown files with MDX in a separate git repo. When I originally made that decision, my intention was to be able to completely rewrite the site without having to change any of the content files.&lt;/p&gt;
&lt;p&gt;And that’s exactly what happened. I’m still using the exact same Markdown files, in the same repo, without having to change the source content at all.&lt;/p&gt;
&lt;p&gt;And still, visually, you couldn’t even tell that something had changed, even though all the code and the whole architecture had changed.&lt;/p&gt;
&lt;p&gt;I’m also still using &lt;a href=&#34;https://keystatic.com/&#34;&gt;Keystatic&lt;/a&gt; as my CMS, which I now deploy as a small self-contained service. But the CMS isn’t a requirement for the site to work. Neither is my deployment setup.&lt;/p&gt;
&lt;p&gt;If I wanted to change how the site is built and deployed, I could just delete the &lt;code&gt;deployer/&lt;/code&gt; folder and not touch anything else. I could have a cron running every minute that pulls changes and rebuilds the site if it needs to, without a webhook. Everything else would work exactly the same way.&lt;/p&gt;
&lt;p&gt;If I didn’t want to use a CMS anymore, I could delete the &lt;code&gt;cms/&lt;/code&gt; folder. I could still write content in a text editor and push changes to git.&lt;/p&gt;
&lt;p&gt;That’s something I really like about the new setup. Everything is just a small, independent piece that I can replace or remove without having to rewrite everything else.&lt;/p&gt;
&lt;h2&gt;For this, simple is enough&lt;/h2&gt;
&lt;p&gt;Don’t get me wrong, I still like frameworks and all the tooling that comes with them.&lt;/p&gt;
&lt;p&gt;For larger production apps, I’d of course still choose a web framework. I’d still use Tailwind CSS because I like it, and I prefer writing reusable components over reusable classes. I’d still use TypeScript if I had to, though lately I’ve been enjoying &lt;a href=&#34;https://www.phoenixframework.org/&#34;&gt;Phoenix&lt;/a&gt; and &lt;a href=&#34;https://ash-hq.org/&#34;&gt;Ash&lt;/a&gt; a lot because they make it so easy to write large, high-quality systems.&lt;/p&gt;
&lt;p&gt;I’m not saying that &lt;em&gt;all&lt;/em&gt; compilers, bundlers, frameworks, or TypeScript are inherently bad. They can be worth it.&lt;/p&gt;
&lt;p&gt;But this is a blog. It doesn’t need all of that, obviously.&lt;/p&gt;
&lt;p&gt;And I know my previous codebase was intentionally overengineered as fuck. Because overengineering was part of the fun. I wrote it into its readme, so curious people who want to learn don’t think all of this is necessary for a blog. I enjoyed experimenting with new tools, learning techniques that I’d also apply to larger production apps, and building something much more complicated that it needed to be. Until I didn’t enjoy it anymore.&lt;/p&gt;
&lt;p&gt;Now I’m having fun writing code again, without constantly thinking about the dozens of dependencies around it. The site is faster, publishing is just as quick as before, and there are fewer things that can break.&lt;/p&gt;
&lt;p&gt;No compilers. No bundlers. Just a generator. And for this site, that’s more than enough.&lt;/p&gt;
&lt;p&gt;…and last but not least, to address the elephant in the room: Rewriting a blog is, like always, a great motivator to write more content again.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, September 25, 2026 at 10:08 AM UTC</title>
      <link href="https://timomeh.de/shorts/1790330921323/?utm_source=rss"/>
      <updated>2026-09-25T10:08:00Z</updated>
      <id>https://timomeh.de/shorts/1790330921323</id>
      <content type="html">&lt;p&gt;If you’re a software engineer and you’re scrolling Twitter, HN, Reddit, or Tech YouTube all day, or enduring more than 3 seconds of DHH screaming bullshit on a stage, you’re hurting yourself and your abilities.&lt;br&gt;
&lt;br&gt;
Maybe it’s then time to stop.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, September 20, 2026 at 9:32 PM UTC</title>
      <link href="https://timomeh.de/shorts/1789939941776/?utm_source=rss"/>
      <updated>2026-09-20T21:32:00Z</updated>
      <id>https://timomeh.de/shorts/1789939941776</id>
      <content type="html">&lt;p&gt;I reached my 100kg milestone today. Stepped on the scale and saw 99.4kg. Two digits before the comma. It’s a bit surreal.&lt;/p&gt;
&lt;p&gt;Every lost kilogram is now much more noticable.&lt;/p&gt;
&lt;p&gt;Next stop: 95kg, at which I’m officially not obese anymore.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Modeling Actions as Resources</title>
      <link href="https://timomeh.de/posts/modeling-actions-as-resources/?utm_source=rss"/>
      <updated>2026-09-19T15:30:00Z</updated>
      <id>https://timomeh.de/posts/modeling-actions-as-resources</id>
      <content type="html">
&lt;p&gt;One idea I’ve internalized while designing APIs is that actions don’t always have to look like actions. Many actions are better off being actual resources.&lt;/p&gt;
&lt;p&gt;It feels intuitive and logical to define endpoints like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;POST /subscriptions/:id/cancel
POST /invoices/:id/pay
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It’s straightforward to build, easy for clients to use, and by itself it’s not inherently wrong. But again and again, I’ve noticed its limitations.&lt;/p&gt;

&lt;h2&gt;When an action becomes a resource&lt;/h2&gt;
&lt;p&gt;When you cancel a subscription, there’s a reason. Easy: just add a &lt;code&gt;reason&lt;/code&gt; field to the POST body. But a user can also change their mind and withdraw the cancellation, keep the subscription for a few months, and then cancel again. When you store &lt;code&gt;status: &#34;canceled&#34;&lt;/code&gt; and &lt;code&gt;reason: &#34;too expensive&#34;&lt;/code&gt; in your subscriptions database table, and the user withdraws the cancellation… what do you do with this information? Do you just throw it away? It’s valuable information!&lt;/p&gt;
&lt;p&gt;It’s also useful to be able to list all cancellation attempts of a user. It’s good information for someone like a customer support agent to see the user’s history during a support inquiry. “Listing cancellations” sounds a lot like a resource.&lt;/p&gt;
&lt;p&gt;It’s similar for paying an invoice: a payment can fail, it’s more like a payment attempt. Also, storing this information in the parent resource is kinda… ugly. It turns into situations like these:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &#34;type&#34;: &#34;invoice&#34;,
  &#34;status&#34;: &#34;payment_failed&#34;,
  &#34;failure_reason&#34;: &#34;insufficient funds&#34;,
  &#34;payment_method&#34;: { /* ... */ }
}

// or

{
  &#34;type&#34;: &#34;invoice&#34;,
  &#34;status&#34;: &#34;paid&#34;,
  &#34;failure_reason&#34;: null,
  &#34;payment_method&#34;: { /* ... */ }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It often results in fields that are nullable (like &lt;code&gt;failure_reason&lt;/code&gt; in the example above), but are never null when the status is &lt;code&gt;&#34;payment_failed&#34;&lt;/code&gt;. It’s a weird API contract: it’s not self-explanatory and you have to explain the behavior to an API consumer. The API is mashing two different concepts into a single resource.&lt;/p&gt;
&lt;p&gt;So instead of modeling these actions as verbs attached to a resource, I now almost always reach for modeling the action as a proper resource:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;POST /subscription_cancellations
POST /payment_attempts
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All action-related properties are bundled inside one resource, no weird nullables. And most importantly, you don’t lose the history in your database. You can just list them all:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;GET /subscription_cancellations?subscription=sub_123
GET /subscription_cancellations?user=usr_xyz
GET /payment_attempts?invoice=inv_000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also usually model them as top-level resources, and not nested resources like &lt;code&gt;/subscriptions/:id/cancellations&lt;/code&gt;. It might look handy at first sight, but having it as a top-level resource allows you to list &lt;em&gt;all&lt;/em&gt; cancellations, or add more complex filters as URL parameters that aren’t possible as a subresource.&lt;/p&gt;
&lt;h2&gt;When it shouldn’t&lt;/h2&gt;
&lt;p&gt;A few times in this post, I’ve emphasized that this pattern is helpful &lt;em&gt;almost always&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Last week I added a friend request feature to an API, so two users can connect with each other and become friends:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;send a user a friend request:
POST /friend_requests { sender, recipient }

to respond to the friend request:
POST /friend_requests/:id/accept
POST /friend_requests/:id/ignore
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After designing &lt;em&gt;everything&lt;/em&gt; in the API as resources, it kinda hurt to define these action endpoints. But what’s the alternative?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;POST /friend_request_responses&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;Accepting or ignoring a friend request isn’t a useful independent identity by itself. You usually can’t decline a friend request, and then a bit later accept it again. The user would instead send a new friend request, and not update an existing one.&lt;/p&gt;
&lt;p&gt;In my mind, I ask myself “do I want to refer to this action later?” If so, I model it as a resource.&lt;/p&gt;
&lt;p&gt;It &lt;em&gt;could&lt;/em&gt; also be:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;PATCH /friend_requests/:id

{&#34;response&#34;: &#34;accept&#34;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, I don’t like an API surface where you change a field and it kicks off some side effects. Accepting a friend request will create a new friendship resource between both users, it will send out a notification… that’s more than simply updating some data.&lt;/p&gt;
&lt;p&gt;In comparison, when a user updates their profile:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;PATCH /user_profiles/me

{&#34;display_name&#34;: &#34;Robinson Crusoe&#34;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;…that just changes the name that’s shown in the app. It doesn’t kick off a chain of user-facing side-effects.&lt;/p&gt;
&lt;h2&gt;Resources as a debugging tool&lt;/h2&gt;
&lt;p&gt;As I mentioned above, having resources for these actions means that we can view their history. That’s not only useful for support folks, but also for us developers.&lt;/p&gt;
&lt;p&gt;You can use it to trace events in your system, see how things progressed, and debug without painfully going through logs or by reading the code and guessing how a bug might have happened. You can store outcomes of a long-running background action, error messages, retry attempts… the stuff you would usually just log so you can debug errors when they might happen.&lt;/p&gt;
&lt;p&gt;And you can turn complex processes, where one action fans out into multiple resources, into straightforward logic. For example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A user publishes a post.&lt;/li&gt;
&lt;li&gt;The system creates a Notification resource for each friend (or subscriber).&lt;/li&gt;
&lt;li&gt;For each Notification, a Push Notification is created. A user can have multiple devices, so each device needs its own Push Notification.&lt;/li&gt;
&lt;li&gt;When a Push Notification is created, it’s sent to the device. The outcome and potential error message from a push notification service is stored on the Push Notification resource.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now, when a user complains that they didn’t receive a notification, you can go into the database and see what’s up: was a Notification created? How many devices are registered for the user? Was a Push Notification created for each device? Was there an error?&lt;/p&gt;
&lt;p&gt;And it doesn’t stop there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;you can now send any arbitrary Notification to all user’s devices, simply by creating a Notification resource.&lt;/li&gt;
&lt;li&gt;you can send a Notification to a single device, by creating the Push Notification resource directly. Create a silent data-only Push Notification to check if the device still has the app installed.&lt;/li&gt;
&lt;li&gt;you now have a Notification resource, which makes it easy to add a &lt;code&gt;GET /notifications&lt;/code&gt; endpoint and add a Notification Center into the app.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Is this premature optimization?&lt;/h2&gt;
&lt;p&gt;Are actions as resources premature optimization? Saying “it might be helpful in the future” sounds a lot like YAGNI&lt;sup id=&#34;fn-ref-modeling-actions-as-resources-1&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/modeling-actions-as-resources/#fn-modeling-actions-as-resources-1&#34; aria-label=&#34;Footnote [1]&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt;. So, should you first build the action endpoint, and later turn it into a resource?&lt;/p&gt;
&lt;p&gt;I don’t think so. It isn’t speculative future-proofing when the action already has domain data that I care about: The cancellation reason already exists. The payment failure already exists. Putting it into a resource decides where this information belongs, not whether it’s needed.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;These days, my rule of thumb is simple: does the action have information on its own? Does it have a lifecycle? Is it something I want to inspect later? Then it’s a resource. If it’s just a state transition, I’ve learned not to force it.&lt;/p&gt;
&lt;p&gt;It’s a small shift in how I model APIs, and it has consistently made the systems behind them easier to understand, extend, and debug.&lt;/p&gt;
&lt;p&gt;Anyway, time for a walk.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;1&#34;&gt;&lt;li id=&#34;fn-modeling-actions-as-resources-1&#34;&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it&#34;&gt;You aren’t gonna need it&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/posts/modeling-actions-as-resources/#fn-ref-modeling-actions-as-resources-1&#34; aria-label=&#34;Back to reference 1&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, July 24, 2026 at 7:29 PM UTC</title>
      <link href="https://timomeh.de/shorts/1784921403500/?utm_source=rss"/>
      <updated>2026-07-24T19:29:00Z</updated>
      <id>https://timomeh.de/shorts/1784921403500</id>
      <content type="html">&lt;p&gt;If you’re not using Sublime Text (UNREGISTERED) as your random collection of notes and scratchpad to draft longer messages then what are you even doing&lt;/p&gt;
&lt;p&gt;And when your computer dies one day, your 4000 lines of unsaved SQL queries, half-written emails and random JSON blobs are still right there waiting for you&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Your body won&#39;t take your muscles away instead of your fat</title>
      <link href="https://timomeh.de/posts/your-body-wont-take-your-muscles-away-instead-of-your-fat/?utm_source=rss"/>
      <updated>2026-07-19T14:54:00Z</updated>
      <id>https://timomeh.de/posts/your-body-wont-take-your-muscles-away-instead-of-your-fat</id>
      <content type="html">
&lt;p&gt;I’m currently on a weight loss journey—I’ll tell more about that in a future post. But I just heard a statement once again that confused me for a long time:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When you’re losing weight, you need to be careful that your body doesn’t burn your muscles instead of your fat.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is very misleading and oversimplified. It can sound as though you’ll stay fat while your body consumes only your muscles. It sounds daunting and makes it seem more difficult. In reality, your body does not choose exclusively between burning fat and losing muscle.&lt;/p&gt;

&lt;p&gt;Weight loss usually consists of body fat together with some fat-free mass (water, glycogen, muscle, etc). A frequently cited rule of thumb is that roughly 75% of weight loss is fat and 25% is this other fat-free mass. This is only a very rough average because the actual proportions vary between people and diets.&lt;/p&gt;
&lt;p&gt;Another common rule says that saving 7,700 calories means losing roughly 1 kg of body fat. In reality, if you have a deficit of 1,100 calories per day, you’ll not lose exactly 1 kg after a week, and you won’t see this progress happening linear, day to day, on your scale. Weight loss is not linear, and short-term changes in body water can change what you see on your scale. However over many weeks and months, I found this to be a reliable estimate, even if it’s not an exact prediction. It’s very rewarding to see this relation between cause (calorie deficit) and effect (losing weight that closely matches the calorie deficit), so I keep doing it.&lt;/p&gt;
&lt;p&gt;Over weeks and months, for people with excess body fat, a sustained healthy calorie deficit will cause weight loss largely from body fat. It’s true that there’s also some weight loss from fat-free mass, but it will not cause losing drastically less fat and instead lose too much muscle mass.&lt;/p&gt;
&lt;p&gt;Whenever I started dieting, I was told that I had to do strength training or else I would lose muscle instead of fat. So I always tried to combine my diet with strength training, but doing both was too much for me. It’s exhausting, was difficult to fit into my daily life, and often caused me to abandon the diet altogether.&lt;/p&gt;
&lt;p&gt;That rough 75/25 ratio can change slightly depending on what you’re doing. Strength training can have a positive effect, and even just having more protein without strength training can have a positive effect, but both are not required for fat loss. A sustained calorie deficit without strength training will still result in substantial fat loss.&lt;sup id=&#34;fn-ref-your-body-wont-take-your-muscles-away-instead-of-your-fat-1&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/your-body-wont-take-your-muscles-away-instead-of-your-fat/#fn-your-body-wont-take-your-muscles-away-instead-of-your-fat-1&#34; aria-label=&#34;Footnote [1]&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;In my current diet, I’m not doing strength training. Instead, I have reduced my overall calorie intake while making protein a larger part of my diet. I do this partly because protein may help me to retain more fat-free mass, but mostly because it helps me feeling full for longer. I also continue walking 8,000-10,000 steps each day. That’s sustainable for me and results in losing 3-4 kg per month, and I’ve lost 18.6 kg so far.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;1&#34;&gt;&lt;li id=&#34;fn-your-body-wont-take-your-muscles-away-instead-of-your-fat-1&#34;&gt;Assuming a person with excess body fat. I’m writing this disclaimer because people and bodies are different, so absolute statements are difficult. But with excess body fat and a healthy diet with ~750 calories deficit per day, you will lose fat. &lt;a href=&#34;https://timomeh.de/posts/your-body-wont-take-your-muscles-away-instead-of-your-fat/#fn-ref-your-body-wont-take-your-muscles-away-instead-of-your-fat-1&#34; aria-label=&#34;Back to reference 1&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Freaking YouTube TV</title>
      <link href="https://timomeh.de/posts/freaking-youtube-tv/?utm_source=rss"/>
      <updated>2026-07-08T21:04:00Z</updated>
      <id>https://timomeh.de/posts/freaking-youtube-tv</id>
      <content type="html">&lt;p&gt;There’s a new bug in the YouTube TV app for Google TV that is so utterly stupid that I need to rant about it.&lt;/p&gt;
&lt;p&gt;When you play a video and press back on the remote, it should jump back 10 seconds. Well, now it now jumps back 10 seconds… and then immediately skips forwards 10 seconds to where you were before. So pressing back is basically doing nothing anymore, other than glitching a bit. You have to press back multiple times, or pause first and then press back.&lt;/p&gt;
&lt;p&gt;The same thing also happens when you press forwards: It skips forwards 10 seconds, and then jumps back to where you were before.&lt;/p&gt;
&lt;p&gt;This is already pretty annoying. But now comes the best part:&lt;/p&gt;
&lt;p&gt;There’s this “Jump ahead” YouTube Premium feature that entirely skips a commonly skipped segment. You press forwards once, it knows that many people skipped this segment as well, and then jumps ahead to where other people usually jumped to. It basically allows you to skip sponsor segments quickly. So you press forwards once on the remote, it skips to the end of the sponsor segment, and you can immediately continue. That’s a really great feature! The UX is a bit &lt;em&gt;meh&lt;/em&gt; but in theory it’s a great idea.&lt;/p&gt;
&lt;p&gt;But now, with this freaking new bug, it skips the sponsor segment, then glitches back, and then thinks that you didn’t want to skip the whole segment (because it looks like you jumped back), so it removes this skipping point so moving forwards won’t skip the whole segment again. Which means you can’t skip the segment again. So this whole freaking feature is now not working anymore.&lt;/p&gt;
&lt;p&gt;There are some UX lessons here about these “magic features” that sometimes appear and disappear that I might want to write about in the future, but for now I only care about &lt;strong&gt;how the actual fuck it’s possible that the &lt;em&gt;YOUTUBE APP&lt;/em&gt;—the official app for THE SECOND MOST VISITED WEBSITE ON THE WORLD—developed by &lt;em&gt;FREAKING GOOGLE&lt;/em&gt; is constantly shipping broken crap that’s noticeable within seconds of using a core feature.&lt;/strong&gt; When did software turn so shit?&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Build the Goddamn Product</title>
      <link href="https://timomeh.de/posts/build-the-goddamn-product/?utm_source=rss"/>
      <updated>2026-07-02T13:13:00Z</updated>
      <id>https://timomeh.de/posts/build-the-goddamn-product</id>
      <content type="html">
&lt;p&gt;The number of times I &lt;em&gt;still&lt;/em&gt; see “Loop Engineering” popping up in any of my feeds is truly upsetting.&lt;/p&gt;
&lt;p&gt;The amount of effort you spend on meta-engineering is an illusion of a return on investment that will allow you to build the product better, faster and with greater ease.&lt;/p&gt;
&lt;p&gt;It’s the same as building your own framework, or framework-in-a-framework, because you think that all other frameworks out there are slowing down your ability to build the actual product.&lt;/p&gt;

&lt;p&gt;While you’re building your bespoke framework, you’re not building the product. You’re not using it, you’re not feeling whether the idea you had in your mind is actually working that well. You’re not shipping anything, and you don’t get user feedback.&lt;/p&gt;
&lt;p&gt;“Question your requirements, delete unnecessary parts of the process, optimize them, automate last.” That’s roughly an Elon Musk quote. I want to emphasize that I despise Elon Musk and I wish it wasn’t his quote. It’s very fitting to software engineering cycles as well. I cannot fathom how we evolved backwards into believing that we should focus on the automation first.&lt;/p&gt;
&lt;p&gt;You’re building your own illusion of future productivity. But just like building your own framework, it won’t work quite like you imagined it would work (who would’ve thought!), and you continue to tinker with your custom framework instead of building the actual product. You’re adding unnecessary requirements with unnecessary parts and telling yourself it will pay off. You will hit the same inevitable experiences: the features you add to the product don’t feel right, you need to iterate, but iterating takes the same amount of time as before, with the addition that now you’re hitting snags in your own bespoke framework (or automation), so you spend time tinkering with it instead of iterating on the actual feature. It’s a downward spiral and you will feel worse.&lt;/p&gt;
&lt;p&gt;It will only take a few months and the next “groundbreaking” way to work with AI is shoved down your throat. Anxiety will hit you, you’ll abandon your loops, and jump onto the next hot thing.&lt;/p&gt;
&lt;p&gt;If tinkering with these things is fun, then tinker with them. But keep in mind that you’re playing around. You’re adding something that you don’t really need, and you’re not building the goddamn product.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Saturday, May 30, 2026 at 11:55 AM UTC</title>
      <link href="https://timomeh.de/shorts/1780142112884/?utm_source=rss"/>
      <updated>2026-05-30T11:55:12Z</updated>
      <id>https://timomeh.de/shorts/1780142112884</id>
      <content type="html">&lt;p&gt;Trying to get back into latte art and doing something that’s not just a simple heart!&lt;/p&gt;
&lt;p&gt;A feather is still pretty close to a heart though.&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/5iyuhDpg5U-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Software Engineering won&#39;t be over</title>
      <link href="https://timomeh.de/posts/software-engineering-wont-be-over/?utm_source=rss"/>
      <updated>2026-05-25T10:55:00Z</updated>
      <id>https://timomeh.de/posts/software-engineering-wont-be-over</id>
      <content type="html">
&lt;div class=&#34;lead&#34;&gt;&lt;p&gt;Every few months, software engineering will be over in a few months again. It can’t be, but for reasons you might not expect.&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;When coming back to work in the beginning of 2026, organizations everywhere were going crazy. So many people, including lots of upper management, had used the winter break to build software with AI and felt that software engineering was over. They had experienced it first-hand. Everything had changed, because look at what they built! Why couldn’t work feel the same?&lt;/p&gt;
&lt;p&gt;Their experiences were real, but they happened in isolation. Building software by yourself is &lt;strong&gt;orders of magnitude easier&lt;/strong&gt; than building it in a team, or across multiple teams. The hard problem at work was &lt;strong&gt;never just about writing code.&lt;/strong&gt; Their experiences didn’t reflect the challenges of the organization they worked in.&lt;/p&gt;

&lt;h2&gt;Organizations divide ownership&lt;/h2&gt;
&lt;p&gt;Organizations aren’t challenging simply because their structure is wrong and they need to fix it. Their structure might be wrong, but every structure is wrong for someone. If you were ever part of a reorg, you probably saw that some people thought it solved the problem, while others thought it made everything worse.&lt;/p&gt;
&lt;p&gt;Still, organizations have to structure themselves somehow. Not everyone can know everything and work on everything. So they divide the work into domains, with a team for each domain. Over time, each team builds deep knowledge around its domain and develops a vision for where it should go.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This is good agile software development:&lt;/strong&gt; people take ownership, plan, build, adjust, and learn from what happens. &lt;strong&gt;But those domains are never fully isolated.&lt;/strong&gt; They overlap or depend on each other, and they keep changing as the product changes.&lt;/p&gt;
&lt;h2&gt;The tension in ownership&lt;/h2&gt;
&lt;p&gt;This ownership model that produces great results is also the main reason why organizational structures are so difficult. It’s hard to give teams a lot of autonomy to materialize their own vision, while also making sure that they don’t create issues for other teams and largely follow the grand vision of the company.&lt;/p&gt;
&lt;p&gt;These are the two values &lt;strong&gt;autonomy&lt;/strong&gt; and &lt;strong&gt;alignment&lt;/strong&gt;. We need both values not simply because they are good values to have, but because each one solves a failure mode that the other one creates:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pure autonomy without alignment&lt;/strong&gt; results in teams that move fast in incompatible directions. You ship a lot, but it doesn’t add up to anything coherent. Eventually you accumulate so much inconsistency that the organization slows down anyway: integration nightmares, bad user experiences, duplicated work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pure alignment without autonomy&lt;/strong&gt; results in an organization that knows exactly where to go but can barely move. Every decision needs sign-off, every team is blocked waiting for consensus. And after waiting for so long before shipping anything, you learn from your users that you shipped the wrong thing.&lt;/p&gt;
&lt;p&gt;Autonomy and alignment are in tension, but &lt;strong&gt;this tension is important, even if it feels frustrating.&lt;/strong&gt; It feels frustrating because the symptoms look like problems we need to fix: the meeting that should have been a Slack message, the RFC nobody reads, the three different date pickers that all don’t work for what you need. Some people ask for more process, trying to create alignment. Others want to strip process away, trying to restore autonomy.&lt;/p&gt;
&lt;p&gt;The tension never goes away. It cannot go away. It just moves closer to one of the failure modes.&lt;/p&gt;
&lt;h2&gt;Tension needs to be felt&lt;/h2&gt;
&lt;p&gt;It’s tempting to use AI to skip the tension that we feel. Instead of talking to another team, we can describe their boundaries to an agent: what it can touch, what it should avoid, what vision it should work towards, and generally how it should behave around their domain.&lt;/p&gt;
&lt;p&gt;But when the agent needs a change that crosses these boundaries, &lt;strong&gt;it will not negotiate.&lt;/strong&gt; It doesn’t feel awkward about stepping into someone else’s area. It will work around the boundaries instead. It can easily copy some code from another team, paste it into the area without these boundaries, make the small change there, and move on. &lt;/p&gt;
&lt;p&gt;For a senior engineer, that would feel wrong. The consequences are immediately obvious: now &lt;em&gt;you&lt;/em&gt; have to maintain that new version, the two versions will diverge over time, and bug fixes will eventually be applied to one version but not the other. This feeling is worse than the discomfort of going through the tension with the other team. So you reach out and explain what you need. And somewhere in that conversation, your work shapes their domain, their context shapes your solution, and the organization becomes slightly more aligned than it was before.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The human feeling is important.&lt;/strong&gt; It is what makes you stop before turning tension into a bad decision for the organization. It keeps autonomy and alignment in balance.&lt;/p&gt;
&lt;h2&gt;More autonomy means more alignment&lt;/h2&gt;
&lt;p&gt;This matters even more now, because people who couldn’t write code will now want to use AI to contribute more directly. Designers can make adjustments by themselves, Support can replicate bugs and propose fixes. This is a good thing. The organization benefits from it. A lot of work exists because someone understands a problem, writes it down, throws it over a wall, and waits for an engineering team to look at it during a backlog refinement session. We can now lower that wall.&lt;/p&gt;
&lt;p&gt;As that wall gets lower, more people will cross into domains they do not fully own. It will no longer only be engineers reaching out to you because they want to change something, but now non-engineers will reach out too. Not because they want &lt;em&gt;you&lt;/em&gt; to change something, but because &lt;em&gt;they&lt;/em&gt; want to change it themselves. They want autonomy, and by reaching out to you, they create alignment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;That is good.&lt;/strong&gt; The surprising outcome is that when you give more people the power to act, you force more of these human conversations to happen. It keeps the tension in balance and prevents it from drifting toward one of the failure modes.&lt;/p&gt;
&lt;p&gt;They cannot skip the conversation, because if they want autonomy, they need alignment. But your answer also cannot simply be: “you are not allowed to touch this.”&lt;/p&gt;
&lt;h2&gt;You will become a better engineer&lt;/h2&gt;
&lt;p&gt;Your job as a software engineer will not disappear, and it will not drastically change because of AI. It will change in the same way that every software engineer’s career changes over time: you will become a better engineer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Being a better engineer never meant writing more complex or smarter code.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As a good engineer, you know how to move through other teams’ domains without taking ownership away from them. You explain what you need, but you also listen to what the other team is protecting. You adjust your solution around the context you gather. You create alignment while still letting the other team own the decision.&lt;/p&gt;
&lt;p&gt;And you bring that same mindset when someone reaches into your domain. You do not just block it, and you do not blindly approve it either. You guide that person through your boundary. You share context about what is safe, what is risky, and why. You listen to their needs and adapt your domain when it reduces future friction or makes contribution easier. And you aren’t nitpicky when a solution works, even if it’s not as elegant as the one you would’ve written.&lt;/p&gt;
&lt;p&gt;This is where AI can help you, but not replace you.&lt;/p&gt;
&lt;h2&gt;Use AI with you in the loop&lt;/h2&gt;
&lt;p&gt;Use AI as a tool inside the boundary you’re in. Let it explain code you do not fully understand yet, or a technology your team is adopting. Draft an architecture and let the AI point out risks, compare it to common design patterns, and surface flaws you haven’t seen yet. Use it to understand how the product is used, find answers in analytics data, recognize patterns in user feedback.&lt;/p&gt;
&lt;p&gt;This is good use of AI because &lt;strong&gt;you’re not asking it to replace your ownership.&lt;/strong&gt; You are using a tool to become more capable inside your area, so you can make decisions you can stand behind.&lt;/p&gt;
&lt;p&gt;You hold yourself to that same standard when you’re crossing into someone else’s boundary. AI can help you prepare: turn a vague need into a clear problem statement, help you understand the tradeoffs, and find the right question to ask before sending that ineffective “I have a problem” DM.&lt;/p&gt;
&lt;p&gt;And yes, use AI to be your coding partner whenever you need it. For me, I like to focus on the architecture and plan it out completely. I write the types and interfaces by hand, and let an agent finish the implementation details that are a chore for me: the repetitive plumbing and the stuff I already know how to write but don’t want to. This is what often works for me. I feel that I’m growing as an engineer by sharpening the skills that matter most to me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This is like the human-in-the-loop pattern,&lt;/strong&gt; but applied to a whole organization. People use an agent inside their ownership zone, then talk to other people, who use an agent to process that new information inside their ownership zone. The humans are still at the center, they’re just better equipped now.&lt;/p&gt;
&lt;p&gt;Conversely, don’t use AI to take the humans out of the loop. Don’t use it to work around another team’s approval. Don’t use it to generate arguments you do not fully understand, just to tell another team why they are wrong about a domain they spent a much longer time becoming experts in. I wouldn’t one-shot a system I don’t fully understand. When someone asks me how the thing that I shipped last week works, I need to be able to answer that.&lt;/p&gt;
&lt;p&gt;Ask yourself: after using AI, &lt;strong&gt;am I more prepared to own this decision?&lt;/strong&gt; If the answer is yes, it helped you become a better engineer. If the answer is no, it probably helped you avoid the part of engineering that matters most.&lt;/p&gt;
&lt;p&gt;Use AI to become a better software engineer. Just don’t forget why software engineering at work was hard in the first place.&lt;/p&gt;
&lt;h2&gt;Back to the beginning of 2026&lt;/h2&gt;
&lt;p&gt;The people who came back from their winter break, convinced that software engineering was over, had built something real. Their experience was real: creating and contributing code was now easier for them. It is genuinely easier to build the things that you wouldn’t have built before.&lt;/p&gt;
&lt;p&gt;Their conclusion, though—that software engineering as we know it was over—was wrong.&lt;/p&gt;
&lt;p&gt;They had discovered a tool that gives them more autonomy. More ability to turn an idea into something working, without waiting for someone else to translate it for them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But autonomy was never the whole job.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;AI can help us move faster inside the boundaries we own. It can help us understand the boundaries we cross. But it cannot remove the need for humans to feel tension, negotiate, adapt, and shape a vision. It cannot remove the need for software engineers to do the actual work of software engineering: helping people turn ideas into working systems, without letting those systems fall apart.&lt;/p&gt;
&lt;p&gt;The tools around us will keep changing, as they always have. The boundaries of our domains will keep shifting, as they always have. The tensions in an organization will create discussions, as they always have. What remains is the elegant craft of listening, explaining, discussing, and adjusting so the system holds together a little better than it did yesterday.&lt;/p&gt;
&lt;p&gt;If that’s what you care about, then software engineering was never going to be over for you anyway.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, May 24, 2026 at 9:55 PM UTC</title>
      <link href="https://timomeh.de/shorts/1779662497717/?utm_source=rss"/>
      <updated>2026-05-24T21:55:00Z</updated>
      <id>https://timomeh.de/shorts/1779662497717</id>
      <content type="html">&lt;p&gt;If software development was always just about writing code, then why does &lt;a href=&#34;https://agilemanifesto.org/&#34;&gt;agilemanifesto.org&lt;/a&gt; not mention the word “code” even once?&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, May 15, 2026 at 10:59 PM UTC</title>
      <link href="https://timomeh.de/shorts/1778885978692/?utm_source=rss"/>
      <updated>2026-05-15T22:59:38Z</updated>
      <id>https://timomeh.de/shorts/1778885978692</id>
      <content type="html">&lt;p&gt;Once a year there’s this moment where I’m motivated to post more content, but first I have to clean up a few design sins.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, March 29, 2026 at 1:33 PM UTC</title>
      <link href="https://timomeh.de/shorts/1774791216587/?utm_source=rss"/>
      <updated>2026-03-29T13:33:00Z</updated>
      <id>https://timomeh.de/shorts/1774791216587</id>
      <content type="html">&lt;p&gt;My YouTube Recommendations right now&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/EXjU6if7l1-960.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Starsailor</title>
      <link href="https://timomeh.de/posts/starsailor/?utm_source=rss"/>
      <updated>2026-03-18T23:14:00Z</updated>
      <id>https://timomeh.de/posts/starsailor</id>
      <content type="html">
&lt;p&gt;This week I discovered &lt;strong&gt;Starsailor&lt;/strong&gt; for the first time. Based on their age and Spotify numbers, they’re not exactly a hidden gem. But it seems like they never quite broke through to the mainstream either. I had just never heard of them before.&lt;/p&gt;
&lt;p&gt;Specifically, their debut album &lt;em&gt;Love Is Here&lt;/em&gt;. I’ve listened to it so much this week. It’s such a great record, filled with great songs. Their music is raw, punchy, expressive, emotional. There’s so much going on in the arrangements, and structure, and lyrics.&lt;/p&gt;
&lt;p&gt;I don’t want to go deep into an analysis, or into how some of their songs remind me of Mando Diao’s &lt;em&gt;Give Me Fire&lt;/em&gt;, another fantastic album. This post is just a recommendation. Give them a listen. Maybe you, or someone else reading these lines, will be discovering them for the first time as well, and their music will touch you just as much.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://open.spotify.com/album/4PyGvXTMf0PmsWsDWohFZw&#34;&gt;https://open.spotify.com/album/4PyGvXTMf0PmsWsDWohFZw&lt;/a&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Waffle House Marker System</title>
      <link href="https://timomeh.de/posts/waffle-house-marker-system/?utm_source=rss"/>
      <updated>2026-02-07T19:07:00Z</updated>
      <id>https://timomeh.de/posts/waffle-house-marker-system</id>
      <content type="html">
&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=Jky5ZXI0axc&#34;&gt;This video&lt;/a&gt; from Waffle House swept into my Recommendations today. It starts kind of unhinged, then quickly gets fully unhinged and just keeps its trajectory towards insanity.&lt;/p&gt;
&lt;p&gt;At Waffle House, cooks remember their orders by putting packets and other seemingly random stuff on a plate, and the types and positions of the packets tells you what order it is. Like, putting an upside down jelly packet with a mustard packet on the bottom of a plate means: scrambled eggs with 3 eggs and wheat bread. The packets are the “markers”. Want some hash browns? Cook sprinkles some hash browns at the top of the plate. Want those hash browns steamed? A butter cup is added.&lt;/p&gt;
&lt;p&gt;The customer doesn’t get the markers, they’re removed from the plate before it goes to the customer.&lt;/p&gt;
&lt;p&gt;Insanity.&lt;/p&gt;
&lt;p&gt;It reminded me of my weird keyboard shortcut “system”, just without the upside-down mustard packets.&lt;/p&gt;
&lt;p&gt;A must-watch, in my opinion.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=Jky5ZXI0axc&#34;&gt;https://www.youtube.com/watch?v=Jky5ZXI0axc&lt;/a&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Saturday, February 7, 2026 at 10:47 AM UTC</title>
      <link href="https://timomeh.de/shorts/1770461228804/?utm_source=rss"/>
      <updated>2026-02-07T10:47:08Z</updated>
      <id>https://timomeh.de/shorts/1770461228804</id>
      <content type="html">&lt;p&gt;When contractors tell you they’ll come on a Saturday at 8:30 am (!!!), then they actually show up at 11:30 am and do nothing except say they want to come again next Saturday at 9 am&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/uoqEDGg5KK-888.jpeg&#34; alt=&#34;Meme: I cant believe you&amp;#39;ve done this&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Saturday, January 17, 2026 at 4:14 PM UTC</title>
      <link href="https://timomeh.de/shorts/1768668846438/?utm_source=rss"/>
      <updated>2026-01-17T16:14:00Z</updated>
      <id>https://timomeh.de/shorts/1768668846438</id>
      <content type="html">&lt;p&gt;I’ve added a small &lt;a href=&#34;https://timomeh.de/ai&#34;&gt;/ai manifesto&lt;/a&gt; to explain how I use generative AI on this site (and also outside of it).&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>I&#39;m not an AI sceptic. I&#39;m a people sceptic.</title>
      <link href="https://timomeh.de/posts/a-people-sceptic/?utm_source=rss"/>
      <updated>2026-01-17T13:43:00Z</updated>
      <id>https://timomeh.de/posts/a-people-sceptic</id>
      <content type="html">
&lt;p&gt;I’m currently working on adding an OAuth/OIDC authorization server at work. Claude told me twice, on different occasions, to just implement the OAuth provider from scratch. No library, just raw-dog OAuth and OIDC completely from scratch. It said it would be worth it, because it’s only ~500 LOC.&lt;/p&gt;

&lt;p&gt;Sure bro. It’s 500 LOC until it’s not anymore. Until you need to add the next OAuth grant.&lt;/p&gt;
&lt;p&gt;I wasn’t interested in building it myself, and I didn’t ask for it. I had already installed &lt;a href=&#34;https://github.com/panva/node-oidc-provider&#34;&gt;node-oidc-provider&lt;/a&gt; and simply asked Claude to create the necessary configuration and fill it with some examples so I don’t have to read through the docs. That’s when it told me the library doesn’t support what I wanted (comparing hashed client secrets) and that we should instead build everything ourselves.&lt;/p&gt;
&lt;p&gt;Of course the library supports it. It supports freaking everything. node-oidc-provider’s docs aren’t great, but that’s exactly why I asked Claude to research it for me in the first place.&lt;/p&gt;
&lt;p&gt;Implementing this yourself is horrible advice. Never implement auth from scratch, especially not an OAuth/OIDC provider, unless you’re doing it for the lulz (to learn), or because you’re creating a standalone project that you intend to maintain responsibly for years.&lt;/p&gt;
&lt;p&gt;The first time Claude suggested building it myself was in the initial plan. I explicitly said “wtf no, we won’t build this from scratch” and changed it. It was so convinced that rolling our own OAuth was the better solution that it suggested it again anyway.&lt;/p&gt;
&lt;p&gt;I’m experienced enough to know this. I’ve added OAuth flows on multiple occasions in the past.&lt;/p&gt;
&lt;p&gt;But what if I wasn’t? What if I were a junior dev? Or a pure vibe coder?&lt;/p&gt;
&lt;p&gt;That scares the shit out of me.&lt;/p&gt;
&lt;p&gt;I think I’m very good at structuring code. It’s my favorite part of programming. I have a good gut feeling for it. Claude is my bitch. It’s here to do what I don’t like to do. It’s not very good at structuring code. So I provide the structure: files, boundaries, functions, interfaces. It’s fun, I know it will be good, and I can do it fast. Claude does the boring implementation work.&lt;/p&gt;
&lt;p&gt;Seeing how Claude structures code on its own scares me. It’s often bound to be short-lived and headed toward a large refactor. That’s where bugs and regressions happen. This concern isn’t new, because humans do this too. But the speed and volume at which we can now do a major refactoring has changed dramatically.&lt;/p&gt;
&lt;p&gt;I’m scared of a future where the apps and tools I use are unstable, where you constantly encounter bugs and hear about more and more avoidable security issues.&lt;/p&gt;
&lt;p&gt;This can be solved with AI. You can run security reviews, architecture reviews, or enforce strong code guidelines with agents. But to do that, you need expertise. You need to understand why certain things are non-negotiable, like never raw-dogging an authorization server. And right now, I don’t see enough people talking about that.&lt;/p&gt;
&lt;p&gt;I’m not scared or sceptic of AI. I’m scared and sceptic of people. Sometimes even of myself.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Ending the Season Images</title>
      <link href="https://timomeh.de/posts/ending-the-season-images/?utm_source=rss"/>
      <updated>2026-01-02T22:50:00Z</updated>
      <id>https://timomeh.de/posts/ending-the-season-images</id>
      <content type="html">
&lt;p&gt;In October I wrote &lt;a href=&#34;https://timomeh.de/posts/about-this-thing-that-i-always-wanted-to-do&#34;&gt;a post&lt;/a&gt; about a little experiment I implemented. An experiement I wanted to build since I was a teen. Now I’m removing this experiment again.&lt;/p&gt;
&lt;p&gt;To recap in short, back in the days when I started to create websites, I was fascinated by the idea that the design of a website (or at least a header image) depicts its own little world, with its own simulated weather and urban scenes and people living there. So I did it, with AI, which renewed the header images every 6 hours.&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/FxVfpWlvOk-960.png&#34; alt=&#34;Screenshot of an AI-generated header image in the blog. Depicting a night scene with a market stand and lots of fairy lights&#34;&gt;&lt;/p&gt;&lt;/figure&gt;

&lt;p&gt;The magic wore off kinda quickly. It was neat to see how it added little scenes around halloween, christmas and new years; but it was also predictable that it will create those scenes. Those special scenes weren’t actually special anymore. And over time, it felt like uninteresting noise. If an artist had created them, it would’ve been much more interesting. Even though it wasn’t 100% AI slop because it had an interesting twist to it, it was still: just AI. People don’t just care about the art, they care about the artist.&lt;/p&gt;
&lt;p&gt;I never wanted to keep those images here forever, and I’m happy this idea is now out of my head.&lt;/p&gt;
&lt;p&gt;Here are a few oopsies that happened during the experiment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To simulate the weather, the AI is prompted with the weather it generated for the previous days, to create a new weather for “today”. It then uses this weather to write a new prompt for the actual image. But it started to write small scenes into the weather report itself, so it continued to reuse this same scene, and for a while all images were in a town with cobblestone streets and a church and a riverside.&lt;/li&gt;
&lt;li&gt;The images need a vignette, which was added to the image in a second step: it first creates the image without the vignette, and then uses this image to generate another image with the vignette. I thought that OpenAI will automatically detect the image aspect ratio to generate a new image with the same ratio. But that was wrong, it started to create square images. So for a while, the vignetted images were weirdly cut off and too small.&lt;/li&gt;
&lt;li&gt;During the React2Shell situation, the image generation halted because I didn’t redeploy the cron. While I updated the Next.js version in my monorepo, there were no changes to the cron (because it doesn’t use Next.js) and the deployment still had the vulnerable version of Next.js installed which we didn’t allow to run on Railway anymore.&lt;/li&gt;
&lt;li&gt;The AI was prompted to create scenes in a german city. But it did not create fireworks at midnight 2025 → 2026, and no streets littered with fireworks, which is just unrealistic af.&lt;/li&gt;
&lt;/ul&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Wednesday, December 24, 2025 at 3:42 PM UTC</title>
      <link href="https://timomeh.de/shorts/1766590955851/?utm_source=rss"/>
      <updated>2025-12-24T15:42:00Z</updated>
      <id>https://timomeh.de/shorts/1766590955851</id>
      <content type="html">&lt;p&gt;CS degree but defeated by pairing a vtech kiddie walkie talkie&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Monday, December 22, 2025 at 1:07 PM UTC</title>
      <link href="https://timomeh.de/shorts/1766408882362/?utm_source=rss"/>
      <updated>2025-12-22T13:07:00Z</updated>
      <id>https://timomeh.de/shorts/1766408882362</id>
      <content type="html">&lt;p&gt;Really looking forward to drive home to my parents for christmas, but procrastinating a lot having to carry stuff downstairs into the car four times.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Intentionally left ugly</title>
      <link href="https://timomeh.de/posts/intentionally-left-ugly/?utm_source=rss"/>
      <updated>2025-12-14T17:14:00Z</updated>
      <id>https://timomeh.de/posts/intentionally-left-ugly</id>
      <content type="html">
&lt;p&gt;My favorite process in software engineering, whether I’m building something new or working on an existing feature, is to first focus purely on the functionality and completely ignore the design. Once everything works, I shift my full attention to making it look and feel great.&lt;/p&gt;
&lt;p&gt;I learned this process over a decade ago, and I’ve been recommending it ever since to anyone who’s struggling while building something: struggling with refactors, with design collaboration, with pressure from planning and management, or simply with finding creative direction for the UI.&lt;/p&gt;

&lt;p&gt;I first experienced this during an Android development course by Ben Jakuben on teamtreehouse.com. At the time, I was enrolled in a mobile app development class at university where we learned iOS development in Objective-C. But as an Android user, I wanted my final project to be an Android app. Having no clue about Android development, I looked around, found a course on Treehouse, and speedran through it over one or two late nights.&lt;/p&gt;
&lt;p&gt;Ben did a fantastic job of guiding you through things logically and leaving you in a place where you could confidently keep learning on your own. The end result of the course was a Snapchat clone built with &lt;a href=&#34;https://pusher.com/&#34;&gt;Pusher&lt;/a&gt; as a backend. It was refreshing to not just build a throwaway demo app, but a real media-based app that was genuinely relevant at the time.&lt;/p&gt;
&lt;p&gt;The course focused heavily on getting the functionality right first: signup, login, creating posts, listing them, viewing them, expiring them so you could only see them once. Only after everything worked did Ben show how to layer a proper design on top, and really demonstrated the merits of this approach. You could see how the app suddenly came to life, without having to refactor everything again and risk breaking things.&lt;/p&gt;
&lt;p&gt;That was a real “woah” moment.&lt;/p&gt;
&lt;p&gt;Since then, I’ve often advocated for this approach and repeatedly experienced how much it can help.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When engineers are frustrated because designs keep changing and they have to keep adjusting their code: focus on the functionality first and don’t get distracted by work-in-progress designs.&lt;/li&gt;
&lt;li&gt;When there’s friction between designers and engineers because they have different interpretations of how things should look and work: focus on the functionality first to build a shared understanding, so both parties can elevate the solution instead of getting stuck in disagreements.&lt;/li&gt;
&lt;li&gt;When teams spend too much time tweaking small design details while major functionality is still missing: focus on the functionality first to reduce stress about big parts that are still missing.&lt;/li&gt;
&lt;li&gt;When engineers are doing the design themselves but can’t quite figure out how it should look: focus on the functionality first so you can later give design your full attention.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even though I’m such a huge fan of this process, it wasn’t possible to do in every project, and it doesn’t work equally well for every kind of product. Sometimes “functionality first” doesn’t mean “design later”, but something in between: where interactions are already considered in the functionality, while the visual polish is postponed. And sometimes you’re joining an existing team that works design-first, and you can’t just overthrow their approach: that wouldn’t be professional. But you can observe friction and frustration, and when it makes sense, recommend trying to focus on the functionality first.&lt;/p&gt;
&lt;p&gt;Once everything works and you’re happy with how it behaves, there’s a good chance the design will naturally start to form in your head. It often just takes a shower, a night of sleep, or a walk. And if it doesn’t, you can still research and ask for help: &lt;em&gt;“How do other apps solve this?”&lt;/em&gt;, or &lt;em&gt;“This is how it should work, can you help me make it look and feel great?”.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The main downside of this process is that some people will assume what you’re building is already the final design. &lt;em&gt;You&lt;/em&gt; know that it’s obviously not, but &lt;em&gt;they&lt;/em&gt; don’t know. Not everyone is familiar with this way of working, or with how quickly something ugly can completely change into something polished. Not everyone can mentally cleanly separate functionality from appearance, and sometimes early visuals tend to stick with them. You’ll get questions about whether this design is already final. You’ll hear comments about spacing, colors, fonts and alignment.&lt;/p&gt;
&lt;p&gt;This can be annoying, but don’t let it distract you. Part of this process is giving people a heads-up… often more than once: &lt;em&gt;I’m focusing on functionality right now. We’ll make it pretty later. This is intentionally left ugly.&lt;/em&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, December 5, 2025 at 10:33 AM UTC</title>
      <link href="https://timomeh.de/shorts/1764930794509/?utm_source=rss"/>
      <updated>2025-12-05T10:33:14Z</updated>
      <id>https://timomeh.de/shorts/1764930794509</id>
      <content type="html">&lt;p&gt;I wish dependabot were a tiny bit smarter. Like: biome’s config has the version in its schema URL. So if dependabot updates biome, the schema version doesn’t match the installed version anymore, and it will complain. Just do it for me, pls.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Why no public buckets on Railway?</title>
      <link href="https://timomeh.de/posts/why-no-public-buckets-on-railway/?utm_source=rss"/>
      <updated>2025-11-29T04:00:00Z</updated>
      <id>https://timomeh.de/posts/why-no-public-buckets-on-railway</id>
      <content type="html">
&lt;p&gt;I’ve just released &lt;a href=&#34;https://docs.railway.com/storage-buckets&#34;&gt;Storage Buckets&lt;/a&gt; on Railway. Right now, you can’t make them public. Some users are rightfully asking why we would only launch with private buckets, and were bummed to see they’re not public. So I wanted to give more insights because I always enjoy these “peeking behind the curtain” stories. I think this stuff is always pretty interesting!&lt;/p&gt;

&lt;h2&gt;Why I worked on buckets in the first place&lt;/h2&gt;
&lt;p&gt;Adding Storage Buckets was my onboarding project at Railway. When you start as an engineer here, the final three weeks of your onboarding phase are reserved for building whatever you want to add to the platform. It’s a pretty neat opportunity to ship something impactful right out of the gate.&lt;/p&gt;
&lt;p&gt;I did some user research and saw that Object Storage had been requested numerous times in the forums. I even found reviews and YouTube videos complaining about the lack of built-in buckets. So that’s what I landed on!&lt;/p&gt;
&lt;aside class=&#34;PostAside aside&#34;&gt;&lt;header class=&#34;PostAside-title&#34;&gt;What&#39;s a Bucket?&lt;/header&gt;&lt;p&gt;A bucket allows you to store files. Think of images, invoices, videos, PDFs, or other user-generated content. Public buckets allows static read access to everything inside them, which is ideal if you’re hosting images that everyone on Earth should be allowed to view.&lt;/p&gt;&lt;p&gt;With private buckets, your users cannot view any files without authorization. You (the service) control who can see a file, either by using presigned URLs or through a proxy.&lt;/p&gt;&lt;/aside&gt;
&lt;h2&gt;Cutting Scope&lt;/h2&gt;
&lt;p&gt;Three weeks isn’t a lot of time to go from “no buckets” to “users can run them and pay for them.”&lt;/p&gt;
&lt;p&gt;The first few days of working on it were very overwhelming. I had no idea where to start, and I saw the hours passing without any real progress. My head was just full of questions, from how tf the infrastructure will work to how pricing should work.&lt;/p&gt;
&lt;p&gt;So I went for a long walk to think things through.&lt;/p&gt;
&lt;p&gt;One of the first things that came to my mind was static sites. Public buckets are great for static sites, and I’m sure users want to use them for it. But hosting a static site on Railway is already easy: connect your GitHub Repo, we detected it as a static site and deploy it inside a Caddy server. Sure, going entirely serverless would be great, but I would spend a substantial amount of time implementing a use case that is already mostly solved.&lt;/p&gt;
&lt;p&gt;I thought about more things (which I will explain below), and came to the conclusion that I need to significantly cut scope to ship at least &lt;em&gt;anything&lt;/em&gt;. Because shipping anything is better than nothing. And shipping it quickly is even better.&lt;/p&gt;
&lt;p&gt;I jotted down my decisions to cut scope into my Discord channel, got positive feedback, wrote an RFC and started building.&lt;/p&gt;
&lt;h2&gt;You can use a private bucket to view files publicly&lt;/h2&gt;
&lt;p&gt;Even with private buckets, we can still support use cases that require sharing files publicly through presigned URLs or proxying. To make this easier for developers, I added two templates: one for a &lt;a href=&#34;https://railway.com/deploy/public-bucket-urls&#34;&gt;small service&lt;/a&gt; that exposes a public URL and redirects it to a presigned URL, and another one for an &lt;a href=&#34;https://railway.com/deploy/public-bucket-image-proxy&#34;&gt;image proxy&lt;/a&gt; that exposes a public URL &lt;em&gt;and&lt;/em&gt; optimizes images on the fly.&lt;/p&gt;
&lt;p&gt;Because we can still support these usecases with a private bucket, it allowed me to cut down the scope significantly while still delivering a ton of value.&lt;/p&gt;
&lt;h2&gt;You might just need a private bucket&lt;/h2&gt;
&lt;p&gt;Let’s look at a common use case and a popular framework: uploading user-generated content like images using Next.js. Love it or hate it, it’s what a lot of people use. Let’s assume a support app where users upload a profile picture and attach a screenshot to a support ticket. Then you use Next.js’s &lt;code&gt;&amp;#x3C;Image&gt;&lt;/code&gt; component, it automatically optimizes the image, and… you have a proxy. In this case, it doesn’t really matter if the bucket itself is public or private.&lt;/p&gt;
&lt;p&gt;I have a hypothesis that a fair amount of public buckets out there should actually be private. It’s not uncommon to hear about security incidents involving a bucket that was accidentally left open to the public.&lt;/p&gt;
&lt;p&gt;It’s easy to create a bucket, make it public because you don’t plan on storing anything sensitive in it, and then completely forget about that setting down the road, when you start uploading files that shouldn’t be exposed.&lt;/p&gt;
&lt;p&gt;That’s a real UX challenge. Frankly, I didn’t want to feel responsible for a major data leak just because I shipped a massive footgun.&lt;/p&gt;
&lt;h2&gt;Thoughts on pricing&lt;/h2&gt;
&lt;p&gt;From the very beginning, I wanted to keep bucket pricing very simple. Railway already had four clear prices: CPU, Memory, Volume Storage, and Egress. I didn’t want to join the company and immediately introduce four more for Object Storage, Class A/B operations, and Bucket Egress.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;“Hi, I’m Timo, I’m new here and I ruined your nice pricing page.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It felt wrong to join a team and, as my first act, overcomplicate their straightforward pricing model.&lt;/p&gt;
&lt;p&gt;I wanted to add just a single price for the actual storage, and not for operations or egress. As it turns out, we can offer exactly that for private buckets.&lt;/p&gt;
&lt;p&gt;But I’m not sure we can do the same for public buckets. It’s as simple as that: I just don’t know yet, and there’s a high risk that we’d have to raise prices down the road. Public buckets will naturally incur far more operations (since every file request counts as one), and “more of something” usually means higher costs. Users hate price increases, and it always leads to bad press. I didn’t want to make a short-sighted decision that I knew will bite me later.&lt;/p&gt;
&lt;p&gt;So, my strategy here was to start with private buckets because we already knew how we can price them. Then I can dig more into how to price public buckets safely. If it turns out they require a different price, it will just be introduced as a new, separate feature with its own pricing.&lt;/p&gt;
&lt;h2&gt;Can’t you add a simple “public” checkbox?&lt;/h2&gt;
&lt;p&gt;It sound like a minor task to just add a checkbox, and the checkbox itself is the easy part. But the real effort lies in everything that comes next, which is what I wanted to show in this post. Static sites, footguns, prices… and there’s more I thought about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Abuse and reputation:&lt;/strong&gt; Public buckets are frequently used for static sites by scammers and malicious popup networks. Because we want buckets to be available on our free tier, this would immediately attract bad actors. It isn’t a reason to never offer it, but we would still need to integrate more abuse-reporting processes to protect our domain- and brand reputation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Illegal material:&lt;/strong&gt; Public platforms have a high risk of being used to host illegal material. Again, keeping buckets available on our free tier means ensuring we don’t accidentally build something that makes hosting malicious content or CSAM incredibly easy. It doesn’t feel great to me to build something without also building mechanisms against this.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File management:&lt;/strong&gt; How would users actually upload public files? I intentionally cut a file explorer from the initial scope, but it becomes even more a necessity if you’re managing a public website bucket.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Feature creep:&lt;/strong&gt; Buckets configured for static site hosting require a bunch of additional configuration settings that I’d also need to build.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of these thoughts in isolation weren’t a big deal. But when everything comes together, it’s just… too much to do in your onboarding project.&lt;/p&gt;
&lt;h2&gt;The Ugly&lt;/h2&gt;
&lt;p&gt;It still sucks to only have a private bucket if all you want is to store an OpenGraph image or some avatar. Proxying or presigning has a learning curve. It’s more effort, especially when you compare it to other cloud providers where you can just drag-and-drop stuff into a browser and it’s public. It makes a worse Developer Experience. There’s no denying that.&lt;/p&gt;
&lt;p&gt;It’s not a feature that public buckets are missing. It’s just that: a missing feature which will eventually be filled.&lt;/p&gt;
&lt;p&gt;For a three-week onboarding project, I of course would’ve loved to launch with public buckets, a file explorer, lifecycle, events, website config, … and it sucks to cut so many features. But I’m also still proud to have shipped what I shipped.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Monday, November 24, 2025 at 11:05 PM UTC</title>
      <link href="https://timomeh.de/shorts/1764025521894/?utm_source=rss"/>
      <updated>2025-11-24T23:05:21Z</updated>
      <id>https://timomeh.de/shorts/1764025521894</id>
      <content type="html">&lt;p&gt;If your crons on Railway were running a bit late recently, they should be better now. I rolled out a few updates between 18:30 and 19:30, and there are clearly some significant changes in cron timing.&lt;/p&gt;
&lt;p&gt;A few late stragglers here and there, but we’ll catch those too.&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/gj4XhYxYb8-960.png&#34; alt=&#34;Graph of Crons fired. After 6:30pm clearly visible spikes every 5 minutes in cron executions.&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, November 23, 2025 at 12:55 PM UTC</title>
      <link href="https://timomeh.de/shorts/1763902521668/?utm_source=rss"/>
      <updated>2025-11-23T12:55:00Z</updated>
      <id>https://timomeh.de/shorts/1763902521668</id>
      <content type="html">&lt;p&gt;I dreamed about a Technology Connections video where Alec explained that the Advent wreath was invented to improve TV remote signal strength in winter. You would aim through the candles, and it helped to turn off the TV during cold winter nights.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, November 21, 2025 at 8:59 PM UTC</title>
      <link href="https://timomeh.de/shorts/1763758798910/?utm_source=rss"/>
      <updated>2025-11-21T20:59:58Z</updated>
      <id>https://timomeh.de/shorts/1763758798910</id>
      <content type="html">&lt;p&gt;I tried cutting pizza with scissors today because I heard only good things about it and&lt;/p&gt;
&lt;p&gt;holy fuck I hated it, there wasn’t a single good thing about it.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, November 14, 2025 at 9:33 AM UTC</title>
      <link href="https://timomeh.de/shorts/1763112837491/?utm_source=rss"/>
      <updated>2025-11-14T09:33:57Z</updated>
      <id>https://timomeh.de/shorts/1763112837491</id>
      <content type="html">&lt;p&gt;Regular Friday morning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;make coffee&lt;/li&gt;
&lt;li&gt;reboot the light switches&lt;/li&gt;
&lt;/ul&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Wednesday, November 12, 2025 at 8:09 PM UTC</title>
      <link href="https://timomeh.de/shorts/1762978187406/?utm_source=rss"/>
      <updated>2025-11-12T20:09:47Z</updated>
      <id>https://timomeh.de/shorts/1762978187406</id>
      <content type="html">&lt;p&gt;Pro-Tip: using &lt;code&gt;BigInt()&lt;/code&gt; in your code makes it look 10x more important.&lt;/p&gt;
&lt;p&gt;I was juggling storage sizes today. 9 petabytes in bytes already hit &lt;code&gt;MAX_SAFE_INTEGER&lt;/code&gt;. 9PB is a lot but also isn’t.&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/bG1NiRhE0p-500.jpeg&#34; alt=&#34;Flex Tape meme, Phil Swift slapping Flex Tape on a leak. The Leak: &amp;#34;Enterprise Needs&amp;#34;. The Tape: &amp;#34;BigInt(number)&amp;#34;&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, November 11, 2025 at 9:06 AM UTC</title>
      <link href="https://timomeh.de/shorts/1762851994314/?utm_source=rss"/>
      <updated>2025-11-11T09:06:34Z</updated>
      <id>https://timomeh.de/shorts/1762851994314</id>
      <content type="html">&lt;p&gt;What my dentist thinks I’m doing in the hour before my appointment vs. what I’m really doing&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/f3DBOCqhFf-587.webp&#34; alt=&#34;a man eating a snickers and a donut&#34;&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/4Jlw9DUhWs-960.jpeg&#34; alt=&#34;pablo escobar sitting and staring into the void&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, November 9, 2025 at 12:17 PM UTC</title>
      <link href="https://timomeh.de/shorts/1762690627500/?utm_source=rss"/>
      <updated>2025-11-09T12:17:00Z</updated>
      <id>https://timomeh.de/shorts/1762690627500</id>
      <content type="html">&lt;p&gt;No better sunday than breakfast and an Outdoor Boys video.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, November 4, 2025 at 7:32 PM UTC</title>
      <link href="https://timomeh.de/shorts/1762284754771/?utm_source=rss"/>
      <updated>2025-11-04T19:32:34Z</updated>
      <id>https://timomeh.de/shorts/1762284754771</id>
      <content type="html">&lt;p&gt;Some popular hosting platforms taught developers the wrong assumption that every hosting-adjacent feature must be built into the platform or bought as another SaaS, when in reality, you often just need to run a docker image.&lt;/p&gt;
&lt;p&gt;Gotta reeducate.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, October 30, 2025 at 9:11 PM UTC</title>
      <link href="https://timomeh.de/shorts/1761858677781/?utm_source=rss"/>
      <updated>2025-10-30T21:11:17Z</updated>
      <id>https://timomeh.de/shorts/1761858677781</id>
      <content type="html">&lt;p&gt;Had my first unproductive day in 3 months. Thanks to MacBook issues.&lt;/p&gt;
&lt;p&gt;One day. In 3 months. Just because of tech problems. Not because of meetings or calls or metawork.&lt;/p&gt;
&lt;p&gt;Actually I’m not even mad, that’s amazing.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, October 28, 2025 at 9:23 PM UTC</title>
      <link href="https://timomeh.de/shorts/1761686587302/?utm_source=rss"/>
      <updated>2025-10-28T21:23:07Z</updated>
      <id>https://timomeh.de/shorts/1761686587302</id>
      <content type="html">&lt;p&gt;me: blocks ntp in firewall on homelab vps tunnel&lt;br&gt;
vps: time drifts out of sync, google oauth breaks&lt;br&gt;
me: surprised_pikachu.png&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, October 24, 2025 at 7:43 PM UTC</title>
      <link href="https://timomeh.de/shorts/1761334993426/?utm_source=rss"/>
      <updated>2025-10-24T19:43:13Z</updated>
      <id>https://timomeh.de/shorts/1761334993426</id>
      <content type="html">&lt;p&gt;work this week be like&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/4HFeyVrrTq-500.jpeg&#34; alt=&#34;Meme: My body is a machine that turns finger movements into enterprise readiness&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>About this thing that I always wanted to do</title>
      <link href="https://timomeh.de/posts/about-this-thing-that-i-always-wanted-to-do/?utm_source=rss"/>
      <updated>2025-10-19T23:00:00Z</updated>
      <id>https://timomeh.de/posts/about-this-thing-that-i-always-wanted-to-do</id>
      <content type="html">&lt;p&gt;More than 15 years ago, I had this idea to autogenerate the header image of my website based on the current time of day, season, location, and a simulated weather pattern that naturally progresses. It fascinated me to have a long-running, realistic-feeling, autonomous system that changes itself without my involvement—like its own little world. I liked the idea to open my own site and being surprised by what I see. &lt;em&gt;“Oh, it’s snowing!”&lt;/em&gt;, then seeing the snow melt away some time later, or observe the bleakness of misty autumn days.&lt;/p&gt;
&lt;p&gt;Back then, I tinkered with layering PNGs on top of each other to create “random” scenes, but it looked terrible. I can design websites, but I can’t draw nice pictures.&lt;/p&gt;
&lt;p&gt;I never ended up doing it because 1) I didn’t miraculously become a good artist, and 2) who cares.&lt;/p&gt;
&lt;p&gt;Well, I care. I’m older now, and the fascination is definitely weaker, but I still thought about it every year. When my most favorite time of year starts, I get this itch. And this year, I finally scratched it.&lt;/p&gt;
&lt;p&gt;AI made this much easier to solve. Not just for creating the images, but also for simulating the weather progression based on the time of day, the season, and previous days. Everything is now truly unpredictable, there isn’t a single line of code where I can already guess what will happen next.&lt;/p&gt;
&lt;p&gt;New scenes get generated four times a day, and I feed the AI with previous days to create a natural progression.&lt;/p&gt;
&lt;p&gt;I’m storing all the prompts, images and weather simulations (in a Railway Bucket of course).&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, October 17, 2025 at 5:04 AM UTC</title>
      <link href="https://timomeh.de/shorts/1760677477738/?utm_source=rss"/>
      <updated>2025-10-17T05:04:37Z</updated>
      <id>https://timomeh.de/shorts/1760677477738</id>
      <content type="html">&lt;p&gt;me when getting paged and pods are restarting&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/xJhVOhjOx9-482.jpeg&#34; alt=&#34;Meme with Marcus the worm. Caption: &amp;#34;I don&amp;#39;t like this pod. It&amp;#39;s pissing me off&amp;#34;&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Monday, October 13, 2025 at 7:10 PM UTC</title>
      <link href="https://timomeh.de/shorts/1760382631843/?utm_source=rss"/>
      <updated>2025-10-13T19:10:31Z</updated>
      <id>https://timomeh.de/shorts/1760382631843</id>
      <content type="html">&lt;p&gt;That’s probably how I sleep on a plane, judging by the back pain I now have.&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/EPKNcrAWlI-640.jpeg&#34; alt=&#34;A cat lying in a weird position on a tiny chair&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, October 12, 2025 at 10:50 AM UTC</title>
      <link href="https://timomeh.de/shorts/1760266258377/?utm_source=rss"/>
      <updated>2025-10-12T10:50:58Z</updated>
      <id>https://timomeh.de/shorts/1760266258377</id>
      <content type="html">&lt;p&gt;MEX 🛬 FRA 🚄 CGN&lt;/p&gt;
&lt;p&gt;I thought I can escape jetlag, but I just slept for 12 hours.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Saturday, October 11, 2025 at 4:04 PM UTC</title>
      <link href="https://timomeh.de/shorts/1760198688918/?utm_source=rss"/>
      <updated>2025-10-11T16:04:48Z</updated>
      <id>https://timomeh.de/shorts/1760198688918</id>
      <content type="html">&lt;p&gt;I just waited 2 hours for my bag at FRA airport until I was told it’s in a separate baggage claim near the train station, because I have a connecting train.&lt;/p&gt;
&lt;p&gt;Who tf designs this crap. A train is not a plane, don’t treat it like one. Against user expectation.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, October 9, 2025 at 7:50 AM UTC</title>
      <link href="https://timomeh.de/shorts/1759996258215/?utm_source=rss"/>
      <updated>2025-10-09T07:50:00Z</updated>
      <id>https://timomeh.de/shorts/1759996258215</id>
      <content type="html">&lt;p&gt;Notably, it’s mostly about dependencies. Dependencies are entropy. When everything can be a dependency of everything else, entropy reaches its maximum. Activity ceases.&lt;/p&gt;
&lt;p&gt;Heat death of a codebase.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, October 9, 2025 at 7:29 AM UTC</title>
      <link href="https://timomeh.de/shorts/1759994968447/?utm_source=rss"/>
      <updated>2025-10-09T07:29:28Z</updated>
      <id>https://timomeh.de/shorts/1759994968447</id>
      <content type="html">&lt;p&gt;There are three base ingredients for a scalable codebase: Modules, Layers and Interfaces.&lt;/p&gt;
&lt;p&gt;Modules to tame data dependencies. Layers to tame function dependencies. Interfaces to tame dependency boundaries.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, October 9, 2025 at 4:03 AM UTC</title>
      <link href="https://timomeh.de/shorts/1759982997545/?utm_source=rss"/>
      <updated>2025-10-09T04:03:00Z</updated>
      <id>https://timomeh.de/shorts/1759982997545</id>
      <content type="html">&lt;p&gt;&lt;a href=&#34;https://hamvocke.com&#34;&gt;Ham’s blog&lt;/a&gt; now also features &lt;a href=&#34;https://hamvocke.com/blog/introducing-moments/&#34;&gt;“Moments”&lt;/a&gt;, as a way to share smaller thoughts and everyday moments on his own site.&lt;/p&gt;
&lt;p&gt;Love to see more people adopt this way of sharing their thoughts outside social media platforms, just on their own websites. I really, really like following the people I care about. I just don’t want to open Twitter or Bluesky most of the time. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Slowcial media, baby!&lt;/em&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Wednesday, October 8, 2025 at 3:46 PM UTC</title>
      <link href="https://timomeh.de/shorts/1759938375943/?utm_source=rss"/>
      <updated>2025-10-08T15:46:00Z</updated>
      <id>https://timomeh.de/shorts/1759938375943</id>
      <content type="html">&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/46mLiI40jt-960.jpeg&#34; alt=&#34;a luchador wrestling against a pyramid of 4 luchadors. Top text &amp;#34;my feature&amp;#34;, bottom text &amp;#34;the four janky temporal workflows&amp;#34;&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, October 5, 2025 at 9:33 PM UTC</title>
      <link href="https://timomeh.de/shorts/1759700017660/?utm_source=rss"/>
      <updated>2025-10-05T21:33:37Z</updated>
      <id>https://timomeh.de/shorts/1759700017660</id>
      <content type="html">&lt;p&gt;TIL the United States has no transit zone, so you need to go through US immigration for a connecting flight.&lt;/p&gt;
&lt;p&gt;The german in me thinks this is very inefficient.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, October 3, 2025 at 10:22 AM UTC</title>
      <link href="https://timomeh.de/shorts/1759486925606/?utm_source=rss"/>
      <updated>2025-10-03T10:22:05Z</updated>
      <id>https://timomeh.de/shorts/1759486925606</id>
      <content type="html">&lt;p&gt;I fell asleep while a Vsauce YouTube Short was playing on my tablet.&lt;br&gt;
I woke up over 6 hours later. It looped fucking 400 times.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, October 2, 2025 at 11:21 AM UTC</title>
      <link href="https://timomeh.de/shorts/1759404077861/?utm_source=rss"/>
      <updated>2025-10-02T11:21:17Z</updated>
      <id>https://timomeh.de/shorts/1759404077861</id>
      <content type="html">&lt;p&gt;the arrow between buckets and services has landed&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/yCjjYYACx1-960.png&#34; alt=&#34;Screenshot on Railway. A service box connected to a bucket box with an arrow&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, September 30, 2025 at 11:07 PM UTC</title>
      <link href="https://timomeh.de/shorts/1759273623419/?utm_source=rss"/>
      <updated>2025-09-30T23:07:03Z</updated>
      <id>https://timomeh.de/shorts/1759273623419</id>
      <content type="html">&lt;p&gt;Bought some melatonin today to combat jetlag next week.&lt;/p&gt;
&lt;p&gt;I had to try one out. idk why but it always fascinates me that medicine actually works. i’m so fucking sleepy&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Monday, September 29, 2025 at 1:22 PM UTC</title>
      <link href="https://timomeh.de/shorts/1759152132580/?utm_source=rss"/>
      <updated>2025-09-29T13:22:12Z</updated>
      <id>https://timomeh.de/shorts/1759152132580</id>
      <content type="html">&lt;p&gt;Just imagine how much time and money has been wasted on reimplementing shitty versions of iOS’s wheel picker.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Saturday, September 27, 2025 at 12:12 AM UTC</title>
      <link href="https://timomeh.de/shorts/1758932060187/?utm_source=rss"/>
      <updated>2025-09-27T00:12:00Z</updated>
      <id>https://timomeh.de/shorts/1758932060187</id>
      <content type="html">&lt;p&gt;I just released Buckets on Railway. This is huge for me.&lt;/p&gt;
&lt;p&gt;I came to Railway because I want to give developers truly great experiences. And this is exactly the stuff.&lt;/p&gt;
&lt;p&gt;A rush of adrenaline, relief, and positive feedback. No idea how I should be able to sleep now. It’s 2:15am.&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/4pocIE-ZLS.gif&#34; alt=&#34;Screen recording of creating a Bucket on Railway&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, September 23, 2025 at 4:46 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758645972721/?utm_source=rss"/>
      <updated>2025-09-23T16:46:00Z</updated>
      <id>https://timomeh.de/shorts/1758645972721</id>
      <content type="html">&lt;p&gt;Replica Metrics (one of my first projects at Railway) is now in GA! You can check how your replicas are doing, spot hot or underutilized regions, and catch replicas going wild.&lt;br&gt;
&lt;br&gt;
choo choo 🚅&lt;br&gt;
&lt;a href=&#34;https://docs.railway.com/reference/metrics#replica-view&#34;&gt;https://docs.railway.com/reference/metrics#replica-view&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/1KYciXxfo2-960.png&#34; alt=&#34;Replica Metrics view at Railway&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Monday, September 22, 2025 at 9:55 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758578122575/?utm_source=rss"/>
      <updated>2025-09-22T21:55:00Z</updated>
      <id>https://timomeh.de/shorts/1758578122575</id>
      <content type="html">&lt;p&gt;TIL there’s a german PhD thesis from 1978 about guys injuring their junk by sticking it into a hoover. It lists 16 medical cases.&lt;/p&gt;
&lt;p&gt;Case 14 is about a guy cleaning up and curiosity got him.  &lt;br&gt;
Case 15 is about case 14’s father who wanted to prove his son lied.&lt;/p&gt;
&lt;p&gt;He did not lie.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Friday, September 19, 2025 at 9:36 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758317789637/?utm_source=rss"/>
      <updated>2025-09-19T21:36:29Z</updated>
      <id>https://timomeh.de/shorts/1758317789637</id>
      <content type="html">&lt;p&gt;It’s mindblowing what’s possible within a week.&lt;/p&gt;
&lt;p&gt;I started adding Buckets to Railway on Monday. Today, 5 days later, I can create a Bucket in a project, click deploy, copy the credentials from the frontend, and upload files to it.&lt;/p&gt;
&lt;p&gt;That’s kinda crazy.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, September 18, 2025 at 11:16 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758237389986/?utm_source=rss"/>
      <updated>2025-09-18T23:16:29Z</updated>
      <id>https://timomeh.de/shorts/1758237389986</id>
      <content type="html">&lt;p&gt;Infra as Code doesn’t gift you confidence.&lt;/p&gt;
&lt;p&gt;You’re only as confident in your changes as you are in the tool.&lt;/p&gt;
&lt;p&gt;If it feels like magic and you don’t understand it, it makes you less confident, not more.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, September 18, 2025 at 5:27 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758216425652/?utm_source=rss"/>
      <updated>2025-09-18T17:27:05Z</updated>
      <id>https://timomeh.de/shorts/1758216425652</id>
      <content type="html">&lt;p&gt;devs when they implement permissions&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/Nc2G9riszl-887.jpeg&#34; alt=&#34;Meme with Text: I am going to create my own permissions DSL that is so fucked up&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thursday, September 18, 2025 at 5:20 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758216043488/?utm_source=rss"/>
      <updated>2025-09-18T17:20:43Z</updated>
      <id>https://timomeh.de/shorts/1758216043488</id>
      <content type="html">&lt;p&gt;There comes a point where a 3rd party API is just so ill-designed that you can’t think of any way to abstract it nicely, and you just add a big comment block to explain what the actual fuck is going on.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Wednesday, September 17, 2025 at 9:35 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758144935839/?utm_source=rss"/>
      <updated>2025-09-17T21:35:00Z</updated>
      <id>https://timomeh.de/shorts/1758144935839</id>
      <content type="html">&lt;p&gt;i’m cooking rn 👀&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://x.com/Railway/status/1968351370534334698&#34;&gt;https://x.com/Railway/status/1968351370534334698&lt;/a&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Wednesday, September 17, 2025 at 10:08 AM UTC</title>
      <link href="https://timomeh.de/shorts/1758103696578/?utm_source=rss"/>
      <updated>2025-09-17T10:08:16Z</updated>
      <id>https://timomeh.de/shorts/1758103696578</id>
      <content type="html">&lt;p&gt;more like yeetest amirite&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/hCaBoRsNfd-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, September 16, 2025 at 9:18 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758057528281/?utm_source=rss"/>
      <updated>2025-09-16T21:18:48Z</updated>
      <id>https://timomeh.de/shorts/1758057528281</id>
      <content type="html">&lt;p&gt;You call it a memory leak. I call it unlimited caching, baby.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, September 16, 2025 at 8:34 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758054887765/?utm_source=rss"/>
      <updated>2025-09-16T20:34:00Z</updated>
      <id>https://timomeh.de/shorts/1758054887765</id>
      <content type="html">&lt;p&gt;In other news: I’ve set up cross-posting to Bluesky and Twitter. I’ll be happy if you read my shit here, but you can also read on &lt;a href=&#34;https://bsky.app/profile/timomeh.de&#34;&gt;Bluesky&lt;/a&gt; and &lt;a href=&#34;https://x.com/timomeh&#34;&gt;Twitter&lt;/a&gt;. I really like the idea of having my own place, where people can come and read what I’m up to, outside of a big social media platform.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, September 16, 2025 at 8:10 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758053457615/?utm_source=rss"/>
      <updated>2025-09-16T20:10:00Z</updated>
      <id>https://timomeh.de/shorts/1758053457615</id>
      <content type="html">&lt;p&gt;This post should be crossposted to my blog, to Twitter and to Bluesky. Poggies if this works. (edit: it did!)&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, September 16, 2025 at 5:08 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758042507961/?utm_source=rss"/>
      <updated>2025-09-16T17:08:27Z</updated>
      <id>https://timomeh.de/shorts/1758042507961</id>
      <content type="html">&lt;p&gt;I started adding storage Buckets into Railway this week. It’s Day 2, and I can already create and deploy a Bucket.¹&lt;/p&gt;
&lt;p&gt;I’m excited af about this because I’ve always experienced Buckets as this boring table UI in some cloud console, and to create a Bucket you had to fill out a huge form. But look at this! Right-click, Bucket, boom, here you go, now build stuff with it!&lt;/p&gt;
&lt;p&gt;¹ right now the Bucket is just an empty shell and you can’t yet do anything with it. But tomorrow is the day where I will turn it into something usable&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/AWezSmq4IA.gif&#34; alt=&#34;Creating and deploying a Bucket in the Railway project canvas&#34;&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/uSu0IT2Tr4-960.png&#34; alt=&#34;Commit details in Railway to deploy a new Bucket&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Tuesday, September 16, 2025 at 2:55 PM UTC</title>
      <link href="https://timomeh.de/shorts/1758034529826/?utm_source=rss"/>
      <updated>2025-09-16T14:55:29Z</updated>
      <id>https://timomeh.de/shorts/1758034529826</id>
      <content type="html">&lt;p&gt;Share every small win. When you’re on a roll and have one small win after another, just share them. A big win is just a collection of many small wins over time. It helps you notice the progress you’re making, and as a nice side effect, others will notice too.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Monday, September 15, 2025 at 11:06 PM UTC</title>
      <link href="https://timomeh.de/shorts/1757977598032/?utm_source=rss"/>
      <updated>2025-09-15T23:06:00Z</updated>
      <id>https://timomeh.de/shorts/1757977598032</id>
      <content type="html">&lt;p&gt;I can now post images! I can just send sent them to my Discord bot and ✨ they are here. Discord even supports alt text which is really handy.&lt;/p&gt;
&lt;p&gt;To verify this works, here are two DALL-E images I recently generated.&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/cBNqH3iwAz-960.png&#34; alt=&#34;A nugget&#34;&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/LBWBChHtM3-960.png&#34; alt=&#34;A man holding a beer keg over his hed, in front of a house at night. There is a lit window.&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Monday, September 15, 2025 at 6:22 PM UTC</title>
      <link href="https://timomeh.de/shorts/1757960538957/?utm_source=rss"/>
      <updated>2025-09-15T18:22:18Z</updated>
      <id>https://timomeh.de/shorts/1757960538957</id>
      <content type="html">&lt;p&gt;Most of the code I’ve written today could’ve been written by Claude, with some manual intervention and guidance in between. Because it was a lot of work where you look at similar implementations in the codebase and do roughly the same, which AIs are generally good at.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;But&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Then I would’ve only learned a tiny fraction about the existing code, and I likely wouldn’t understand half of it. By doing everything by myself, I learned so many things about the codebase that will be massively helpful in the future.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, September 14, 2025 at 10:24 PM UTC</title>
      <link href="https://timomeh.de/shorts/1757888682964/?utm_source=rss"/>
      <updated>2025-09-14T22:24:42Z</updated>
      <id>https://timomeh.de/shorts/1757888682964</id>
      <content type="html">&lt;p&gt;I also built a small Discord bot with n8n to automate posting. I added it to my private Discord server (which I use for various stuff), and whenever I post into a specific channel, it creates a new post here!&lt;/p&gt;
&lt;p&gt;Tomorrow: crossposting to other socials. I think. Or maybe images first.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, September 14, 2025 at 9:26 PM UTC</title>
      <link href="https://timomeh.de/shorts/1757885217047/?utm_source=rss"/>
      <updated>2025-09-14T21:26:00Z</updated>
      <id>https://timomeh.de/shorts/1757885217047</id>
      <content type="html">&lt;p&gt;I added short posts as a new post type. Basically as an alternative to posting on Bluesky or Twitter. Like in the old days.&lt;/p&gt;
&lt;p&gt;It’s scrappy, there’s a bug in timezones with relative times, and I want to add a bunch of stuff. But I can use it.&lt;/p&gt;
&lt;p&gt;I still don’t feel like I want to open Bluesky or Twitter. It pulls me in too much and messes with my inner peace. But I’ll definitely set up some cross-posting in the future, and I also want to pull in likes (and maybe comments? dunno yet) from socials.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Sunday, September 14, 2025 at 9:23 PM UTC</title>
      <link href="https://timomeh.de/shorts/1757885266015/?utm_source=rss"/>
      <updated>2025-09-14T21:23:00Z</updated>
      <id>https://timomeh.de/shorts/1757885266015</id>
      <content type="html">&lt;p&gt;Test Test&lt;/p&gt;
&lt;p&gt;Hello?&lt;/p&gt;
&lt;p&gt;Is this thing on?&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>You can tell me, I can take it</title>
      <link href="https://timomeh.de/posts/you-can-tell-me-i-can-take-it/?utm_source=rss"/>
      <updated>2025-08-25T23:48:00Z</updated>
      <id>https://timomeh.de/posts/you-can-tell-me-i-can-take-it</id>
      <content type="html">&lt;p&gt;I don’t like many of my development-related blog posts for one reason: I often feel like I spend too much time explaining the problem instead of getting straight to the point.&lt;/p&gt;
&lt;p&gt;Understanding the problem is just as important as understanding how to solve it. So I don’t want to skip explaining the problem properly. And I want to include readers who might not be familiar with the topic. But whenever I start writing, I imagine readers rolling their eyes in light of the “obviousness” of it all.&lt;/p&gt;
&lt;p&gt;I often think back to &lt;a href=&#34;https://css-tricks.com/words-avoid-educational-writing/&#34;&gt;&lt;em&gt;“Words To Avoid in Educational Writing”&lt;/em&gt;&lt;/a&gt; by Chris Coyier. He warns against using certain common words that make readers feel dumb. Just because &lt;em&gt;you&lt;/em&gt; find something obvious doesn’t mean &lt;em&gt;they&lt;/em&gt; do.&lt;/p&gt;
&lt;p&gt;I’m certainly guilty of using those words myself sometimes, but the message stuck with me. That’s why I always try to explain problems thoroughly: because the reader might not know this yet, and it could be valuable knowledge for them, and I want them to feel included.&lt;/p&gt;
&lt;p&gt;Still, I can’t shake the insecurity. Whenever I explain a problem, I worry readers will think that I’m a bit of a dum-dum for explaining something “everyone” already knows. Even when editing my posts before publishing them, I spend most of my time refining the problem explanation, trying to make it not too long but still explain everything.&lt;/p&gt;
&lt;p&gt;Do I explain problems too much? You can tell me, I can take it!&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Vary for images on Cloudflare CDN for free</title>
      <link href="https://timomeh.de/posts/vary-for-images-on-cloudflare-cdn-for-free/?utm_source=rss"/>
      <updated>2025-08-24T23:23:00Z</updated>
      <id>https://timomeh.de/posts/vary-for-images-on-cloudflare-cdn-for-free</id>
      <content type="html">
&lt;div class=&#34;lead&#34;&gt;&lt;p&gt;Let’s rebuild a paid Cloudflare feature … on Cloudflare, for free.&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://developers.cloudflare.com/cache/advanced-configuration/vary-for-images/&#34;&gt;Vary for images&lt;/a&gt; is a Cloudflare CDN feature that caches multiple variants of the same URL, based on the browser’s specific capabilities. It’s a paid feature. I want it, but I didn’t want to pay for it. That’s no issue, because we can rebuild this functionality on Cloudflare completely for free, with just a bit more configuration.&lt;/p&gt;

&lt;h3&gt;What’s the problem that I’m trying to solve?&lt;/h3&gt;
&lt;aside class=&#34;PostAside aside&#34;&gt;&lt;header class=&#34;PostAside-title&#34;&gt;tldr?&lt;/header&gt;&lt;p&gt;If you already know about content negotiation and just want to see the solution, just scroll down.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I have a small image optimization service running. It can generate different image sizes and compresses the image on the fly, to improve loading times for users. It can also turn the image into a different format, like WebP or AVIF, if the browser supports it.&lt;/p&gt;
&lt;p&gt;This means that the URL &lt;code&gt;timomeh.de/keyboardcat.png&lt;/code&gt; can return an image that’s not really a png. When the browser supports AVIF, it would return it as an AVIF, even though the URL ends with &lt;code&gt;.png&lt;/code&gt;. When it supports WebP, it returns a WebP, still using the &lt;code&gt;.png&lt;/code&gt; extension. When it supports neither, it actually returns a PNG. We have the same URL, but different files can be returned.&lt;/p&gt;
&lt;p&gt;The image optimization service is doing that by looking at the &lt;code&gt;Accept&lt;/code&gt; header, to see which image formats the browser supports, and then it decides which format to return. We also call this &lt;em&gt;content negotiation&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;But this image optimization service is doing all of this on the fly. It doesn’t cache images that it has already generated. Optimizing each image on every request is a bit slow and wasteful. We could add caching into our image optimization service, but that’s more work. We can also just use a CDN, like Cloudflare, and let it do the caching for us.&lt;/p&gt;
&lt;h3&gt;But if we just enable Cloudflare’s free CDN for our image optimization service, we’ll run into an issue&lt;/h3&gt;
&lt;p&gt;Cloudflare’s CDN caches files by its URL. When someone requests &lt;code&gt;timomeh.de/keyboardcat.png&lt;/code&gt;, it fetches the image from my service and caches it. The next time someone tries to load that file, Cloudflare will see that it already has a file cached for that URL, and will return it directly to the user.&lt;/p&gt;
&lt;p&gt;So when the first user’s browser supports AVIF, it will cache the optimized AVIF file. And when the second browser doesn’t support AVIF, they will also get the optimized AVIF file, and they won’t be able to see the image. That’s not great.&lt;/p&gt;
&lt;p&gt;To solve that, Cloudflare offers &lt;a href=&#34;https://developers.cloudflare.com/cache/advanced-configuration/vary-for-images/&#34;&gt;Vary for images&lt;/a&gt;, which also does content negotiation, and only returns cached variants that the browser supports. This is a paid feature.&lt;/p&gt;
&lt;h3&gt;How we can still use content negotiation on Cloudflare’s CDN for free&lt;/h3&gt;
&lt;p&gt;Cloudflare also has free URL Rewrites, which are actually pretty powerful! We can even rewrite a URL based on an HTTP header, like the &lt;code&gt;Accept&lt;/code&gt; header. You might see where this is going: we can use this to rewrite the URL into multiple different URLs for the different image formats, based on what format the browser supports.&lt;/p&gt;
&lt;p&gt;Let’s create the first URL Rewrite rule. Go into Cloudflare’s Dashboard, navigate to &lt;em&gt;Rules&lt;/em&gt; and create a new rule. Choose URL Rewrite Rule. We’ll use a &lt;em&gt;custom filter expression&lt;/em&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-txt&#34;&gt;(http.host eq &#34;timomeh.de&#34;
 and any(lower(http.request.headers[&#34;accept&#34;][*])[*]
   contains &#34;image/avif&#34;
))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, under &lt;em&gt;“Rewrite to”&lt;/em&gt;, we’ll use a static query param, like &lt;code&gt;?format=avif&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/waayQOK2ua-960.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Now, when a user requests &lt;code&gt;timomeh.de/keyboardcat.png&lt;/code&gt; and the browser supports AVIF, then the URL is rewritten to &lt;code&gt;timomeh.de/keyboardcat.png?format=avif&lt;/code&gt;. And this new URL is used to cache the file on the CDN.&lt;/p&gt;
&lt;p&gt;My image optimization service is doing &lt;em&gt;absolutely&lt;/em&gt; &lt;em&gt;nothing&lt;/em&gt; with this query parameter. It doesn’t look at it, it still just looks at the &lt;code&gt;Accept&lt;/code&gt; header. The only reason for this query parameter is to have a unique URL for Cloudflare’s CDN.&lt;/p&gt;
&lt;p&gt;We can create another rewrite rule for only WebP support:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-txt&#34;&gt;(http.host eq &#34;timomeh.de&#34;
 and any(lower(http.request.headers[&#34;accept&#34;][*])[*]
   contains &#34;image/webp&#34;)
 and not any(lower(http.request.headers[&#34;accept&#34;][*])[*]
   contains &#34;image/avif&#34;)
)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;…and we’ll use &lt;code&gt;?format=webp&lt;/code&gt; as rewrite query.&lt;/p&gt;
&lt;p&gt;In total, this will automatically get us 3 different URLs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;timomeh.de/keyboardcat.png?format=avif&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;timomeh.de/keyboardcat.png?format=webp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;timomeh.de/keyboardcat.png&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They will be separately cached. But we don’t have to link to those 3 different URLs ourselves. We can just continue to link to &lt;code&gt;timomeh.de/keyboardcat.png&lt;/code&gt;. Cloudflare does the rest for us.&lt;/p&gt;
&lt;h3&gt;Done&lt;/h3&gt;
&lt;p&gt;And now we have content negotiation for free!&lt;/p&gt;
&lt;p&gt;To make sure, we can quickly check that content negotiation is working properly by making 3 different curl requests:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-console&#34;&gt;$ curl -I \
    -H &#34;Accept: image/avif,image/webp,image/*;q=0.8,*/*;q=0.5&#34; \
    &#34;https://timomeh.de/keyboardcat.png&#34;
HTTP/2 200
content-type: image/avif
content-length: 36665
content-disposition: inline; filename=&#34;keyboardcat.avif&#34;
server: cloudflare
cf-cache-status: HIT

$ curl -I \
    -H &#34;Accept: image/webp,image/*;q=0.8,*/*;q=0.5&#34; \
    &#34;https://timomeh.de/keyboardcat.png&#34;
HTTP/2 200
content-type: image/webp
content-length: 35696
content-disposition: inline; filename=&#34;keyboardcat.webp&#34;
server: cloudflare
cf-cache-status: HIT

$ curl -I \
    -H &#34;Accept: image/jpeg,image/png,image/*;q=0.8,*/*;q=0.5&#34; \
    &#34;https://timomeh.de/keyboardcat.png&#34;
HTTP/2 200
content-type: image/png
content-length: 59883
content-disposition: inline; filename=&#34;keyboardcat.png&#34;
server: cloudflare
cf-cache-status: HIT
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can see it’s working: the first one returns an AVIF, the second one a WebP, and the third returns a PNG. All served by Cloudflare, and we got nice cache hits.&lt;/p&gt;
&lt;aside class=&#34;PostAside aside&#34;&gt;&lt;header class=&#34;PostAside-title&#34;&gt;hello cloudflare&lt;/header&gt;&lt;p&gt;You work at Cloudflare? Please don’t take this away from me.&lt;/p&gt;&lt;/aside&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>A Better Button Component with Composition</title>
      <link href="https://timomeh.de/posts/a-better-button-component-with-composition/?utm_source=rss"/>
      <updated>2025-07-02T18:01:00Z</updated>
      <id>https://timomeh.de/posts/a-better-button-component-with-composition</id>
      <content type="html">
&lt;p&gt;Do I really need to write an introduction to button components? We all know them. Buttons are one of the most commonly used components in our user interfaces, and are also some of the messiest components, with crappy interfaces and complex implementations for something as simple as a freaking button, and they only get worse as your codebase ages.&lt;/p&gt;
&lt;p&gt;In this post, I’ll briefly explain why button components are a classic problem in software engineering, how composition can solve this problem, and how I implement complex buttons with simple code these days.&lt;/p&gt;

&lt;h2&gt;What’s our problem with buttons?&lt;/h2&gt;
&lt;p&gt;Buttons seem so simple at first, but we need a lot from them: Primary buttons, secondary buttons, red buttons for destructive actions, bordered buttons, transparent buttons. In forms we need them to be an actual HTML &lt;code&gt;&amp;#x3C;button&gt;&lt;/code&gt; element, sometimes as &lt;code&gt;type=&#34;submit&#34;&lt;/code&gt; and sometimes as &lt;code&gt;type=&#34;button&#34;&lt;/code&gt;. Sometimes they aren’t buttons, they are links and should be an &lt;code&gt;&amp;#x3C;a&gt;&lt;/code&gt; element, unless it’s client-side routing where we need to use a special &lt;code&gt;&amp;#x3C;Link&gt;&lt;/code&gt; component. Buttons come in different sizes. They should support icons on the left, icons on the right, or only an icon and no text—but then of course with a tooltip! They can be disabled, but sometimes they can look disabled even though they are not actually disabled. They can have a loading state, so it also needs to support that A͟N͟D͟ T͟H͟E͟N S͟O͟M͟E͟T͟I͟M͟E͟S T̷H̴E̶ ̶B̸U̶T̶T̴O̵N̸S̶ 𝙏𝙃𝙀𝙔 𝘼𝙍𝙀 𝘽𝙐𝙏𝙏𝙊𝙉𝙎 𝘛𝙃𝘼𝙏 𝘼𝙍𝙀𝙉’𝙏¿!? ✖︎ B̷U̸T̶T̷O̴N̸S̶ — THEY REFUSE to exist ╰┈➤ t͞h̸e͟y͞ ͞m͡e͜l͜t͡ ͟i͠n͜t̛o̕ ̴t̕h̨e͝ ͘c̛o͞d͡e͢, THEY &lt;strong&gt;TALK&lt;/strong&gt; &lt;code&gt;&amp;#x3C;Button prop=&#34;kill_me&#34; /&gt;&lt;/code&gt; THE PROPS ARE ＳＣＲＥＡＭＩＮＧ AT ME &lt;code&gt;&gt; Warning: prop &#39;scream&#39; is not recognized on the DOM element. Did you mean &#39;screm&#39;?&lt;/code&gt; &lt;code&gt;onClick={() =&gt; END_MY_SUFFERING()}&lt;/code&gt; ⠀⛓ ᴀɴᴅ ʏᴇᴛ ɪ sᴛɪʟʟ ʜᴀᴠᴇ ᴛᴏ ᴅᴇᴀʟ ᴡɪᴛʜ &lt;code&gt;as=&#34;a&#34;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;&lt;em&gt;It’s a lot.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Buttons have to address many concerns. And our solution is really to try to squeeze all of that into a single component? &lt;em&gt;Really?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You might say: “hang on, we don’t always use a single component!” And you’re right—sometimes you’ll see separate components, such as an &lt;code&gt;&amp;#x3C;IconButton&gt;&lt;/code&gt;. However, I’d argue that this often makes things worse. Because now you have to implement many of those complex concerns twice. While you remove a single concern from your big bad button component (for example, the concern that it only renders an icon and no text), your new special &lt;code&gt;&amp;#x3C;IconButton&gt;&lt;/code&gt; still looks like a button, can be disabled and hovered like a button, and needs to share most of the same styles. You’ll also need to implement the polymorphism twice to render different clickable HTML elements.&lt;/p&gt;
&lt;p&gt;This problem sounds familiar! It seems like we’re dealing with separation of concerns, and simply refactoring it into an &lt;code&gt;&amp;#x3C;IconButton&gt;&lt;/code&gt; is the wrong separation. We don’t usually solve separation of concerns like this—we solve it with layering and composition!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The button component is nothing more than a classic software engineering problem that we usually solve with composition… &lt;em&gt;yet I’ve rarely seen it solved with good composition!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Moving the clickable element out of the button&lt;/h2&gt;
&lt;p&gt;Forget the idea of using a single button component. From now on, we’ll think of every button in our UI as multiple layered components.&lt;/p&gt;
&lt;p&gt;The base layer of every button is an unstyled, native interactive element, such as a button element or an anchor, in which we’ll nest a component that looks like a button:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;&amp;#x3C;button&gt;
  &amp;#x3C;PrimaryButton&gt;Submit form&amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/button&gt;

&amp;#x3C;a href=&#34;/pricing&#34;&gt;
  &amp;#x3C;PrimaryButton&gt;View our pricing&amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/a&gt;

function PrimaryButton(props) {
  return (
    &amp;#x3C;div className=&#34;p-4 bg-brand border border-brand-500 rounded&#34;&gt;
      {props.children}
    &amp;#x3C;/div&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 1: Basic composition by moving the clickable element out of the button component.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;aside class=&#34;PostAside aside&#34;&gt;&lt;header class=&#34;PostAside-title&#34;&gt;Note&lt;/header&gt;&lt;p&gt;I’m going to use tailwindcss in all examples. You can, of course, use whatever you want; the composition principles are the same.&lt;/p&gt;&lt;p&gt;I tested this with NVDA to make sure that screen readers have no issues with this markup.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;We immediately and completely remove polymorphism from our button components. That’s already a huge improvement. Polymorphic components are a big pain in the ass, and I try to avoid them wherever possible.&lt;/p&gt;
&lt;p&gt;Note that we won’t encapsulate our layered button into a single button component again. This would just result in a messy polymorphic component with lots of props and complexity. We will always call all layers as we need them.&lt;/p&gt;
&lt;p&gt;We can now achieve a lot with pure CSS. Adding hover and disabled states is straightforward and elegant:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;&amp;#x3C;button disabled&gt;
  &amp;#x3C;PrimaryButton&gt;Submit form&amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/button&gt;

function PrimaryButton(props) {
  return (
    &amp;#x3C;div
      className=&#34;
        p-4 bg-brand border border-brand-500 rounded
 // [!code ++:2]
        not-in-disabled:hover:bg-brand-600
        in-disabled:bg-brand-300 in-disabled:text-gray
      &#34;
    &gt;
      {props.children}
    &amp;#x3C;/div&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 2: Styling button states based on the parent element&#39;s state.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It’s great that we can solve this simply by adding CSS, without having to change any existing code. There’s no need to concatenate classes dynamically, nor did we need to add an attribute to our button.&lt;/p&gt;
&lt;p&gt;However, if necessary, we can also add a &lt;code&gt;disabled&lt;/code&gt; attribute to our button component. This would be useful if we needed a button that looks disabled but isn’t.&lt;/p&gt;
&lt;aside class=&#34;PostAside aside&#34;&gt;&lt;header class=&#34;PostAside-title&#34;&gt;Why is that useful?&lt;/header&gt;&lt;p&gt;It’s a good user experience pattern to indicate visually that an action cannot be performed, while still allowing the user to click the button and trigger a more detailed error message.&lt;/p&gt;&lt;/aside&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;&amp;#x3C;button&gt;
  &amp;#x3C;PrimaryButton disabled&gt;Submit form&amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/button&gt;

function PrimaryButton(props) {
  return (
    &amp;#x3C;div
      data-disabled={props.disabled} // [!code ++]
      className=&#34;
        p-4 bg-brand border border-brand-500 rounded
// [!code highlight:2]
        not-data-disabled:hover:bg-brand-600
        data-disabled:bg-brand-300 data-disabled:text-gray
      &#34;
    &gt;
      {props.children}
    &amp;#x3C;/div&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 3: Styling button states explicitly with attributes.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I’ve seen some really messy solutions to this problem, such as two separate &lt;code&gt;visuallyDisabled&lt;/code&gt; and &lt;code&gt;disabled&lt;/code&gt; attributes, where it’s unclear in which combination they should be used. But with composition, we don’t need to worry about that! We can immediately see from the way it’s used that we have a clickable button that isn’t disabled, and it has a visual child that looks disabled.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I cannot stress enough how powerful this is. We’re eliminating ambiguity and complexity while writing code that documents itself.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Isn’t this against DRY?&lt;/h2&gt;
&lt;p&gt;I’ve heard engineers in the past who argued that this approach is bad because you end up repeating yourself more. For example, writing &lt;code&gt;&amp;#x3C;button&gt;&amp;#x3C;Button /&gt;&amp;#x3C;/button&gt;&lt;/code&gt; many times. It’s often seen as a violation of the “Don’t repeat yourself” (DRY) principle.&lt;/p&gt;
&lt;p&gt;But DRY doesn’t mean that you’re never allowed to repeat yourself. It’s not about avoiding repetition at any cost. It’s about avoiding duplication of logic and knowledge.&lt;/p&gt;
&lt;p&gt;In our case, the repetition is fine. It’s markup. The alternative, like &lt;code&gt;&amp;#x3C;Button as=&#34;a&#34; href=&#34;/pricing&#34;&gt;&lt;/code&gt;, is the same repetition in a worse syntax.&lt;/p&gt;
&lt;h2&gt;Adding more layers on top&lt;/h2&gt;
&lt;p&gt;Now that our base is in place, we can start adding individual components for each concern and layer them into our button.&lt;/p&gt;
&lt;p&gt;For example, let’s say we want to add a loading state to our buttons. This means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The button should appear disabled.&lt;/li&gt;
&lt;li&gt;The button itself should be disabled so that users cannot re-submit a loading form.&lt;/li&gt;
&lt;li&gt;The button’s content should be replaced with a loading state.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here’s how we can implement this by separating each concern into its own layer:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;&amp;#x3C;button disabled&gt;
  &amp;#x3C;PrimaryButton disabled&gt;
    &amp;#x3C;LoadingLabel label=&#34;Saving…&#34; active={isSubmitting}&gt; // [!code ++]
      Save
    &amp;#x3C;/LoadingLabel&gt; // [!code ++]
  &amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/button&gt;

// [!code ++:13]
function LoadingLabel(props) {
  if (props.active) {
    return (
      &amp;#x3C;&gt;
        &amp;#x3C;SpinIcon /&gt;
        &amp;#x3C;span role=&#34;status&#34; aria-busy&gt;
          {props.label || &#39;Loading…&#39;}
        &amp;#x3C;/span&gt;
      &amp;#x3C;/&gt;
    )
  }
  return &amp;#x3C;&gt;{props.children}&amp;#x3C;/&gt;
}

function PrimaryButton(props) {
  return (
    &amp;#x3C;div
      data-disabled={props.disabled}
      className=&#34;
        p-4 bg-brand border border-brand-500 rounded
        not-data-disabled:hover:bg-brand-600
        data-disabled:bg-brand-300 data-disabled:text-gray
      &#34;
    &gt;
      {props.children}
    &amp;#x3C;/div&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 4: Adding a loading state for buttons with composition.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;With composition, we were able to solve it without a single change to the &lt;code&gt;PrimaryButton&lt;/code&gt;. That’s a good thing! It shows that our composition is working well.&lt;/p&gt;
&lt;p&gt;Another positive sign is that all of our attributes are in the right place. We added a &lt;code&gt;label&lt;/code&gt; and &lt;code&gt;active&lt;/code&gt; attribute, both of which are obvious in the context of the &lt;code&gt;LoadingLabel&lt;/code&gt; component. This new component addresses one specific concern, and all its attributes are related to this concern.&lt;/p&gt;
&lt;p&gt;To illustrate a poor design choice, let’s assume that we would add the loading state concern into the &lt;code&gt;PrimaryButton&lt;/code&gt;. This would result in something like this:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;&amp;#x3C;button disabled&gt;
  &amp;#x3C;PrimaryButton
    disabled
    loadingLabel=&#34;Saving…&#34;
    isLoading={isSubmitting}
  &gt;
    Save
  &amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/button&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 5: Anti-pattern for a loading state by overloading the button component with additional attributes.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This is a whack component interface! The attributes &lt;code&gt;loadingLabel&lt;/code&gt; and &lt;code&gt;isLoading&lt;/code&gt; are related to each other, but &lt;code&gt;disabled&lt;/code&gt; is not. All attributes have to be optional because not every button has a loading state. However, setting &lt;code&gt;loadingLabel&lt;/code&gt; makes no sense without &lt;code&gt;isLoading&lt;/code&gt;. The relationship between the attributes is not immediately obvious. This interface requires documentation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you have a whack component interface like this and your attributes are a mess of unrelated concerns, it’s a clear sign that you need to separate these concerns into different layers.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Different button variants&lt;/h2&gt;
&lt;p&gt;Until now, we have only used a single &lt;code&gt;PrimaryButton&lt;/code&gt;. In reality we often have different button variants, such as a &lt;code&gt;SecondaryButton&lt;/code&gt; in a different color, or a transparent button, or a red button for destructive actions.&lt;/p&gt;
&lt;p&gt;We could simply create an attribute for this, which would be an acceptable solution. But I’ll explain why we might not want this:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;&amp;#x3C;button&gt;
  &amp;#x3C;Button variant=&#34;primary&#34;&gt; // [!code highlight]
    Submit
  &amp;#x3C;/Button&gt;
&amp;#x3C;/button&gt;

&amp;#x3C;button type=&#34;button&#34;&gt;
  &amp;#x3C;Button variant=&#34;secondary&#34;&gt; // [!code highlight]
    Reset
  &amp;#x3C;/Button&gt;
&amp;#x3C;/button&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 6: Button variants with attributes.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;According to what I wrote in the previous section, an attribute is sufficient for the variant. We don’t need to add another layer. It still only controls the visual appearance of the button’s base.&lt;/p&gt;
&lt;p&gt;But it’s not the implementation that I would choose. I think it’s fine to have separate components for each variant, all within the same file:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;function PrimaryButton(props) {
  return (
    &amp;#x3C;div
      className=&#34;
        p-4 bg-brand border border-brand-500 rounded
        not-in-disabled:hover:bg-brand-600
        in-disabled:bg-brand-300 in-disabled:text-gray
      &#34;
    &gt;
      {props.children}
    &amp;#x3C;/div&gt;
  )
}

function SecondaryButton(props) {
  return (
    &amp;#x3C;div
      className=&#34;
        p-4 bg-gray border border-gray-500 rounded
        not-in-disabled:hover:bg-gray-600
        in-disabled:bg-gray-300 in-disabled:text-gray
      &#34;
    &gt;
      {props.children}
    &amp;#x3C;/div&gt;
  )
}

function TransparentButton(props) {
  return (
    &amp;#x3C;div
      className=&#34;
        p-4 bg-transparent border border-transparent rounded
        not-in-disabled:hover:bg-gray-100
        in-disabled:bg-gray-200 in-disabled:text-gray
      &#34;
    &gt;
      {props.children}
    &amp;#x3C;/div&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 7: Button variants with individual components.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Although we’re repeating some styles multiple times, the repeated code is close together, so I don’t consider it a big problem.&lt;/p&gt;
&lt;p&gt;Even with different button sizes, I’d still prefer a &lt;code&gt;&amp;#x3C;PrimaryButton size=&#34;sm&#34;&gt;&lt;/code&gt; over a &lt;code&gt;&amp;#x3C;Button variant=&#34;primary&#34; size=&#34;sm&#34;&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;There are two main reasons why I prefer separate components:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Keep your design in mind before implementing a combination of all possible variants and sizes.&lt;/strong&gt;&lt;br&gt;
Some button variants only come in specific sizes. For example, the secondary button may always be medium and never large. One benefit of keeping the variants in separate components is that you don’t have to support all possible combinations of variants and sizes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It discourages contributors from changing a generic button component for “one-off buttons”.&lt;/strong&gt;&lt;br&gt;
Instead, it encourages your peers and contributors to create separate components for new buttons that look slightly different. There’s a high chance that it’s a one-off button. You might ask: “what’s a one-off button?”&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Make one-off buttons not reusable&lt;/h2&gt;
&lt;p&gt;Not all components in a design will be reused. For instance, we might use a huge button with a shiny effect on the landing page that is never used again.&lt;/p&gt;
&lt;p&gt;There’s often the tendency to change the button component and add attributes like &lt;code&gt;size=&#34;xxl&#34;&lt;/code&gt; and &lt;code&gt;variant=&#34;shiny&#34;&lt;/code&gt; to it, even though it’s only used once in this exact combination. While it may seem like a small, quick change and we can reuse the existing button, we then make the decision to carry this burden around. Maintaining the button will be more difficult because we’ll always have to check that our special styling won’t break. At some point, the huge shiny button on the landing page is removed, but nobody removed the styles from the reusable button component.&lt;/p&gt;
&lt;p&gt;If you encounter a button style that you haven’t seen before and it’s only used in one place, I recommend writing it inline instead of extending the existing button component. This tells all contributors that it is not meant to be reusable and only supports exactly what was needed.&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;&amp;#x3C;a href=&#34;/signup&#34;&gt;
  &amp;#x3C;div className=&#34;p-8 bg-brand effect-shine text-xxl rounded&#34;&gt;
    Sign up
  &amp;#x3C;/div&gt;
&amp;#x3C;/a&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 8: Implementing a one-off button inline. You don&#39;t always need to use a button component.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;We don’t need to think about the styles when the special button is disabled because it cannot be disabled. And when it’s removed, no remnants are left behind.&lt;/p&gt;
&lt;h2&gt;Example: icons in buttons&lt;/h2&gt;
&lt;p&gt;To wrap up some patterns that I use more often, you can add support for icons with just some CSS. This works well for left icons, right icons, and only icon buttons without text:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;function PrimaryButton(props) {
  return (
    &amp;#x3C;div
      className=&#34;
        p-4 bg-brand border border-brand-500 rounded
        not-in-disabled:hover:bg-brand-600
        in-disabled:bg-brand-300 in-disabled:text-gray

// [!code ++:3]
        inline-flex flex-wrap
        gap-1.5 items-center justify-center
        *:[svg]:size-4 *:shrink-0
      &#34;
    &gt;
      {props.children}
    &amp;#x3C;/div&gt;
  )
}

&amp;#x3C;button&gt;
  &amp;#x3C;PrimaryButton&gt;
    &amp;#x3C;FloppyDiskIcon /&gt; // [!code highlight]
    Save
  &amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/button&gt;

&amp;#x3C;a href=&#34;/page/2&#34;&gt;
  &amp;#x3C;PrimaryButton&gt;
    Next page
    &amp;#x3C;ArrowRightIcon /&gt; // [!code highlight]
  &amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/a&gt;

&amp;#x3C;Tooltip label=&#34;Edit&#34;&gt;
  &amp;#x3C;button disabled aria-label=&#34;Edit&#34;&gt;
    &amp;#x3C;PrimaryButton&gt;
      &amp;#x3C;PencilIcon /&gt; // [!code highlight]
    &amp;#x3C;/PrimaryButton&gt;
  &amp;#x3C;/button&gt;
&amp;#x3C;/Tooltip&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 9: Simple support for icons in buttons.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;
&lt;li&gt;Icons can be added as simple children.&lt;/li&gt;
&lt;li&gt;The icons are automatically sized.&lt;/li&gt;
&lt;li&gt;It adds space between icons and text.&lt;/li&gt;
&lt;li&gt;It ensures that the button wraps nicely.&lt;/li&gt;
&lt;li&gt;We use composition for the tooltip instead of adding a tooltip into our button.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more advanced cases—when you feel the need to add an attribute to the &lt;code&gt;PrimaryButton&lt;/code&gt; to control the icons—keep in mind that it’s better to separate the concerns and use composition. Don’t overload the button component with weird attributes again. A separate component that only handles the icon layout will be easier to maintain, and we can use it as an overlay on the base button.&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-jsx&#34;&gt;&amp;#x3C;button&gt;
  &amp;#x3C;PrimaryButton&gt;
    &amp;#x3C;IconLabel start={&amp;#x3C;FloppyDiskIcon /&gt;}&gt; // [!code highlight]
      Save
    &amp;#x3C;/IconLabel&gt;
  &amp;#x3C;/PrimaryButton&gt;
&amp;#x3C;/button&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 10: Using composition for icons in buttons.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Bonus: Focus rings&lt;/h2&gt;
&lt;p&gt;Sadly, focus styles are often overlooked and lack sufficient emphasis. Often, they simply mirror the hover styles, but hover and focus are two very different things. A hover style alone isn’t enough to catch your eye when navigating with a keyboard.&lt;/p&gt;
&lt;p&gt;Focus rings are an effective solution because they make the focus state highly visible. And because we separated the button into multiple layers, adding focus rings for all elements is quick and easy:&lt;/p&gt;
&lt;figure&gt;&lt;pre&gt;&lt;code class=&#34;language-css&#34;&gt;:focus-visible {
  outline-color: var(--color-brand-300);
  outline-offset: 4px;
  outline-width: 2px;
  border-radius: 2px;
}
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 11: Global styles for focus rings of clickable elements.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The focus ring is now a concern of the native button- and anchor element, so we can style it independently of the button component. It does not affect the button component at all, and the focus rings will always be present and consistent.&lt;/p&gt;
&lt;p&gt;Of course, you could still define a focus style in the button component. But you don’t need to. It works great without it. &lt;/p&gt;
&lt;h2&gt;Tip: avoid &lt;code&gt;className&lt;/code&gt; as attribute&lt;/h2&gt;
&lt;p&gt;Adding a &lt;code&gt;className&lt;/code&gt; attribute to a component is one of the easiest ways to shoot yourself in the foot. It opens up the component too much, and quickly becomes hard to control. It invites contributors (and even future-you!) to mess with the internal styles from the outside, making it harder to change anything without breaking stuff.&lt;/p&gt;
&lt;p&gt;Just don’t.&lt;/p&gt;
&lt;h2&gt;Reflection&lt;/h2&gt;
&lt;p&gt;So, here we are! What started as “I just wanna write a short post about this pattern I’m using for buttons” quickly turned into a long article.&lt;/p&gt;
&lt;p&gt;We talked a lot about buttons because, as we all know, they’re often the worst offenders in a codebase. At this point, “the button component” has basically become a meme. But somewhere along the way, it feels like we’ve started to accept that these components are inherently messy. &lt;/p&gt;
&lt;p&gt;I asked ChatGPT to “write me a button component in React that implements all the necessary features that I will need”, and it shat out this:&lt;/p&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;pre&gt;&lt;code class=&#34;language-tsx&#34;&gt;import React from &#34;react&#34;;
import { cn } from &#34;@/lib/utils&#34;;

export type ButtonProps = {
  asChild?: boolean;
  variant?: &#34;default&#34; | &#34;destructive&#34; | &#34;outline&#34; | &#34;ghost&#34; | &#34;link&#34;;
  size?: &#34;default&#34; | &#34;sm&#34; | &#34;lg&#34; | &#34;icon&#34;;
  loading?: boolean;
  disabled?: boolean;
  type?: &#34;button&#34; | &#34;submit&#34; | &#34;reset&#34;;
  children?: React.ReactNode;
  className?: string;
  onClick?: React.MouseEventHandler&amp;#x3C;HTMLButtonElement&gt;;
} &amp;#x26; React.ButtonHTMLAttributes&amp;#x3C;HTMLButtonElement&gt;;

const Button = React.forwardRef&amp;#x3C;HTMLButtonElement, ButtonProps&gt;(
  (
    {
      variant = &#34;default&#34;,
      size = &#34;default&#34;,
      loading = false,
      disabled = false,
      type = &#34;button&#34;,
      className,
      children,
      ...props
    },
    ref
  ) =&gt; {
    return (
      &amp;#x3C;button
        ref={ref}
        type={type}
        disabled={disabled || loading}
        className={cn(
          &#34;inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none&#34;,
          {
            default: &#34;bg-primary text-white hover:bg-primary/90&#34;,
            destructive: &#34;bg-red-500 text-white hover:bg-red-600&#34;,
            outline: &#34;border border-input bg-background hover:bg-accent hover:text-accent-foreground&#34;,
            ghost: &#34;hover:bg-accent hover:text-accent-foreground&#34;,
            link: &#34;underline-offset-4 hover:underline text-primary&#34;,
          }[variant],
          {
            default: &#34;h-10 px-4 py-2&#34;,
            sm: &#34;h-9 px-3&#34;,
            lg: &#34;h-11 px-8&#34;,
            icon: &#34;h-10 w-10&#34;,
          }[size],
          className
        )}
        {...props}
      &gt;
        {loading ? &amp;#x3C;span className=&#34;animate-spin mr-2 h-4 w-4 border-2 border-current border-t-transparent rounded-full&#34; /&gt; : null}
        {children}
      &amp;#x3C;/button&gt;
    );
  }
);
Button.displayName = &#34;Button&#34;;

export { Button };
&lt;/code&gt;&lt;/pre&gt;&lt;figcaption&gt;Fig. 12: A horrible button component written by ChatGPT, as it exists in many projects.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;aside class=&#34;PostAside aside&#34;&gt;&lt;header class=&#34;PostAside-title&#34;&gt;lol&lt;/header&gt;&lt;p&gt;I especially love how ChatGPT used a &lt;code&gt;size&lt;/code&gt; enum with the values &lt;code&gt;default&lt;/code&gt;, &lt;code&gt;sm&lt;/code&gt;, &lt;code&gt;lg&lt;/code&gt; and &lt;code&gt;icon&lt;/code&gt;. What a great combination of names for sizes! It’s funny because that’s exactly what happens in real projects.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;This is why the button component is a meme. It’s a brittle, hard-to-maintain mess. But it also looks like something I’ve seen a lot in codebases—and, honestly, it’s something I’ve contributed to in the past. It shouldn’t be like this.&lt;/p&gt;
&lt;p&gt;While I only talked about buttons in this article, the same patterns can and should be used for other UI components as well. Buttons are just the worst offenders, but they are not the only ones. I now use the same layered UI composition patterns for many more things, and I believe it is some of the best frontend code I have ever written.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>What&#39;s that LaCroix flavor?</title>
      <link href="https://timomeh.de/posts/whats-that-lacroix-flavor/?utm_source=rss"/>
      <updated>2025-06-03T22:10:00Z</updated>
      <id>https://timomeh.de/posts/whats-that-lacroix-flavor</id>
      <content type="html">
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/kLjGAvCmOm-960.jpeg&#34; alt=&#34;&amp;#x22;Who&amp;#x27;s that Pokemon?&amp;#x22; image but with the silhouette of a can&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>I&#39;m using em dashes—but I&#39;m not an AI</title>
      <link href="https://timomeh.de/posts/i-am-using-em-dashes-but-i-am-not-an-ai/?utm_source=rss"/>
      <updated>2025-05-19T20:48:00Z</updated>
      <id>https://timomeh.de/posts/i-am-using-em-dashes-but-i-am-not-an-ai</id>
      <content type="html">
&lt;p&gt;Please don’t make the em dash—the long hyphen I’m using here—an indicator of AI-written text. I recently saw a post on LinkedIn (it pains me to admit it) where someone wrote a script to hide all comments containing an em dash because they’re highly likely to be AI-generated. I think there’s truth to it. But I also hate the fact that I think there’s truth to it.&lt;/p&gt;

&lt;p&gt;For a long time, I used en dashes – the shorter version of the em dash. I always used it with a space, then the en dash, then a space. I liked how it structured sentences visually and caused me to read them with a small pause. I think it looks much nicer than parentheses (which always make me feel like I’m doing maths) and I also think it structures sentences better than commas, especially when the sentence contains a list of comma-separated words.&lt;/p&gt;
&lt;p&gt;I used en dashes until I saw a &lt;a href=&#34;https://www.youtube.com/watch?v=Bd8r7LUiUJA&#34;&gt;video by John Green&lt;/a&gt; where he explained that I had been using them incorrectly all this time. The correct usage is an em dash—you don’t even need to add spaces, although you can.&lt;/p&gt;
&lt;p&gt;You can use an &lt;em&gt;en dash&lt;/em&gt; for ranges, such as 2–3pm. You can also use an en dash to reduce the ambiguity of a regular hyphen. In John Green’s example, it’s &lt;em&gt;‘New York–style pizza’&lt;/em&gt; and not &lt;em&gt;‘New York-style pizza’&lt;/em&gt;. This makes it clear that it’s a style of pizza from New York, and not a new pizza in York-style. Or how &lt;a href=&#34;https://www.merriam-webster.com/grammar/em-dash-en-dash-how-to-use&#34;&gt;Merriam-Webster&lt;/a&gt; defines it, &lt;em&gt;“in compound adjectives when at least one of the elements is a two-word compound”&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;However, you shouldn’t use the en dash as a replacement for a comma, semicolon or parentheses. For this, you use the em dash. —&lt;/p&gt;
&lt;p&gt;So I started using the em dash more often as a result. And I looove using it. I still think it’s a great way to structure a sentence visually without cluttering it up, and it makes me pause when I read it.&lt;/p&gt;
&lt;p&gt;However, more recently, I’ve noticed that I’ve been trying to avoid using the em dash. I’ve caught myself typing it and then removing it again to replace it with a comma. Simply because I noticed that AI uses em dashes a lot, and I’m afraid people will think my text is AI-generated, even though I’m not.&lt;/p&gt;
&lt;p&gt;Is this the slow death of em dashes?&lt;/p&gt;
&lt;p&gt;I think I’ll just embrace them and use them whenever I want. Maybe I’ll sometimes surround them with spaces, which AI doesn’t seem to do. Maybe I’ll use them more than necessary to shove them into people’s faces. Perhaps people will think my text is AI-generated, but then again, maybe I’ll just write it so badly that no AI could produce such rubbish.&lt;/p&gt;
&lt;p&gt;AI might take my job, but it won’t take my em dashes away!&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Saw a cat</title>
      <link href="https://timomeh.de/posts/saw-a-cat/?utm_source=rss"/>
      <updated>2025-05-03T22:24:00Z</updated>
      <id>https://timomeh.de/posts/saw-a-cat</id>
      <content type="html">&lt;p&gt;Saw a cat, took some photos. Cat looked like it was having one of those days.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/9aKPvn7m7Y-960.jpeg&#34; alt=&#34;a brown-grey cat sits on a stone wall and looks majestically to the side, paws tucked in the front, green plants in the background&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/4MLYa1Zl-S-960.jpeg&#34; alt=&#34;the cat is still sitting on the wall, but looks down sadly (or just very tired)&#34;&gt;&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>How and when should I actually migrate my database?</title>
      <link href="https://timomeh.de/posts/how-and-when-should-i-actually-migrate-my-database/?utm_source=rss"/>
      <updated>2025-05-02T15:23:00Z</updated>
      <id>https://timomeh.de/posts/how-and-when-should-i-actually-migrate-my-database</id>
      <content type="html">
&lt;p&gt;For a long time, across different projects throughout my career, I’ve seen database migrations happen during application startup. These migrations usually run as part of a post-deployment hook, just before the new deployment receives any production traffic. But… what’s happening in this short (or sometimes longer) timeframe after the migration is done and before the new app boots, while the old app is still active?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What if you’re doing a slow rollout? Won’t the old instances fail because the database changed?&lt;/li&gt;
&lt;li&gt;What if your new code has an issue and you have to do an immediate rollback? Won’t the old version now also fail until the database is rolled back? Wouldn’t that result in big disruption of service?&lt;/li&gt;
&lt;li&gt;What if your migration takes a long time? Will it take a long time until your new code is deployed as well?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I had so many questions, but the root one was: “do I have to worry about this at all?” The answer was yes. Because I saw how issues and incidents happened where those questions suddenly became reality.&lt;/p&gt;
&lt;p&gt;And over time, I built up an understanding and realized the answers to those questions—but I also realized how this seemingly dangerous process can actually be pretty chill. So let’s do a quick dive into when (and how) to seamlessly migrate your database.&lt;/p&gt;
&lt;h2&gt;How a small change turns into a stressful experience&lt;/h2&gt;
&lt;p&gt;A popular example is how to rename a database column. Let’s take a look into what will happen if you just rename a column in a single migration with a simple &lt;code&gt;ALTER TABLE RENAME COLUMN&lt;/code&gt; SQL statement:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You change the schema locally, rename the column, and trigger a deployment to production.&lt;/li&gt;
&lt;li&gt;At some point during deployment, the migration runs.&lt;/li&gt;
&lt;li&gt;The migration will lock the whole table—no reads and writes to it anymore for a short amount of time. In the example of a simple rename, this is a quick operation.&lt;/li&gt;
&lt;li&gt;The migration was successful, but the deployment is not fully done, and the old app is still active and receives traffic. The old app will now start to throw errors because it’s trying to access a column that doesn’t anymore exist. Right now, your users will sometimes see errors popping up.&lt;/li&gt;
&lt;li&gt;You sit there, your butt cheeks clenched, and you wait until hopefully all new instances have booted and receive 100% of the production traffic.&lt;/li&gt;
&lt;li&gt;All looks good, the new version is active. You feel relieved, and your butt cheeks go back into a relaxed state.&lt;/li&gt;
&lt;li&gt;10 minutes later, you’re alerted to an incident: There’s a high error rate. Your change introduced a critical bug. Luckily, you are prepared for this, because you can roll back to the previous version within seconds with 1 simple click.&lt;/li&gt;
&lt;li&gt;But your old code uses the old column name, and the rollback did not revert your migrations. The rolled back version still throws errors. Maybe it refuses to boot at all.&lt;/li&gt;
&lt;li&gt;Shit. What now? Are you prepared to run a script to revert the database migration? Do you push a new commit and wait for multiple minutes until it’s deployed?&lt;/li&gt;
&lt;/ol&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/qteolLw9bY-960.png&#34; alt=&#34;illustration of an astronaut falling scared into a spiral, holding his clenched buttocks&#34;&gt;&lt;/p&gt;&lt;/figure&gt;
&lt;p&gt;Of course, it doesn’t always have to result in an incident. But there’s a short amount of time where users will see errors, and it’s definitely a more risky situation. So what can we do instead? &lt;/p&gt;
&lt;h2&gt;Be backwards compatible… multiple times&lt;/h2&gt;
&lt;p&gt;To prevent all those issues, we have to divide our migrations into multiple backwards compatible changes. Let’s continue with the example of renaming a column, and how we would divide this into multiple steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new column to the schema and run the migration. Don’t migrate the data yet; just update the schema. Your code will still reference the old column. This new column will be empty and should have no default value—then you’re not locking the table. Simply don’t touch the old column, and you won’t break anything.&lt;/li&gt;
&lt;li&gt;Migrate the data separately. Do it in batches to avoid database load and locking the whole table. Depending on your setup, this is likely not even a part of your automated deployment pipeline, but instead just a script that you’re executing manually. I’ll talk more about those manual tasks later in this article.&lt;/li&gt;
&lt;li&gt;Update and deploy your code to reference the new column. Depending on what data you’re migrating, it’s likely that you want to read and write from both columns.&lt;/li&gt;
&lt;li&gt;You should now be in a state where both columns are always in sync. Be sure to do a sanity check to ensure that’s the case.&lt;/li&gt;
&lt;li&gt;Now remove any references in your code to the old column and deploy it. Do not yet delete the old column, just don’t access it anymore.&lt;/li&gt;
&lt;li&gt;After the new version is fully rolled out to production, the old column is not used anymore, and you can finally drop the old column from the schema. You can wait a few days before you delete the old column, to increase the time frame of backwards compatible changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;figure style=&#34;--content-image-shadow: none&#34;&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/dTuNYcD3A5-960.png&#34; alt=&#34;illustration of a happy astronaut flying away from a spiral, with lines indicating relieve coming from his buttocks&#34;&gt;&lt;/p&gt;&lt;/figure&gt;
&lt;p&gt;Because we’re doing a bunch of backwards compatible changes, if we fuck up at any stage, we can try again and no one will notice. And we can also do instant rollbacks to a previous version in an emergency. The longer we take to do the last step, the more room we give ourselves to roll back.&lt;/p&gt;
&lt;p&gt;Now that we know how and why we safely migrate our database, when and where should we perform these steps?&lt;/p&gt;
&lt;h2&gt;Treat it as an async process in multiple one-off tasks&lt;/h2&gt;
&lt;p&gt;You can do all of these steps in an async manner. And that’s what I think is the beauty of it. Those steps don’t have to happen as part of your automated deployment pipeline, and you don’t even have to stress about getting it done quickly during a single workday. You can take your time!&lt;/p&gt;
&lt;p&gt;In this setup, you wouldn’t even need to migrate the schema during a deployment. It can totally happen during normal operations. And if you don’t want to block the deployment pipeline with a long-running migration, and potentially block any urgent fixes, it maybe shouldn’t happen as part of a regular deployment.&lt;/p&gt;
&lt;p&gt;But it’s also a good practice to not raw-dog into your production database from your local machine and execute any SQL.&lt;/p&gt;
&lt;p&gt;Prepare your steps as separate scripts, and let your colleagues review them. This isn’t about code style or maintainability—in the end, they’re just one-off scripts. But your colleagues may see some typos, or issues where you’ll accidentally cause high database load.&lt;/p&gt;
&lt;p&gt;And then have a way to execute these scripts inside your production infrastructure. For example, a &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/controllers/job/&#34;&gt;Kubernetes Job&lt;/a&gt; which can connect to your database, or any equivalent service in your infrastructure that can connect to your database but is not your production service which handles real traffic. Then you don’t have to directly connect to your database from your local machine or from a deployment machine like GitHub Actions.&lt;/p&gt;
&lt;h2&gt;Compiled apps, CLI dependencies, and migrations&lt;/h2&gt;
&lt;p&gt;I’m working a lot with dockerized TypeScript apps. The final docker image only contains bundled code, and dependencies that are referenced in the bundled code. But migrations aren’t part of the bundle—because they aren’t part of my running app. And a CLI to run migrations, &lt;a href=&#34;https://orm.drizzle.team/docs/kit-overview&#34;&gt;like &lt;code&gt;drizzle-kit&lt;/code&gt;&lt;/a&gt;, also isn’t part of the final bundle!&lt;/p&gt;
&lt;p&gt;Knowing that I want to run migrations async in my production environment, I was wondering for some time how the actual fuck I’m supposed to run them within my production docker image—because it doesn’t contain my migrations and the drizzle CLI. I can’t just start that image in a one-off job and execute my tasks. So, should I install &lt;code&gt;drizzle-kit&lt;/code&gt; in my production image? Copy all migrations? But that would increase the size of my docker image, and I want to keep it small.&lt;/p&gt;
&lt;p&gt;The solution to this is quite simple: just have a separate image. You could, for example, execute a Dockerfile as a one-off script:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-dockerfile&#34;&gt;FROM node:22-slim
WORKDIR /app
COPY package.json pnpm-lock.yaml
RUN pnpm install --frozen-lockfile
COPY ./migrations ./migrations
CMD [&#34;npx&#34;, &#34;drizzle-kit&#34;, &#34;migrate&#34;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s what I’m doing, with a small tweak that I’m inlining this Dockerfile inside a &lt;code&gt;docker-compose&lt;/code&gt; file, as a separate service called “migrate”. I can just start that service on production, it builds itself, runs the migrations, and then exits.&lt;/p&gt;
&lt;p&gt;Or you could even not care about migration files at all, use the schema in your code as the source of truth, and use something like &lt;code&gt;drizzle-kit push&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-dockerfile&#34;&gt;FROM node:22-slim
WORKDIR /app
COPY package.json pnpm-lock.yaml
RUN pnpm install --frozen-lockfile
COPY . .
CMD [&#34;npx&#34;, &#34;drizzle-kit&#34;, &#34;push&#34;, &#34;--force&#34;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Of course: the trade-offs!&lt;/h2&gt;
&lt;p&gt;As with everything, there are trade-offs, and you don’t need to do this strict approach all the time. Some projects simply don’t have those requirements. And in some projects maybe the few seconds of downtime are okay.&lt;/p&gt;
&lt;p&gt;Do you need to do all of this in your side project? Probably not.&lt;/p&gt;
&lt;p&gt;Would it be okay if your production docker image is a few MB larger and you execute the migrations, including data migrations, during app boot? Could be okay.&lt;/p&gt;
&lt;p&gt;But will you still learn something from practicing it? Absolutely.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>GitHub Releases as RSS Feed</title>
      <link href="https://timomeh.de/posts/github-releases-as-rss-feed/?utm_source=rss"/>
      <updated>2025-04-23T18:37:00Z</updated>
      <id>https://timomeh.de/posts/github-releases-as-rss-feed</id>
      <content type="html">
&lt;p&gt;Quick tip: You can follow GitHub Releases in your feed reader. Just add &lt;code&gt;.atom&lt;/code&gt; to the end of the releases URL. For example:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/glanceapp/glance/releases&#34;&gt;https://github.com/glanceapp/glance/releases&lt;/a&gt;&lt;br&gt;
👇&lt;br&gt;
&lt;a href=&#34;https://github.com/glanceapp/glance/releases.atom&#34;&gt;https://github.com/glanceapp/glance/releases.atom&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can do the same with other GitHub resources—like commits, users, tags—if that’s useful to you. But I find the releases feed super handy. Sometimes I just wanna stay in the loop on certain software, like apps, frameworks, major libraries, services, databases.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>If you&#39;re using Next.js&#39; Middleware for authorization, you&#39;re doing something wrong</title>
      <link href="https://timomeh.de/posts/if-youre-using-next-js-middleware-for-authorization-youre-doing-something-wrong/?utm_source=rss"/>
      <updated>2025-03-23T23:10:00Z</updated>
      <id>https://timomeh.de/posts/if-youre-using-next-js-middleware-for-authorization-youre-doing-something-wrong</id>
      <content type="html">
&lt;p&gt;Whenever the topic of authorization in our Next.js apps came up at &lt;a href=&#34;https://gigs.com/&#34;&gt;Gigs&lt;/a&gt;, I had a very strict opinion and rule: we don’t use the middleware for authorization. We can use the middleware for some optimistic UI patterns, like an early redirect when a user is logged out, but never as a means to grant a user access to some data. I’m not saying this because I hate the middleware, or because it’s an easily predictable vulnerability, but because of the way the Next.js middleware sits in an application.&lt;/p&gt;

&lt;p&gt;If you were affected by &lt;a href=&#34;https://nextjs.org/blog/cve-2025-29927&#34;&gt;CVE-2025-29927&lt;/a&gt; in the sense that you were vulnerable to an authorization bypass, you should rethink the structure of your application. Reading the responses to this CVE makes me think that people either don’t know how Next.js’ middleware works, or they don’t know where authorization should happen in an application.&lt;/p&gt;
&lt;p&gt;The Next.js middleware is very bare-bones: you have a single function for your entire application that gets a &lt;code&gt;NextRequest&lt;/code&gt; and you return a &lt;code&gt;NextResponse&lt;/code&gt;. The response can be a &lt;code&gt;rewrite()&lt;/code&gt; or a &lt;code&gt;redirect()&lt;/code&gt; or &lt;code&gt;next()&lt;/code&gt;, the latter meaning “continue routing”. But unlike other web frameworks, Next.js’ middleware can’t write to a context object that you can read from later in your routes. Your routes only have access to the &lt;code&gt;NextRequest&lt;/code&gt;, which you can’t extend however you want. You can only add headers to the request in the middleware, but an HTTP header is obviously not something you should trust blindly.&lt;/p&gt;
&lt;p&gt;In other web frameworks, the middleware writes data to a context object that you can control and can trust; it should be impossible for anyone outside to write to this object. In an Express middleware, you would &lt;em&gt;authenticate&lt;/em&gt; the user and then add the current user to &lt;code&gt;req.user&lt;/code&gt;, in Koa you would add it to &lt;code&gt;ctx.user&lt;/code&gt;. Your routes will then do &lt;em&gt;authorization&lt;/em&gt; checks based on this context, or you may even have another middleware layer that returns a &lt;code&gt;401 Unauthorized&lt;/code&gt; if the user context is missing.&lt;/p&gt;
&lt;p&gt;In these examples, if your authentication middleware failed or was skipped, the context object would be missing, and the routes would subsequently fail. But if your Next.js middleware can fail or be skipped, and your routes just keep working, there’s something seriously wrong with your software design.&lt;/p&gt;
&lt;p&gt;Your authorization logic should happen, with your authentication context (i.e. the current user object), close to where you handle data: either after you fetch some data and before you return it to the user, or, if possible, even before you fetch the data. But whether you do it before or after you fetch data, it happens &lt;em&gt;in&lt;/em&gt; or &lt;em&gt;very&lt;/em&gt; &lt;em&gt;close to&lt;/em&gt; your data layer. However, as you might notice, Next.js’ middleware is nowhere near an authorization check in the data layer. I treat it as part of the presentation layer.&lt;/p&gt;
&lt;p&gt;Relying on authorization within Next.js’ middleware is like building a single-page application with a login, but the API that you use when the user is logged in has no authorization at all. In this example, you also have no shared context that you can fully trust.&lt;/p&gt;
&lt;p&gt;In our Next.js apps at &lt;a href=&#34;https://gigs.com&#34;&gt;Gigs&lt;/a&gt;, we split our codebase into a presentation layer and a data layer. The presentation layer (the &lt;code&gt;/app&lt;/code&gt; folder) can never access data directly by calling an API or a database, instead it has to call a function in the data layer. Inside the data layer (the &lt;code&gt;/data&lt;/code&gt; folder), we have a &lt;code&gt;userContext()&lt;/code&gt; function that returns the acting user by reading it from the request’s encrypted HTTP-Only cookie. The &lt;code&gt;userContext()&lt;/code&gt; function is only allowed to be called within the data layer, and not from the presentation layer. We use this user context object every time we try to access data in the data layer, before we return any data back to the presentation layer.&lt;/p&gt;
&lt;p&gt;That’s how we make sure the authorization happens at the right place. How you structure your code may be different, but however you structure it, you should still put authorization close to where you’re accessing data.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Fish is a great shell that simplified my dotfiles</title>
      <link href="https://timomeh.de/posts/fish-is-a-great-shell-that-simplified-my-dotfiles/?utm_source=rss"/>
      <updated>2025-03-23T15:30:00Z</updated>
      <id>https://timomeh.de/posts/fish-is-a-great-shell-that-simplified-my-dotfiles</id>
      <content type="html">
&lt;p&gt;I’ve been a zsh user for a long time, though I’ve had a bit of a love-hate relationship with it. It’s cool once you get it configured, but there’s so much to configure, and from time to time things would just break or the shell would get annoyingly slow.&lt;/p&gt;

&lt;p&gt;I started keeping track of my zsh config in a &lt;a href=&#34;https://github.com/timomeh/dotfiles&#34;&gt;dotfiles repository&lt;/a&gt;, so I can roll back to a previous state if the shell suddenly gets slow or something breaks. The dotfiles cover more than just zsh, but zsh was the biggest part of it. After starting with oh-my-zsh many years ago, I tried several different plugin managers.&lt;/p&gt;
&lt;p&gt;I ended up using &lt;a href=&#34;https://github.com/zdharma-continuum/zinit&#34;&gt;Zinit&lt;/a&gt; with &lt;a href=&#34;https://www.gnu.org/software/stow/&#34;&gt;stow&lt;/a&gt; for a long time. It was fast and I could modularize my zsh config into local plugins. I liked the simplicity of stow, but Zinit has a syntax and concepts that I had to learn and remember: ice modifiers, turbo mode, some plugins are prefixed with “light”… after a while of not looking at it, I forgot how all that works. So in October 2024 I made a big change: I changed all of my dotfiles to be based on Nix with home-manager.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Nix with home-manager sounded cool in theory. What attracted me the most was that it adds a lot of good zsh tools with just a few lines of configuration. And when things break, it’s easy to roll it back to a previous state, and it should work exactly as it did before. However, it also quickly became annoying: every tiny change has to be reapplied, which always takes a few seconds. And since Nix takes full ownership of your tooling, everything has to be installed and configured through it. On top of that, I think it has a very steep learning curve that feels much more complex and mysterious. I started to feel the same struggles I had with Zinit: if I didn’t touch it for a while, I unlearned how it worked.&lt;/p&gt;
&lt;p&gt;Then one day, when I had to make a change to my Nix config while I was in a somewhat stressful debugging situation, I couldn’t apply my Nix config anymore. I had no idea why, it was just a bunch of cryptic error messages that looked like compiler errors. After some googling, I learned that it needed some major dependency updates first, which caused breaking changes to the configuration, which I then had to google again.&lt;/p&gt;
&lt;p&gt;Nix had to go. When shit hits the fan, I can’t risk not knowing how to change my system configuration, or not being able to install or update tools. It’s just so much unnecessary frustration. Even though I liked how home-manager comes with many batteries included, I just don’t want to learn the language and behavior of something that adds a layer of complexity between me and my shell configuration.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;What now? Back to Zinit? I also heard some good things about the fish shell. So when I got rid of Nix, I thought this might be a good chance to try out fish after all this time with zsh.&lt;/p&gt;
&lt;p&gt;And the fish experience is great! It’s fast and comes with so many batteries and minimal configuration. Suggestions, completions, syntax highlighting, autocomplete—it all works right out of the box. I don’t have to add so much stuff to my dotfiles that I won’t understand in a few months. And because there’s a lot less configuration, I don’t need a management tool to tame my shell configuration.&lt;/p&gt;
&lt;p&gt;And with all that already included, it’s easy to add my usual tooling workflows. Besides my custom &lt;a href=&#34;https://github.com/timomeh/dotfiles/blob/840baa738240fcb352287a64c3aa05d86eccbcc9/.config/fish/conf.d/aliases_git.fish&#34;&gt;git aliases&lt;/a&gt;, I make heavy use of &lt;a href=&#34;https://github.com/PatrickF1/fzf.fish&#34;&gt;fzf&lt;/a&gt;, &lt;a href=&#34;https://github.com/bnprks/mcfly-fzf&#34;&gt;mcfly&lt;/a&gt;, &lt;a href=&#34;https://github.com/denisidoro/navi&#34;&gt;navi&lt;/a&gt;, &lt;a href=&#34;https://github.com/nvbn/thefuck&#34;&gt;thefuck&lt;/a&gt;, and often rely on information from the &lt;a href=&#34;https://starship.rs/&#34;&gt;starship prompt&lt;/a&gt;, all of which were quick to add and configure for the habits that are ingrained in me after so many years of using zsh.&lt;/p&gt;
&lt;p&gt;I’m back to using stow again to link files to my home directory. I’m just installing all the tools with &lt;a href=&#34;https://brew.sh/&#34;&gt;brew&lt;/a&gt; and &lt;a href=&#34;https://mise.jdx.dev/&#34;&gt;mise&lt;/a&gt;. And all the config, including fish, is neatly stored in its corresponding &lt;code&gt;~/.config&lt;/code&gt; directory. Everything is nice and modular, with no additional tools required, just conventions. And whenever I need to change something, I feel confident that I know what to do.&lt;/p&gt;
&lt;p&gt;If you would like to take a look, here’s my &lt;a href=&#34;https://github.com/timomeh/dotfiles&#34;&gt;timomeh/dotfiles repository&lt;/a&gt;.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Werner by Herzog</title>
      <link href="https://timomeh.de/posts/werner-by-herzog/?utm_source=rss"/>
      <updated>2025-03-18T00:01:00Z</updated>
      <id>https://timomeh.de/posts/werner-by-herzog</id>
      <content type="html">
&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=3D25j0Olc_E&#34;&gt;https://www.youtube.com/watch?v=3D25j0Olc_E&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;wait a second i know the synthesizer why don’t i use the synthesizer&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;There are a few things I always wanted to do with AI. This is one of them.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>URL Fragments and pushState() are weird</title>
      <link href="https://timomeh.de/posts/url-fragments-and-push-state-are-weird/?utm_source=rss"/>
      <updated>2025-03-17T20:22:00Z</updated>
      <id>https://timomeh.de/posts/url-fragments-and-push-state-are-weird</id>
      <content type="html">
&lt;p&gt;Yesterday I learned two weird things that happen when you use &lt;code&gt;pushState()&lt;/code&gt; to navigate to a page with a URL fragment:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/:target&#34;&gt;CSS &lt;code&gt;:target&lt;/code&gt; selector&lt;/a&gt; doesn’t work. You can use &lt;code&gt;:target&lt;/code&gt; to style an element that is the current URL fragment when doing a &lt;em&gt;full document load&lt;/em&gt;, but not with &lt;code&gt;pushState&lt;/code&gt;! This is also documented &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/:target#description&#34;&gt;on MDN&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The target element is set at document load and &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/History/back&#34;&gt;&lt;code&gt;history.back()&lt;/code&gt;&lt;/a&gt;, &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/History/forward&#34;&gt;&lt;code&gt;history.forward()&lt;/code&gt;&lt;/a&gt;, and &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/History/forward&#34;&gt;&lt;code&gt;history.go()&lt;/code&gt;&lt;/a&gt; method calls. But it is &lt;em&gt;not&lt;/em&gt; changed when &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/History/pushState&#34;&gt;&lt;code&gt;history.pushState()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState&#34;&gt;&lt;code&gt;history.replaceState()&lt;/code&gt;&lt;/a&gt; methods are called.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But that’s weird! Why not? I would argue that it makes &lt;code&gt;:target&lt;/code&gt; a little bit unusable in modern web applications. Even though it’s such a useful feature!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Window/hashchange_event&#34;&gt;&lt;code&gt;hashchange&lt;/code&gt; event&lt;/a&gt; doesn’t fire. Even though the hash changes, the event doesn’t fire. This is also documented on MDN, but oddly enough it’s documented &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/History/pushState#description&#34;&gt;in the &lt;code&gt;pushState&lt;/code&gt; docs&lt;/a&gt;, and &lt;em&gt;not&lt;/em&gt; in the &lt;code&gt;hashchange&lt;/code&gt; docs.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note that &lt;code&gt;pushState()&lt;/code&gt; never causes a &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Window/hashchange_event&#34;&gt;&lt;code&gt;hashchange&lt;/code&gt;&lt;/a&gt; event to be fired, even if the new URL differs from the old URL only in its hash.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s weird! And unexpected. This note should be included in the &lt;code&gt;hashchange&lt;/code&gt; docs. Might be a good opportunity to open a small pull request.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I did indeed open a &lt;a href=&#34;https://github.com/mdn/content/pull/38684&#34;&gt;small pull request&lt;/a&gt; and the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Window/hashchange_event&#34;&gt;hashchange docs&lt;/a&gt; now also explain this behavior.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Reading less short message social media</title>
      <link href="https://timomeh.de/posts/reading-less-short-message-social-media/?utm_source=rss"/>
      <updated>2025-03-05T14:03:00Z</updated>
      <id>https://timomeh.de/posts/reading-less-short-message-social-media</id>
      <content type="html">
&lt;p&gt;I stopped scrolling through Bluesky for a month, and I really enjoyed that month.&lt;/p&gt;
&lt;p&gt;Even though Bluesky and Mastodon are much nicer places than Twitter, I realized that I don’t enjoy the experience of scrolling through short message social media. There are a few posts here and there that are nice or funny or interesting, but if there’s just a one post that I don’t want to read or think about, the whole experience is ruined for me.&lt;/p&gt;
&lt;p&gt;It’s not about keeping your feed clean of extremism and other bullshit. It was easy to keep my feeds clean on Bluesky and Mastodon. But people think and post about a lot of different things, and I’m just not interested in all of them, nor do I want to spend any amount of mental capacity thinking about them. Scrolling past them is difficult. I have to force myself not to read something I’m not interested in. And that just makes it not a great experience.&lt;/p&gt;
&lt;p&gt;I subscribe to a YouTube channel because I’m interested in the kind of content they make, and I assume that future content will be similar. And I follow people on Instagram because I like the pictures they post. But short message services just give me too much variety in what to expect.&lt;/p&gt;
&lt;p&gt;So, I will continue what I did for a month. I deleted the Bluesky app from my phone and removed it from my browser bookmarks. I’ll still cross-post my posts there, because of course I want to reach an audience. And maybe I’ll post the occasional meme there. (Why not post them here?) But for now, I don’t want to consume text feeds.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Upgrading to Tailwind v4.0</title>
      <link href="https://timomeh.de/posts/upgrading-to-tailwind-v4/?utm_source=rss"/>
      <updated>2025-01-25T18:51:00Z</updated>
      <id>https://timomeh.de/posts/upgrading-to-tailwind-v4</id>
      <content type="html">
&lt;p&gt;On 22 January, 3 days ago at the time of writing, &lt;a href=&#34;https://tailwindcss.com/blog/tailwindcss-v4&#34;&gt;Tailwind v4.0 was released&lt;/a&gt; with some major changes. I decided to upgrade today, and the upgrade path was mixed to be honest!&lt;/p&gt;

&lt;p&gt;Tailwind provides an &lt;a href=&#34;https://tailwindcss.com/docs/upgrade-guide#using-the-upgrade-tool&#34;&gt;automated upgrade tool&lt;/a&gt;, which worked okay-ish. One of the major changes is the new &lt;a href=&#34;https://tailwindcss.com/blog/tailwindcss-v4#css-first-configuration&#34;&gt;CSS-first configuration&lt;/a&gt; instead of the old JavaScript-based configuration. Unfortunately, the upgrade tool didn’t migrate the configuration, saying it couldn’t.  Maybe because of the typography plugin, maybe because of something else, I don’t know, it didn’t tell me.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-css&#34;&gt;/* This is how the new configuration file should look like */
@import &#34;tailwindcss&#34;;
@theme {
  --font-display: &#34;Satoshi&#34;, &#34;sans-serif&#34;;
  --breakpoint-3xl: 1920px;
  --color-avocado-100: oklch(0.99 0 0);
  --color-avocado-200: oklch(0.98 0.04 113.22);
  --color-avocado-300: oklch(0.94 0.11 115.03);
  --color-avocado-400: oklch(0.92 0.19 114.08);
  --color-avocado-500: oklch(0.84 0.18 117.33);
  --color-avocado-600: oklch(0.53 0.12 118.34);
  --ease-fluid: cubic-bezier(0.3, 0, 0, 1);
  --ease-snappy: cubic-bezier(0.2, 0, 0, 1);
}

/* This is what the upgrade tool did */
@config &#34;../../tailwind.config.js&#34;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But the new CSS-based config is a big part of Tailwind 4, and I wanted to use it. The upgrade tool simply loaded the old config &lt;a href=&#34;https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file&#34;&gt;in compatibility mode&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So I had to migrate it manually, but the &lt;a href=&#34;https://tailwindcss.com/docs/upgrade-guide&#34;&gt;upgrade guide&lt;/a&gt; doesn’t really explain how to migrate the old JavaScript-based configuration. So I had to figure it out for myself, and while some of it was obvious and easy to find, other things weren’t so easy.&lt;/p&gt;
&lt;h2&gt;Dark mode variants&lt;/h2&gt;
&lt;p&gt;I use multiple dark mode variants. This is what it looked like in the old configuration:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;module.exports = {
  darkMode: [
    &#39;variant&#39;,
    [
      &#39;@media (prefers-color-scheme: dark) { &amp;#x26;:not(html[data-theme=light] *, [data-theme=light]) }&#39;,
      &#39;&amp;#x26;:is([data-theme=dark] *, html[data-theme=dark])&#39;,
    ],
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;dark:&lt;/code&gt; variant can now be configured with the &lt;code&gt;@custom-variant&lt;/code&gt; directive. The &lt;a href=&#34;https://tailwindcss.com/docs/dark-mode#using-a-data-attribute&#34;&gt;Dark mode docs&lt;/a&gt; have an example of how to override it with a single rule, but how do I use it with multiple rules like in the old configuration? It took me a while to figure out that the docs use a shorthand syntax, and you can use multiple rules with the long syntax:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-css&#34;&gt;/* Example in the docs, uses the shorthand syntax */
@custom-variant dark (&amp;#x26;:where([data-theme=dark], [data-theme=dark] *));

/* This is how it works with multiple selectors */
@custom-variant dark {
  &amp;#x26;:where([data-theme=&#39;dark&#39;] *, [data-theme=&#39;dark&#39;]) {
    @slot;
  }

  @media (prefers-color-scheme: dark) {
    &amp;#x26;:not(html[data-theme=&#39;light&#39;] *, [data-theme=&#39;light&#39;]) {
      @slot;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Overriding the gray color palette&lt;/h2&gt;
&lt;p&gt;Tailwind’s color palette has 5 different gray temperatures, ranging from a cool blueish gray called “Slate” to a warm brownish gray called “Stone”. You usually use only one of these grays. I like to use “Stone” and have aliased it to &lt;code&gt;gray&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;const colors = require(&#39;tailwindcss/colors&#39;)

module.exports = {
  theme: {
    extends: {
      colors: {
        gray: colors.stone, // [!code highlight]
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How does this aliasing work in the new CSS-based configuration? Well, you have to override all gray shades.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-css&#34;&gt;@theme {
  --color-gray-50: var(--color-stone-50);
  --color-gray-100: var(--color-stone-100);
  --color-gray-200: var(--color-stone-200);
  --color-gray-300: var(--color-stone-300);
  --color-gray-400: var(--color-stone-400);
  --color-gray-500: var(--color-stone-500);
  --color-gray-600: var(--color-stone-600);
  --color-gray-700: var(--color-stone-700);
  --color-gray-800: var(--color-stone-800);
  --color-gray-900: var(--color-stone-900);
  --color-gray-950: var(--color-stone-950);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Custom background images&lt;/h2&gt;
&lt;p&gt;To create a utility class with a custom background image (for an image file, not a gradient), you could extend the theme like any other utility:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;module.exports = {
  theme: {
    extends: {
      backgroundImage: {
        &#39;dark-grain&#39;: &#34;url(dark-grain-pattern.svg)&#34;, // [!code highlight]
        &#39;light-grain&#39;: &#34;url(light-grain-pattern.svg)&#34; // [!code highlight]
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The new docs to &lt;a href=&#34;https://tailwindcss.com/docs/background-image#customizing-your-theme&#34;&gt;customize &lt;code&gt;background-image&lt;/code&gt;&lt;/a&gt; only mention gradients, but not images. So I guessed how it should work based on how it used to work, but I guessed wrong. I also couldn’t figure out if there’s still a way to extend it within the theme, so I’m now simply using a utility.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-css&#34;&gt;@theme {
  /* This does not work! */
  --bg-dark-grain: url(&#34;dark-grain-pattern.svg&#34;); /* [!code --] */
  --bg-light-grain: url(&#34;light-grain-pattern.svg&#34;); /* [!code --] */
}

/* This works */
@utility bg-dark-grain {
  background-image: url(&#34;dark-grain-pattern.svg&#34;); /* [!code ++] */
}

@utility bg-light-grain {
  background-image: url(&#34;light-grain-pattern.svg&#34;); /* [!code ++] */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Using arbitrary &lt;code&gt;transition-property&lt;/code&gt; values&lt;/h2&gt;
&lt;p&gt;I have some places where I only want to transition the &lt;code&gt;transform&lt;/code&gt; and &lt;code&gt;opacity&lt;/code&gt; properties, and I simply used &lt;code&gt;transition-[transform,opacity]&lt;/code&gt; to apply these transitions. But after upgrading to v4, these transitions were broken! I couldn’t find anything in the upgrade guide, and the &lt;a href=&#34;https://tailwindcss.com/docs/transition-property&#34;&gt;transition-property docs&lt;/a&gt; didn’t look any different at first glance.&lt;/p&gt;
&lt;p&gt;Until I saw that &lt;code&gt;transition-transform&lt;/code&gt; now uses 4 properties: the usual &lt;code&gt;transform&lt;/code&gt;, but 3 new custom properties &lt;code&gt;translate&lt;/code&gt;, &lt;code&gt;scale&lt;/code&gt; and &lt;code&gt;rotate&lt;/code&gt;. This is not mentioned as a breaking change, and the upgrade tool didn’t catch it either.&lt;/p&gt;
&lt;p&gt;You now have to transition those properties as well:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;#x3C;!-- v3 --&gt;
&amp;#x3C;div class=&#34;transition-[transform,opacity]&#34; /&gt;

&amp;#x3C;!-- v4 --&gt;
&amp;#x3C;div class=&#34;transition-[transform,translate,scale,rotate,opacity]&#34; /&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, you don’t need to specify &lt;em&gt;all&lt;/em&gt; of these properties if you only need to transition some of them.&lt;/p&gt;
&lt;h2&gt;Using the Tailwind Typography plugin&lt;/h2&gt;
&lt;p&gt;Tailwind’s &lt;a href=&#34;https://github.com/tailwindlabs/tailwindcss-typography&#34;&gt;typography plugin&lt;/a&gt; is great, and I think you should always use it (or any alternative for good standard text rendering). When I was manually migrating the configuration, I finally got to the typography configuration and was wondering how to migrate it to the new CSS-based configuration. The &lt;a href=&#34;https://github.com/tailwindlabs/tailwindcss-typography&#34;&gt;documentation of the plugin&lt;/a&gt; didn’t mention the new config, and the upgrade guide didn’t mention anything either. Until I found a note in the &lt;a href=&#34;https://tailwindcss.com/docs/functions-and-directives#compatibility&#34;&gt;functions and directives docs&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;@plugin&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Use the &lt;code&gt;@plugin&lt;/code&gt; directive to load a legacy JavaScript-based plugin:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-css&#34;&gt;@plugin &#34;@tailwindcss/typography&#34;;
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Legacy? Oh no. Let’s hope we get non-legacy plugins in the future.&lt;/p&gt;
&lt;p&gt;Anyway, to use the typography plugin, you can use the old configuration and import it into the new configuration.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-css&#34;&gt;@config &#39;./typography.config.js&#39;; [!code highlight]

@theme {
  /* ... */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;// typography.config.js

/** @type {import(&#39;tailwindcss&#39;).Config} */
module.exports = {
  plugins: [require(&#39;@tailwindcss/typography&#39;)],
  theme: {
    extend: {
      typography: () =&gt; ({
        DEFAULT: {
          css: {
            color: &#39;#333&#39;,
            a: {
              color: &#39;#3182ce&#39;,
              &#39;&amp;#x26;:hover&#39;: {
                color: &#39;#2c5282&#39;,
              }
            }
            // etc
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Final thoughts&lt;/h2&gt;
&lt;p&gt;Although the upgrade path has been a bit of a bumpy ride, I like the overall change in direction that Tailwind has taken. It now not only supports the new features of the platform, it embraces them and shows them to you. It’s much more of an extension of the platform, rather than just a collection of utility classes.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Favorite Media 2024</title>
      <link href="https://timomeh.de/posts/favorite-media-2024/?utm_source=rss"/>
      <updated>2024-12-31T01:30:00Z</updated>
      <id>https://timomeh.de/posts/favorite-media-2024</id>
      <content type="html">
&lt;p&gt;An incomplete list of my favorite videos, shows, movies and music of 2024, in no particular order.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=MmJ8NVLji84&#34;&gt;&lt;strong&gt;Installing The Sonic Drive-In Operating System&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Trying to get an old drive-in self-service counter to work. The first Bringus Studios video I’ve seen. Laughed a lot. Love the editing with the small jokes and memes sprinkled on top.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=Modo5hnUshg&#34;&gt;&lt;strong&gt;Completely Overhauling my 1940’s Garage&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
I really like home renovation videos! But this one brought it to the next level. I had to spontaneously laugh out loud multiple times.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=jpPfCLjFVyo&#34;&gt;&lt;strong&gt;I flew to Detroit to track down a Game Boy thief&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
I like watching Nick’s longer documentaries. Very nostalgic feeling.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=xw7PsZ340kQ&#34;&gt;&lt;strong&gt;The Worst Sitcom Ending of All Time – Two and a Half Men&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
A video essay about the ending of Two and a Half Men, the drama surrounding Charlie Sheen, and the good aftermath that was less talked about.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=jn92eWhGG14&#34;&gt;&lt;strong&gt;The Men Who Promised the Impossible: Unlimited Energy&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Remember when scientists thought they were able to generate more energy than they put in? I didn’t, because I wasn’t born back then. A 3-part documentary about the crazy story and aftermath of trying to solve cold fusion.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=b3gZOt1Lo4A&#34;&gt;&lt;strong&gt;I Don’t Know James Rolfe&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
A video essay about James Rolfe, also known as the “Angry Video Game Nerd”. I’ve used to watch AVGN a lot, and I even bought the AVGN movie on Vimeo, so it was interesting to learn more about James. But at the end you realize that it’s not just about James Rolfe, it’s about getting older and changing. The production and filming of this video essay was amazing, and peaked with the small model of the AVGN studio at the end.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=91vAsyyRaag&#34;&gt;&lt;strong&gt;DIY basement slab&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
More entertaining and funny home renovation content! I proceeded to binge-watch the whole Müjin channel the same evening.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=p6udDpmtmOY&#34;&gt;&lt;strong&gt;TRANSANGLIUM 1: Can I Cross England in a Straight Line Before GeoWizard?&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
I’ve clicked on this video not knowing (and not realizing) it was a parody. I thought it was going to be a regular straight-line mission, which made it even funnier when it got more and more ridiculous.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/@jetlagthegame&#34;&gt;&lt;strong&gt;Jet Lag: The Game&lt;/strong&gt;&lt;/a&gt; &lt;a href=&#34;https://www.youtube.com/playlist?list=PLB7ZcpBcwdC6zyXJyImHgVdrC4Vl8SNG9&#34;&gt;&lt;strong&gt;S08&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, &lt;a href=&#34;https://www.youtube.com/playlist?list=PLB7ZcpBcwdC7gTO_IVdiBv8nVPLKbqNa4&#34;&gt;S09&lt;/a&gt;, &lt;a href=&#34;https://www.youtube.com/playlist?list=PLB7ZcpBcwdC4dhXkpNzUVsGFZp72v0UqL&#34;&gt;S10&lt;/a&gt;, &lt;a href=&#34;https://www.youtube.com/playlist?list=PLB7ZcpBcwdC56V3DHxfFVTMDzera__IFi&#34;&gt;S11&lt;/a&gt;, &lt;a href=&#34;https://www.youtube.com/playlist?list=PLB7ZcpBcwdC79KvPUh76PhFZ8x7q18hOW&#34;&gt;S12&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
I couldn’t pick a specific season of Jet Lag, so I picked all of them from this year. Jet Lag is a travel competition show, where they compete in a game (like Tag or Capture the Flag) throughout a whole country or continent. I have a Nebula subscription just because I want to support Jet Lag.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=CtHpiNBzPsk&#34;&gt;&lt;strong&gt;Shit’s on Fire, Yo!&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
A talk from Deviant Ollam (the elevator and lock picking guy) about fire code in buildings and sprinkler systems. Now, whenever I go through an airport or hotel, I always look at the colors of the sprinklers on the ceilings.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/watch?v=z2EUPDSabY0&#34;&gt;&lt;strong&gt;The greatest clock (and map) ever made&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
I want that clock!&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/@DougDoug&#34;&gt;&lt;strong&gt;DougDoug&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Right now my favorite english-speaking YouTube channel. Doug cracked the code with his combination of silly challenges, AI, gaming and chat interaction. He knows how to create entertaining and unique content, which is evident by his guide to new creators.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/@dubsonizer&#34;&gt;&lt;strong&gt;Donnie_oh&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
My favorite german-speaking YouTube channel. Donnie seems like a great guy, he deserves more views. I lately enjoy his reaction content a lot, but also the real-life stories and gaming content is very entertaining to watch.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/@Engineezy&#34;&gt;&lt;strong&gt;Engineezy&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
”Maker content” is another genre I like to watch, and JBV/Engineezy builds marble machines from time to time! Building marble machines fascinated me since the Marble Machine X videos, which became a bit difficult to follow (iykyk). So I’m really grateful for videos about building marble machines that are shorter, and don’t take multiple years to complete.&lt;/li&gt;
&lt;li&gt;📺 &lt;a href=&#34;https://www.youtube.com/@MaxMakerChannel&#34;&gt;&lt;strong&gt;Max Maker&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Maker content meets home renovation! Not necessarily home &lt;em&gt;renovation&lt;/em&gt;, but he’s building a new workshop right now.&lt;/li&gt;
&lt;li&gt;🎬 &lt;a href=&#34;https://www.imdb.com/title/tt11280740/&#34;&gt;&lt;strong&gt;Severance&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Whenever I see a show I like a lot, I think “there can’t be anything better”. Now I think there can’t be anything better than Severance. Looking forward to season 2.&lt;/li&gt;
&lt;li&gt;🎬 &lt;a href=&#34;https://www.imdb.com/title/tt13443470/&#34;&gt;&lt;strong&gt;Wednesday&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Binge-watched Wednesday together with a good friend. Good times! The plot was kinda predictable, but it was still entertaining. &lt;/li&gt;
&lt;li&gt;🎬 &lt;a href=&#34;https://www.imdb.com/title/tt21867434/&#34;&gt;&lt;strong&gt;Blackberry&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
The story of Blackberry. Had this on my watchlist for a year, until we watched it on our company offsite.&lt;/li&gt;
&lt;li&gt;💿 &lt;a href=&#34;https://open.spotify.com/album/2ej3ZX7h1N7noej8defaj1&#34;&gt;&lt;strong&gt;Faber – Addio&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
This album was by far the album and songs I heard the most this year. My Spotify wrapped was just songs from this album.&lt;/li&gt;
&lt;li&gt;💿 &lt;a href=&#34;https://open.spotify.com/album/7xTZRsn24E15EitkMHeOjb&#34;&gt;&lt;strong&gt;Gringo Mayer – Ihr liewe Leit&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;💿 &lt;a href=&#34;https://open.spotify.com/album/5Ck6efk3eVXHqiQUzg3qAY&#34;&gt;&lt;strong&gt;Tim Freitag – Monsters Forever&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;💿 &lt;a href=&#34;https://open.spotify.com/album/1Sc1C169FkYZIPH9lOP5w8&#34;&gt;&lt;strong&gt;Enno Bunger – Der beste Verlierer&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;💿 &lt;a href=&#34;https://open.spotify.com/album/65aaWX8pDif9qt6u4kNPpq&#34;&gt;&lt;strong&gt;DI-RECT – Sphinx&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;💿 &lt;a href=&#34;https://open.spotify.com/album/2cXmNLcQmo2pFtaFPvQcue&#34;&gt;&lt;strong&gt;SIND – Erstmal für immer&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;💿 &lt;a href=&#34;https://open.spotify.com/album/2ugpQnwxFFVfVpX3Q6SlCZ&#34;&gt;&lt;strong&gt;J. Bernhardt – Contigo&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🎵 &lt;a href=&#34;https://www.youtube.com/watch?v=y4G5z8Zt34c&#34;&gt;&lt;strong&gt;Marc Rebillet Ft. Gabriel Richards (saxophone guy) from we outside ep 4&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🎵 &lt;a href=&#34;https://open.spotify.com/track/7n3hfyNw12pdVoWAYHcEuO&#34;&gt;&lt;strong&gt;skuth – Ändert nichts&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🎵 &lt;a href=&#34;https://open.spotify.com/track/0fnFswOjUpFddzIfy2CY3P&#34;&gt;&lt;strong&gt;Thunder Jackson – Hello Stranger&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🎵 &lt;a href=&#34;https://open.spotify.com/track/48ydM7KLcCPtT8hAc3QVRF&#34;&gt;&lt;strong&gt;Nils Frevert – Ich würde dir helfen, eine Leiche zu verscharren, wenn’s nicht meine ist&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🎵 &lt;a href=&#34;https://open.spotify.com/track/3iA4foXIFpekwHyma7pRs1&#34;&gt;&lt;strong&gt;Men At Work – Overkill&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Only deploy on Fridays</title>
      <link href="https://timomeh.de/posts/only-deploy-on-fridays/?utm_source=rss"/>
      <updated>2024-12-22T16:27:00Z</updated>
      <id>https://timomeh.de/posts/only-deploy-on-fridays</id>
      <content type="html">
&lt;p&gt;There’s a poster next to my desk with “Only deploy on Fridays” written on it. The poster is visible on &lt;a href=&#34;https://gigs.com/careers&#34;&gt;Gigs’ Careers page&lt;/a&gt;, and from time to time, colleagues and applicants mention it or ask me about it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/YOJsiL6U44-960.jpeg&#34; alt=&#34;the desk in my home office with the &amp;#x22;Only deploy on Fridays&amp;#x22; poster hanging on the right side of it&#34;&gt;&lt;/p&gt;

&lt;p&gt;Last year, &lt;a href=&#34;https://losstopschade.de/&#34;&gt;Daniel&lt;/a&gt; sent me a photo of some scribbles he made with funny work-related sentences in a very artsy and typographical style. One thing led to another, and sometime later, I received this poster in the mail. It’s a phrase he picked, based on topics that we often discussed.&lt;/p&gt;
&lt;p&gt;Of course, the statement to &lt;em&gt;only&lt;/em&gt; deploy on Fridays is exaggerated and satirical. It’s an obvious nod to the &lt;em&gt;“Don’t deploy on Fridays”&lt;/em&gt; rule—something I encountered a few times in different jobs and projects, but I can’t identify with.&lt;/p&gt;
&lt;p&gt;Restricting deployments to certain days or times is a bit of a short-sighted mentality. Some people are very afraid of deploying to production, but that’s not how it should be. If you’re afraid of it, instead of doing it less often and continuing to be afraid of it, do it more often and take the fear out of it until it becomes second nature.&lt;/p&gt;
&lt;p&gt;You should always deploy. Do it on weekdays, evenings, Fridays, weekends—whenever you finish an increment of work. But do it with common sense and responsibility. If you’re deploying something that could have an unintended impact and you need to monitor its rollout, it doesn’t make sense to trigger a deployment and immediately close your laptop. It’s not a very responsible thing to do.&lt;/p&gt;
&lt;p&gt;Just because you’re deploying on a Thursday instead of a Friday doesn’t give you proper confidence that it will continue to work over the weekend. You still have to be confident in your changes regardless of the day or time. You can’t skimp on writing tests just because it worked on production for a few days. Conversely, when you’re confident in your work, the day or time of deployment doesn’t matter.&lt;/p&gt;
&lt;p&gt;Better yet, decouple the act of deploying with the act of releasing. Put your work behind a &lt;a href=&#34;https://martinfowler.com/articles/feature-toggles.html&#34;&gt;feature flag&lt;/a&gt;, continuously work on your feature behind this flag, and ship multiple smaller increments to production. Users won’t be impacted by your work in progress because it’s not yet released to them. When the time is right, enable the flag and start rolling it out to users. If you notice unintended side effects, like a spike in errors or something that doesn’t work as expected, you can just disable the feature flag again with a simple click, and the crisis is averted.&lt;/p&gt;
&lt;p&gt;I believe that working with &lt;a href=&#34;https://martinfowler.com/bliki/ContinuousDelivery.html&#34;&gt;Continuous Deployment&lt;/a&gt; is an important tool to improve your skills as a software engineer. And Continuous Deployment can’t stop on a Friday: it’s &lt;em&gt;continuous&lt;/em&gt;. Some people will be skeptical at first: when I first introduced Continuous Deployment at &lt;a href=&#34;https://gigs.com/&#34;&gt;Gigs&lt;/a&gt;, some colleagues were skeptical, some new joiners had doubts about it, and some candidates I’m interviewing sometimes question how this should work. These doubts will always fade away, and everyone will see the benefits. I think they are skeptical at first because it requires you to approach your work from a different angle. It’s different from making larger releases with breaking changes, and not everyone is used to working like this. You have to work in backwards-compatible increments, and you have to increase your confidence in your changes. But all of these are good things. Having the confidence to deploy on a Friday, just like any other day, is a freeing experience.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>gimme dat snake_case</title>
      <link href="https://timomeh.de/posts/gimme-dat-snake-case/?utm_source=rss"/>
      <updated>2024-12-10T19:32:00Z</updated>
      <id>https://timomeh.de/posts/gimme-dat-snake-case</id>
      <content type="html">&lt;p&gt;Scenario: a magical fairy—the “magical” is important, so you don’t confuse it with a boring non-magical fairy—appears and grants me one wish. What would I wish for?&lt;/p&gt;
&lt;p&gt;That JavaScript switches to &lt;code&gt;snake_case&lt;/code&gt; over night. We wake up and all the &lt;code&gt;camelCase&lt;/code&gt; is gone, replaced by beautiful &lt;code&gt;snake_case&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This isn’t a matter of personal taste. &lt;code&gt;camelCase&lt;/code&gt; is simply more difficult to read. It requires more visual effort. There’s even &lt;a href=&#34;https://www.cs.kent.edu/~jmaletic/papers/ICPC2010-CamelCaseUnderScoreClouds.pdf&#34;&gt;a study on that&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We’re used to reading words that are visually separated, and the underscore provides that visual separation. You probably had no issues reading this sentence, even though it was mostly lowercase letters. But writingLikeThis madeItLikely aBitMoreDifficult toRead, didn’t it?&lt;/p&gt;
&lt;p&gt;JavaScript is not a visually appealing language. Perhaps Java and Smalltalk were not the best influences. And with all the new question marks added to its syntax, it looks like a very insecure “mocking spongebob” meme.&lt;/p&gt;
&lt;p&gt;And I won’t buy the argument that &lt;code&gt;camelCase&lt;/code&gt; is more efficient because you don’t have to type the underscore all the time! It’s as if developers spend their whole day just typing, non-stop, without autocomplete, constantly having to find those keys to press! &lt;em&gt;Aaaaah help, where’s my underscore key gone now, I can’t find it!!!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Nah. snake_case would have been the better choice.&lt;/p&gt;
&lt;p&gt;A man can dream though… &lt;a href=&#34;https://www.youtube.com/watch?v=vAUOPHqx5Gs&#34;&gt;a man can dream&lt;/a&gt;.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>User-defined color theme in the browser without the initial flash</title>
      <link href="https://timomeh.de/posts/user-defined-color-theme-in-the-browser-without-the-initial-flash/?utm_source=rss"/>
      <updated>2024-12-08T22:38:00Z</updated>
      <id>https://timomeh.de/posts/user-defined-color-theme-in-the-browser-without-the-initial-flash</id>
      <content type="html">
&lt;p&gt;When adding dark and light mode to your site, a common approach is to store the theme in localStorage and reading it on the next visit. But our JavaScript usually runs after the page loads, so reading it in JavaScript can cause a flash of the wrong theme—like flashbanging dark mode users with light mode. We can fix this with a small script in the &lt;code&gt;&amp;#x3C;head&gt;&lt;/code&gt;. But wait—&lt;em&gt;isn’t that a blocking script? Aren’t those bad?&lt;/em&gt; Let’s take a quick look at why that’s not always true.&lt;/p&gt;

&lt;p&gt;First, here’s the small simple script which you can add into the &lt;code&gt;&amp;#x3C;head&gt;&lt;/code&gt; of your document:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;#x3C;html data-theme=&#34;dark&#34;&gt;
  &amp;#x3C;head&gt;
    &amp;#x3C;!-- all the stuff in your head --&gt;
    &amp;#x3C;script&gt;
      (function () {
        const theme = localStorage.getItem(&#39;theme&#39;) || &#39;dark&#39;;
        document.documentElement.setAttribute(&#39;data-theme&#39;, theme);
      })();
    &amp;#x3C;/script&gt;
  &amp;#x3C;/head&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It reads the preferred theme from local storage and adds it as a data attribute to the &lt;code&gt;&amp;#x3C;html&gt;&lt;/code&gt; element, before the browser renders the site. We can now style our page for light and dark mode based on the &lt;code&gt;html[data-theme=dark]&lt;/code&gt; selector.&lt;/p&gt;
&lt;p&gt;Your site will only render after the script ran—so it will only render &lt;em&gt;after&lt;/em&gt; the attribute is already set, and there will be no “initial flash of incorrect theme”, or &lt;a href=&#34;https://css-tricks.com/flash-of-inaccurate-color-theme-fart/&#34;&gt;FART&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;…and to let users switch the theme, update both &lt;code&gt;localStorage&lt;/code&gt; and the &lt;code&gt;data-theme&lt;/code&gt; attribute.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;function toggleTheme() {
  const newTheme =
    document.documentElement.getAttribute(&#39;data-theme&#39;) === &#39;light&#39;
      ? &#39;dark&#39;
      : &#39;light&#39;
  document.documentElement.setAttribute(&#39;data-theme&#39;, newTheme)
  localStorage.setItem(&#39;theme&#39;, newTheme)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;What about cookies? Why not use one? Aren’t blocking scripts bad?&lt;/h2&gt;
&lt;p&gt;If you have a server and not just a statically hosted site, you can also use a cookie. If you search online for how to avoid the initial flash, you’ll often find this solution: store the theme in a cookie and render the HTML on the server, with the theme already included in the server-rendered HTML.&lt;/p&gt;
&lt;p&gt;A cookie gets rid of the blocking script that we use in the example above. A blocking script pauses the browser’s rendering process until the script is fully executed, which can delay the initial page load. We usually want to avoid such delays, which is why blocking scripts are often discouraged. But this doesn’t mean that a blocking script is &lt;em&gt;always&lt;/em&gt; worse.&lt;/p&gt;
&lt;p&gt;The downside of cookies is that you have to render the HTML on the server &lt;em&gt;for every request,&lt;/em&gt; which also takes some time.&lt;/p&gt;
&lt;p&gt;Caching is much easier without a cookie, and it significantly speeds up your site. You could even put a CDN in front of your HTML and cache your whole page. You can’t do that with a user-specific cookie. (Unless you’re Valve on a certain &lt;a href=&#34;https://store.steampowered.com/oldnews/19852&#34;&gt;unforgettable Christmas morning in 2015&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;The blocking script takes only approximately 0.1ms to run. That’s 100 microseconds. There’s a chance that server-rendering your uncached HTML will take more time—several milliseconds or even seconds, depending on server and network conditions.&lt;/p&gt;
&lt;p&gt;Here’s my take on it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you render user-based HTML dynamically on the server anyways, just store the user’s preferred theme in your database, where you already store your user’s data. And then you can render &lt;code&gt;&amp;#x3C;html data-theme={user.preferredTheme}&gt;&lt;/code&gt; on the server. It won’t make a difference. No blocking scripts necessary.&lt;/li&gt;
&lt;li&gt;If your site is serving content that doesn’t need to be rendered per request for each user, use the approach above with a blocking script on the client. You might want to do some benchmarking to check whether your server or the client is faster, but it’d also be a good idea to consider whether you’ll need caching in the future.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Use the user’s preferred color scheme as the default&lt;/h2&gt;
&lt;p&gt;In the example above, we use &lt;code&gt;dark&lt;/code&gt; as the default color scheme. If you want to default to the user’s preferred color scheme instead, but still let the user switch the theme, you could change it to something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;let theme = localStorage.getItem(&#39;theme&#39;);
theme ||= window.matchMedia(&#39;(prefers-color-scheme: dark)&#39;).matches
  ? &#39;dark&#39;
  : &#39;light&#39;;
document.documentElement.setAttribute(&#39;data-theme&#39;, theme);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;…or you could also add another value &lt;code&gt;system&lt;/code&gt;, as the default. It’s a bit more verbose which can be beneficial in certain situations, but can also make your selectors more complex.&lt;/p&gt;
&lt;h2&gt;I wish there were a native API&lt;/h2&gt;
&lt;p&gt;It’s a bummer that we have to fall back to CSS selectors when we want to give a user control over the selected theme. The &lt;code&gt;prefers-color-scheme&lt;/code&gt; media query is neat, but even more so the new &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark&#34;&gt;&lt;code&gt;light-dark()&lt;/code&gt;&lt;/a&gt; CSS color function. We can’t use them with a CSS-selector-based solution.&lt;/p&gt;
&lt;p&gt;I like the ability to manually toggle the theme for a specific site. Just because I use dark mode on my system doesn’t mean that I want dark mode on every site. Especially for sites I visit and use a lot.&lt;/p&gt;
&lt;p&gt;How about a small native API that allows us to override &lt;code&gt;prefers-color-scheme&lt;/code&gt; for the current site?&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;// This does not exist
window.setUserPreference(&#39;color-scheme&#39;, &#39;dark&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It would persist the user’s selection and let us use those nifty CSS features. The browser could even have a native UI to show the override to a user. It could let a user change or reset their preference directly in the browser’s UI, similar to camera and microphone permissions, without relying on toggles and buttons on the site itself.&lt;/p&gt;
&lt;p&gt;A man can dream though… &lt;a href=&#34;https://www.youtube.com/watch?v=vAUOPHqx5Gs&#34;&gt;a man can dream&lt;/a&gt;.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Thought Leaders</title>
      <link href="https://timomeh.de/posts/thought-leaders/?utm_source=rss"/>
      <updated>2024-12-06T23:57:00Z</updated>
      <id>https://timomeh.de/posts/thought-leaders</id>
      <content type="html">
&lt;p&gt;I have many thoughts about this topic but I’ll try to keep it short: I don’t like this thought leadership in engineering, where it’s mostly about &lt;em&gt;being an&lt;/em&gt; &lt;em&gt;influencer&lt;/em&gt; and less about &lt;em&gt;having a good influence&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It rubs me the wrong way. You could just say that it annoys me and I should ignore those parts of the internet. But it actually worries me because it feels like small cult-like groups in which engineers won’t grow: They’re caught in an echo chamber, which makes them &lt;em&gt;feel like&lt;/em&gt; they’re growing, but instead of growing as a person and engineer, only a single opinion grows within them.&lt;/p&gt;

&lt;p&gt;It’s this thought leadership where the same small set of design patterns is repeated over and over again, and held up as the holy grail. It’s no longer just opinionated, it’s dogmatic. It becomes bad-mouthing of different opinions and fighting over minuscule details, instead of taking a step back and seeing all the similarities.&lt;/p&gt;
&lt;p&gt;That’s obviously the wrong way to approach leadership.&lt;/p&gt;
&lt;p&gt;In the beginning of my professional career, I was surrounded by people I looked up to — now good friends, whom I still look up to. I was often listening in on their discussions, and while of course everyone did their little opinionated comments for fun and the occasional nerdy joke, it always concluded with: everything is a tradeoff. There are upsides and downsides. What worked great this time might not work great the next time.&lt;/p&gt;
&lt;p&gt;I strongly believe that this time in my life shaped me into who I am today. Of course there was a time during which I held certain opinions higher than I should’ve, and &lt;em&gt;boy&lt;/em&gt; did I boast about them being the best. It was the classic case of the Dunning-Kruger effect, and I was at the peak of Mount Stupid.&lt;/p&gt;
&lt;p&gt;But those people around me asked questions. And I didn’t have an answer to them. And then they shared their professional experience and knowledge, which over time expanded my horizon.&lt;/p&gt;
&lt;p&gt;These lessons have influenced how I approach leadership today. Today, I’m in a technical leadership role at work. I’m aware that my opinions can have an influence on my peers. I’m also aware that my technical decisions will have an influence on the business. This awareness, combined with the experiences when I grew as an engineer, shapes how I approach technical leadership at work.&lt;/p&gt;
&lt;p&gt;I often emphasize to my colleagues that my decisions are centered around consistency, simplicity, and using established patterns. I’m opinionated in the sense that I strongly believe that this is the best approach for the company, based on business needs and risks.&lt;/p&gt;
&lt;p&gt;Obviously I also have some opinions—very small opinions in comparison. For example: I think that state machines tend to make a business process more restrictive than the actual process. But I won’t preach about those little things. If I’m going to preach anything, it’s about being more aware of the business impact you have as an engineer.&lt;/p&gt;
&lt;p&gt;I don’t want to call out any of the “thought leaders” or influencers I mentioned earlier, which is why I’ve kept my critique intentionally vague. If you read this and you feel like you might need to defend yourself, because you see yourself as such a leader or as part of a group, I encourage you to reflect on how you influence others, the broader community and yourself.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Some of my yearly Christmas music</title>
      <link href="https://timomeh.de/posts/some-of-my-yearly-christmas-music/?utm_source=rss"/>
      <updated>2024-12-01T14:40:00Z</updated>
      <id>https://timomeh.de/posts/some-of-my-yearly-christmas-music</id>
      <content type="html">

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Quiet Company – Winter is Coming&lt;/strong&gt; (&lt;a href=&#34;https://music.youtube.com/playlist?list=OLAK5uy_kq-lkrExqV0HKQ61whNPuavzLs0VoK4LA&#34;&gt;YouTube&lt;/a&gt;, &lt;a href=&#34;https://open.spotify.com/album/5uzlqjqewhmczwBprB46d9&#34;&gt;Spotify&lt;/a&gt;)&lt;br&gt;
A cozy EP with a small collection of holiday standards. &lt;em&gt;O Holy Night&lt;/em&gt; is my favorite arrangement on it. Quiet Company was featured on Grooveshark back in 2011, and a year later they released this winter EP. It’s been on repeat every December since then. This year it’s the 13th time!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;John Rutter – Magnificat&lt;/strong&gt; (&lt;a href=&#34;https://music.youtube.com/playlist?list=OLAK5uy_mJWp4g-WNnm77phq9duShAozN5efSDbiQ&#34;&gt;YouTube&lt;/a&gt;, &lt;a href=&#34;https://open.spotify.com/album/6MY9yVtW2gkkE1og4av96t&#34;&gt;Spotify&lt;/a&gt;)&lt;br&gt;
Rutter’s Magnificat is one of my favorite pieces of contemporary classical music. It begins immediately with a sleigh ride through a snowy landscape. Listening to it is like watching a movie in my head, with a great mix of quiet scenes and energetic highlights. It’s big and cheerful and wintery, and it ends with a big bang. It’s typical for British composers, which are known for their sentimental and audience-friendly choral works. My music teacher once described them as taking all emotions in their hand and then shoving it right in your face.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Coldplay – Christmas Light&lt;/strong&gt; (&lt;a href=&#34;https://www.youtube.com/watch?v=z1rYmzQ8C9Q&#34;&gt;YouTube&lt;/a&gt;, &lt;a href=&#34;https://open.spotify.com/track/4fzyvSu73BhGvi96p2zwjL&#34;&gt;Spotify&lt;/a&gt;)&lt;br&gt;
One of those songs where the music immediately and always plays a little movie in my head. The chorus in the second half is reminiscent of the family singing together on Christmas Eve. You know, when the family sings together and the beginning of the chorus is a little bit slower because everyone is trying to keep up with everyone else.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spectre Morse – Last Christmas Together&lt;/strong&gt; (&lt;a href=&#34;https://web.archive.org/web/20121212203958/https://youtube.com/watch?v=38QVhcr2lko&#34;&gt;Internet Archive&lt;/a&gt;)&lt;br&gt;
I wrote about this song in the intro to my &lt;a href=&#34;https://timomeh.de/posts/backup-youtube-videos-to-drive-with-raspberry-pi&#34;&gt;post about backing up YouTube videos&lt;/a&gt;. The song has been removed from all platforms, but is still available through the Internet Archive. I like it because it has such a special atmosphere, with the faint street noise in the background that sounds a bit like a snare drum being brushed, the electric piano that sometimes crackles like a fireplace, and the reverb-y voice on top. It’s very happy-sad.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chris Rea – Driving Home for Christmas&lt;/strong&gt; (&lt;a href=&#34;https://www.youtube.com/watch?v=DDt3u2Ev1cI&#34;&gt;YouTube&lt;/a&gt;, &lt;a href=&#34;https://open.spotify.com/track/3Z3QhZAZpqwZa1phsbQ3JZ&#34;&gt;Spotify&lt;/a&gt;)&lt;br&gt;
Maybe I’m just be a cheesy guy, but &lt;em&gt;Driving Home for Christmas&lt;/em&gt; is on repeat every year when I’m in my car driving home for Christmas. Of course, it’s not on repeat for the whole 2½ hour drive home, I’m not crazy, but usually at the beginning and end of the drive home to my parents.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;jschlatt – A Very 1999 Christmas&lt;/strong&gt; (&lt;a href=&#34;https://www.youtube.com/watch?v=JjjNa8khhww&#34;&gt;YouTube&lt;/a&gt;, &lt;a href=&#34;https://open.spotify.com/album/0vRq8Ai8Zkq3oDsc1rjY4o&#34;&gt;Spotify&lt;/a&gt;)&lt;br&gt;
The newest addition because it was just released today. But I already listened to it several times today and it will definitely be on my annual December playlist. Like &lt;em&gt;Winter is Coming&lt;/em&gt;, it has the usual holiday standards. Schlatt’s voice is just perfect for these Christmas songs. &lt;em&gt;Have yourself a Merry Little Christmas&lt;/em&gt; is my favorite song on it so far. The arrangements have a very old school Disney feel to them.&lt;/li&gt;
&lt;/ul&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Lüften</title>
      <link href="https://timomeh.de/posts/lueften/?utm_source=rss"/>
      <updated>2024-11-26T21:39:00Z</updated>
      <id>https://timomeh.de/posts/lueften</id>
      <content type="html">
&lt;p&gt;Who would have thought that opening the windows several times a day would have a lasting effect on reducing the humidity in my home? My parents, probably. And probably everyone else except me.&lt;/p&gt;
&lt;p&gt;Don’t get me wrong, I did air the rooms in my apartment regularly! But most of the time, not &lt;em&gt;multiple times a day&lt;/em&gt;. For example, I aired my bedroom most days. Maybe I forgot to do it once a week, but I usually do it after I roll out of bed. But in the fall season, the humidity has always been at the upper limit before it’s too high.&lt;/p&gt;
&lt;p&gt;I guess I was a bit ignorant because after opening the window for about 15 minutes, the humidity quickly returned to where it was before. I thought this would happen every time, no matter how many times I opened the window. But somehow I forgot the most logical conclusion: that doing it multiple times a day will incrementally dry out the room more and more.&lt;/p&gt;
&lt;p&gt;After only 2 weeks of airing all the rooms several times a day, it’s now at a perfectly average level. And my windows are not fogging up as much overnight. I even bought a dehumidifier last year, which helped a bit, but in retrospect wasn’t necessary. I should’ve just opened the damn windows more than once a day.&lt;/p&gt;
&lt;p&gt;To be honest, it’s a bit embarrassing to admit my ignorance. But I have learned something!&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Don&#39;t stress about falling asleep</title>
      <link href="https://timomeh.de/posts/dont-stress-about-falling-asleep/?utm_source=rss"/>
      <updated>2024-11-21T21:52:00Z</updated>
      <id>https://timomeh.de/posts/dont-stress-about-falling-asleep</id>
      <content type="html">
&lt;div class=&#34;lead&#34;&gt;&lt;p&gt;For the past three years, there hasn’t been a single night when I couldn’t fall asleep or even struggled to do so. The secret? Simply enjoy the moment.&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;Three years ago, one night before our company’s Christmas party, I was sitting at a hotel bar in Berlin with a colleague for an evening drink. I had just started my new job at &lt;a href=&#34;https://gigs.com&#34;&gt;Gigs&lt;/a&gt; a few months earlier. We were still a small company, especially the engineering department, which was just a handful of engineers.&lt;/p&gt;
&lt;p&gt;As we were chatting, he told me this trick that helped him get his daughter to fall asleep. It’s simple: just focus on how comfortable everything is, and enjoy the fact that you don’t have to do anything. Don’t set expectations to fall asleep. It’s fine. If you think about it, you don’t have to fall asleep. Everything will be fine in the end.&lt;/p&gt;
&lt;p&gt;You could also be in a situation where sleep is not an option: It could be a boring lecture, where your eyes start to feel heavy and you have to fight the urge to close them. But you’re not in that situation. Instead, you’re in a bed. A comfy bed. You can snuggle under the blanket, enjoy the warmth, and the sensation of the pillow hugging your head.&lt;/p&gt;
&lt;p&gt;And it’s fine to stay awake in bed for a bit longer. There won’t be any consequences just because you’re not falling asleep right now, or maybe at all. Nobody will sue you because you didn’t sleep for long enough. And tomorrow, when you have to get up, you can take it a bit slower. Maybe you’ll be a bit more tired and sluggish, but what gives? A hot drink the next morning will help you to start your day.&lt;/p&gt;
&lt;p&gt;Ever since he told me about this, I’ve been able to always fall asleep without any trouble. Before that, I didn’t have any major problems falling asleep, but it sometimes happened. I think it’s something a lot of people experience from time to time. When you find yourself constantly checking the time: 6 hours become 5 hours. 5 hours become 4 hours, 3½, 3, … it’s really not a great feeling.&lt;/p&gt;
&lt;p&gt;But not for me anymore. I don’t just do this when I think I’m going to have trouble falling asleep; it’s now my mindset when I go to bed all the time. I enjoy how comfortable it is and how I don’t have to do anything.&lt;/p&gt;
&lt;p&gt;It was simple. But it was a life changing experience, just from meeting my new colleague during an evening drink at a hotel bar in Berlin.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Breaking UI Changes</title>
      <link href="https://timomeh.de/posts/breaking-ui-changes/?utm_source=rss"/>
      <updated>2024-11-19T23:20:00Z</updated>
      <id>https://timomeh.de/posts/breaking-ui-changes</id>
      <content type="html">
&lt;p&gt;I think some apps I use every day, like Spotify for Desktop or YouTube TV, are being way too careless with seemingly small UI changes. It starts to annoy me a lot, so I put together some examples of sloppy and irresponsible UI changes that I noticed in Spotify and YouTube TV to make you think twice before making such careless changes in your apps.&lt;/p&gt;

&lt;p&gt;In software development, we often talk about &lt;em&gt;breaking changes:&lt;/em&gt; when we make changes to our code that might cause other systems to break or force them to adapt. We try to minimize those changes because they’re super annoying for the people using the software, and we want everyone to have a smooth experience. But when it comes to &lt;em&gt;UI design,&lt;/em&gt; the idea of breaking changes rarely comes up.&lt;/p&gt;
&lt;p&gt;The apps I use every day are part of my routine. Over time, using them turns into muscle memory. The design becomes the interface between me and the machine. I rely on that interface. But it more often feels like some apps make changes that &lt;em&gt;look&lt;/em&gt; minor, but have a huge impact on my routine and muscle memory.&lt;/p&gt;
&lt;h2&gt;Spotify for Desktop&lt;/h2&gt;
&lt;p&gt;Spotify, oh Spotify. What are y’all even doing over there? Spotify for Desktop has made some seriously bizarre choices with their user experience for no apparent reason. It feels like they’re sometimes just making changes for the lulz, when they’re trying to reinvent common design patterns for desktop. Honestly, I could write a whole blog post just about all the weirdness in their UI/UX. For example: this new filter-based navigation in the library sidebar—what even is that? But I wanna talk about one change in particular.&lt;/p&gt;
&lt;p&gt;Something happened a few months which annoyed the crap out of me: they moved the “Home” button from the sidebar to the top of the app.&lt;/p&gt;
&lt;figure&gt;&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/pVtl2Z9CP6-960.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&lt;figcaption&gt;The Spotify desktop app as of November 2024&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Since 2014, the “Home” button (or “Browse,” as it was called back then) was always the top item in the sidebar. &lt;a href=&#34;https://community.spotify.com/t5/The-Blog-Vault/10-Year-Evolution-Spotify-Apps/ba-p/5331115&#34;&gt;I checked&lt;/a&gt;—it’s been that way for a decade. Clicking the first item in the sidebar was muscle memory for me. I didn’t need to think about it; my hand just did the thing. This was a real no-brainer.&lt;/p&gt;
&lt;p&gt;But then one day, a few months ago, I opened Spotify and clicked on the first item in the sidebar like I always do. Except now, it triggered a click on “Your Library”, which collapses the sidebar.&lt;sup id=&#34;fn-ref-breaking-ui-changes-1&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/breaking-ui-changes/#fn-breaking-ui-changes-1&#34; aria-label=&#34;Footnote [1]&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt; At first, I didn’t even visually see that something had changed, I just &lt;em&gt;felt&lt;/em&gt; that something was off. All I knew was that this isn’t what usually happens.&lt;/p&gt;
&lt;p&gt;Maybe this confusion only lasted 30 seconds, but it felt like an eternity during which I stared into my screen like a monkey, not knowing what I’m supposed to do.&lt;/p&gt;
&lt;p&gt;The gist is: this change was completely unnecessary and careless in its execution. It looks like a small design change, but it’s a huge breaking change in the way I use this app. Even months later, I still struggle to find my way through the Spotify app.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;1&#34;&gt;&lt;li id=&#34;fn-breaking-ui-changes-1&#34;&gt;Big LOL btw on this feature. &lt;a href=&#34;https://timomeh.de/posts/breaking-ui-changes/#fn-ref-breaking-ui-changes-1&#34; aria-label=&#34;Back to reference 1&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;
&lt;h2&gt;YouTube TV&lt;/h2&gt;
&lt;p&gt;I use the YouTube app on my Google TV on a daily basis. Its design is clean, sticks to simple UI conventions, and has no unnecessary bells and whistles—which is especially important in this case, because you’re using this app with a remote control!&lt;/p&gt;
&lt;p&gt;A remote is a very interesting input device because, unlike a mouse or touchscreen, you can use the remote faster than the UI can keep up. If you know the layout and where you want to go, you just press the buttons quickly and let the UI catch up.&lt;/p&gt;
&lt;p&gt;When I’m watching a video and want to go back to my subscriptions, I have my very own &lt;a href=&#34;https://en.wikipedia.org/wiki/Konami_Code&#34;&gt;Konami Code&lt;/a&gt; ingrained into me: &lt;kbd&gt;←&lt;/kbd&gt; &lt;kbd&gt;←&lt;/kbd&gt; &lt;kbd&gt;↓&lt;/kbd&gt; &lt;kbd&gt;↓&lt;/kbd&gt; &lt;kbd&gt;↓&lt;/kbd&gt; &lt;kbd&gt;↓&lt;/kbd&gt; &lt;kbd&gt;→&lt;/kbd&gt; &lt;kbd&gt;→&lt;/kbd&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Two times left to get into the sidebar,&lt;/li&gt;
&lt;li&gt;four times down to go to “Subscriptions”,&lt;/li&gt;
&lt;li&gt;two times right to get into the list of videos.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But a few weeks ago, I suddenly kept ending up in the library screen instead of my subscriptions. You know, that screen where your watch history and playlists are—not where I often want to go. It took me a few hours, maybe even until the next day, before I realized that they had swapped the positions of “Subscriptions” and “Library”.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/dIbFZP8-qX-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Now, to go into the Subscriptions feed, I had to press down five times instead of four. A completely unnecessary change, done without any care. Especially on a TV, these kinds of mistakes always feel so “expensive”. (Maybe because of the latency and the lack of an app frame?)&lt;/p&gt;
&lt;p&gt;And just as I was getting used to the new key sequence, YouTube apparently realized that it was a stupid change and reverted it. Which meant that I now &lt;em&gt;again&lt;/em&gt; started navigating to the wrong screens all the time, and &lt;em&gt;again&lt;/em&gt; had to re-train myself. What an utterly useless and frustrating experience.&lt;/p&gt;
&lt;p&gt;Generally, YouTube TV fucks around a lot with the navigation. Most of the time, they don’t even change the order of elements, and instead change which element gets the initial focus!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/1B6zzjNoh--960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;For example, when you’re watching a video, pressing up twice used to focus on the video title (where you could view the description). From there, pressing right would take you to the channel.&lt;/p&gt;
&lt;p&gt;Now? The initial focus is on the channel! But wait, it get’s even better: in a recent update, there’s now a new “Subscribe” button on this screen that gets the initial focus.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/0HMljuaKQH-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;But now comes the best part: You would think that this button is shown if you’re not subscribed to the channel, &lt;em&gt;&lt;strong&gt;except when it’s not!&lt;/strong&gt;&lt;/em&gt; The “Subscribe” button is sometimes there, and sometimes not, even if you haven’t subscribed to this channel. Is this a bug? A feature? At this point, why not both!&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Breathe, Timo.&lt;/p&gt;
&lt;p&gt;Seriously though, all of this—and many more similar experiences—makes me think that some people with decision-making power just aren’t considering the consequences of their changes. This stuff matters a lot. It alienates me as a user. The fact that YouTube reverted the swapped menu items suggests they got enough negative feedback to come to the conclusion that it’s not an important enough change.&lt;/p&gt;
&lt;p&gt;Design isn’t just about making things look pretty. If breaking changes are treated with caution in code and are discussed so often, why aren’t they in design?&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>dragonflydb wouldn&#39;t index my JSON</title>
      <link href="https://timomeh.de/posts/dragonflydb-wouldnt-index-my-json/?utm_source=rss"/>
      <updated>2024-11-18T14:11:00Z</updated>
      <id>https://timomeh.de/posts/dragonflydb-wouldnt-index-my-json</id>
      <content type="html">
&lt;div class=&#34;lead&#34;&gt;&lt;p&gt;A short story about a small debugging adventure, entirely within the redis-cli.&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;I’m caching the content on this site in &lt;a href=&#34;https://www.dragonflydb.io/&#34;&gt;Dragonfly&lt;/a&gt;, a drop-in replacement for Redis with Redisearch support. I do this not only to store my content as JSON, but primarily so I can query it. Very nice for filtering, sorting, searching. &lt;a href=&#34;https://youtube.com/shorts/gFB2-wFJv5c&#34;&gt;Very demure, very mindful.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This worked great in development, but when I deployed it to production, it didn’t work: the page was empty. No content there, even though my logs state that the cache was successfully populated. I opened the redis-cli on production to inspect what’s going on, and to check what’s in the database.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;$ KEYS *
&gt; &#34;posts:foo&#34;
&gt; &#34;posts:bar&#34;
&gt; [...]

$ FT.INFO posts:index
&gt; [...]
&gt; num_docs 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Interestingly enough, listing all stored keys with &lt;code&gt;KEYS *&lt;/code&gt; told me that it actually stored the records. My logs didn’t lie. But when inspecting the index with &lt;code&gt;FT.INFO posts:index&lt;/code&gt;, the final &lt;code&gt;num_docs 0&lt;/code&gt; told me that it didn’t index anything. Zero documents. So they are stored, but not indexed. Weird!&lt;/p&gt;
&lt;p&gt;I spent some time blindly trying a few different things, like changing the keys and prefixes, until I decided to act like a proper engineer and go into the Redis CLI and test some things.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;$ JSON.SET posts:foo . &#39;{ &#34;title&#34;: &#34;lol&#34; }&#39;
&gt; OK

$ FT.INFO posts:index
&gt; [...]
&gt; num_docs 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I tried to create a new record in the CLI and — Wait… it worked! The post is stored and indexed. But why? Why does it work now? Even re-creating the index made no difference. So I tried the same thing again, just to check if the behavior was at least consistent:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;$ JSON.SET posts:bar . &#39;{ &#34;title&#34;: &#34;wot&#34; }&#39;
&gt; OK

$ FT.INFO posts:index
&gt; [...]
&gt; num_docs 2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It still works. Okay, it’s consistent. The issue is not the key itself. But why is it working now? Why won’t it work with my actual content? Well, I didn’t test it with my actual content. Maybe I should try and save my actual records instead of just “lol” and “wot”.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;$ JSON.SET posts:earbuds . &#39;{
  &#34;title&#34;: &#34;Open Ear Earbuds&#34;,
  &#34;description&#34;: null,
  &#34;frontmatter&#34;: {
    &#34;cover&#34;: &#34;beans.jpg&#34;
  },
  [...]
}&#39;
&gt; OK

$ FT.INFO posts:index
&gt; [...]
&gt; num_docs 2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Okokok. It didn’t work. The indexed document count didn’t change. I’m onto something. I can reproduce it. It must be the value. But what exactly? Is it the nested JSON?&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;$ JSON.SET posts:earbuds-2 . &#39;{
  &#34;title&#34;: &#34;Open Ear Earbuds&#34;,
  &#34;description&#34;: null,
  [...]
}&#39;
&gt; OK

$ FT.INFO posts:index
&gt; [...]
&gt; num_docs 2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Removing the nested JSON still won’t work. So I can exclude nested JSON from my suspected issues (they were a bit sus at first because they are referenced with a funky JSON Path).&lt;/p&gt;
&lt;p&gt;What’s left? Oh – oh no. Is it just the &lt;code&gt;null&lt;/code&gt; value? Let’s try and remove it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;$ JSON.SET posts:earbuds-3 . &#39;{
  &#34;title&#34;: &#34;Open Ear Earbuds&#34;,
  &#34;frontmatter&#34;: {
    &#34;cover&#34;: &#34;beans.jpg&#34;
  },
  [...]
}&#39;
&gt; OK

$ FT.INFO posts:index
&gt; [...]
&gt; num_docs 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ffs, it is just the &lt;code&gt;null&lt;/code&gt;! It causes that the document won’t get indexed! And all my records had a null value in them, so nothing got indexed!&lt;/p&gt;
&lt;p&gt;Sidebar: Kinda odd developer experience that it happily lets you store &lt;code&gt;null&lt;/code&gt; values, but then refuses to use them.&lt;/p&gt;
&lt;p&gt;So I added a little utility to strip out all the &lt;code&gt;null&lt;/code&gt;’s from the records, deployed it, and everything worked fine on production.&lt;/p&gt;
&lt;p&gt;Now the final question is: why did it work locally on my machine? idk, probably some mismatch in docker image versions, I didn’t care enough to spend more time on it lol.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>What&#39;s the deal with Trash Bags?</title>
      <link href="https://timomeh.de/posts/whats-the-deal-with-trash-bags/?utm_source=rss"/>
      <updated>2024-11-17T18:22:00Z</updated>
      <id>https://timomeh.de/posts/whats-the-deal-with-trash-bags</id>
      <content type="html">
&lt;p&gt;I don’t know if it’s just me, but trash bags lately suck. Something very strange must be happening in the trash bag industry. So strange that I find myself constantly thinking about trash bags to the point where buying them gives me anxiety.&lt;/p&gt;

&lt;p&gt;It used to be that my only issue with trash bags was that I occasionally bought the wrong size. You know, when you accidentally get bags that are too small, and then you struggle to pull them over the trash can, only to give up and let half the bag flop awkwardly into the can, but you also don’t care enough and then try to buy the right size next time. That’s my fault.&lt;/p&gt;
&lt;p&gt;Because really, what else could go wrong with trash bags? They have the most basic set of requirements: 1) contain trash and 2) allow me to take out the trash. That’s the bare minimum functionality &lt;em&gt;for a bag:&lt;/em&gt; something you’d think humans would have optimized over tens of thousands of years. And yet, in the last year, most of the trash bags I’ve bought have failed to meet even those basic requirements.&lt;/p&gt;
&lt;p&gt;Two years ago, I decided to buy household items like trash bags or sponges in larger quantities so I’d only need to stock up once or twice a year. A very adult move, I thought. And everything was fine for a while. Then, earlier this year, I opened a roll of trash bags where most of the bags had long slits down the sides, making them completely unusable. &lt;em&gt;Okay,&lt;/em&gt; I thought, &lt;em&gt;probably just a manufacturing defect. No big deal, I have other rolls.&lt;/em&gt; But every roll I opened after that had the same issue. All defective.&lt;/p&gt;
&lt;p&gt;With that in mind, I obviously switched to a different brand. And let me tell you, this marked the beginning of my trash-bag-induced anxiety—and the most infuriating experience I’ve had with any product in a long time.&lt;/p&gt;
&lt;p&gt;These new bags weren’t defective in the same way. They &lt;em&gt;looked&lt;/em&gt; fine at first. But they ripped open constantly. They ripped inside the trash can, spilling garbage everywhere. They ripped when I tried to lift them out, leaving trash in the can. One time, they ripped open at the very last moment, right in front of the dumpster downstairs, dumping my trash all over the sidewalk.&lt;/p&gt;
&lt;p&gt;I tried double-bagging: they ripped. I tried triple-bagging: they still ripped. I thought maybe I was overfilling them or making them too heavy, and so I started taking out the trash when the bag was not even half full. They &lt;em&gt;still&lt;/em&gt; ripped. I wondered if something sharp in the trash can was puncturing them, so I tried it once outside the can. It still ripped open.&lt;/p&gt;
&lt;p&gt;Those bags were the bane of my existence. After some time—I first had to process the fact that a product can really be that shitty—I bought a different brand. This time just two rolls, and I specifically chose bags that advertised themselves as “tear-proof”. I think it’s kinda odd that they have to advertise this at all, considering that &lt;em&gt;holding trash in the bag&lt;/em&gt; is a basic requirement for trash bags, but I won’t complain if they will do the job.&lt;/p&gt;
&lt;p&gt;I arrived at home, weirdly excited about having new trash bags, opened them up, tore off a bag from the roll, and … it had no handle. Confused, I tore off another bag, thinking that I did something wrong. But no—there was no strap, no handle, nothing. They have no handle!? They’re just a plastic tube with one end sealed shut!&lt;/p&gt;
&lt;p&gt;I was dumbfounded. I had never seen anything like this. How are you supposed to tie these up? Where do you hold them to carry the trash downstairs? What were they thinking?&lt;/p&gt;
&lt;p&gt;While it was still &lt;em&gt;possible&lt;/em&gt; to tie them up, you end up with no handle to carry it downstairs in dignity, and you shouldn’t fill them up too much because you need enough material left to tie them up.&lt;/p&gt;
&lt;p&gt;Even though I still felt anxious every time I took out the trash—bracing myself for the moment the bag’s molecules would spontaneously decide to disintegrate—they didn’t rip open. So, I guess, one out of two requirements met.&lt;/p&gt;
&lt;p&gt;Now I’ve bought yet another kind of bag. One that claims to be both tear-proof &lt;em&gt;and&lt;/em&gt; has a strap. Maybe this will finally end my misery. I’m still skeptical.&lt;/p&gt;
&lt;p&gt;But something feels off with this industry when a product has to boldly claim that it meets the bare minimum of requirements. This isn’t the first time I’m using trash bags, this used to be different!&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Changelog, November 2024</title>
      <link href="https://timomeh.de/posts/changelog-november-2024/?utm_source=rss"/>
      <updated>2024-11-14T23:29:00Z</updated>
      <id>https://timomeh.de/posts/changelog-november-2024</id>
      <content type="html">
&lt;p&gt;I’ve motivated myself to write shorter posts more frequently! The previous list of headlines (which is now the &lt;a href=&#34;https://timomeh.de/archive&#34;&gt;Archive&lt;/a&gt;) added too much friction for writing down some content—not just because I had to come up with a title, but also because a short post on its own page felt a bit … lonely.&lt;/p&gt;
&lt;p&gt;After 2 years of writing posts in GitHub Discussions, I’ve now switched to &lt;a href=&#34;https://keystatic.com/&#34;&gt;Keystatic&lt;/a&gt;. The writing experience is much better: it’s still in my browser, and the media handling is much better! Images and videos became a bit more cumbersome with GitHub Discussions. It wasn’t impossible, just a bit annoying. And that extra friction became an excuse to not writing down some thoughts I had.&lt;/p&gt;
&lt;p&gt;I might have been just a wee bit too excited to release this new version. There are some minor tweaks here and there to improve, but &lt;em&gt;pfft&lt;/em&gt;, that’s continuous deployment for you!&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Not waking up at 6:30am</title>
      <link href="https://timomeh.de/posts/not-waking-up-at-6-30/?utm_source=rss"/>
      <updated>2024-10-15T18:48:00Z</updated>
      <id>https://timomeh.de/posts/not-waking-up-at-6-30</id>
      <content type="html">
&lt;p&gt;Early this morning I woke up briefly, it was 6:30am—yes, that’s early morning for me—and heard very faint shower noises. I usually don’t hear anything from my neighbors, but probably because it was so quiet otherwise, I realized that one of my neighbors had to get up now.&lt;/p&gt;
&lt;p&gt;And then I remembered that I used to have to get up at about that time when I went to school. To be exact, I always got up at precisely 6:55am. My morning was always timed to the minute to get the most sleep out of it. The whole family had to coordinate who was in the bathroom at what time. I actually went to bed for another 15 minutes after taking a shower, just to make the most out of every minute of sleep.&lt;/p&gt;

&lt;p&gt;And as I laid in bed this morning, remembering all of this because of those faint shower sounds, I just felt at ease. Because instead of having to get up at 6:55, I get to sleep for another 2 hours. If I wanted to, even longer. I was never a morning person, I didn’t like going to school and I had to struggle to get out of bed every morning. Especially when it was fall or winter, because it was still dark outside, and then I had to get out in the cold, hop on my bike and cycle through the cold breeze, to sit in a classroom which was often just a container on our school yard because our school was too small for the number of students they had, and that container was never very comfortable or cozy. Even though I actually really like fall and winter.&lt;/p&gt;
&lt;p&gt;It reminded me that I had made it. By “it” I don’t mean everything I want to accomplish in life, but at least this one thing. I no longer have to struggle to get out of bed in the morning. I can enjoy the moody and gloomy mornings. When it gets a little colder at night and you can just wrap yourself up a little more in your blanket. When everything is a bit more quiet and chill. I get up, I’m in my own apartment. I do my morning routine, I make myself an oat milk cappuccino, I sit down in my little home office and start working. Working on things I’m passionate about. I’m doing what I want to do in life and I am enjoying it.&lt;/p&gt;
&lt;p&gt;With a smile on my face, wrapped in my blanket, knowing that it’s still dark(ish) and quiet and cold outside, I fell asleep again and just had a really nice, mindful, enjoyable morning.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Style elements across nested layouts with Tailwind</title>
      <link href="https://timomeh.de/posts/style-elements-across-nested-layouts-with-tailwind/?utm_source=rss"/>
      <updated>2024-06-16T13:38:00Z</updated>
      <id>https://timomeh.de/posts/style-elements-across-nested-layouts-with-tailwind</id>
      <content type="html">
&lt;p&gt;I recently discovered that Tailwind’s &lt;code&gt;group&lt;/code&gt; utility is &lt;em&gt;super useful&lt;/em&gt; in web frameworks with nested layouts. I only thought of the &lt;code&gt;group&lt;/code&gt; utility for smaller UI components, but you actually can use &lt;code&gt;group&lt;/code&gt; to style any element based on &lt;strong&gt;any other element&lt;/strong&gt; in the DOM.&lt;/p&gt;

&lt;p&gt;This may not seem like a big deal, but consider this example: we hide the header if there’s an element with the CSS class &lt;code&gt;hide-header-signal&lt;/code&gt; somewhere in the DOM.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;#x3C;body class=&#34;group/body&#34;&gt; &amp;#x3C;!-- layout --&gt;
  &amp;#x3C;header class=&#34;group-has-[.hide-header-signal]/body:hidden&#34;&gt;...&amp;#x3C;/header&gt;
  &amp;#x3C;main&gt;
    &amp;#x3C;h1&gt;Hello world&amp;#x3C;/h1&gt; &amp;#x3C;!-- page --&gt;
    &amp;#x3C;div class=&#34;hide-header-signal&#34;&gt;&amp;#x3C;/div&gt;
  &amp;#x3C;/main&gt;
&amp;#x3C;/body&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This scenario is a common layout pattern: you put your header in your layout and render all your pages within this layout. So now all pages share the same header. But this also means that a page cannot change the header. Except with the &lt;code&gt;group&lt;/code&gt; utility, we actually can change the header from within the page! Well, to be precise, we can tell the header to change based on what else is in the document. In fact, we can use the &lt;a href=&#34;https://tailwindcss.com/docs/hover-focus-and-other-states#differentiating-nested-groups&#34;&gt;named group&lt;/a&gt; &lt;code&gt;group/body&lt;/code&gt; to change the style of any element based on any other element.&lt;/p&gt;
&lt;p&gt;You might think that you could just conditionally render the header to achieve the same thing, but that’s not always easy to do in every web framework.&lt;/p&gt;
&lt;p&gt;Here’s a real world example: My blog has a header on all pages, so the header can simply be in the root layout. But I also have two pages for visual regression testing of my &lt;a href=&#34;https://timomeh.de/vrt/shiki&#34;&gt;syntax highlighting&lt;/a&gt; and &lt;a href=&#34;https://timomeh.de/vrt/markdown&#34;&gt;markdown rendering&lt;/a&gt;, and I don’t want to show the header on those pages, because the tests shouldn’t fail when I change the header.&lt;sup id=&#34;fn-ref-style-elements-across-nested-layouts-with-tailwind-1&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/style-elements-across-nested-layouts-with-tailwind/#fn-style-elements-across-nested-layouts-with-tailwind-1&#34; aria-label=&#34;Footnote [1]&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt;  What other solutions would I have?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I don’t have access to the current URL in the root layout, in order to conditionally hide the header based on the URL, unless I would turn the layout into a client component.&lt;/li&gt;
&lt;li&gt;I could also move the header into every page, instead of having it in the layout. Then I could simply not include it in the pages where I don’t want to show the header. But then I use all advantages of layouts.&lt;/li&gt;
&lt;li&gt;I could create more nested folders with nested layouts, but I would do it &lt;em&gt;just for those two pages&lt;/em&gt;. That’s a significant change for 2 simple test pages.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Although I could do a bunch of things to render the header dynamically for those pages, they all have a comparatively high impact on the codebase. Sometimes this impact is justified and one of these approaches might be a better choice, but clearly not in this case where I just have some unlisted pages for testing purposes.&lt;/p&gt;
&lt;p&gt;By using the pattern above with the &lt;code&gt;group&lt;/code&gt; utility, it’s now super easy to hide the header on some pages:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-tsx&#34;&gt;// layout.tsx
export default function RootLayout({ children }) {
  return (
    &amp;#x3C;html&gt;
      &amp;#x3C;body className=&#34;group/body&#34;&gt;
        &amp;#x3C;header className=&#34;group-has-[.hide-header-signal]/body:hidden&#34;&gt;
          &amp;#x3C;Header /&gt;
        &amp;#x3C;/header&gt;
        {children}
      &amp;#x3C;/body&gt;
    &amp;#x3C;/html&gt;
  )
}

// e.g. regular blog post pages
// posts/[...slug]/page.tsx
export default function Page() {
  return (
    &amp;#x3C;main&gt;
      &amp;#x3C;p&gt;The header is visible on this page&amp;#x3C;/p&gt;
    &amp;#x3C;/main&gt;
  )
}

// e.g. pages for visual regression testing
// vrt/[...name]/page.tsx
export default function Page() {
  return (
    &amp;#x3C;main&gt;
      &amp;#x3C;p&gt;The header is hidden on this page&amp;#x3C;/p&gt;
      &amp;#x3C;div className=&#34;hide-header-signal&#34; /&gt;
    &amp;#x3C;/main&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Done. A simple change which just added a few classes and affected 2 files, instead of changing a lot of code and affecting many files.&lt;/p&gt;
&lt;p&gt;This example is only using the &lt;code&gt;has-[.hide-header-signal]&lt;/code&gt; modifier, but it’s not limited to only this modifier. You can do even more than just hiding one element based on the existence of another element. For example, you could change the position of an element based on the data attribute of another element. Or change some colors in the layout for some very special pages.&lt;/p&gt;
&lt;p&gt;And the nice thing is: it’s just CSS.&lt;/p&gt;
&lt;p&gt;…I guess those CSS selectors are slow as hell, but computers are also fast these days.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;1&#34;&gt;&lt;li id=&#34;fn-style-elements-across-nested-layouts-with-tailwind-1&#34;&gt;Fun fact: I decided to just let those tests fails when the header changes lol. Because when the header changes, then I’m gonna see it anyways. But I still apply this pattern in other places. &lt;a href=&#34;https://timomeh.de/posts/style-elements-across-nested-layouts-with-tailwind/#fn-ref-style-elements-across-nested-layouts-with-tailwind-1&#34; aria-label=&#34;Back to reference 1&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Open Ear Earbuds</title>
      <link href="https://timomeh.de/posts/open-ear-earbuds/?utm_source=rss"/>
      <updated>2024-05-25T22:44:00Z</updated>
      <id>https://timomeh.de/posts/open-ear-earbuds</id>
      <content type="html">
&lt;p&gt;In-ear earbuds are weird, aren’t they? You’ve got those small rubbery mushrooms that you shove into your ear canal to listen to music and you hope there’s no juicy ear gunk on them when you pull ‘em out.&lt;/p&gt;

&lt;p&gt;I have the &lt;a href=&#34;https://store.google.com/de/product/pixel_buds_pro?hl=de&amp;#x26;pli=1&#34;&gt;Pixel Buds Pro&lt;/a&gt; and the &lt;a href=&#34;https://www.sony.de/headphones/products/wf-1000xm5&#34;&gt;Sony WF-1000XM5&lt;/a&gt;. I bought the Sony earbuds because the Pixel Buds are a little annoying. You have to corkscrew the Pixel Buds into your ear, but it’s also one big touch-sensitive surface, and when you twist them in or out of your ear, you inevitably trigger a touch gesture. If they loosen a bit, you push them back, and you trigger another touch gesture. So I tried the Sony earbuds, and they’re a little better at this.&lt;/p&gt;
&lt;p&gt;By the way, both have a great sound. But it’s not about the sound, it’s about the feel. And I don’t always like the feeling of clogging my ear canal.&lt;/p&gt;
&lt;p&gt;Earbuds used to be different. Back when you had a cord – at least one that connected both buds together – you could just pull one side out and let it dangle. Like when you’re at the checkout counter at the grocery store and you don’t want to be rude to the cashier and you actually want to hear what they’re saying. Even though earbuds now have this transparency mode where you can still hear your surroundings… it just feels rude to me. If someone tries to talk to me, I pull out a bud.&lt;/p&gt;
&lt;p&gt;And what do you do with the single earpiece? Hold it awkwardly between your fingers? Throw it in a pocket to fish it out later, accidentally triggering 20 touch gestures in the process? Pulling out the case just to put it away quickly? Pffffft. Ain’t nobody got time for that.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I have found that I like in-ear earbuds for longer, uninterrupted listening sessions, like on a train or plane or a long walk where I want to be buried in music. But I also wear them a lot for short trips, and then I don’t like them. Running errands is always a short walk away, and I spend most of my daily walks listening to or recording voice memos (almost exclusively with &lt;a href=&#34;https://losstopschade.de/post/peak-entspannung&#34;&gt;Daniel&lt;/a&gt;). That’s where in-ear earbuds don’t do it for me.&lt;/p&gt;
&lt;p&gt;I recently stumbled upon the concept of &lt;strong&gt;Open Ear Earbuds&lt;/strong&gt; (roll credits!). You don’t stick them in your ear, they just sit very close to your ear. It’s like a private little speaker that follows you and points at your ear. You can still hear the world around you, which I actually like when I’m not immersed in music. And because I don’t have my ears plugged, I don’t feel like I’m being rude by not taking them out in certain situations. I can just pause the music. No taking them out temporarily. Maybe I’m just a special boy, but it feels better.&lt;/p&gt;
&lt;p&gt;In particular, I bought the &lt;a href=&#34;https://consumer.huawei.com/de/headphones/freeclip/buy/&#34;&gt;Huawei FreeClip&lt;/a&gt;. Not a brand I would normally choose, but the features were too intriguing.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/-sFTFishQv-960.jpeg&#34; alt=&#34;a Huawei FreeClip earbud and its case&#34;&gt;&lt;/p&gt;
&lt;p&gt;The FreeClip is this bean and ball that you just clip onto your ear. Sort of like a big piercing. The bow between them is flexible, and clipping them on and off is super easy. They’re not tight, but they’re in place and won’t move.&lt;/p&gt;
&lt;p&gt;What really sold me was the fact that there are no left or right buds. They’re interchangeable and automatically recognize if they’re left or right. It’s a small detail that makes life less annoying. It makes putting them back in the case a breeze, and if I’m only wearing one bud and the batteries are empty, I can use the other bud on the same side.&lt;/p&gt;
&lt;p&gt;They have touch gestures, of course, but you don’t have to touch the earbuds, you can just tap somewhere on your ear. Cool, I guess.&lt;/p&gt;
&lt;p&gt;They also sound good, the base is of course less punchy like it’s common with open-ear earbuds, but as I said, I don’t wear them because I want to block out the outside world and just be surrounded by music. What I didn’t expect is that when you turn the volume up to 100%, they turn down the base even more. I don’t know why they do that, maybe because of the drivers, but it’s not a problem for me, I don’t need to use them at full volume.&lt;/p&gt;
&lt;p&gt;When I go out to do some quick errands or take a walk to listen to some voice memos, I always use them now, and I really like it.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Two weeks ago I flew to Mallorca for a work trip and took my Pixel Buds to listen to music on the plane. I haven’t used them in a while, and interestingly enough, there was a firmware update and they seem less sensitive now.&lt;/p&gt;
&lt;p&gt;I guess that’s my life now. The earbeans for casual everyday use, and the earnubs for active deep listening.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Picking those low-hanging fruit in your life</title>
      <link href="https://timomeh.de/posts/picking-those-low-hanging-fruit/?utm_source=rss"/>
      <updated>2024-03-07T22:46:00Z</updated>
      <id>https://timomeh.de/posts/picking-those-low-hanging-fruit</id>
      <content type="html">
&lt;p&gt;When I moved into my first apartment over 11 years ago, I learned something that I continue to learn on a regular basis: solve the little problems in your life. Realize that they’re just low-hanging fruit, ready to be picked.&lt;/p&gt;
&lt;p&gt;Low-hanging fruit is a term I usually think of only in the context of work. And I still do! Thinking and writing about &lt;em&gt;low-hanging fruit&lt;/em&gt; in the context of my personal life feels strange to me, but of course they exist.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I never really liked the faucet in the kitchen of my new apartment. It was a little loose, and when you rotated it, the whole apparatus rotated a few degrees. It was tall, and the water always splashed more than usual when it fell into the sink, splattering water all over the dark granite countertop and stove. You couldn’t pull the faucet down, and it didn’t have a sprayer. It was inconvenient and annoying.&lt;/p&gt;
&lt;p&gt;But I didn’t do anything about it because… I don’t know why? Because it’s just a faucet? It didn’t occur to me that this was a low-hanging fruit that I could solve. I just lived with the damn thing for 2 years. Until I realized that a new faucet only costs 50€ and is easy to replace. I could fix this annoyance in my life with the least amount of effort.&lt;/p&gt;
&lt;p&gt;Even the little wiggle it had could have been fixed in a few minutes without any tools. Yet I never did.&lt;/p&gt;
&lt;p&gt;And I began to avoid using it because it annoyed me so much. Instead of washing my hands in the kitchen, &lt;del&gt;I didn’t wash them at all&lt;/del&gt; I actually went from the kitchen to the bathroom sometimes and washed my hands there so I wouldn’t have to wipe the counter because the water would splash everywhere.&lt;/p&gt;
&lt;p&gt;I wasted 2 years on something I could have fixed with the click of a button on amazon and 30 minutes of “work”.&lt;/p&gt;
&lt;p&gt;That’s just one of many. I’ve started to identify and fix more of them in my life, but it always takes some time to realize &lt;em&gt;“yeah, this has been bothering me for a while, and it’s easy to fix”&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So here’s my call to you: identify those low-hanging fruits and pick them. The big things in life are hard enough, and the little things make a difference.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>One year with the Aeron Chair</title>
      <link href="https://timomeh.de/posts/one-year-with-the-aeron-chair/?utm_source=rss"/>
      <updated>2024-03-05T21:42:00Z</updated>
      <id>https://timomeh.de/posts/one-year-with-the-aeron-chair</id>
      <content type="html">
&lt;p&gt;1 year ago I wrote about my first &lt;a href=&#34;https://timomeh.de/posts/two-weeks-with-the-aeron-chair&#34;&gt;two weeks with my new Herman Miller Aeron Remastered chair&lt;/a&gt;. So, how is it after a full year?&lt;/p&gt;
&lt;p&gt;This chair was the best investment I made last year. My butt never gets tired of this chair.&lt;/p&gt;
&lt;p&gt;I still use the tilt mechanism as I configured it a year ago. It’s perfect. I lean back a little, a little more, or not at all. In meetings, I like to lean back a lot, put my hands behind my head and just relax.&lt;/p&gt;
&lt;p&gt;It’s a good thing I didn’t get the headrest, because you really don’t need it. When I sit upright, I don’t rest my head. And when I lean back, like I said, I like to put my hands behind my head and lean on them, and it’s really comfortable. It would probably be annoying if there was a headrest.&lt;/p&gt;
&lt;p&gt;My back pain never came back! I remember I used to have this constant tension under my right shoulder and looking back it was really not good. But since then it’s just gone. Never had any problems again.&lt;/p&gt;
&lt;p&gt;If your job involves sitting at a desk a lot, and sometimes your butt starts to get tired, or you have some tension in your back or shoulders, and you’re not short on money, I would &lt;em&gt;highly&lt;/em&gt; recommend buying this chair if you’re not short on money. The price tag may seem high for a chair, but when you consider how expensive a good mattress and pillow is, and how many hours you’ll spend on it, it’s worth every penny. #notsponsored&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Screenshot an HTML element with transparent background</title>
      <link href="https://timomeh.de/posts/screenshot-transparent-html-element/?utm_source=rss"/>
      <updated>2024-03-03T23:14:00Z</updated>
      <id>https://timomeh.de/posts/screenshot-transparent-html-element</id>
      <content type="html">
&lt;p&gt;Today I learned that you can capture a screenshot with transparent background using Safari’s Web Inspector. That’s nice because Chrome’s Dev Tools can’t do it. It will always capture it with the background. Sometimes I just want to quickly paste an HTML element into Figma without recreating it. Now I have at least one reason to open Safari from time to time!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/h2NeulvpK8-827.png&#34; alt=&#34;Making a Screenshot of a node in Safari&amp;#x27;s Web Inspector&#34;&gt;&lt;/p&gt;
&lt;p&gt;A few interesting things to mention:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you zoom in, the screenshot is also more high res, which is nice.&lt;/li&gt;
&lt;li&gt;If you select text, the text is also selected in the screenshot. Before you ask: the mouse is not included.&lt;/li&gt;
&lt;li&gt;It only makes a screenshot of whatever is in the bounds of the selected element. If the element has a shadow, the shadow is not in the screenshot. You gotta add some spacing around it if you wanna include the shadow.&lt;/li&gt;
&lt;li&gt;It also includes any absolute positioned child elements, even if they’re not in the bounds of the element. Which makes sense, you’re capturing the node, which also includes its children.&lt;/li&gt;
&lt;li&gt;While the screenshot does not include the background, it does include elements that overlap the bounds of screenshot, even if they’re from a totally different node.&lt;/li&gt;
&lt;li&gt;But it doesn’t include all overlapping elements? It’s a bit difficult to explain, let me demonstrate:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/jVCoDVSQvP-640.png&#34; alt=&#34;Example of quirky behavior with overlapping elements&#34;&gt;&lt;/p&gt;
&lt;p&gt;I played around with it, and when I remove the &lt;code&gt;inline-block&lt;/code&gt; from my name, it is in the screenshot. Interesting, but not interesting enough to try to understand it because it’s likely the most useless knowledge out there.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Just give me the answer, ChatGPT</title>
      <link href="https://timomeh.de/posts/just-give-me-the-answer-chatgpt/?utm_source=rss"/>
      <updated>2023-12-29T00:46:00Z</updated>
      <id>https://timomeh.de/posts/just-give-me-the-answer-chatgpt</id>
      <content type="html">
&lt;p&gt;Last week, I tinkered with developing a Shopify App. Shopify’s developer guides are… eh – a mixed bag. What I wanted to do just wouldn’t work. So, when I can’t find an answer in their guides and it’s also not easily googled, I turn to ChatGPT. I don’t often use ChatGPT for this kind of stuff – I still mostly use Google because it’s faster – but I’ve found that searching for Shopify’s subscription guides often leads to forum posts with no clear answers.&lt;/p&gt;
&lt;p&gt;The issue with ChatGPT is that it can be so annoying. It’s like talking to that one coworker who never responds directly to your questions, trying to hide that they secretly have no idea what they’re doing. &lt;em&gt;Just give me an answer, Chatty!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I know that if I just ask, “Hey beep boop, this no workey, why that?” it would respond with a big list of useless information. I had a hunch that it was because of the payments, but I didn’t want to loop over making configuration changes to see what works. So, I gave it some context about what I was doing and asked my question:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;br&gt;
Do shopify subscriptions work with the bogus payment gateway?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ChatGPT&lt;/strong&gt;:&lt;br&gt;
As of my last update in April 2023, Shopify’s Bogus Gateway (or Bogus Payment Method) is typically used for testing checkout processes and transactions without processing real credit card payments. However, when it comes to testing subscriptions, the functionality can be more limited.&lt;/p&gt;
&lt;p&gt;Here are a few key points to consider:&lt;br&gt;
1. &lt;strong&gt;Limited Testing Scope:&lt;/strong&gt; The Bogus Gateway is blah blah &lt;em&gt;more list items&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At this point, I’m already annoyed af. I asked a yes or no question. I don’t need all the information in the world. I know it knows the answer; the thing can search the freaking internet. But it always defaults to “Could be, figure it out yourself, here are a few things to consider”. But you’re the computer, you do the work for me! So, I take a deep breath and continue.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt; Please, dude. Just say yes or no.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ChatGPT:&lt;/strong&gt; &lt;em&gt;[Awkward pause]&lt;/em&gt; No.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thank God. Why not like this in the first place? Okay, while I already have this conversation established, let’s continue with solving the problem.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;br&gt;
How do I test subscriptions then? Keep your answer short and concise, you’re using so many unnecessary words&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ChatGPT:&lt;/strong&gt; To test Shopify subscriptions:&lt;br&gt;
1. Use a subscription app’s test mode, if available.&lt;br&gt;
2. Utilize the test mode of your payment gateway.&lt;br&gt;
3. Create test plans with minimal costs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Again, so much useless content. Stop with your numbered lists. Did they hardcode into ChatGPT’s instructions that it should always respond with bullet points or numbered lists? I actually think they did, but it’s so annoying. And it’s so slow! It pains me to see it typing in real-time.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;br&gt;
How do I configure the payment gateway for testing?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ChatGPT:&lt;/strong&gt;&lt;br&gt;
To configure your payment gateway for testing in Shopify:&lt;br&gt;
1. &lt;em&gt;bullet point list with vague generic instructions for any payment gateway&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;br&gt;
Which payment gateway should I use?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ChatGPT:&lt;/strong&gt;&lt;br&gt;
Choosing a payment provider for your Shopify store depends on several factors:&lt;br&gt;
1. Location: Some payment providers are only available in certain countries. Bla bla bla&lt;br&gt;
2. &lt;em&gt;more list items&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Uuuugggghhhh!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;br&gt;
Dude. It’s for testing. Keep it short&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ChatGPT:&lt;/strong&gt;&lt;br&gt;
For testing subscriptions in Shopify, use Shopify Payments in test mode or select another payment gateway that offers a sandbox or test environment, like Stripe or PayPal’s sandbox mode.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Finally, we’re there. That’s the answer.&lt;/p&gt;
&lt;p&gt;And yes, I know about the custom instructions. I already added some to prevent it from being annoying. But it still is. I guess the system message they sent with ChatGPT wires its brain super hard to give a lot of information with many words and always use lists if possible.&lt;/p&gt;
&lt;p&gt;Welcome to 2023, where I’m complaining about this crazy AI technology which is actually scarily powerful but annoys me too much.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>DI-RECT, August 4th 2023, Gebäude 9 Cologne</title>
      <link href="https://timomeh.de/posts/direct-2023-08-04/?utm_source=rss"/>
      <updated>2023-08-05T13:47:00Z</updated>
      <id>https://timomeh.de/posts/direct-2023-08-04</id>
      <content type="html">
&lt;p&gt;&lt;a href=&#34;https://youtu.be/bT7V1WH8ghs&#34;&gt;https://youtu.be/bT7V1WH8ghs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This was one of the best concerts I have ever seen. I was so blown away after the first song that I had to yell “holy fuck”. It sounded so incredible. The drums were super tight, everyone was putting all their energy into the music, and it’s unbelievable how good Marcel Veenendaal sounds live.&lt;/p&gt;
&lt;p&gt;If you’ve never heard of DI-RECT (they’re quite popular in the Netherlands but not so much here in Germany), I highly recommend you check them out. &lt;a href=&#34;https://www.youtube.com/watch?v=GDx5zPV2LSc&#34;&gt;This radio concert&lt;/a&gt; is how I found them, and I don’t understand how it only has 20k views.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>On Repeat: Moby – Resound NYC</title>
      <link href="https://timomeh.de/posts/on-repeat-moby-resound-nyc/?utm_source=rss"/>
      <updated>2023-07-25T20:05:00Z</updated>
      <id>https://timomeh.de/posts/on-repeat-moby-resound-nyc</id>
      <content type="html">
&lt;p&gt;A few times a year, I come across an album that completely captures me. I get so hooked on it, and end up playing it on repeat, all day long. This summer, that album is Moby’s &lt;a href=&#34;https://open.spotify.com/album/2w2Pv5AdhDjgLBjcN5OEuT&#34;&gt;Resound NYC&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To be honest, I hadn’t really thought about Moby much lately, except for that one How I Met Your Mother episode where they meet a bald guy on New Year’s Eve and mistake him for Moby. Other than that, his music didn’t really grab my attention much. I mean, sure, I knew some of his banger songs, but that was about it.&lt;/p&gt;
&lt;p&gt;But then, someone recommended this new album to me, and after the first minute, I knew that I’ll love it. Resound NYC doesn’t bring in any new songs, but instead it’s Moby’s older tracks from 1994 to 2010 in new orchestral arrangements. These versions are all absolute bangers. They’re both familiar but also refreshingly new.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=0d9cr46fhF4&#34;&gt;https://www.youtube.com/watch?v=0d9cr46fhF4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Those songs were all influenced by his life in New York City, hence the title: Resound NYC. In a &lt;a href=&#34;https://www.youtube.com/watch?v=qWwwtNo5cPs&amp;#x26;list=PLpllqzgq8wPa56zQTPya-8mmOkT9prN2E&#34;&gt;series of short videos on YouTube&lt;/a&gt;, Moby shares the stories behind each track. He talks about what life was like in NYC during those times, what he was going through personally, and how each song came to be. How he was living in decimated neighborhoods that were hit hard by the crack epidemic of the 80s and 90s, and even how we was living in an abandoned factory…? It’s super interesting, inspiring and emotional.&lt;/p&gt;
&lt;p&gt;There’s also the album &lt;a href=&#34;https://www.youtube.com/watch?v=72oDquo0tuc&amp;#x26;list=PLxA687tYuMWglzSjrQgUIJmVmhGrJ476T&#34;&gt;Reprise&lt;/a&gt; from 2021, which also consists of new versions of his older songs, but Resound NYC is just… a whole new level. Interestingly enough, both albums feature the track “Extreme Ways”, and listening to both, you immediately notice how Resound NYC is much more vibrant and cinematic.&lt;/p&gt;
&lt;p&gt;Even though Resound NYC made me listen to the original versions again, I just like the Resound NYC versions much more. And  maybe that’s by design. Why would he want to make something worse? He transformed it from the music he wanted to release 25 years ago, to the music he wanted to release in 2023.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Haller &amp; Cäthe &amp; Enno Bunger, April 14th 2023, Gloria Cologne</title>
      <link href="https://timomeh.de/posts/lagerfeuer-deluxe-2023-04-14/?utm_source=rss"/>
      <updated>2023-04-30T14:51:00Z</updated>
      <id>https://timomeh.de/posts/lagerfeuer-deluxe-2023-04-14</id>
      <content type="html">
&lt;p&gt;&lt;a href=&#34;https://youtu.be/Aa0Nr9kma0o&#34;&gt;https://youtu.be/Aa0Nr9kma0o&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lagerfeuer Deluxe&lt;/em&gt;, an unplugged concert with 3 artists: Haller, Cäthe and Enno Bunger. Of course, when Enno is in town, I have to go there. Very nice atmosphere, good music and needless to say Enno’s set was just incredible.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Portugal, March 2023</title>
      <link href="https://timomeh.de/posts/portugal-2023/?utm_source=rss"/>
      <updated>2023-04-30T13:54:00Z</updated>
      <id>https://timomeh.de/posts/portugal-2023</id>
      <content type="html">
&lt;p&gt;Our semi-annual Gigs offsite was this time in Portugal, Guimarães. Beautiful city. I’m not a good photographer.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/lq_wm2tNLH-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/lvZe8VYm_u-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/-qx5LVJsbN-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/o-N_VJ8Cmi-960.jpeg&#34; alt=&#34;flur&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/DdsCrA3pX--960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/l8P3ozcXim-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/Wrk1tXqZcg-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/zVmxBVPFXB-960.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Looks like I have a thing for alleyways.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Warhaus, March 18th 2023, Gebäude 9 Cologne</title>
      <link href="https://timomeh.de/posts/warhaus-2023-03-18/?utm_source=rss"/>
      <updated>2023-03-18T22:42:00Z</updated>
      <id>https://timomeh.de/posts/warhaus-2023-03-18</id>
      <content type="html">
&lt;p&gt;&lt;a href=&#34;https://youtu.be/qtoXfpBeXgw&#34;&gt;https://youtu.be/qtoXfpBeXgw&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Went there with &lt;a href=&#34;https://www.chrisjarling.com/&#34;&gt;Chris&lt;/a&gt;, was a great night. I am a huge fan of Maarten. His solo music is much more chill than Balthazar, and it’s definitely different and slower compared to a Balthazar concert. But the guy is great, an incredibly talented musician. And I love it when he holds his guitar up under his chin.&lt;/p&gt;
&lt;p&gt;Marteen’s concerts, both for Balthazar and Warhaus, are not just songs from the album but-it’s-live. Instead, he rethinks the songs and how they could work live, creating a very unique experience.&lt;/p&gt;
&lt;p&gt;The first solo was kind of weird? It felt like the guitarist and the drummer had no idea what to do. But maybe they were just being musical geniuses, who knows.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Yukno, March 15th 2023, YUCA Cologne</title>
      <link href="https://timomeh.de/posts/yukno-2023-03-15/?utm_source=rss"/>
      <updated>2023-03-16T23:00:00Z</updated>
      <id>https://timomeh.de/posts/yukno-2023-03-15</id>
      <content type="html">
&lt;p&gt;&lt;a href=&#34;https://youtu.be/YLMfjeFssO8&#34;&gt;https://youtu.be/YLMfjeFssO8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Found myself getting totally lost in the music, just vibing along, no sense for time or space. (Besides the fact that the sound guy seemed to have a problem which he apparently couldn’t fix until the end)&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>I&#39;m exceptionally bad at taking breaks</title>
      <link href="https://timomeh.de/posts/exceptionally-bad-at-taking-breaks/?utm_source=rss"/>
      <updated>2023-03-06T23:36:00Z</updated>
      <id>https://timomeh.de/posts/exceptionally-bad-at-taking-breaks</id>
      <content type="html">
&lt;p&gt;One of my goals for this year is to get better at taking breaks from work. But, honestly, I’m doing a terrible job at it. Whether it’s taking a lunch break, calling it a day, or taking a little coffee break: I don’t stop when I should stop. I keep telling myself I’ll do better, but in the moment, I screw up. And it’s not because work is stressful or too much is expected of me – it’s my own fault.&lt;/p&gt;
&lt;p&gt;The problem is, I’m always telling myself that I’ll just finish this one small thing that’ll only take 2 minutes. But then 5 minutes pass, and another 5 minutes, and another, until half an hour has gone by. And suddenly, I’ve only got a short lunch break before the next meeting starts. It’s funny how in this situation I keep looking at the time, seeing how it flies, and I’m just like, “Oh God, I should get going…” &lt;em&gt;but I don’t do it&lt;/em&gt;. Even though I should just get up and go. I’m such a dingus.&lt;/p&gt;
&lt;p&gt;I know that I don’t have to respond to messages right away. No one expects an immediate response. But it’s just one message, which then turns into a few messages, and then a longer conversation. Or when doing code reviews, I tell myself that I’ll just write those few last comments and finish up the whole review (even though nobody would be mad if I submit only half a review, and do the next half later). Or when I’m coding, just a few more lines of code.&lt;/p&gt;
&lt;p&gt;It’s always small tasks that, for some reason, I think will be done in 2 minutes.&lt;/p&gt;
&lt;p&gt;But I always feel like I have to get it all done, or else it’s going to occupy my mind all through lunch or the next day. But will it really? Like… &lt;em&gt;really&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;Two weeks ago, I took a day off and didn’t check Slack even once. I woke up to a bunch of notifications on my phone, and without reading them, I paused all work-related apps. And you know what? I didn’t check them all day. This surprised me because I usually open Slack automatically, like how you open TikTok, but not while you’re sitting on the toilet. That was a win!&lt;/p&gt;
&lt;p&gt;The thing is, I keep telling myself I’ll do better tomorrow, but then I relapse the day after. It feels like an endless cycle. It makes me less motivated to do better. Even though &lt;em&gt;I know&lt;/em&gt; I should just take a goddamn break.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Fargo, Season 4</title>
      <link href="https://timomeh.de/posts/fargo-season-4/?utm_source=rss"/>
      <updated>2023-03-05T22:06:00Z</updated>
      <id>https://timomeh.de/posts/fargo-season-4</id>
      <content type="html">
&lt;p&gt;I missed the dark humor of seasons 1-3, where it always felt like a mix of &lt;em&gt;“that’s a whoopsie”&lt;/em&gt; and &lt;em&gt;“oh geez”&lt;/em&gt; from the very first episode. This is what made Fargo so unique to me. Season 4 felt more like &lt;em&gt;“holy…”&lt;/em&gt; – and only after a few episodes.&lt;/p&gt;
&lt;p&gt;It was still quite compelling in its own way, had some unexpected twists, and there were some elements of dark humor present. Though the dark humor focused mostly on weird deaths, instead of the typical chain of unfortunate circumstances. At least the unnecessary, yet fun, paranormal stuff wasn’t removed.&lt;/p&gt;
&lt;p&gt;Score: 68%&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Automatically backup YouTube Videos I don&#39;t want to lose to my Google Drive, using a Raspberry Pi</title>
      <link href="https://timomeh.de/posts/backup-youtube-videos-to-drive-with-raspberry-pi/?utm_source=rss"/>
      <updated>2023-02-21T01:03:00Z</updated>
      <id>https://timomeh.de/posts/backup-youtube-videos-to-drive-with-raspberry-pi</id>
      <content type="html">
&lt;p&gt;There’s a Christmas song on YouTube that has a special place in my heart. I’ve been listening to it every holiday season since its release in 2011. Music has a way of taking us back to memories, and whenever I hear this song, I’m transported back in time. I used to take for granted that it would always be available to me on YouTube, but that all changed in Christmas 2021.&lt;/p&gt;
&lt;p&gt;All of a sudden, the song was nowhere to be found.&lt;/p&gt;

&lt;p&gt;It was gone from YouTube and even the musician’s bandcamp store. I searched for it everywhere but had no luck finding it. I even reached out to the musician but didn’t hear back from him. Then I stumbled upon a tweet from someone who was also looking for the song, and the musician had responded that it was no longer available online. That was the proof. I’m sure he has a reason for unpublishing it. But for me, it was lost, and I was gutted.&lt;/p&gt;
&lt;p&gt;Last Christmas, in 2022, a small miracle happened. I couldn’t stop thinking about the song and desperately wanted to hear it again. Then, a ray of hope: I found the direct link to the YouTube video buried in an old tweet. I entered it into the Internet Archive, and voila! There it was. It played through my speakers, just like that. The Internet Archive had saved this YouTube video from 2011. I was so relieved. And when the song ended, I opened my eyes and immediately made sure to save it, so that I’ll never lose it again.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/_wrJeJ9mMD-960.png&#34; alt=&#34;digital AI art of a man with headphones on sitting in front of a desk with speakers on it, a window with a winter city at night outside&#34;&gt;&lt;/p&gt;
&lt;h2&gt;Backing up videos I don’t want to lose&lt;/h2&gt;
&lt;p&gt;I started to notice more videos disappearing from my playlists. YouTube doesn’t even tell you what’s been deleted, so who knows what I’ve lost. Maybe they were important to me. Maybe not. But that got me thinking, I don’t wanna lose the stuff that means something to me, or just the stuff I like to watch from time to time.&lt;/p&gt;
&lt;p&gt;Around the same time, &lt;a href=&#34;https://knuspermagier.de/posts/2023/eine-liste-von-gr-nden-aus-denen-ich-doch-anfing-youtube-videos-herunterzuladen&#34;&gt;Philipp wrote a post&lt;/a&gt; about how he downloads videos and songs to his Plex server automatically. It looked easy enough, but the best part is that it’s super user-friendly. You just add videos to an unlisted playlist and they get downloaded automatically. It’s seriously the easiest solution I’ve seen. Adding a video to a playlist takes just two clicks, whether you’re on your phone or your computer.&lt;/p&gt;
&lt;h2&gt;Storing them on Google Drive&lt;/h2&gt;
&lt;p&gt;Philipp’s setup involves downloading videos to his Plex server, but for me, I just want to keep a backup of my favorite YouTube videos in case they disappear. Call it a ✨ Sicherheitskopie. ✨&lt;/p&gt;
&lt;p&gt;As an Android user &lt;em&gt;&lt;strong&gt;(boooooh!)&lt;/strong&gt;&lt;/em&gt;, I already have a Google One subscription to back up my photos, and I barely use 30% of my Google Drive storage, so it’s a no-brainer for me. And if I ever wanna upgrade to 1TB in the future, the pricing is pretty reasonable.&lt;/p&gt;
&lt;p&gt;How ethical is it to download a video from a one Google server – YouTube – and upload it to Drive – just another Google server? I don’t care. Google isn’t scanning your personal files against Content ID and then blocking them or anything. That would be just bonkers and a scandal waiting to happen.&lt;/p&gt;
&lt;h2&gt;The Plan&lt;/h2&gt;
&lt;p&gt;A few years back, I bought a Raspberry Pi, but it mostly just gathered dust in a box of random cables since then. This could be the perfect project to repurpose it: using it to automatically download and back up my favorite YouTube videos. Here’s the plan:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Mount my Google Drive as a network drive&lt;/li&gt;
&lt;li&gt;Download my favorite YouTube videos and save them to the network drive&lt;/li&gt;
&lt;li&gt;Set up an automatic schedule to regularly download new videos in my magic Playlist&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Teaser: It’s working far better than expected&lt;/h2&gt;
&lt;p&gt;I will explain the details of how I’ve set everything up in this post – also for me as a reference, in case I have to do it again. But maybe you’re not interested in those details! No worries, let’s take a quick look at the outcome.&lt;/p&gt;
&lt;p&gt;When I tried it out the first time, I was a bit blown away by how fast it was. It only took less than 5 minutes to download, recode, and upload a single 53-minute long 720p video to my Google Drive. I thought that would take much longer—especially on a small Raspberry Pi!&lt;/p&gt;
&lt;p&gt;The second time I tried it, I downloaded 11 videos, totaling 77 minutes, and it was done in 20 minutes, including recoding and uploading to my Google Drive. 20 minutes! Downloading, recoding, and uploading it again! I didn’t expect this.&lt;/p&gt;
&lt;p&gt;I combined the download script with a small script using Node.js, that sends me a Telegram message when the download is completed or when it encountered an error – which is also an idea I borrowed from Philipp. Thanks, Philipp!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/4D9WfU4wvg-549.png&#34; alt=&#34;Screenshot of the Telegram Bot with messages for all downloaded videos&#34;&gt;&lt;/p&gt;
&lt;p&gt;Philipp implemented the playlist-fetching and memorizing of which videos were downloaded by himself. I simply opted to use yt-dlp’s built-in solution to download a playlist.&lt;/p&gt;
&lt;p&gt;While it was easier for me to quickly hack this together by just using yt-dlp’s included features, there are upsides to Philipp’s approach. He has control over each video download step.&lt;/p&gt;
&lt;p&gt;Regardless of the details, I absolutely adore this solution. And what’s even better is that &lt;em&gt;I have this solution in place&lt;/em&gt;. Whenever I come across a video I want to keep, I add it to the playlist and don’t worry about it again. It’s very satisfying to know that my favorite videos can be safe and sound.&lt;/p&gt;
&lt;p&gt;Now, let’s dive into the details.&lt;/p&gt;
&lt;h2&gt;1. Mount Google Drive as a network drive&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://rclone.org/&#34;&gt;Rclone&lt;/a&gt; allows you &lt;a href=&#34;https://rclone.org/commands/rclone_mount/&#34;&gt;mount&lt;/a&gt; your Google Drive as a network drive on your Raspberry Pi. I set it up by following &lt;a href=&#34;https://ostechnix.com/mount-google-drive-using-rclone-in-linux/&#34;&gt;this guide I found&lt;/a&gt;, but it was actually so easy to set up, that the guide wasn’t really necessary. At least the guide gave me the confidence that I’m doing the right thing.&lt;/p&gt;
&lt;p&gt;When you use Rclone for the first time, it will ask you to set up a new remote, but this is a simple step-by-step process. The only thing that tripped me up was creating API credentials. You don’t actually need them, but it’s recommended for a higher API quota, so I thought I just do it. And even though they have a &lt;a href=&#34;https://rclone.org/drive/#making-your-own-client-id&#34;&gt;good guide&lt;/a&gt; to walk you through it, I still did it wrong the first time.&lt;/p&gt;
&lt;p&gt;Don’t make the same mistake I did: just make sure to configure the OAuth Consent Screen before creating the app credentials. Otherwise Google will just create a client id without a client secret, and you’ll need the client secret later on. Because without the secret, it will look like it works, but it doesn’t, yikes! But this isn’t the guides fault, it’s just my fault. The guide explicitly tells you to first configure the OAuth Consent Screen, and I didn’t do it, because I thought I’m smarter.&lt;/p&gt;
&lt;p&gt;At some point, you’ll be asked which Google Drive permissions to grant your Pi. You can go ahead and give it full access, but I chose to limit it to read and write access for only the files it creates. That way, it can’t see any of my other files on Drive.&lt;/p&gt;
&lt;p&gt;And last but not least, mount your Google Drive:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;rclone mount mygdrive: ~/gdrive/ --daemon
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;mygdrive&lt;/code&gt; is just the name of your remote, which you set up earlier. &lt;code&gt;~/gdrive/&lt;/code&gt; is the directory where I mounted my Drive. The &lt;code&gt;--daemon&lt;/code&gt; flag just runs the mount in the background.&lt;/p&gt;
&lt;p&gt;Now Google Drive should be mounted as a directory, and the first step is completed. To make sure everything’s working, I created a new file in my mount directory and it showed up on the Google Drive web interface. So far, so good!&lt;/p&gt;
&lt;h2&gt;2. Download videos from YouTube&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/yt-dlp/yt-dlp&#34;&gt;yt-dlp&lt;/a&gt; is a fork of youtube-dl, which allows you to download YouTube videos with a ridiculous amount of options. It requires &lt;a href=&#34;https://www.ffmpeg.org/&#34;&gt;ffmpeg&lt;/a&gt; to function properly.&lt;/p&gt;
&lt;p&gt;Installing both yt-dlp and ffmpeg on the Raspberry Pi was very quick and painless. In contrast, installing ffmpeg on my expensive MacBook M1X Pro using Homebrew takes ages because it &lt;del&gt;first compiles the Linux Kernel from scratch and then mines a bitcoin&lt;/del&gt; often requires updating and installing numerous dependencies.&lt;/p&gt;
&lt;p&gt;Below is the complete command that I am using to download videos.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;yt-dlp \
  -P &#34;/home/pi/Videos&#34; \
  -P &#34;temp:tmp&#34; \
  -o &#34;../gdrive/Video/%(title)s - %(channel)s - %(id)s.%(ext)s&#34; \
  --restrict-filenames \
  --download-archive &#34;~/Videos/downloads_downloaded.txt&#34; \
  -f &#34;bestvideo[height&amp;#x3C;=1080][ext=mp4]+bestaudio[ext=m4a]/best[height&amp;#x3C;=1080]&#34; \
  --recode-video mp4 \
  https://www.youtube.com/playlist?list=xxx
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This may look intimidating, but here’s an explanation what each component will do:&lt;/p&gt;
&lt;h3&gt;First: Setting up some folders&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;  -P &#34;/home/pi/Videos&#34; \
  -P &#34;temp:tmp&#34; \
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To begin with, we need to specify the working directory for yt-dlp. yt-dlp generates some intermediate files during the download process, and we don’t want them to be synced to Google Drive via Rclone, because that would slow us down. For this reason, we set the working directory to be &lt;code&gt;/home/pi/Videos&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;temp:tmp&lt;/code&gt; option specifies that temporary files should be stored in a separate directory called “tmp”. I actually don’t know if it’s necessary, but it also won’t hurt to have it.&lt;/p&gt;
&lt;p&gt;Next, we define the output path for the downloaded video:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;  -o &#34;../gdrive/Video/%(title)s - %(channel)s - %(id)s.%(ext)s&#34; \
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As we want the downloaded video to be saved in the mounted Google Drive, we point to the relative path inside Google Drive.&lt;/p&gt;
&lt;p&gt;According to the docs, the path must be relative; otherwise, the &lt;code&gt;-P&lt;/code&gt; option won’t work. A little bit weird, but it does the job.&lt;/p&gt;
&lt;p&gt;This will move the downloaded video into a &lt;code&gt;Video/&lt;/code&gt; folder on my Google Drive, and give it a descriptive name. &lt;code&gt;%(title)s&lt;/code&gt; will be replaced with the video’s title, &lt;code&gt;%(channel)s&lt;/code&gt; with the name of the channel, &lt;code&gt;%(id)s&lt;/code&gt; is the ID of the video, and &lt;code&gt;%(ext)s&lt;/code&gt; the file extension.&lt;/p&gt;
&lt;p&gt;Finally, the last part of the video file setup:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;  --restrict-filenames
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will remove any special characters in the video’s name and replace them with underscores.&lt;/p&gt;
&lt;h3&gt;Next: Remember if a video was already downloaded&lt;/h3&gt;
&lt;p&gt;We want to execute the above command regularly to download new videos. But we don’t want to download the same videos again and again. We only need to download them once. And &lt;em&gt;of course&lt;/em&gt; youtube-dl (and its cool cousin yt-dlp) has a built-in solution for that: the “Download Archive”.&lt;/p&gt;
&lt;p&gt;The Download Archive file stores the IDs of all the videos you’ve already downloaded. All you need to do is add this option to your command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;  --download-archive &#34;~/Videos/downloads_downloaded.txt&#34;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And voila! yt-dlp will check the archive before downloading each video and only download it if it’s not already on the list. I store this file in a local directory and not inside the Drive, because… I used a location inside the network drive and it didn’t work. 🤷‍♂️&lt;/p&gt;
&lt;h3&gt;Then: Configuring the video quality&lt;/h3&gt;
&lt;p&gt;Now we can configure what video quality we want to download. I actually don’t know a lot about this part, haha. But I asked ChatGPT to create it for me, and it just worked.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;  -f &#34;bestvideo[height&amp;#x3C;=1080][ext=mp4]+bestaudio[ext=m4a]/best[height&amp;#x3C;=1080]&#34; \
  --recode-video mp4 \
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I wanna download videos with a maximum resolution of 1080p, and only as mp4. It would otherwise download webm, and I don’t trust webm as long as it isn’t a commonly shared file format.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;bestvideo[height&amp;#x3C;=1080][ext=mp4]+bestaudio[ext=m4a]&lt;/code&gt; requests a 1080p video as mp4, and separately downloads the best audio quality with it. The video and audio track will then be merged into a single file after they’re downloaded.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/best[height&amp;#x3C;=1080]&lt;/code&gt; means that if a video using the above criteria cannot be found, I just want the best available audio and video with a maximum resolution of 1080p.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--recode-video mp4&lt;/code&gt; is used to tell it to recode the video to an mp4 when it isn’t an mp4. Although we configure mp4 above, it could download another format when it can’t find an mp4.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Final part of that command: Configure your Playlist, and that’s it!&lt;/h3&gt;
&lt;p&gt;The final part of this command is to specify the URL of your playlist. &lt;a href=&#34;https://knuspermagier.de/posts/2023/eine-liste-von-gr-nden-aus-denen-ich-doch-anfing-youtube-videos-herunterzuladen&#34;&gt;Philipp explains this well in his post&lt;/a&gt;: you’ll need to ensure that the playlist is set to unlisted instead of private, and that the videos are sorted from newest to oldest.&lt;/p&gt;
&lt;p&gt;Once you’ve set up the playlist, the script will go through it, check which videos haven’t yet been downloaded, and proceed to download them. Once the downloads (and maybe recoding) is complete, the file will be transferred to the Google Drive, and it’s all done.&lt;/p&gt;
&lt;h2&gt;3. Run the Download on a regular interval&lt;/h2&gt;
&lt;p&gt;To run this command automatically, you’ll want to set up a cronjob. The cronjob just runs a command at a specified time interval. You can edit your cronjobs using &lt;code&gt;crontab -e&lt;/code&gt;, and paste in something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-txt&#34;&gt;0 5,11,18,23 * * * sh /home/pi/yt-download.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will run the download script every day at 5:00, 11:00, 18:00 and 23:00. This is what I chose, you could choose whatever schedule tickles your pickle.&lt;/p&gt;
&lt;p&gt;I’m not calling this huge command inside the cronjob. I copied the yt-dlp command it into a shell script called &lt;code&gt;yt-download.sh&lt;/code&gt;, and run this shell script in the cronjob. That way, if I need to change anything, I can just update the script instead of messing around with the crontab file.&lt;/p&gt;
&lt;h2&gt;Done. This is what I love about computers&lt;/h2&gt;
&lt;p&gt;And that’s it! It works!&lt;/p&gt;
&lt;p&gt;It’s so satisfying to see how pieces just work together. Like gears which fit perfectly into each other. It’s done, and we just used existing solutions. Not even had to write a single line of code.&lt;/p&gt;
&lt;p&gt;To take it a step further, you can add more pieces to it. I’m parsing the output logs, so I can search for new downloads and trigger a Telegram notification when it found one. But that’s just neat gimmicks on top.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Blogging like Chris Coyier</title>
      <link href="https://timomeh.de/posts/blogging-like-chris-coyier/?utm_source=rss"/>
      <updated>2023-02-18T15:39:00Z</updated>
      <id>https://timomeh.de/posts/blogging-like-chris-coyier</id>
      <content type="html">
&lt;p&gt;Chris Coyier is well-known for blogging a mind-boggling amout of posts on CSS-Tricks (which is now owned by DigitalOcean). But I’m not going to talk about his stuff on CSS-Tricks, but instead about his personal blog &lt;a href=&#34;https://chriscoyier.net/&#34;&gt;chriscoyier.net&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Chris’ blog feels like a stream of consciousness. It’s just what he’s thinking about at the moment, without any deeper meaning or learning. And yet, those thoughts are still interesting and fun to read. Annoyed at System Fonts in macOS? Just &lt;a href=&#34;https://chriscoyier.net/2023/02/13/id-like-to-remove-the-typeface-academy-engraved-let-please/&#34;&gt;blog about it&lt;/a&gt;. Orange favicons work great for light and dark themes? Why not &lt;a href=&#34;https://chriscoyier.net/2023/02/10/you-kinda-want-an-orange-favicon/&#34;&gt;write down that thought&lt;/a&gt;, then notice that Safari is weird, and end it with “Time for a nap”. It’s refreshing to see someone share their half-baked ideas without feeling the need to make a grand conclusion or provide a takeaway for the reader. You can just end your post if you don’t know what else to write.&lt;/p&gt;
&lt;p&gt;It feels like a conversation with a friend. Sometimes you just want to talk about something that’s been on your mind without worrying about whether it’s profound or even fully formed. It’s totally normal in a conversation to suddenly end your thought mid-sentence with a big ol’ shrug. And that’s what his blog feels like to me.&lt;/p&gt;
&lt;p&gt;Maybe we sometimes try too hard to offer some kind of education or to present ourselves as experts? At least I sometimes feel that way. But I don’t think that’s necessary. It’s nice to take a break from expert content and just read something that’s relatable and human.&lt;/p&gt;
&lt;p&gt;Chris has definitely inspired me to post more half-baked thoughts. And to not think about words and sentences and publishing too much. Just write it down, press the big button, and continue with your day.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Two weeks with the Aeron Chair</title>
      <link href="https://timomeh.de/posts/two-weeks-with-the-aeron-chair/?utm_source=rss"/>
      <updated>2023-02-16T20:26:00Z</updated>
      <id>https://timomeh.de/posts/two-weeks-with-the-aeron-chair</id>
      <content type="html">
&lt;p&gt;I bought a fully loaded Herman Miller Aeron Remastered Chair, and have been sitting on it for the last two weeks. Fun Fact: Aeron stands for “an expensive Ron”. So you’re asking what it’s like to sit on Ron?&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/q81a5jCata-960.jpeg&#34; alt=&#34;a picture of an Aeron Chair in my home office&#34;&gt;&lt;/p&gt;

&lt;p&gt;Of course it’s good. It has to be good. It’s an expensive chair, it better be good. I’ve sat on a cheap DX Racer for the last 7 years, which isn’t a fair comparison, but whattayawannado.&lt;/p&gt;
&lt;p&gt;First of all, this thing is like a hammock for your butt. It doesn’t get uncomfortable even after hours and hours of sitting. And the tilting mechanism – gosh! – it is so well adjusted. When I simply lean back, I sit comfortably straight and it supports my back. And when I use a little more pressure, it tilts back (because I didn’t lock the back rest). But I don’t tilt back until it locks, I just stop wherever feels good to me. And then I comfortably lean back and the thing still supports my back. That’s crazy to me! I don’t need to turn any knobs to change if I want to sit straight or lean back, so I change my sitting position automatically whenever I feel like it.&lt;/p&gt;
&lt;p&gt;It’s so comfortable. You can’t really sit wrong on it, you’re automatically in the correct position. The “PostureFit” lumbar support pads I don’t really feel pressing against my back, but I do feel that it supports me. The lack of a missing headrest made me a bit sceptical at first, but I don’t miss the headrest at all. I guess those fancy engineers at Herman Miller were right about that one.&lt;/p&gt;
&lt;p&gt;People online reported that they have back pains in the first weeks because they didn’t sit straight for years, but I only felt it for 2 days or so. And then it actually relieved my most noticeable back pain! I always had this tension next to my right shoulder blade, and now it’s gone.&lt;/p&gt;
&lt;p&gt;So is it worth it? This thing has 12 years guarantee. This comes down to a bit more than 100€ a year. And they usually last way longer. That’s worth it to me.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Kid Francescoli on arte Concerts</title>
      <link href="https://timomeh.de/posts/kid-francescoli-arte-concert/?utm_source=rss"/>
      <updated>2023-02-11T23:41:00Z</updated>
      <id>https://timomeh.de/posts/kid-francescoli-arte-concert</id>
      <content type="html">&lt;p&gt;There are some really good and well produced concerts on &lt;a href=&#34;https://www.arte.tv/de/arte-concert/&#34;&gt;arte Concert&lt;/a&gt;. In the past weeks, I’m totally obsessed with this live session from Kid Francescoli. It’s not only chill music, but also visually very appealing. The setting on a boat makes for some really cool camera shots. Due to the lack of an audience, it has kind of a lonely undertone to it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/4JorPi4IMv-960.png&#34; alt=&#34;Still frame from the video, a scene on the deck of a boat with multiple keyboards with Kid Francescoli standing between them, and singer Andréa Durand in the front&#34;&gt;&lt;/p&gt;
&lt;p&gt;There’s a version &lt;a href=&#34;https://www.youtube.com/watch?v=DmLe7vjFF8U&#34;&gt;on YouTube&lt;/a&gt; which cannot be embedded, hence the screenshot of a still frame. 🙃 Or alternatively on the &lt;a href=&#34;https://www.arte.tv/en/videos/081858-009-A/kid-francescoli/&#34;&gt;Arte Mediathek&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I only realized a few years ago that arte is actually kind of an interesting channel. When I was a teen and still watched a lot of TV, I thought that arte is just an artsy experimental TV station for snobs. It always felt odd when they were airing something appealing and interesting, because aren’t they supposed to be weird? Maybe arte is still just an artsy channel for snobs, and I’m the one who became a snob?&lt;/p&gt;
&lt;p&gt;Anyways, there are also sessions from &lt;a href=&#34;https://www.youtube.com/watch?v=lS0WBxL6tUk&#34;&gt;Jungle&lt;/a&gt;, &lt;a href=&#34;https://www.youtube.com/watch?v=u_Mw9dEHW3w&#34;&gt;French 79&lt;/a&gt;, &lt;a href=&#34;https://www.youtube.com/watch?v=zhDT5oVAV6g&#34;&gt;Loyle Carner&lt;/a&gt; and the &lt;a href=&#34;https://www.youtube.com/watch?v=fCMsudkw_e8&#34;&gt;Grandbrothers&lt;/a&gt; which I can recommend if you’re interested in more.&lt;/p&gt;
&lt;p&gt;I also watched this &lt;a href=&#34;https://www.youtube.com/watch?v=ePSivyATBqg&#34;&gt;Live Show from the Parcels&lt;/a&gt; a few times in the past weeks. It’s not from arte, but I thought I just mention it. I watched a lot of those live sessions while I’m coding in the past weeks. Don’t know where that’s coming from.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>New Offtopic Posts</title>
      <link href="https://timomeh.de/posts/offtopic-thoughts/?utm_source=rss"/>
      <updated>2023-02-07T22:59:00Z</updated>
      <id>https://timomeh.de/posts/offtopic-thoughts</id>
      <content type="html">&lt;p&gt;I felt like posting random stuff sometimes. Not only babble about software development tips. So I added this new Offtopic section. Although I called it &lt;em&gt;Stream&lt;/em&gt; in the Sidebar because Offtopic is a long word?&lt;/p&gt;
&lt;p&gt;Anyways, what started with a new category ended in a switch from Markdown to MDX and a dark mode, mainly because I’m often looking at my blog at night and it hurt me poor eyes. I’m not completely done, there are a few things I’d like to add and improve, but shipping is good.&lt;/p&gt;
&lt;p&gt;I imagined some cool aurora borealis vibes going on, but didn’t yet spent too much time in Figma to make it a bit more like I imagined. I need to change some pictures of previous posts to fit into the dark theme. And some old posts were moved into the Offtopic section because it made more sense. In summary: things happened.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Updating to Next.js 13&#39;s App Directory</title>
      <link href="https://timomeh.de/posts/updating-to-next-13-app-dir/?utm_source=rss"/>
      <updated>2023-01-08T00:21:00Z</updated>
      <id>https://timomeh.de/posts/updating-to-next-13-app-dir</id>
      <content type="html">
&lt;p&gt;Do you remember when I told you the story how I developed this blog using Next.js, &lt;code&gt;getStaticProps&lt;/code&gt; and Incremental Static Regeneration? Well, we’ve got some new features in Next.js, which we’ll explore here. This is the story of migrating to a new very much still experimental feature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update March 2024:&lt;/strong&gt; Some of the information and implementation in this post has changed in the meantime and everything is now stable without any quirky workarounds. If you are interested in the current implementation, check out the repo: &lt;a href=&#34;https://github.com/timomeh/timomeh.de&#34;&gt;github.com/timomeh/timomeh.de&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;2 months ago, Next.js 13 was released with a huge major new feature, sometimes referred to as “App Directory”. It’s a new routing implementation, which sits at the core of Next.js, and changes the way how apps are rendered quite a bit. I’m using Next.js for personal projects and at work, so this Blog is perfect to play around with those new changes.&lt;/p&gt;
&lt;p&gt;Playing around I did… and &lt;a href=&#34;https://mastodon.social/@timomeh/109411092519518259/&#34;&gt;reverted it&lt;/a&gt; after an afternoon of work.&lt;/p&gt;
&lt;p&gt;I decided to wait for a few patch versions, gave it another try, and it finally worked. 🥳 So here’s a summary of what had to change:&lt;/p&gt;
&lt;h2&gt;Dynamic Pages with Server Components&lt;/h2&gt;
&lt;p&gt;The biggest change are &lt;a href=&#34;https://beta.nextjs.org/docs/rendering/server-and-client-components#server-components&#34;&gt;Server Components&lt;/a&gt;. Components can now be async and are evaluated on the Server, and by default, all Page Components are now Server Components.&lt;/p&gt;
&lt;p&gt;Previously you had to fetch data inside an async function called &lt;code&gt;getStaticProps()&lt;/code&gt;, which had to return JSON-serializable data, which was then passed as Prop into your Page Component.&lt;/p&gt;
&lt;p&gt;With async Server Components, this isn’t anymore necessary. You can directly fetch data inside the Component. It makes everything incredibly simple, like it should be. This is how I now render the list of all posts:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-tsx&#34;&gt;// app/posts/page.tsx
export default async function Posts() {
  const posts = await getBlogPosts()

  return (
    &amp;#x3C;ul className=&#34;space-y-4&#34;&gt;
      {posts.map((post) =&gt; (
        &amp;#x3C;li key={post.slug}&gt;
          &amp;#x3C;Link href={`/posts/${post.slug}`}&gt;{post.title}&amp;#x3C;/Link&gt;
        &amp;#x3C;/li&gt;
      ))}
    &amp;#x3C;/ul&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And it’s similarly simple to render a single post:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-tsx&#34;&gt;// app/posts/[slug]/page.tsx
export async function generateStaticParams() {
  return []
}

export default async function Post({ params }) {
  const post = await getBlogPost(params.slug)
  if (!post) notFound()

  return (
    &amp;#x3C;&gt;
      {/* @ts-expect-error Server Component */}
      &amp;#x3C;PostTitle title={post.rawTitle} /&gt;
      {/* @ts-expect-error Server Component */}
      &amp;#x3C;PostBody body={post.rawBody} /&gt;
      &amp;#x3C;PostComments discussionNumber={post.discussionNumber} /&gt;
    &amp;#x3C;/&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;About that &lt;code&gt;@ts-expect-error Server Component&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Being an early adopter also means that you have to deal with tools which don’t yet support your fancy new stuff. That’s the case with TypeScript here: it thinks that async functions cannot be rendered as Components, and throws an error.&lt;/p&gt;
&lt;p&gt;This will certainly be fixed in the future. You can check the corresponding TypeScript PR &lt;a href=&#34;https://github.com/microsoft/TypeScript/pull/51328&#34;&gt;microsoft/TypeScript#51328&lt;/a&gt; to see the status of it.&lt;/p&gt;
&lt;h2&gt;Transforming Markdown to HTML inside a Component&lt;/h2&gt;
&lt;p&gt;Before Server Components, I transformed the Markdown to HTML directly after fetching the data from GitHub inside &lt;code&gt;getStaticProps()&lt;/code&gt;, and passed those HTML-strings into the Components. It was the only way to do that, because the transformation is async, and async code could only be executed before starting to render.&lt;/p&gt;
&lt;p&gt;Now this can be done inside the Component, which packages the concern neatly within a single piece of code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-tsx&#34;&gt;export async function PostTitle({ title }) {
  const htmlTitle = await markdownToHtml(title)
  return &amp;#x3C;span dangerouslySetInnerHTML={{ __html: htmlTitle }} /&gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;You need &lt;code&gt;generateStaticParams()&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;You might’ve noticed that I have this &lt;code&gt;generateStaticParams&lt;/code&gt; function, which just returns an empty array. What’s that all about?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;generateStaticParams&lt;/code&gt; lets you define a list of URLs which should be generated at build time. I don’t want generation at build time, I want it dynamically during runtime. So I thought I could just omit this function completely. And it seemed like I could, because everything was still working – everything except caching.&lt;/p&gt;
&lt;p&gt;Unfortunately, I did not think that the problems with caching are correlated to the missing &lt;code&gt;generateStaticParams&lt;/code&gt; function. I debugged this for what felt like an eternity. I thought that the API requests to GitHub are causing the cache to be invalidated.&lt;sup id=&#34;fn-ref-updating-to-next-13-app-dir-1&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/updating-to-next-13-app-dir/#fn-updating-to-next-13-app-dir-1&#34; aria-label=&#34;Footnote [1]&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt; Of course you cannot test caching in dev mode, you have to build the site and run it in production mode, which made this very tedious.&lt;/p&gt;
&lt;p&gt;I’m not sure if it was by coincidence or if I found it in a GitHub Issue, but after some time, I added the the empty &lt;code&gt;generateStaticParams&lt;/code&gt; in there, and it finally worked.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;1&#34;&gt;&lt;li id=&#34;fn-updating-to-next-13-app-dir-1&#34;&gt;Instead of defining a cache duration for a whole page, it’s now possible to define a cache on a per-request basis. The shortest cache duration determines how long the whole page stays cached. &lt;a href=&#34;https://timomeh.de/posts/updating-to-next-13-app-dir/#fn-ref-updating-to-next-13-app-dir-1&#34; aria-label=&#34;Back to reference 1&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;
&lt;h2&gt;Rendering the Comments widget only on the Client&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;https://giscus.app/&#34;&gt;Giscus&lt;/a&gt; comments widget is a client-only Component, it should initiate async on the client. &lt;code&gt;PostTitle&lt;/code&gt; and &lt;code&gt;PostBody&lt;/code&gt; are rendered on the server, which is now the default. But you can opt-in to client-side rendering by adding &lt;code&gt;&#39;use client&#39;&lt;/code&gt; to the top of the file.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-tsx&#34;&gt;// app/posts/[slug]/PostComment.tsx
&#39;use client&#39;

export function PostComments({ discussionNumber }) {
  return (
    &amp;#x3C;Giscus
      repo=&#34;timomeh/timomeh.de&#34;
      mapping=&#34;number&#34;
      term={discussionNumber.toString()}
    /&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Components vs. Rendering&lt;/h2&gt;
&lt;p&gt;With Server- and Client-Components, it’s easy to think that Server-Components are cached and Client-Components aren’t cached, because “they are only on the Client”, aren’t they?&lt;/p&gt;
&lt;p&gt;But pre-rendering is still a thing, and server-rendering didn’t replace it. Client-Components are still pre-rendered and hydrated by default.&lt;/p&gt;
&lt;p&gt;I think this can be a bit confusing in the beginning? At least I first had to wrap my head around it. There’s a matrix of different Components types and Rendering modes, and then there’s also Caching mixed into it. It certainly introduces a level of complexity into the mental model, not into the code itself.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;For smaller projects, go ahead and use the new App Directory. I wouldn’t recommend blindly migrating an important production app, since it’s still in beta and there are some bugs and missing pieces. But all in all, I’m a huge fan of those new features. It reimagines how we write React Apps quite a bit.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>What belongs into .gitignore (and what doesn&#39;t)</title>
      <link href="https://timomeh.de/posts/what-belongs-into-gitignore/?utm_source=rss"/>
      <updated>2022-12-26T16:51:00Z</updated>
      <id>https://timomeh.de/posts/what-belongs-into-gitignore</id>
      <content type="html">
&lt;p&gt;There’s a high chance that your &lt;a href=&#34;https://git-scm.com/docs/gitignore&#34;&gt;&lt;code&gt;.gitignore&lt;/code&gt; file&lt;/a&gt; includes a bunch of stuff which doesn’t belong in there. In my opinion, it should only include paths which belong to your software project. For example build artifacts, 3rd party packages, and specifics to the language or runtime of your software.&lt;/p&gt;

&lt;p&gt;You’ll also often find paths for Editors and Operating Systems inside &lt;code&gt;.gitignore&lt;/code&gt;. Let’s say you’re using VS Code on macOS, so you added this to your &lt;code&gt;.gitignore&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;.vscode
.DS_Store
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The next developer joining the project uses IntelliJ on Windows, so they update the &lt;code&gt;.gitignore&lt;/code&gt; to this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;.vscode
.DS_Store
.idea
Thumbs.db
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The neat thing about software projects is that they’re completely independent from your local setup. You can use whatever Operating System and Editor you want. So why do we break this by adding details about our local environments into the project?&lt;/p&gt;
&lt;h2&gt;Define a global &lt;code&gt;.gitignore&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Of course Git has a solution for this. You can define a global gitignore file, only locally for you.&lt;/p&gt;
&lt;p&gt;To do this, create a new file &lt;code&gt;~/.config/git/ignore&lt;/code&gt; and add all paths specific to your local setup into it. For VS Code on macOS, it could look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;.vscode
.DS_Store
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And you’re done. It will be applied to all projects, additionally to the &lt;code&gt;.gitignore&lt;/code&gt; of each project.&lt;/p&gt;
&lt;p&gt;At the time of writing, I’m using &lt;a href=&#34;https://asdf-vm.com/&#34;&gt;asdf&lt;/a&gt; which has a &lt;code&gt;.tool-versions&lt;/code&gt; files, so I can specify which Node.js version I want in a specific project. Of course not everyone is using asdf, so I simply added it to my global gitignore.&lt;/p&gt;
&lt;h2&gt;Un-ignoring still works&lt;/h2&gt;
&lt;p&gt;Let’s say your team decided to share some common VS Code configurations, but your global gitignore already contains the &lt;code&gt;.vscode&lt;/code&gt; folder and won’t be checked in. No worries, overrides will still work. If you un-ignore it inside the &lt;code&gt;.gitignore&lt;/code&gt; of the project, it will be checked in again – only for this project, and not for all.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;!.vscode/tasks.json
!.vscode/launch.json
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;It’s their fault&lt;/h2&gt;
&lt;p&gt;A lot of auto-generators and project templates come with a &lt;code&gt;.gitignore&lt;/code&gt; file which already contains such common paths for local setups. This might make it more beginner friendly, but I think it also makes it look like it’s &lt;em&gt;the&lt;/em&gt; solution on how to deal with those files. But it’s not.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Everything is a CMS – Building a low-maintenance website for a low-budget trash movie</title>
      <link href="https://timomeh.de/posts/making-of-pottoriginale-de/?utm_source=rss"/>
      <updated>2022-11-28T21:15:00Z</updated>
      <id>https://timomeh.de/posts/making-of-pottoriginale-de</id>
      <content type="html">
&lt;p&gt;A few months ago, an email from my good friend &lt;a href=&#34;https://www.instagram.com/gerrit.starczewski/&#34;&gt;Gerrit&lt;/a&gt; showed up in my inbox. Gerrit made a new “&lt;a href=&#34;https://www.instagram.com/pottoriginale/&#34;&gt;Pottoriginale&lt;/a&gt;” movie, and he needed a website for his film tour. I knew that it will only take me an evening to do, I had the feeling that I’d enjoy the challenge, and I knew that I have some time in the coming week. And a few days later, &lt;a href=&#34;https://www.pottoriginale.de/&#34;&gt;pottoriginale.de&lt;/a&gt; was live.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/dBKvkgoqtd-640.png&#34; alt=&#34;Screenshot of pottoriginale.de&#34;&gt;&lt;/p&gt;
&lt;p&gt;I’ve already built a few websites for Gerrit many years ago, so I know what he needs. Gerrit is very good at providing essential info without asking, which makes the process very nice.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;i have 2 posters. + new dates. + a poster for the aftershow party of the premiere.&lt;br&gt;
see here [file sharing link]&lt;br&gt;
tickets for the aftershow party are available here [link]&lt;br&gt;
would be epic to have the trailer on the page [youtube link]&lt;br&gt;
tour dates:&lt;br&gt;
[…]&lt;br&gt;
Director, Idea, Producer: Gerrit Starczewski&lt;br&gt;
Camera: […]&lt;br&gt;
press inquiries, theater inquiries etc [mail]&lt;br&gt;
hugs and many thanks&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Everything else, for example &lt;strong&gt;the actual design&lt;/strong&gt; is a nice greenfield project, and he’s always very grateful for everything you do for him. I took some inspiration from the movie poster: colors, fonts, and for example the red banner at the bottom.&lt;/p&gt;
&lt;p&gt;Because I know Gerrit, I also know that he wants his website to include up-to-date info. In the end, &lt;strong&gt;it’s a website for a movie&lt;/strong&gt;, and of course there will be new tour dates. Does this mean I need a database and a server? I just want to build a website!&lt;/p&gt;
&lt;h2&gt;I excel at choosing a CMS&lt;/h2&gt;
&lt;p&gt;Tour dates need to be updated frequently. I don’t want to make changes to code and deploy a new version just to insert a new date. It should be as easy as possible for both me and for Gerrit to update the dates. Because, when for some reason I cannot make changes anymore, Gerrit should still be able to add new dates.&lt;sup id=&#34;fn-ref-making-of-pottoriginale-de-1&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/making-of-pottoriginale-de/#fn-making-of-pottoriginale-de-1&#34; aria-label=&#34;Footnote [1]&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt; I don’t want a situation where someone’s career depends on my availability.&lt;/p&gt;
&lt;p&gt;So… what’s a free tool, where you can enter structured data, for which everyone already has an account for, is always available, needs no explanation, and where you can restrict who has access to it? ✨ &lt;strong&gt;Google Sheets&lt;/strong&gt; ✨&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/qQUvuGElx6-960.png&#34; alt=&#34;Screenshot of Tour Dates in Google Sheets&#34;&gt;&lt;/p&gt;
&lt;p&gt;Yes, I use Google Sheets as CMS for &lt;a href=&#34;https://www.pottoriginale.de/&#34;&gt;pottoriginale.de&lt;/a&gt;. This is free real estate. The site uses Next.js’ &lt;a href=&#34;https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration&#34;&gt;Incremental Static Regeneration&lt;/a&gt;, it’s cached, and works very similar to &lt;a href=&#34;https://timomeh.de/posts/how-i-built-this-blog&#34;&gt;how I built my blog&lt;/a&gt;. And you know the best thing about it? &lt;em&gt;It just works.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It works like a charm. I told Gerrit that if he wants new dates on the site, he should just shoot me an email and it only takes me a few seconds to update it. I shared the Google Sheet with him and told him, that in case I’m not available, he can feel free to add it to the Sheet. There’s a link inside the Sheet you can’t miss, it’s clearly labeled to click on it after making changes (that link invalidates the site’s cache).&lt;/p&gt;
&lt;p&gt;Every time Gerrit sends me an email with a new tour date, it just takes a few seconds to do and &lt;em&gt;it’s actually fun&lt;/em&gt;. It makes me very happy to see that he gets more and more screenings of his film.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;1&#34;&gt;&lt;li id=&#34;fn-making-of-pottoriginale-de-1&#34;&gt;I’m always trying to minimize the &lt;a href=&#34;https://en.wikipedia.org/wiki/Bus_factor&#34;&gt;bus factor&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/posts/making-of-pottoriginale-de/#fn-ref-making-of-pottoriginale-de-1&#34; aria-label=&#34;Back to reference 1&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;
&lt;h2&gt;Lesson learned: don’t restrict yourself&lt;/h2&gt;
&lt;p&gt;A few days later, Gerrit emailed me:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;New date&lt;br&gt;
6.10 GELSENKIRCHEN SCHAUBURG&lt;br&gt;
Tickets soon&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The date had no link for the ticket presale yet, it should show “Tickets soon”. But I was an idiot, because I did what every developer loves to do, and built an unnecessary restriction into my code: if a row is incomplete, it is ignored. I thought I was smart. I thought that “in case I accidentally write garbled data into the sheet, it won’t break”. But why should I do that? What a stupid decision. There was no reason to restrict myself, it doesn’t make any sense to have.&lt;/p&gt;
&lt;p&gt;Easy change, I removed that restriction, and added a “Tickets soon” banner for when there’s no link yet.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/tzKN0_kFBK-960.png&#34; alt=&#34;List of Events with &amp;#x22;Tickets soon&amp;#x22; banner&#34;&gt;&lt;/p&gt;
&lt;p&gt;Next time, I would probably go even further and make everything configurable:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If there’s no link, just don’t link it.&lt;/li&gt;
&lt;li&gt;Make a column for the banner text. Instead of baking “Sold out” and “Tickets soon” hard into the code, just make it completely configurable for each date.&lt;/li&gt;
&lt;li&gt;Maybe even make the “Tickets” text configurable. Because why not, it won’t hurt, it’s just a row in a spreadsheet! I’m a big boy, I can type.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Lesson learned: Optimizing Websites for TikTok &amp;#x26; Instagram Stories&lt;/h2&gt;
&lt;p&gt;After watching some &lt;a href=&#34;https://www.instagram.com/pottoriginale/&#34;&gt;Pottoriginale Instagram Stories&lt;/a&gt;, I noticed that Gerrit is posting screenshots of the website’s section with the upcoming dates, to update his followers on upcoming screenings in or near their city. It blew me away because I never thought of it, yet it makes so much sense. It’s easy for him to do and the screenshots are of course already in the mobile form factor.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/6F3w63N_1S-428.png&#34; alt=&#34;Instagram Story with Events List from the website&#34;&gt;&lt;/p&gt;
&lt;p&gt;Next time, I will keep the screenshot-ability for social media in mind. For every section. It’s such a good life hack. And it also encourages others to post screenshots, if the screenshots just look nice.&lt;/p&gt;
&lt;h2&gt;Some ‘00 design in ‘22&lt;/h2&gt;
&lt;p&gt;I’m not the best at “designing while you code”, it’s just not a process I like to do. I also didn’t want to spend a lot of time on an actual design, because I wanted to do everything in one evening. On top of that, I don’t have any practice anymore in actually sitting in front of a design app and and designing something. So, even if it’s not my most favorite and productive workflow, I designed it while I coded it.&lt;/p&gt;
&lt;p&gt;It was a fun process regardless, because I can do whatever. It’s a website for a trashy film, so I have the chance to make a fittingly trashy looking website. Everything just happened while I did it. Why not put a good old tile table on a website? When do you get the chance to do that?&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/9iikb1IOIl-960.png&#34; alt=&#34;A tile table on a website&#34;&gt;&lt;/p&gt;
&lt;p&gt;Why not make everything jump and move, get some motion in there? Crediting people – why not in the form of scrolling end credits? Taking the design inspiration from the poster and using the colorful scrolling banners as section separators worked great, in my humble opinion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All in all, it was a lot of fun.&lt;/strong&gt; In case I didn’t link to it often enough, you can see the result on &lt;a href=&#34;https://pottoriginale.de/&#34;&gt;pottoriginale.de&lt;/a&gt;.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>How I organize myself (without Productivity Tools)</title>
      <link href="https://timomeh.de/posts/organization-without-productivity-tools/?utm_source=rss"/>
      <updated>2022-11-12T17:15:00Z</updated>
      <id>https://timomeh.de/posts/organization-without-productivity-tools</id>
      <content type="html">
&lt;p&gt;I’ve always found Productivity Apps ✨ cool ✨. Nice-looking Apps for Todos and Notes, as a single source of truth for everything going on in my life. But I learned that I don’t work like that. Those Apps always felt wrong. I’m very organized without them. For some reason, I’m still envious of people when they show how they use some App to organize their life, but I don’t try them out anymore.&lt;/p&gt;
&lt;p&gt;I mainly use &lt;strong&gt;Emails&lt;/strong&gt;, my &lt;strong&gt;Desktop&lt;/strong&gt;, &lt;strong&gt;Calendar&lt;/strong&gt;, and &lt;strong&gt;Post-It’s&lt;/strong&gt;. I know it sounds ridiculously oldschool, but it works pretty well for me. Let me explain:&lt;/p&gt;

&lt;h2&gt;Emails&lt;/h2&gt;
&lt;p&gt;Everything in my Email Inbox is something I need to do, and when it’s done, the Email is archived. Some Emails only need a reply, and for other Emails I need to do something before I can reply. Some Emails can stay in my Inbox for weeks, until I can finally respond and archive them. Even when it’s an ongoing task or discussion: as soon as I cannot actively do something and I need to wait for a reply, it’s going to the archive.&lt;/p&gt;
&lt;p&gt;This is what I use most of the time. When an online service can send me Email Notifications for things I need to act on, I’ll usually activate them – for example GitHub Pull Request Reviews. Sometimes I also send mails to myself.&lt;/p&gt;
&lt;h2&gt;Desktop&lt;/h2&gt;
&lt;p&gt;Similar to how I use Emails, but for longer-running tasks. For example doing taxes, invoices, contracts, collecting documents before I can send them off. I’ll just put them on my Desktop until it’s finished and can be sent off via Email or moved to my Google Drive. My goal is to keep my desktop clean. This often plays together with my Emails where I need to collect documents before I can reply.&lt;/p&gt;
&lt;p&gt;For physical documents, I’ll scan them and put them on my Desktop.&lt;/p&gt;
&lt;h2&gt;Calendar&lt;/h2&gt;
&lt;p&gt;Easy, just to remind me of my schedule, with the addition that I also use it as task reminder when something needs to be done in a timeframe. For example driving my car to the garage before noon is a calendar event from 8:00 - 12:00. Booking train tickets can be a calendar event spanning a few days.&lt;/p&gt;
&lt;p&gt;This plays together with my Emails and Desktop: When I buy concert tickets, I download them to my desktop, create a calendar event, and attach them. For business travels, when someone sends me train tickets and a hotel booking, I’ll create a calendar event and attach it.&lt;/p&gt;
&lt;h2&gt;Post-It’s&lt;/h2&gt;
&lt;p&gt;Smaller things don’t fit into the above categories. When I want to remind myself of a task which needs to be done in a few hours or tomorrow, I’ll write it on a sticky note and stick it onto my desk. It often happens during meetings or Slack messages.&lt;/p&gt;
&lt;h2&gt;Scratch that Itch&lt;/h2&gt;
&lt;p&gt;Now that I finally wrote this down and thought a little bit more about it, I noticed that all of those places have one thing in common: they make me feel uncomfortable. I don’t like Emails in my Inbox, files on my desktop, notes on my desk, or events in my calendar. With each day, the discomfort increases to finally “clean up”.&lt;/p&gt;
&lt;p&gt;Nobody likes doing tedious tasks, and for me, a fancy app contradicts too much with the burden of finishing those tasks. I would feel less of a necessity to actually do them. Maybe this reasoning sounds crazy, like I’m a huge fan of feeling uncomfortable. It’s not &lt;em&gt;that&lt;/em&gt; bad. I can relax even when I have some Emails in my Inbox. But I feel even better when they’re finally done.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Small changes are the most stressful</title>
      <link href="https://timomeh.de/posts/small-changes-are-stressful/?utm_source=rss"/>
      <updated>2022-10-10T10:52:00Z</updated>
      <id>https://timomeh.de/posts/small-changes-are-stressful</id>
      <content type="html">
&lt;p&gt;Last week I got a new sofa, and it’s one of the most stressful changes I had in the past.&lt;/p&gt;
&lt;p&gt;Big changes are not an issue for me. 10 years ago, when I moved into my very first apartment and lived alone for the first time: no worries at all. It was exciting!&lt;/p&gt;
&lt;p&gt;But I struggled so hard with buying a new sofa. It took me a year to get myself to buy a new one. It’s big and comfortable, looks nice, it’s exactly what I wanted. But all the consequences of that change:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I had to move all the furniture in my office, so my old sofa fits in there. Getting rid of my old sofa wasn’t an option. But now I’m sitting in a different direction on my desk. It just feels wrong. The room looks nice and cozy, but it’s so different. My mic boom arm now doesn’t fold away easily because it bangs against the wall. Do I also need to move that thing? So many changes!&lt;/li&gt;
&lt;li&gt;I always folded my laundry on top of the backrest of my old sofa. It was nice. I could watch TV while folding up my tees. But I cannot do that anymore with my new sofa.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Changing everything? Not an issue.&lt;/p&gt;
&lt;p&gt;Changing a small minor detail? Oof.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Of Enums and Booleans</title>
      <link href="https://timomeh.de/posts/of-enums-and-booleans/?utm_source=rss"/>
      <updated>2022-09-14T10:51:00Z</updated>
      <id>https://timomeh.de/posts/of-enums-and-booleans</id>
      <content type="html">
&lt;p&gt;In programming, we often deal with things being in a state. Users being verified, Modals being open, Posts being published. Yesterday I had an interesting chat with &lt;a href=&#34;https://losstopschade.de/&#34;&gt;Daniel&lt;/a&gt; about &lt;strong&gt;rules to decide when you should store state as an enum&lt;/strong&gt;&lt;sup id=&#34;fn-ref-of-enums-and-booleans-1&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/of-enums-and-booleans/#fn-of-enums-and-booleans-1&#34; aria-label=&#34;Footnote [1]&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt; &lt;strong&gt;or as a boolean&lt;/strong&gt;. We both know that it’s always better to use enums instead of booleans. It’s a common advice and nothing new, just search it on the internet and you’ll see countless articles recommending the use of enums.&lt;/p&gt;
&lt;p&gt;But how can we tell that a boolean should rather be an enum?&lt;/p&gt;

&lt;p&gt;Having a rule for such decisions not only helps you to write consistently good code – it helps you a lot in Code Reviews. “I think this boolean should be an enum instead” could be a good code improvement, but it’s not a good suggestion because it doesn’t contain an objective reason &lt;em&gt;why&lt;/em&gt; it would be better.&lt;/p&gt;
&lt;p&gt;For example, when deciding if a value should be a number or a string, there’s an easy rule: if it makes sense to increment or decrement the value, it’s a number. If not, it’s a string which happens to only consist of numbers.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;1&#34;&gt;&lt;li id=&#34;fn-of-enums-and-booleans-1&#34;&gt;”enum” here means an enumerated type, consisting of a set of different values &lt;a href=&#34;https://timomeh.de/posts/of-enums-and-booleans/#fn-ref-of-enums-and-booleans-1&#34; aria-label=&#34;Back to reference 1&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;
&lt;h2&gt;The Rule if State is an Enum or a Boolean&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;In short: A boolean state is the answer to a question that you ask an enum.&lt;/strong&gt; It can also be the answer to a combination of different values, and not only enums. But if you don’t have an enum to ask that question, there can’t be an answer, so you need an enum.&lt;/p&gt;
&lt;p&gt;When differentiating between different states of a thing, you ask that thing “What are you?”. The answer is always an enum. You cannot answer “What are you?” with “yes”. But you can ask this enum “Are you […]?”, which you can answer with “yes”.&lt;/p&gt;
&lt;p&gt;For example, a user could be &lt;code&gt;verified&lt;/code&gt; and &lt;code&gt;unverified&lt;/code&gt;, and also maybe &lt;code&gt;blocked&lt;/code&gt; and &lt;code&gt;deleted&lt;/code&gt;.&lt;sup id=&#34;fn-ref-of-enums-and-booleans-2&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/of-enums-and-booleans/#fn-of-enums-and-booleans-2&#34; aria-label=&#34;Footnote [2]&#34;&gt;[2]&lt;/a&gt;&lt;/sup&gt; You can ask this enum:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Are you verified? When it’s &lt;code&gt;verified&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Are you unverified? When it’s &lt;code&gt;unverified&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Are you able to login at all? When it’s not &lt;code&gt;blocked&lt;/code&gt; or &lt;code&gt;deleted&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s say you’ve modelled this as booleans &lt;code&gt;isVerified&lt;/code&gt; and &lt;code&gt;isUnverified&lt;/code&gt;. Managing both of them independent from each other – not by asking an enum – can cause that both are true, which is an impossible state.&lt;/p&gt;
&lt;p&gt;You can never go wrong with storing state in an enum, even if your enum only contains 2 values. It might contain more values in the future, or it might not. But no matter what, your code stays nice and readable, and will have less cognitive load.&lt;sup id=&#34;fn-ref-of-enums-and-booleans-3&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/of-enums-and-booleans/#fn-of-enums-and-booleans-3&#34; aria-label=&#34;Footnote [3]&#34;&gt;[3]&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;2&#34;&gt;&lt;li id=&#34;fn-of-enums-and-booleans-2&#34;&gt;This is only an example for illustration. User states are often much more complex in the real world &lt;a href=&#34;https://timomeh.de/posts/of-enums-and-booleans/#fn-ref-of-enums-and-booleans-2&#34; aria-label=&#34;Back to reference 2&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;li id=&#34;fn-of-enums-and-booleans-3&#34;&gt;For example: &lt;code&gt;!user.is_unverified&lt;/code&gt; requires you to think for a short moment. The negation &lt;code&gt;!&lt;/code&gt; is far away from the word “unverified”, it doesn’t read well from left to right, and also contains a double negation &lt;a href=&#34;https://timomeh.de/posts/of-enums-and-booleans/#fn-ref-of-enums-and-booleans-3&#34; aria-label=&#34;Back to reference 3&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Robin Rendle: &#34;Take Care of Your Blog&#34;</title>
      <link href="https://timomeh.de/posts/robin-rendle-take-care-of-your-blog/?utm_source=rss"/>
      <updated>2022-09-12T13:12:00Z</updated>
      <id>https://timomeh.de/posts/robin-rendle-take-care-of-your-blog</id>
      <content type="html">
&lt;p&gt;In his blog post &lt;a href=&#34;https://www.robinrendle.com/notes/take-care-of-your-blog-/&#34;&gt;&lt;em&gt;Take Care of Your Blog&lt;/em&gt;&lt;/a&gt;, Robin Rendle wrote some career advice:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Blog your heart! Blog about something you’ve learned, blog about something you’re interested in. Blog about cameras or HTML or that one browser bug you’ve noticed this morning […]&lt;/p&gt;
&lt;p&gt;Ignore the analytics and the retweets though. There will be lonely, barren years of no one looking at your work. There will be blog posts that you adore that no one reads and there’ll be blog posts you spit out in ten minutes that take the internet by storm.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s exactly the philosophy I want to follow here. And that’s also the reason why I focused on building a blog which allows me to publish content as frictionless as possible.&lt;sup id=&#34;fn-ref-robin-rendle-take-care-of-your-blog-1&#34; class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://timomeh.de/posts/robin-rendle-take-care-of-your-blog/#fn-robin-rendle-take-care-of-your-blog-1&#34; aria-label=&#34;Footnote [1]&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://christianpoplawski.de&#34;&gt;Chris’ blog&lt;/a&gt; inspired me to finally start blogging again. His blog is a mixture of smaller and larger development topics, mixed with other thoughts and stories from his life. Sometimes I messaged him with some small development thoughts or things I learned that day, and he often responded with &lt;em&gt;“that would be a nice little blog post”&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;And he’s right! You just need to overcome the thoughts &lt;em&gt;“that’s not worthy of publishing”&lt;/em&gt; and &lt;em&gt;“nobody cares”&lt;/em&gt;. At least I had to overcome them.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; aria-label=&#34;Footnotes&#34;&gt;&lt;ol start=&#34;1&#34;&gt;&lt;li id=&#34;fn-robin-rendle-take-care-of-your-blog-1&#34;&gt;shameless plug to my first post: &lt;a href=&#34;https://timomeh.de/posts/how-to-build-a-blog&#34;&gt;How to Build a Blog&lt;/a&gt; &lt;a href=&#34;https://timomeh.de/posts/robin-rendle-take-care-of-your-blog/#fn-ref-robin-rendle-take-care-of-your-blog-1&#34; aria-label=&#34;Back to reference 1&#34;&gt;↑&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/section&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>The Curse of the astray Service Worker</title>
      <link href="https://timomeh.de/posts/astray-service-worker/?utm_source=rss"/>
      <updated>2022-09-11T12:48:00Z</updated>
      <id>https://timomeh.de/posts/astray-service-worker</id>
      <content type="html">
&lt;p&gt;When I published my new site last week, I continued to still see my old site. Initially I thought it was just DNS, but after a short while it dawned on me, that my old site used a Service Worker which cached everything and made it offline available. When you visited my old site, it automatically installed the Service Worker, and continued to serve it from cache. And now, if you visited my new site, it still served my old site. Great.&lt;/p&gt;

&lt;p&gt;My old site used &lt;a href=&#34;https://www.gatsbyjs.com/&#34;&gt;Gatsby&lt;/a&gt;, and while browsing through Gatsby’s plugins, I saw a plugin to make it offline available and I just installed it, because why not. It sounded cool. I had no real experience with those Service Workers. After using it for a while, I didn’t really like the User Experience of it. Every time I published a new post, it still showed old posts with a banner “New content available, please reload”. But I also kept it because it didn’t bother me too much.&lt;/p&gt;
&lt;p&gt;I could just go into the Dev Tools and unregister the Service Worker myself, but that would only solve it for me. I had no real experience with the Service Worker Cache API, so I had no idea where and how to start to fix this. I first thought that I need to add some JavaScript into the old site’s HTML, but of course that didn’t make sense, because that’s the cached file I cannot update anymore.&lt;/p&gt;
&lt;h2&gt;How to unregister an old Service Worker&lt;/h2&gt;
&lt;p&gt;In the end, the solution was kinda easy. The old Service Worker from this Gatsby plugin was automatically created under &lt;code&gt;timomeh.de/sw.js&lt;/code&gt;. I simply created a new &lt;code&gt;sw.js&lt;/code&gt; with some code to unregister itself which I found in &lt;a href=&#34;https://stackoverflow.com/a/65295696&#34;&gt;this StackOverflow answer&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;self.addEventListener(&#39;install&#39;, function (e) {
  self.skipWaiting()
})

self.addEventListener(&#39;activate&#39;, function (e) {
  self.registration
    .unregister()
    .then(function () {
      return self.clients.matchAll()
    })
    .then(function (clients) {
      clients.forEach((client) =&gt; client.navigate(client.url))
    })
})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For users which still have the Service Worker installed, it will refetch the &lt;code&gt;sw.js&lt;/code&gt; file, run it, it unregisters itself, the page will reload, and the new site was visible. No Service Worker anymore.&lt;/p&gt;
&lt;h2&gt;Things I’m still unsure about&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Would this problem have fixed itself after some time if I never created this new &lt;code&gt;sw.js&lt;/code&gt; file? I’ve read a few discussions saying that Service Workers update themselves every ~24 hours, but would a gone &lt;code&gt;sw.js&lt;/code&gt; also unregister itself after 24 hours?&lt;/li&gt;
&lt;li&gt;My gut feeling is: no, because that would make the offline-available aspect not so useful anymore.&lt;/li&gt;
&lt;li&gt;If it would never unregister itself, isn’t this kinda bad? For example you’re buying a domain from someone else which used a Service Worker, or some malicious code got injected into your page and you cleaned it up, there could still be code running in the background for some users, which you don’t even know about.&lt;/li&gt;
&lt;li&gt;Even if it unregisters itself after some time: while it’s still registered and you don’t know about it, it could do pretty bad things.&lt;/li&gt;
&lt;/ul&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>Mastering git rebase --onto</title>
      <link href="https://timomeh.de/posts/mastering-git-rebase-onto/?utm_source=rss"/>
      <updated>2022-09-08T00:41:00Z</updated>
      <id>https://timomeh.de/posts/mastering-git-rebase-onto</id>
      <content type="html">
&lt;p&gt;&lt;code&gt;git rebase --onto&lt;/code&gt; is one of my absolute favorite git features. I don’t use it every day, but when I use it, it’s super helpful. For all those situations where you branched off a branch before it got merged, and then you need to rebase your branch onto main without handling dozens of conflicts.&lt;/p&gt;

&lt;p&gt;A very common scenario to use &lt;code&gt;git rebase --onto&lt;/code&gt; is when you created a branch (&lt;code&gt;feature-b&lt;/code&gt;) from another feature branch (&lt;code&gt;feature-a&lt;/code&gt;), and &lt;code&gt;feature-a&lt;/code&gt; got merged in the meantime. When you use a regular rebase, without &lt;code&gt;--onto&lt;/code&gt;, git will go with you step by step through every commit, and most likely will tell you that there are a lot of conflicts to resolve. When using &lt;code&gt;--onto&lt;/code&gt;, it’s a single command without any conflicts.&lt;/p&gt;
&lt;p&gt;This scenario looks like this:&lt;/p&gt;
&lt;p data-image-theme=&#34;light&#34;&gt;&lt;img src=&#34;https://timomeh.de/img/2njAr-FbJv-960.png&#34; alt=&#34;feature-a branching from main and then merging back into main. feature-b branching from feature-a&#34;&gt;&lt;/p&gt;

&lt;p&gt;You now want &lt;code&gt;feature-b&lt;/code&gt; to be branched from &lt;code&gt;main&lt;/code&gt;, so the history looks like you never even branched from &lt;code&gt;feature-a&lt;/code&gt;. Make sure your local git is up-to-date (&lt;code&gt;main&lt;/code&gt;, &lt;code&gt;feature-a&lt;/code&gt; and &lt;code&gt;feature-b&lt;/code&gt; are fetched). Then run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git rebase --onto I F feature-b
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;I&lt;/code&gt; is the new parent commit of the branch &lt;code&gt;feature-b&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;F&lt;/code&gt; is the old parent commit of the branch &lt;code&gt;feature-b&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;feature-b&lt;/code&gt; is … &lt;code&gt;feature-b&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After that, there shouldn’t be any conflicts, and you are immediately in your desired state. Force push &lt;code&gt;feature-b&lt;/code&gt; and you’re done.&lt;/p&gt;
&lt;p data-image-theme=&#34;light&#34;&gt;&lt;img src=&#34;https://timomeh.de/img/nzSZsMhwpy-960.png&#34; alt=&#34;a linear main branch with feature-b branching off at the end&#34;&gt;&lt;/p&gt;

&lt;p&gt;This is very helpful when &lt;code&gt;feature-a&lt;/code&gt; is a Pull Request which is currently being reviewed, and before it’s merged you want to start working on a new feature which depends on &lt;code&gt;feature-a&lt;/code&gt;. After &lt;code&gt;feature-a&lt;/code&gt; is reviewed and merged, you want to create a new Pull Request for &lt;code&gt;feature-b&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Personal Note on waiting for Code Reviews&lt;/h2&gt;
&lt;p&gt;Code Reviews have one of the highest priorities in a team. When you’re assigned for a review, finish your last thoughts or the few lines you’re currently writing – which should just take a few more minutes – and then start the review. Code which is sitting there and waiting for a review is a lost opportunity to provide immediate user- and business value. If you’re constantly blocked and have to wait for many hours or even days until your code is reviewed, be assured that this isn’t how it should be. Talk to your team. Send them this paragraph. The only reason why you shouldn’t immediately start a review is because you’re currently not working, or because you’re working on a highly urgent task, in which case someone else should be assigned for review.&lt;/p&gt;
&lt;h2&gt;How &lt;code&gt;--onto&lt;/code&gt; works&lt;/h2&gt;
&lt;p&gt;The example above is far away from the only reason why you should know about &lt;code&gt;--onto&lt;/code&gt;. In general, &lt;code&gt;--onto&lt;/code&gt; allows you to select any range of commits and move it on top of any other commit.&lt;/p&gt;
&lt;p&gt;A second useful scenario, and good example to see how it really works, is removing previous commits. In the example below, we want to remove &lt;code&gt;D&lt;/code&gt; and &lt;code&gt;E&lt;/code&gt; from our feature branch.&lt;/p&gt;
&lt;p data-image-theme=&#34;light&#34;&gt;&lt;img src=&#34;https://timomeh.de/img/JOAinvJJqB-960.png&#34; alt=&#34;a linear branch history with commits A to H, with the range F to H highlighted&#34;&gt;&lt;/p&gt;

&lt;p&gt;We do this by selecting the range from commits &lt;code&gt;F&lt;/code&gt; to &lt;code&gt;H&lt;/code&gt;, and move them onto &lt;code&gt;C&lt;/code&gt;. &lt;strong&gt;In order to select  the range &lt;code&gt;F&lt;/code&gt; to &lt;code&gt;H&lt;/code&gt;, we need to use the commit sha &lt;em&gt;before the range starts&lt;/em&gt; (which is &lt;code&gt;E&lt;/code&gt;), and the last commit sha of the range (&lt;code&gt;H&lt;/code&gt;).&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git rebase --onto C E H
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If we run this, then &lt;code&gt;C&lt;/code&gt; is the new parent of &lt;code&gt;F&lt;/code&gt;, and &lt;code&gt;D&lt;/code&gt; is unattached from it. Basically deleting &lt;code&gt;D&lt;/code&gt; and &lt;code&gt;E&lt;/code&gt;.&lt;/p&gt;
&lt;p data-image-theme=&#34;light&#34;&gt;&lt;img src=&#34;https://timomeh.de/img/xljsFmmc7l-960.png&#34; alt=&#34;a linear branch history with commits A to H, but D and E are gone&#34;&gt;&lt;/p&gt;

&lt;h2&gt;Use &lt;code&gt;--onto&lt;/code&gt; with only 2 arguments&lt;/h2&gt;
&lt;p&gt;The last argument is optional – in the example above &lt;code&gt;H&lt;/code&gt;. If you omit it, git will use &lt;code&gt;HEAD&lt;/code&gt; by default. If your &lt;code&gt;HEAD&lt;/code&gt; was already &lt;code&gt;H&lt;/code&gt; before you ran the command above, you could’ve also used the shorter version:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git rebase --onto C E
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Back to the first example&lt;/h2&gt;
&lt;p&gt;Looking back at the first example (with our &lt;code&gt;feature-b&lt;/code&gt; branched off from &lt;code&gt;feature-a&lt;/code&gt;), we now know why this works. The command we ran was:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git rebase --onto I F feature-b
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;We select the first commit in the range by using &lt;code&gt;F&lt;/code&gt; – the commit before the range starts.&lt;/li&gt;
&lt;li&gt;We select the last commit in the range by using the branch name directly &lt;code&gt;feature-b&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;With this range selected, we put it onto &lt;code&gt;I&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-image-theme=&#34;light&#34;&gt;&lt;img src=&#34;https://timomeh.de/img/v3d1R8xPZl-960.png&#34; alt=&#34;feature-a branching from main and then merging back into main. feature-b branching from feature-a. feature-b is highlighted&#34;&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If our &lt;code&gt;HEAD&lt;/code&gt; already is the latest &lt;code&gt;feature-b&lt;/code&gt;, we could’ve omitted it.&lt;/li&gt;
&lt;li&gt;If our &lt;code&gt;main&lt;/code&gt; branch is up-to-date and &lt;code&gt;I&lt;/code&gt; is &lt;code&gt;main&lt;/code&gt;, we could also write &lt;code&gt;main&lt;/code&gt; instead.&lt;/li&gt;
&lt;li&gt;If we have &lt;code&gt;feature-a&lt;/code&gt; checked out locally and it is &lt;code&gt;F&lt;/code&gt;, we could also write &lt;code&gt;feature-a&lt;/code&gt; instead.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If all of this is the case, we can simply run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git rebase --onto main feature-a
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And now I’ll never forget how this works.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>How I Built this Blog with GitHub Discussions</title>
      <link href="https://timomeh.de/posts/how-i-built-this-blog/?utm_source=rss"/>
      <updated>2022-09-04T21:58:00Z</updated>
      <id>https://timomeh.de/posts/how-i-built-this-blog</id>
      <content type="html">
&lt;p&gt;In my &lt;a href=&#34;https://timomeh.de/posts/how-to-build-a-blog&#34;&gt;last post&lt;/a&gt; I covered my decision to use GitHub Discussions as CMS for my posts. I’m going to build it using Next.js, because that’s what I already use a lot, and it has some features which will become quite useful. Let’s get cracking!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update March 2024:&lt;/strong&gt; A lot has changed in the meantime, and now I use Next.js’ App Router and React Server Components for server-side rendering. A few things have stayed the same though: I still use GitHub Discussions in the same way (now even with labels) and still revalidate posts via webhooks.&lt;br&gt;
If you are interested in the current implementation, check out the repo: &lt;a href=&#34;https://github.com/timomeh/timomeh.de&#34;&gt;github.com/timomeh/timomeh.de&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update November 2024:&lt;/strong&gt; I don’t anymore use GitHub Discussions, haha whoops. I’m now using &lt;a href=&#34;https://keystatic.com/&#34;&gt;Keystatic&lt;/a&gt;, which still stores content on GitHub, but instead as Markdown files in a private repository. Keystatic has an &lt;em&gt;even better&lt;/em&gt; writing experience directly in my browser.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Public Repo, Private Posts&lt;/h2&gt;
&lt;p&gt;Strangers shouldn’t be able to open a new Discussion and poof, it’s visible on my site. That’s &lt;em&gt;my&lt;/em&gt; free real estate, not theirs. You could make your Repository private, but I would like it to be public. This way, the Discussion comments could actually be used as comment section.&lt;/p&gt;
&lt;p&gt;That’s where GitHub’s “Announcement” format comes in handy. When you create a Discussion category using the Announcement format, only maintainers and admins (that’s me!) can create a new Discussion in this category. Others can still comment on those posts. I created two of those categories, one for actual posts and one for drafts and ideas.&lt;/p&gt;
&lt;p&gt;You could also use Issues and a “published” Label to achieve the same security, because only maintainers can set Labels on Issues. Contrary to Issues, Discussion comments are threaded, which I found could be pretty cool.&lt;/p&gt;
&lt;h2&gt;The Problem with Slugs&lt;/h2&gt;
&lt;p&gt;Like Issues and Pull Requests, Discussions use numbers as user-facing identifier, and don’t have native support for slugs. I want URLs with slugs like &lt;code&gt;/posts/how-to-build-a-blog&lt;/code&gt;, not &lt;code&gt;/posts/2&lt;/code&gt;. So I’m simply using the Discussion’s title as slug. As post title, I’m using the first heading in the actual post body.&lt;/p&gt;
&lt;p&gt;You can see it in action &lt;a href=&#34;https://github.com/timomeh/timomeh.de/discussions/3&#34;&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://timomeh.de/img/ST9HiIk4kT-960.png&#34; alt=&#34;screenshot of GitHub Discussions where the discussion title is a slug called how-to-build-a-blog and the Discussions first Headline is the sentence &amp;#x22;How to build a Blog&amp;#x22;&#34;&gt;&lt;/p&gt;
&lt;h2&gt;Loading Posts via the API&lt;/h2&gt;
&lt;p&gt;GitHub’s API allows unauthenticated requests to public data with a rate limit of 60 requests per hour and IP. That’s not a lot. But if you use a personal Access Token, the rate limit is 5000 requests per hour. That should be enough. I configured the Access Token to only have access to public data, which makes the attack vector pretty insignificant – if that token would ever leak.&lt;/p&gt;
&lt;p&gt;GitHub Discussions aren’t available in their REST API. It’s only in their GraphQL API. While I’m not the biggest fan of GraphQL, it’s also not a problem.&lt;/p&gt;
&lt;h3&gt;Listing all Posts&lt;/h3&gt;
&lt;p&gt;… is quite straight forward. You can list up to 100 discussions, filtered by the category ID and sorted by created date. It will take a few days until I have 100 posts, but I love implementing pagination because it’s one of the only reasons to use &lt;code&gt;do...while&lt;/code&gt; loops.&lt;/p&gt;
&lt;h3&gt;Fetching a Single Post&lt;/h3&gt;
&lt;p&gt;Retrieving a single post is the real fun part. Because this is where the next problem with slugs emerges: there’s no API endpoint to get a single Discussion by its exact title, where I store the slug.&lt;/p&gt;
&lt;p&gt;My first idea was to just list all posts, what I already do on the List page, and then filter them in JavaScript by an exact title match. I decided on a different solution, but I still think this would be a totally okay solution. I won’t have thousands of posts, and computers are fast.&lt;/p&gt;
&lt;p&gt;My other idea, and what I’m using now, is to use GitHub’s Search API. It allows you to find Discussions with a title which includes a search term. I found some people online saying that the search results aren’t reliable, but I found it works without any issues.&lt;/p&gt;
&lt;p&gt;This means it could return multiple results, when the slugs are very similar, like &lt;code&gt;my-post&lt;/code&gt; and &lt;code&gt;my-post-part-2&lt;/code&gt;. But again, we can just find an exact title match using JavaScript.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-ts&#34;&gt;async function getBlogPost(slug) {
  const { search } = await api(
    `query postBySlug($search: String!) {
      search(
        query: $search
        type: DISCUSSION
        first: 100
      ) {
        edges {
          node {
            ... on Discussion {
              title
              createdAt
              body
              number
              category {
                id
              }
            }
          }
        }
      }
    }`,
    { search: `&#34;${slug}&#34; in:title repo:${owner}/${repo}` }
  )

  const post = search.edges.find((result) =&gt; {
    const discussion = result.node
    const isMatchingSlug = discussion.title === slug
    const isPostsCategory = discussion.category.id === POSTS_CATEGORY_ID
    return isMatchingSlug &amp;#x26;&amp;#x26; isPostsCategory
  })?.node

  return post
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Side note: You see those &lt;code&gt;node&lt;/code&gt; and &lt;code&gt;edges&lt;/code&gt; in the code snippet above? That’s one reason why I’m not a big fan of GitHub’s GraphQL API.&lt;/p&gt;
&lt;p&gt;I spare you with the details of turning the Markdown body into HTML using &lt;a href=&#34;https://github.com/remarkjs/remark&#34;&gt;remark&lt;/a&gt; and &lt;a href=&#34;https://github.com/rehypejs/rehype&#34;&gt;rehype&lt;/a&gt; because I hated it. But if you’re interested, everything related to data fetching and transforming is located in the &lt;a href=&#34;https://github.com/timomeh/timomeh.de/blob/438465fd4231619af18e2be712b1d441c206fcbf/src/lib/blog.ts&#34;&gt;&lt;code&gt;lib/blog.ts&lt;/code&gt; file&lt;/a&gt; in &lt;a href=&#34;https://github.com/timomeh/timomeh.de&#34;&gt;my repo&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Silly Feature: Custom Published Date&lt;/h3&gt;
&lt;p&gt;If we can find Discussions which &lt;em&gt;include&lt;/em&gt; the slug in their title, we could in theory add more information into the title. Nothing crazy, it shouldn’t conflict with the slug itself, but I added a small feature that you can optionally add a custom published date into the title, using the format &lt;code&gt;some-slug YYYY-MM-DD&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I could use this if I ever want to show a different published date than the actual Discussion’s creation date. Maybe it will come in handy some day.&lt;/p&gt;
&lt;h2&gt;Caching is Next.js’ Best Friend&lt;/h2&gt;
&lt;p&gt;One thing I hated about my last site was that I had to rebuild it for every change. I don’t want to deal with that anymore. But it also would be unnecessary to call GitHub’s API on every request. The site would be slow, unresponsive when GitHub’s API is flaky, and a chaos monkey could flood me with requests and exceed my rate limit.&lt;/p&gt;
&lt;p&gt;Next.js’ &lt;a href=&#34;https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration&#34;&gt;&lt;strong&gt;Incremental Static Generation&lt;/strong&gt;&lt;/a&gt; to the rescue: it generates the page on the server and caches it, so the next request is served from cache.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-ts&#34;&gt;// posts/[slug].ts

export async function getStaticPaths() {
  return {
    paths: [], // don&#39;t pre-render anything during build time
    fallback: &#39;blocking&#39;,
  }
}

export async function getStaticProps(context) {
  const post = await getBlogPost(context.params.slug)

  if (!post) {
    return { notFound: true }
  }

  return {
    props: { post },
    revalidate: false // cache it forever (default)
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You could set &lt;code&gt;revalidate: 60&lt;/code&gt; and Next.js would refetch the data if the cache is older than 60 seconds – or any cache time you want to set. But we can do better.&lt;/p&gt;
&lt;h2&gt;Using Webhooks to Regenerate Pages On Demand&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration#on-demand-revalidation&#34;&gt;On-demand Revalidation&lt;/a&gt; is a Next.js feature on top of Incremental Static Generation, which allows to you regenerate a specific page only when it’s necessary.&lt;/p&gt;
&lt;p&gt;All you need to do is to create an API Route, run &lt;code&gt;res.revalidate(path)&lt;/code&gt;, and let GitHub send a Webhook to this API Route every time a Discussion is created or updated. All affected pages will immediately be regenerated, the site is fast, and you only make a few requests every now and then. API Rate Limits won’t be an issue at all.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-ts&#34;&gt;// api/github-webhook.ts

export default async function handler(req, res) {
  const webhooks = new Webhooks({
    secret: process.env.GITHUB_WEBHOOK_SECRET,
  })

  // Verify that it&#39;s actually GitHub sending the Webhook
  const signature = req.headers[&#39;x-hub-signature-256&#39;]
  const verified = await webhooks.verify(req.body, signature)
  if (!verified) {
    res.status(401).json({ hint: &#39;Unverified&#39; })
  }

  // Verify that it&#39;s only related to Discussions
  if (!data.discussion) {
    res.status(401).json({ hint: &#39;Not a discussion event&#39; })
  }

  // Verify that it&#39;s the correct Posts Category
  if (data.discussion.category.node_id !== POSTS_CATEGORY_ID) {
    res.status(200).json({ hint: &#39;Only Blog Post Category allowed.&#39; })
  }

  // New Post: regenerate the List of Posts
  if (data.action === &#39;created&#39;) {
    await res.revalidate(&#39;/posts&#39;) // [!code highlight]
    res.status(200).json({ hint: &#39;Revalidated pages&#39; })
    return
  }

  // Updated Post: regenerate the Post and the List of Posts
  if (data.action === &#39;edited&#39;) {
    const { slug } = parseDiscussionTitle(data.discussion.title)
    await res.revalidate(&#39;/posts&#39;) // [!code highlight]
    await res.revalidate(`/posts/${slug}`) // [!code highlight]
    res.status(200).json({ hint: &#39;Revalidated pages&#39; })
    return
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Adding Comments&lt;/h2&gt;
&lt;p&gt;I didn’t add comments yet, but maybe I’ll add them in the future. &lt;a href=&#34;https://giscus.app/&#34;&gt;giscus&lt;/a&gt; looks like the perfect fit to embed the Discussion’s comment section below a post.&lt;/p&gt;
&lt;h2&gt;Feels Good&lt;/h2&gt;
&lt;p&gt;I’m really happy with this solution. For the previous post, I could fix some typos on my phone last evening and it was immediately updated on my site. The Next.js site is hosted on Vercel’s free tier, I still have my own minimalistic design, with a free CMS which I don’t need to host, maintain and update.&lt;/p&gt;
&lt;p&gt;You can find all code in my &lt;a href=&#34;https://github.com/timomeh/timomeh.de&#34;&gt;timomeh.de GitHub Repository&lt;/a&gt;.&lt;/p&gt;</content>
    </entry>
  
    
  
  





  
  


  




    <entry>
      <title>How to Build a Blog</title>
      <link href="https://timomeh.de/posts/how-to-build-a-blog/?utm_source=rss"/>
      <updated>2022-09-04T20:50:00Z</updated>
      <id>https://timomeh.de/posts/how-to-build-a-blog</id>
      <content type="html">
&lt;p&gt;When I was a teen, I learned how to build WordPress themes. During holidays or when school was out, I vividly remember how I sometimes sat in front of my computer for a few days and nights, and created new themes for my blog. Of course I had no blog, but having one was a cool thought. But this stuck to me, and I was really never happy with how my blogs work. Until now!&lt;/p&gt;

&lt;h2&gt;Flashback&lt;/h2&gt;
&lt;p&gt;When I was a teen, I learned how to build WordPress themes. During holidays or when school was out, I vividly remember how I sometimes sat in front of my computer for a few days and nights, and created new themes for my blog. Of course I had no blog, but having one was a cool thought. From designing in Photoshop, to programming it in Notepad++  and learning new things about WordPress, to finally dragging everything into FileZilla, and seeing how FTP slowly published my work to the world. It was a glorious feeling.&lt;/p&gt;
&lt;p&gt;My themes always supported nested comments and pingbacks, but I hardly had any traffic on my site.&lt;/p&gt;
&lt;p&gt;I must’ve created a dozen themes during this time, from simple designs to art-directed content. But I maybe used half of them to actually publish a few posts. The other half never got used, because I created a new theme before actually writing posts. And I always deleted the old content, because I thought it didn’t match the concept, or just because I found it cringe.&lt;/p&gt;
&lt;p&gt;During this time, I enjoyed the process of programming and learning, more than I cared about the content.&lt;/p&gt;
&lt;h2&gt;Bad Habits stick to you&lt;/h2&gt;
&lt;p&gt;Fast forward into my time after university. When I finally wanted to publish some actual content, I continued doing the same mistake. It was no longer WordPress, but I still implemented solutions for problems I didn’t have.&lt;/p&gt;
&lt;p&gt;Yes, it would be cool to build support for interactive code examples and a sticky Table of Contents, displaying the section you’re currently reading, and all just generated from simple Markdown files. But when I wanted to write something, everything I built was useless, and nothing I really wanted and needed was there.&lt;/p&gt;
&lt;h2&gt;What do I need to write content?&lt;/h2&gt;
&lt;p&gt;I don’t like to write content in my Code Editor. It’s cool to have Posts and Images tracked in Git, but I hated the process of dragging Images into directories, writing &lt;code&gt;![](../../images/2020/cat.jpg)&lt;/code&gt;, committing, pushing, waiting for it to rebuild. Ugh.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I want a Textbox inside a Browser. Creating or updating content should be simple and fast.&lt;/li&gt;
&lt;li&gt;I want a simple “Save” button to publish or update content, without going through Git.&lt;/li&gt;
&lt;li&gt;When I want to write a 2-sentence Post, it should be published in no time.&lt;/li&gt;
&lt;li&gt;I like writing Markdown, so that’s okay. I just shouldn’t need my Editor.&lt;/li&gt;
&lt;li&gt;I want a Preview. When I proofread a Post, I just like to do it in a Preview of the Post.&lt;/li&gt;
&lt;li&gt;I want to drag an Image from my Desktop into the Browser, it gets uploaded and pasted into the Post, and just works.&lt;/li&gt;
&lt;li&gt;I don’t want to deal with a database.&lt;/li&gt;
&lt;li&gt;It should be possible to extend in the future, when needed.&lt;/li&gt;
&lt;li&gt;I still want to build the UI myself, but no unnecessary features until I really need them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And most importantly: that’s all I need. I don’t need a setup to write long and complex  tech articles with a fancy UI.&lt;/p&gt;
&lt;h2&gt;Making decisions&lt;/h2&gt;
&lt;p&gt;My immediate thought was to (ab)use GitHub Issues as CMS. It ticks all my boxes. &lt;a href=&#34;https://youtu.be/cd4-UnU8lWY&#34;&gt;It’s free real estate.&lt;/a&gt; I don’t need to worry about database and hosting (except for worrying about API Rate limits), don’t need to make any backups (maybe I will have a GitHub Action to regularly download images), the content stays available even if I create a completely new site (given I don’t decide to delete the repository), and GitHub is totally never down (Ignoring the 11 Incidents last month. Maybe I need to implement a “GitHub is down, Content may not be up-to-date” banner). And it even has a comment section built in!&lt;/p&gt;
&lt;p&gt;The idea of using GitHub Issues as Blog isn’t new. Some research, trying out things, finding some difficulties with it, looking at other implementations, overthinking it again and telling myself not to overthink it, and a few days later: a Blog inside &lt;a href=&#34;https://github.com/timomeh/timomeh.de/discussions&#34;&gt;GitHub Discussions&lt;/a&gt; was born.&lt;/p&gt;
&lt;p&gt;Now I can even use the GitHub App to post from my phone! How futuristic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read more about the technical details in &lt;a href=&#34;https://timomeh.de/posts/how-i-built-this-blog&#34;&gt;Part 2&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;</content>
    </entry>
  
</feed>
