article
- This script needs read/write access to a micro.blog (or other fediverse) account that can send @mentions to me.
- The script needs to parse the feed (in this example micro.blog/rknightuk…) for keywords
- I need an option to provide the keywords. Could be hard-wired into the script for starters
- if a keyword is found, create a new post mentioning me and containing the link
- since this could be high-volume as the keywords are maybe too broad it shouldn’t mention/ping the creator of the post
- Back in our UI, where we display the widget, we do not display the category.
- When we get a successful response for the request, we update the internal state of the app (we don’t use Redux). So we “save” the category.
- When we open the form the edit the widget, we fetch data from the API first and display that to edit.
- For the happy path test for a successful response and be done
- Add tests for the failure case of unsuccessful responses
Blödsinn, TikTok und mein Schlaf
Berlin, 17. August Kennt ihr das, wenn ihr irgendwo etwas lest/seht und euch das die nächsten Tage weiter beschäftigt — obwohl es eigentlich Blödsinn ist? Bzw. ich weiß gar nicht, ob es Blödsinn ist. Jedenfalls hat vor ein paar Tagen jemand auf TikTok behauptet (so fangen die dümmsten Stories an 😜), dass „mein“ Stoffwechsel „resettet“ werden müsste. Klare Anzeichen dafür wären, dass mir 7-8h Schlaf nicht ausreichen würde um morgens nicht müde zu sein, dass ich nach dem Mittagessen in ein Energieloch fallen würde und müde wäre usw. usf. Und nun wache ich seitdem morgens auf, schlief mind. 7h, und bin groggy. Ja ich habe sogar einmal verschlafen seitdem! Stell dir vor! 😅
Also: Meine aktuelle Arbeitshypothese ist, dass das Blödsinn war und er nur sein achsotolles Programm zum Stoffwechsel-Reset (Blödsinn!) verkaufen wollte (Blödsinn!) und ich einfach nur gerade wieder einmal viel zu viel Stress im Job habe (kein Blödsinn 🤨).
Ansonsten bin ich heute das erste Mal nach dem Unfall und der OP mit meinem neuen Gravelbike zum Büro gefahren. Nun steht es hier auf dem Balkon neben mir, und ich freue mich jedes Mal, wenn ich rausschaue.

