Today I ran part of the way to work. It was a cold, beautiful winter morning in Stockholm.

Sometimes, I solve programming problems by coding on paper. A few days ago, it looked like this:

I've started working on a code editor that is a mix of a text editor and a structured editor. It is all text, but parsers and pretty printers allow you to work with a tree structure and not think too much about syntax. It is a work in progress. Code is here.

We got some more snow. I like running in the winter. Especially when there is snow and the sun is shining.

I needed to submit some heic photos to a service that only accepted jpg. I didn't know about the heic format, but a little searching gave me a solution:
bash
$ heif-convert
bash: heif-convert: command not found...
Install package 'libheif' to provide command 'heif-convert'? [N/y] y
...
$ find . -iname '*.heic' -exec heif-convert -q 100 {} {}.jpg \;
Today was the first day of snow this season. Not much. I'm looking forward to many more runs on a white trail.

I was researching how to run Black (and possibly other formatters) from Vim and found Ergonomic mappings for code formatting in Vim. It was very helpful.
How would you improve this code?
python
def update_r_users(service)
r_users = []
for user in service.get_all_users():
if "r" in user:
r_users.append(user)
service.set_users_in_group("users_with_r_in_name", r_users)
Find out what I did it in my latest newsletter.
Today I learned about the Rison data serialization format. I wrote a function to convert a Python value to Rison format. It was an elegant recursive function with partial support for the format.
I've used testing without mocks quite extensively now. I've also used it in a work project for more than a year. My experience is that it's the best testing strategy that I've ever used. I've never felt more confident that my code works. I refactor code without fear of it breaking. It's so good.
It's getting dark. It gives variation to the running.

Various things have kept me from running for a while. Today I had enough. I just had to go for a short run. It was the first run with warmer clothes. The weather was nice. I reclaimed some energy.

Pull requests discourage experiments because changes can only propagate after approval. The idea behind PRs is to only approve "good" changes.
First, the learning opportunities of mistakes are gone. Second, you might loose interest in experimenting because you are afraid of making mistakes.
Today I just needed to run. I had not run since I hurt my achilles tendon almost a month ago. I wanted to see if it still hurt. I felt something, but not too much. I think I still need to take it easy with running, but man it felt good moving again.

If you want to know how to implement a Bash-like shell, with support for redirects, in only 31 lines of Python, you should check out my latest blog post Bash Redirects Explained.
Do you know the difference between the following Bash commands?
bash
program 2>&1 >/tmp/log.txt
program >/tmp/log.txt 2>&1
If not, you might be interested in my latest blog post Bash Redirects Explained.
I just implemented a small shell in 29 lines of Python that has support for redirects:
$ ./minishell.py ~~?~~> echo hello hello ~~0~~> wc -l minishell.py 29 minishell.py ~~0~~> wc -l <minishell.py >report.txt ~~0~~> cat report.txt 29
Did another bike workout at the gym. Similar heart rate and duration as my regular runs, but felt like more effort because I'm not used to cycling. I'd rather be running, but this is a good alternative. Listened to Hej (resten av) internet! Avsnitt 2: Nyhetsbrev (eller brev kort och gott).
Today I bought a gym membership. I spent another 40 minutes on the bike. I felt good after the workout, but I didn't get any ideas or inspiration like I usually do when I'm running. Hopefully I can incorporate some runs soon, but I will for sure continue biking to help build an aerobic base.
Yes! The draft makes sense now. I think. I had a rough idea of what I wanted to write about. I had lots of notes that I struggled to fit into a coherent narrative. But finally, it all fell into place. I clarified my thinking by writing.
Today I spent 40 minutes on a bike in the gym. I'd rather be running, but I've got some pain in my achilles tendon, so I explore alternative training at the moment. For this workout, I happened to discover the (Swedish) podcast Hej (resten av) internet! It feels like an entry into an alternative, beautiful web-universe. I look forward to more workouts with them in my ears.
It's time for a new avatar. I'm thinking I should update them more frequently. Maybe yearly? Anyway, here is the new one.
![]()
It's like it's all out there. Energy, motivation, well being, creativity... You just have to put on a pair of shoes and go out and get it. That's why I run.

I just implemented support in Smart Notes for giving links a text description.
This was inspired by recent readings about concept mapping and Zettelkasten resources talking about the importance of giving context when linking two ideas.
I'm looking forward to using this to see if I find it helpful.

My website as a home (found via End of Year Hyperlink Dump) talks about a metaphor for websites:
I feel as if someone is giving me a tour of their apartment: I’m looking at the papers on his desk, the notes stuck to his fridge, an album of butterfly photos taken by his brother, and so on.
I like this metaphor, and I would like my website to feel like a home. Micro.blog makes this very easy. I can share and develop my interests. I can structure content with categories and pages. Others can come have a look. Comment if they wish. And you can see conversations that I've had with visitors.
I first learned programming by hitting "View Page Source" on a web page to learn how something was implemented. Today, 20+ years later, I did the same. I wish more environments had "View Page Source" function.
I was tired and low on energy. I knew I needed to run. I know that the longer I run, the more energy I get back. I also clarified my thinking on an upcoming blog post. Yey running!

Today I did a lot of focused work. My brain was tired. Solution? Running. It worked. It always works. That's why I run.

What is Rickard working on and thinking about right now?
Every month I write a newsletter about just that. You will get updates about my current projects and thoughts about programming, and also get a chance to hit reply and interact with me. Subscribe to it below.