Ältere Damen im Wartezimmer
Heute erneuter Kontrolltermin im Krankenhaus für die Schulter, inkl. Röntgen. Die Frau an der Anmeldung beim Röntgen entfernt ihre Ohrstöpsel/Kopfhörer als ich sie anspreche. Ich bin ob dieser Tatsache etwas verwirrt. Nachdem ich 2min im Wartezimmer sitze, bei den beiden älteren Damen, die sich »angeregt unterhalten«, verstehe ich sie.
Why I opened a pull request to Rails (again)
It’s been a few years but I finally opened a PR to Rails again. github.com/rails/rai… The situation is a bit yak-shaving: I wanted to update to ActiveRecord v7 in my client’s app. In order to be able to do this I needed to update the gem sensible_logging. This gem is stuck at Rails < v7 though, so I created a PR to update the Gem which in turn surfaced a bug originating in Rails, hence the PR to Rails 🎉 My last PR was from Feb 3, 2015.
Tagebuchblogggen 28.2.2023
Arbeit
Beim Kunden bin ich heute endlich wieder gut voran gekommen. Die letzten Sprints haben sich gezogen, da ich große Themen hatte, die nicht immer in 1-Woche-Sprints gepasst haben.
Spaß 1
Ich bin heute über ein neues Tool gestolpert. Es heißt SketchyBar. Bevor du den Link klickst: das ist nur was für Leute, die gern mit dem Terminal unter MacOS arbeiten. SketchyBar hilft dir, eine Menüleiste unter MacOS zu erstellen, wie sie dir gefällt. Die orginale wird dabei ausgeblendet. Das hat den Vorteil, dass sie für dich perfekt sein kann. Das hat den Nachteil, dass du Zeit investieren musst, um sie so zu machen, wie du magst. Und das ist auch schon das Hauptproblem. Damals (TM) während des Studiums, und sogar schon Ende der Abizeit 2001, habe ich diese Zeit gehabt. Ich habe damals mein Windows Mac-artig gemacht. Da gab es die tollsten Tools, um das Aussehen zu verändern. Viel Gefrickel, aber es machte Spaß und funktionierte—meistens.
Heute würde ich mir wünschen, dass es jemanden gibt, der das für mich macht. Ich sitze jetzt abends auf der Couch und schreibe das. Dafür reicht es bei mir jetzt noch abends im Kopf. Aber jetzt noch am Rechner sitzen und Syntax & Semantik des Tools kapieren, und dann noch wissen, was ich erreichen möchte? Das geht jetzt nicht mehr. Also wäre es toll, wenn es jemanden gäbe der z.B. ein Patreon zu diesem Thema hat. Ich zahle einen kleinen Betrag, und kann mir raussuchen was mir gefällt. Vielleicht sogar einfach Copy & Paste machen und Dinge ausprobieren.
Spaß 2
Der viel größere Spaß heute war, dass ich über den Spielplatz gerannt bin. Ich habe die kleine Tochter abgeholt und den Sonnenschein genutzt. Der Spielplatz liegt direkt neben der Kita. Da kommt man bei schönem Wetter nicht dran vorbei. Richtig so! möchte ich sagen. Dementsprechend voll war er. Ich habe dann noch die große Tochter angerufen, die kam dann dazu. Gemeinsam mit einer Kitafreundin und deren zwei Brüdern haben wir Fange gespielt. Ein herrliches Vergnügen. Am Ende waren meine Schuhe voll Sand. Ich sehe das als Beweis dafür, wie ungehemmt wir Spaß hatten. Perfekt.
Daheim dann mit der großen Tochter noch Radschlagen geübt. Das war schwierig. In der Schule wird das wohl benotet (WARUM?!?!) und sie möchte keine 5. Naja, mit etwas Glück sind wir bei der 4 angelangt. Ist halt nicht so einfach.
Am Abend dann Grießbrei und hier bloggen.
Gelesen
Frau Herzbruch schreibt über eine Diskussion zum verfickten Angriffskrieg Russlands. Sie verfolgte diese, um fremde Standpunkte zu verstehen. Ich finde das gut. Leider ~bringt~ brachte das nur nichts. Und ich bin da ganz bei ihr.
Wisdom from Sandi Metz
„The verse method is getting simpler, but it still has more than one responsibility. This problem is reflected by the very structure of the code—the above method contains a blank line. Programmers add blank lines to signify changes of topic. The presence of multiple topics suggests the existence of multiple responsibilities, which makes code harder to understand when reading, and easier to harm when changing.“
Excerpt from “99 Bottles of OOP” by Sandi Metz
The book is full of small (and bigger) nuggets of wisdom regarding OO programming.
idea for a low-fi solution to subscribe to keywords on the fediverse
So today I read this interesting conversation by @rknightuk. The topic isn’t “finished” and he might post updates on the topic. If he remembers he might add them to the conversation. But maybe he doesn’t. (I wouldn’t blame him!)
That brings me to the question: How could I make sure I don’t miss the update? Checking in daily is one option. It’s unrealistic for me though. If you consider the case that you want to see posts from someone you don’t follow/subscribe to, how can you make sure you get updates on things you might care about?
This is just me thinking out loud, I don’t know the answer, yet.
Maybe there could be a service that monitors their feed for certain keywords and pings you once they post something containing those keywords? There isn’t even the option to subscribe to a conversation as that conversation doesn’t have an RSS feed associated. One way would be to have a service that subscribes to his RSS feed and monitors that one for designated keywords. If it finds the keywords it creates a post mentioning me.
What comes to mind for me is a CRON job running on a server. But that sucks. Using cron doesn’t feel right to me today. Another idea was to have a GitHub action running. But that always needs a trigger to get started. So what could be a trigger?
goes away to read GitHub Actions docs
Turns out: You can schedule a workflow on GitHub actions, using cron syntax. Awesome! I mean it’s still somehow cron, but it’s more accessible than some bash thingy on some server.
So what is left is figuring out, what the GitHub Actions workflow should run. It could be a javascript or ruby script inside the repository that the workflow belongs to.
It doesn’t sound too complicated right now. I’ll leave that for later and will come back to this idea!
edit: this sounds like a solution that probably already exists. if you know about something like this, let me know. maybe you could even use google alerts or something like this!
Ich habe heute dieses Video gefunden Happiness by Steve Cutts und das passt ganz wunderbar zum Artikel „No other love“ von @Buddenbohm@mastodon.social vom 12. Januar.
Utility tool to help migration from Gatsby to Micro.blog
I wrote a little tool yesterday to help me normalize my markdown files from the Gatsby site to be able to import them into Micro.blog properly. Especially I wanted to have redirects setup automatically for all the old posts. My site had simple slugs like holgerfrohloff.de/power-laws. Micro.blog sets up the posts using the dates => https://holgerfrohloff.de/2019/03/01/power-laws.html
For that to work, I needed to have the permalink added to the frontmatter. That wasn’t the case for the majority of posts. I didn’t want to change this manually, so I wrote a script thingy to do it for me. https://github.com/5minpause/postsnormalizer
So maybe this could be helpful if you want to migrate a GatsbyJS site to Micro.blog. /cc @manton
Finally made the migration
I finally made the migration to micro.blog with my personal site https://holgerfrohloff.de All the posts and newsletters I’ve written are migrated. They are still being published so they are not styled, yet. Have to migrate all pages as well. And then the overal design of the site. I want it to look a little bit different and also showcase some of the functionality that microblog offers me now. Overall I am happy to be even more part of the IndieWeb now.
Photo by Mathew Schwartz on Unsplash

Rückblickend
Ich schrieb ja, dass ich Bahn fuhr. Ich war unterwegs nach Werder (Havel) zu einem kleinen Hotel. Dort verbringe ich das Wochenende, allein und zurückgezogen.
2018 und 2019 nahm ich mir die Zeit auf das Jahr zurück zu blicken. Ich hatte ein großes Notizbuch (A4! go big or go home!) zur Hand und schrieb mit Stift meine Gedanken dazu auf, wie das Jahr lief. Was war gut, was nicht. Und was war dazwischen. Anschließend schrob ich den Ausblick auf das kommende Jahr; Machte mir Gedanken, was wichtig würde und was ich wertschätzen möchte. 2020 und 2021 machte ich das nicht. Am Ende von 2021 schrammte ich knapp an einem Burnout vorbei, wenn ich meiner Ärztin vertrauen möchte. Es fühlte sich zumindest auch sehr danach an.
Dieses Wochende werde ich jedenfalls wieder schreiben. Und nachdenken. Vor allem nachdenken.
Ich bin mit zwei Kunden, die ich ins neue Jahr begleiten darf, gut aufgestellt. Cashflow ist gesichert und die Perspektive gut. Mit Freunden evaluiere ich Ideen, was noch mögöich wäre, wie die nächsten 5-10 Jahre noch abwechslungsreich und spannend werden könnten. Da habe ich ein bis zwei Ideen. Aber erstmal werde ich nachdenken. Und dann schreiben und dabei weiter denken.
Wenn ich mal Bahn fahre…
Bin mit der Bahn unterwegs statt dem Auto. Will gar nicht weit fahren, nur ein bissel Regio. Aber der ist zu spät und verspätet sich während der Fahrt noch mehr. Schaffe meinen Anschluss nicht. Die Fahrt mit dem Auto wäre warm und schön gewesen und hätte planmäßig schon nur 50% der Zeit gedauert. Jetzt fahre ich fast 3h und friere. So macht das keinen Spaß.
Maintaining custom software
Jeena writes about the challenge to maintain a custom blog software.
I've neglected my rails application which runs my own website for many many years, mostly because it's a lot of work to keep upgrading rails especially when it comes to major version changes. Dependencies break and disapear, API's break, you need to rewrite a lot of code because new concepts and data structures gets introduced, etc. Anyway now I need to upgrade from rails 4.2 which was released 8 years ago to 7.0 which was released last year.
I still like to have written my own website because this way I can have exactly the functionality which I want, not someone else. But it's a lot of work.
I feel the challenge. I started rewriting this very site in Rails, to be able to include Webmentions and support other IndieWeb features. But sadly, I didn’t find enough time
recently to work on the project.
So cheers to Jeena and hopefully, he’ll be able to upgrade to Rails 7.
Once I’ve finished some more client projects, maybe I’ll be able to take the time to work on this site more.
MacOs 12 makes it harder to know the selected keyboard layout
MacOS 12.4 changes the display of the selected keyboard layout. Before 12.4 it used to be a country’s flag. I could discern the selected layout from glancing to the menu bar and recognize the flag (US or Germany). That was quick and easy. Now they changed it to show two white-ish letters or black background.
I have to read the actual letters to know the layout. I don’t think this really helps anything. It only makes things look more similar, uniform and boring. Maybe there is a setting to revert that back to colorful country flags, but I am not hopeful. 😑

GitHub Codespaces port errors
GitHub codespaces is a great feature by GitHub that let’s me work on an iPad way easier than it was before. It’s also cool for teams to quickly setup a new developer, of switch between branches.
I use it for Ruby on Rails development, mostly. Sometimes a thing happens that prevents me from continuing
my work and I had trouble finding out how best to solve this. Here’s what happens:
I start my codespace and want to spin up a Rails server, to inspect the website.
Once I type bin/rails s
the server starts and I get the notification to open up the browser in a new tab.
When I navigate there, I see this screen:
It’s a message from nginx that tells me that there is a 502 Bad Gateway error when I want to access my codespace.
The solution that always helps me is to unpublish the port and re-publish it again. Here’s how that looks in the interface:
That should solve your issue and you can quickly access the website.
Something new
Changes!
I joined my last client, Edeka, in April 2020. Since then I am not freelancing anymore. My old Wordpress site ran on quite expensive hosting. Which I could justify as a business expense. But since those are gone now, I have to switch to something cheaper.
This site now runs as a GitHub pages site, powered by Gatsby. Which I love quite a lot. And now I am free to experiment with this site more, again.
Onboarding new team members
Tomorrow I will help a new team member onboard at my client. I am the acting tech-lead for the client right now and so it’s my job to make sure that everything is in place for this new member of the team.
The former tech lead onboarded me in September (not so long ago). He had prepared a list of tasks we had to do together. He even created a whole new Trello board, just for the onboarding. Did he do it because it was so laborious? No! In fact, the onboarding mostly consisted of joining the services and Saas applications we use and getting familiar with all the processes for running the show.
But it did help to be able to cross items off the list. We were always aware of which services were yet to join. We also knew what was missing until I was at 100%. That was certainly helpful.
When I am onboarded at a new client, I generally send them my onboarding survey beforehand. In it I ask questions that are relevant to the process and to me, and that come up with every client. Asking them these questions before I arrive, they tend to be better prepared.
I am really looking forward to having the new developer join the team, tomorrow. I bet he’ll do great. And to help him along, I’ll just follow my onboarding sheet. 😉
Do you use something similar?
Yours,
Holger
Why ist software so bad?
A couple of days ago I talked about the Akimbo podcast by Seth Godin. It was an eposide about opportunity cost and how that relates to livelong learning as a software developer.
This morning I was on the train to a dear friend who happens to help me with my financial retirement plannings. She helps me choose equity funds and all those things related. I decided to take the train instead of the bike, which is what I usually use to get around Berlin. Taking the train meant that I could write a few words that moved around in my brain. I also meant I could listen to music or a podcast. It just so happened that the latest episode from Seth was relevant to our topics here again. Its title is the same as this email’s subject:
Why is software so bad?
When I saw the title appear in the episode list in my podcast app of choice (Overcast on iOS), I just had to listen to it. In it, Seth compares the evolution of the development of cars to the stagnating evolution of software. I believe you will get a lot out of this episode. If for nothing else, you will at least get one or two ideas for a software startup you could pursue.
Here’s the link to the episode: www.akimbo.link/blog/s-5-…
See you next week.
Holger
Opportunity cost
Today I heard a recent episode of the Akimbo podcast by Seth Godin. The topic was opportunity cost. As a quick recap, here’s what Wikipedia has to say about opportunity costs:
The opportunity cost, or alternative cost, of making a particular choice is the value of the most valuable choice out of those that were not taken. When an option is chosen from alternatives, the opportunity cost is the “cost” incurred by not enjoying the benefit associated with the best alternative choice
So… about that new JavaScript framework. Or, about the recent addition to React name suspense… have you already taken the time to read up on it? Do you know what it does? It is supposed to change how we render things onto the page and fetch the necessary data to display.
Or did you know that in Ruby 3.0 the handling or positional and keyword arguments will change from the way it was handled in Ruby 2.7 and before? How will your code have to be changed?
And that language Rust… and Elixir/Erlang. What else didn’t you yet learn? All the other developers competing for the best job probably already know at least something about those technologies, right? But I guess, you did watch the latest Netflix series.
Do you feel left behind already? What a shitty feeling. I know I do. About those tech that I wrote above… Every thing I know about those is what you can read in this email! I didn’t yet take any deep dive. I don’t even know GraphQL. (I wanted to add a “yet” but realized how phony that would have been. I won’t learn GraphQL unil I need it on some project!)
So here’s my take on all this FOMO: Ignore it. Learn fundamentals. Learn the basic building blocks of how the stuff works—and worked for last 40 years. It pays to know how a request is handled on the web. Generally. It’s fun to look at the complete request cycle of the Rails framework. But you don’t need it. If you can build a basic REST API you’ll be fine. And if you come across a use case that requires GQL you will be quick enough to adopt it and learn it as you go.
Don’t get freaked out but the lastest trends and what the cool kids think they need to learn. They are usually wrong and have been before.
Learn the basics, practice those “soft” skills like communication, articulating concepts in a way that people understand, practice your story-telling and call you mom regularly. That will help you way more than getting freaked out by the opportunity costs and all the things you might have to learn.
Time to say goodbye to Drip
This will be the last email that you’ll get from me sent by Drip. My account will be terminated tomorrow.
I just spent around an hour saving screenshots of my automations and text files with the contents of all emails that I send to my subscribers. What a hassle. And then I’ll have to recreate everything when I’ve found a new home for that.
I would like to go to something like ConvertKit, but they are not GDPR compliant. So that’s definitely not a solution for me. The next best thing looks like Mailjet, but I already know they don’t support everything I’d like to have. ☹
I am still toiling with the idea of writing something myself. But I don’t have time for that.
Work
I spent last week doing my first sabbatical week, inspired by this guy. That’s the reason I didn’t code anything at all for clients.
I worked on my pilot course a bit, but mostly on my website holgerfrohloff.de. I silently launched it yesterday because I figured that I’d already waited for too long. I know it’s not finished and that not everything is worked as it’s supposed to. The reasons for that are mostly a) time and b) Wordpress/PHP. I am still figuring out how Wordpress and PHP work. And it turns out I have a really hard time doing it. Even simple changes to the theme I bought and to Wordpress' logic take me ages—if I am able to do it at all. It sucks.
But I am glad that I launched. Now day by day things will improve. I already know of things that do not work, but if you come across anything, please let me know. You have my email adress 😉
Personal
I used the week to spent quality time with my family, played some video games and read great books. But I also made time for high-intensity running workouts. It was an awesome week. I am already looking forward to the next one. Since I will be at my new client by then, I’ll have to see how and when it will be possible.
One work-related thing I that I want to leave you with is this tweet-conversation I had with the creator of the Lucky framework, Paul C. Smith: https://twitter.com/5minpause/status/1159464579249950721 He responded to my question “When is a class too big”.
See you next week, I hope (if I figure out how to send emails with Mailjet or something else by then).
When is the right time to break something?
Please excuse this sensational headline. I am referring to classes in your software and to their design. But also to tests, but see below…
Work
The past week I mainly tried to pair with my fellow developers to impart some knowledge onto them. We worked together on integration tests with Nightwatch.js which is something like Capybara from the Ruby world. A question that came up was “when do we stop testing?”
I have to share some details about our setup: We created a React application for the frontend and use the APIs provided by the backend developers. Those APIs are sometimes flaky. And generally it would be a bad idea to access them during the tests. This is because they would introduce a dependency in your tests that is outside of your control. Do you want to have your tests fail, because somebody changed something inside the APIs? And would you like your tests to succeed, regardless of whether the API was accessible or not?
The answer for both question is “yes”. The first type of test is a system test, where you do a complete blackbox-style test of your system for (mostly) functional requirements. If the API changes, you would want to know. And you would like to have your tests fail and notify you of that change. Well, you would want the backend dev to notify you beforehand, but still…
The second type of test I was describing is an integration test. You want to find out whether the code you wrote tries to access the API in the required way and whether your software behaves as specified for the API’s responses. But you don’t need the actual API for that. You should use a MOCK API that replaces the real API and behaves just the same. And this mocked API should be under your control.
So much for the details. Because we wrote integration tests against the mocked API. We sent a request to get data, let’s call it a widget and we specified it by its ID.
GET /widgets/123-567-890 => widget.json
We received JSON and displayed the widget in a form, so the user is able to edit it.
In this test, we edit a widget’s category only. We send a PUT
request with the whole object, even though we only update the category (A PATCH
would be enough, but this is what the API specified…). We send the request to our mocked API. Since this was the “happy path” testing, we received a response that indicated a success. 🎉
A bit more of background:
Now the question was: “Where do we stop testing?” Since we mock the successful response anyway, do we test that we update the internal state with the widget? But we don’t use or display that state (the updated category) anyway?!
I want to say, I had to think about this for a while. I wasn’t sure what the best way would be. One answer could’ve been to display the edited category somewhere accessible for the test (perhaps as a data-attribute). But where’s the business value in that?
A better answer turned out to be:
And the test and it’s questions revealed another thing: We do not need to store the updated category right now. The person who wrote that code did it with a possible future requirement in mind. But it wasn’t and isn’t necessary right now. But since they didn’t use TDD to create the code and its design, they didn’t notice.
So that’s one more history for “tests help increase the quality of code and design”.
This is already long and I wanted to share something on the size of classes and when to refactor them. I guess this has to wait for the next issue.
Talks/webinars
This topic from last week resonated with you. Thanks for the many responses. I will take you up on your offers and put you in a virtual crowd using Zoom, next time I am doing something like this.
Personal
Fixed gear bikes seem to be a favorite for many readers. I hadn’t anticipated that you would have experience riding these. I was glad I shared it.
On a completely unrelated note: In the future I will factor into my selection of clients whether they have a shower in their office or not. Having access to one helps me tremendously to combine my training plans into my working plans. Just yesterday I was able to do an intense interval running training on my way to my client because I knew I could shower afterwards. The alternative would have been to do it in the evening. But I’d rather spent the evening with my family instead. So this really increases my happiness.
Another personal endeavor of mine is to decrease my reliance on external/3rd party solutions for syncing data and storing it. This means stuff like iCloud and Dropbox but also other proprietary solutions inside apps that I use, e.g. DayOne.app
If I write my thoughts for years and years, I do not want to rely on some business to be able to access it. Same with my own business content. I mostly write code and articles, but also thoughts on strategy and lots of other things. I plan my business for the long run, which means I want to be able to access these things forever.
That’s why I begin to turn away from iCloud and friends. I don’t use Ulysses anymore for writing, but Joplin. I run my own cloud service (Nextcloud) and sync all my encrypted plain text files to the cloud and between my devices. That way I can tripple-back-up everything. Joplin is FOSS. I can save the source code in its current state (you bet I already did!) and will be able to access my notes for as long as I have a computer.
So I started migrating my data from the different apps I used to Joplin. This is an ongoing task and I also began to write an Importer to do this automatically. I have thousands of entries and notes in DayOne and other apps. It’s quite a challenge. But this makes sense to me.