May 3rd, 2023 — 21:34 #
On the run
Added a Music section to my site. 3rd party APIs are so much fun with:
- serverless functions.
- APIs with only a simple token auth.
Brings me joy!
On the run
Added a Music section to my site. 3rd party APIs are so much fun with:
Brings me joy!
On the run
This is me posting from my brand new iOS Shortcut! 🥰
Stockholm
The minimalism of "Open House" by Lou Reed and John Cale is superb. So eerie and perfect. Nobody can do Lou Reed's voice better than Lou Reed himself.
Stockholm
On the night to Friday, March 17th, I became a father for the second time. Insane! A little girl was born to us.
Thanks to me now being deep into the kids thing, this time around didn't feel as scary as with our first. I am now able to embrace this moment to 150%, which feels a-mazing.
Stockholm
Did a small re-align of my site. Nothing too big. Just some spring cleaning, visually. Feels good.
I've landed in a nice rhythm of doing exercise now. Combining running and weight lifting. My constant gripe with the latter is to have to eat so goddamned much all the time to get any growth effect out of the gym sessions, but whatever.
Watched "All Quiet On The Western Front" yesterday. It's a Netflix produced film (but it was super good!) about a solider in the German army during World War I. It's based on the book with the famous title, a source of many dad phrasings over the years (dads throwing in the reference "all quiet on the Western front" in conversations when receiving the question "how do you do"). The film was amazing in the sense of production, but also (I guess) authenticity (the dialogue is German 💞). The sheer horror of war was pictured in a deeply touching and soul draining way.
Stockholm
I've finally stopped using Twitter now. Feels weird. The reason was that they shutdown API access for 3rd party clients, like the one I'm using: Tweetbot. That was the last straw for me. I'm out. I have zero energy for using Twitter's apps. I'm going all in on Mastodon now.
Luckily, the creators of Tweetbot have released Ivory – an iOS app for Mastodon. It's the same look and feel as Tweetbot, which is amazing. I've started to like Mastodon a lot now. I wrote a post about it too.
Long live Twitter. Goodbye, old friend 👋
Stockholm
hi again.
last week, i was in portugal 🇵🇹 (right on the coast) with the rest of lookback. it was lovely to see everybody again. the heart is truly filled until next time.
we're going to south africa 🇿🇦 in november! we're gonna be in franschhoek and kalk bay, on the cape. really looking forward, since a) i've never been in south africa, b) after researching, everything seem so cool.
for the month long trip, i've made a list of books to read:
just the action of making this list makes me excited.
red hot chili peppers' latest album "return to the dream canteen" is so good. i love anthony's smooth vocals, and john's solid guitar. they're so very musical.
i've bought an watch even though i've said i wouldn't. to my defense, it was a) a used one, and b) i'll only use it for exercising. it's really nice to not bring the phone when running, since i wanna track how good i do. however, i'm really impressed by the watch so far. it's really a marvel of engineering.
i watch "house of the dragon" on HBO, and "rings of power" on amazon prime. the former is really good: even though it doesn't have the intricate storylines from "game of thrones", i like the acting and focus on relationships between parents and children. i also appreciate the focus on the hardships for women of giving birth. "rings of power" is so-so. it feels too CGI, i think, and too "joyful". it doesn't have the raw feeling of peter jackson's trilogy.
Stockholm
i bought myself a Hario Filter-in Bottle for making cold brew tea from a recommendation from a friend. excited for my new life as health guru.
The summer house in the Stockholm archipelago
lookie here, haven't posted in a while. this is how it goes when you have a full time job, and not being on parental leave!
for my own memory, these are things i want to check out at the moment:
overall, things are pretty chill. i'm reading the autobiography of keith richards, and i'm actually enjoying it. thought it would be another sleazy rock star bio, but it kind "sounds" like he actually wrote it. also, he's got a great memory. too bad i want to buy a new acoustic guitar now, AND an electric one… 💸
i'm enjoying watching the women's euro cup in football. there are so much less free kicks overall, due to … they're doing less movie tricks i guess? or are just toucher. the quality is super high (more than a few years ago, they say), and i appreciate it a lot.
On the run
the musical experience which had most impact on me was one time in gothenburg, at a sleazy karaoke bar. one woman came up to the mic, and it looked like she had been through a lot in her life. i don't know, i just felt it. then she went on and did the most emotional and beautiful version of alanis morissette's "ironic".
totally blew me away. the song was hers.
On the run
finished two shows today: Euphoria S02 and Pam & Tommy.
Euphoria is simply amazing. i loved season one. season two is grittier, and while it uses violence, sex, and drugs to describe the world, it’s always the characters that shine through. i’ve never seen better acting than zendaya’s performance as rue.
pam & tommy is kinda of a curve ball. i like it! i didn’t think i would. it manages to take a story (pamela anderson & tommy lee’s stolen sex tape in the 90s) and make a whole series about it. i liked the sentimental rendition of their mutual love for each other. also, the issue of men vs. women in terms of leaked nudes is also brought up. “i was in that tape too!”, says tommy. “it’s not the same! i’m.. i’m.. a woman!”, says pamela. and it’s not just hollow talk: the series actually manages to showcase how pamela suffered.
i also appreciated the 90s LA vibe ☀️
On the run
i don't think everyone need heavy test runners and framework for every project. a single file with import assert from 'assert'
(node) and a bunch of assertions can suffice for a tiny prototype project.
if you want more structure, where do you go? the npm libraries tape
and tap
have ~20 dependencies each. ava
has ~40. i don't even want to think about jest
…
i'm sure these packages are great for certain things. but here's a minimal test runner i've written:
it works as you'd expect:
test
and write test cases.import { test } from './_test-helper';
import assert from 'assert/strict';
test('it works', () => {
assert.equal(true, true);
});
i use node's assert
for assertions. want typescript support? add esbuild
and esbuild-register
as dev dependencies and run tests with:
node -r esbuild-register run-tests.ts
the runner supports returning promises, as well as printing fancy file names for each test case.
i appreciate taking this approach before jumping to npm install <dep>
. it gives me very much peace of mind, as long as you don't spend too much time maintaining your own tooling.
My living room table in Stockholm
my latest favourite cocktail is this gin sour with bergamot and black tea. you've probably felt the scent of bergamot in earl grey tea or in perfumes. it's a highly aromatic citrus fruit: it looks like a large, more spherical, lemon. it's also surprisingly hard to find here in stockholm – even when it's in season.
i found this recipe (in swedish...) and got hold of a batch of bergamots through a restaurant friend. i've translated the recipe to english below:
Ingredients
Procedure
the cocktail will get a lovely orange tea-like colour too!
Ingredients
(this will make more syrup than you need for one drink.)
Procedure
i think the simple syrup is as best the first few days, but mine has lasted over a week now. just don't forget it in there…
On the run
i want to get more tattoos but i don’t know what motifs yet. worst feeling.
My kitchen table in Stockholm
…
My kitchen table in Stockholm
i love this quote from Nils van der Poel (emphasis mine):
I think it's important to understand that you're not doing it for a gold medal. Regardless of which life you chose to live, you will sacrifice something, that's the way it is.
As soon as you go in one direction, you also choose to not go in all other directions at the same time. It's the basic precondition for going anywhere at all.
But on the path you take, you will experience fantastic things, even though it's uphill there will be a great view when you're at the top, and that's what makes it worth it, to be on this journey with people you love. It doesn't matter that much where the journey ends. A movie with a sad ending is also a good movie - and a movie with a nice ending makes you happy.
I'm very happy for this medal around my neck, and for getting all the way here. But why do you do it? I don't think you get to pick your dreams, they pick us. It's up to us to realize them or not, and it seems like people who try to realize their dreams are happier.
Nils van der Poel is a swedish olympic speed skater who just won two gold medals in the beijing 2022 olympics.
source: Radiosporten's Twitter (swedish). translated to english by jacobr.
On the floor in my apartment in Stockholm
i'm switching to sublime text from vs code as main code editor, and man – it's much more config to do before it's usable to me. vs code follows more of a "batteries included" and "sensible defaults" approach.
this is my behavioural config (typography stuff removed):
{
"create_window_at_startup": false,
"draw_indent_guides": true,
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"highlight_modified_tabs": true,
"highlight_line": true,
"remember_open_files": false,
"translate_tabs_to_spaces": true,
"shift_tab_unindent": true,
"hide_new_tab_button": true,
"caret_style": "blink",
"caret_extra_top": 1,
"caret_extra_bottom": 1,
"trim_trailing_white_space_on_save": "all",
"scroll_past_end": true,
"mini_diff": "auto",
"folder_exclude_patterns": [
".svn",
".git",
".hg",
"CVS",
".Trash",
".Trash-*",
"node_modules",
"build"
]
}
the last one is especially interesting. as of january 2022, there's still no way to tell sublime to ignore files in .gitignore
. sublime should hide/gray out the files/folders in the sidebar, and not make them appear in the quick open dialog. so i have to add folders such as node_modules
and build
to the global config. people tell me to use some plugin (sublime-gitignorer
), but meh... this issue from 2019 is still open.
then i couldn't get the editorconfig
plugin to work. i tried changing indent_size
in my .editorconfig
file, but the change wasn't reflected in the editor. joy.
then i realised that the typescript in sublime 4 isn't really "support": it's more "the syntax highlighting" is working. one has to install a typescript package for the Language Server Plugin for intellisense (completions, etc) to work. people don't like this.
then i installed prettier along with the sublime plugin, but formatting on every save isn't viable since it's very slow. somebody online said that vs code's prettier extension is keeping long running node processes instead of spawning a single one for each save. sublime's plugin is evidently not doing that. may have to check out dprint, but that plugin isn't even out in package control yet. hehe.
then there are these small annoyances like i can't do backspace
to delete a file when it's focused in the sidebar. or hit enter
to rename it. but no can do. like, what?! this is standard file explorer shortcuts? i timeboxed 5 min to find a keybinding but couldn't. i guess my mental model from atom and vs code differs from sublime's.
i'd really like more visual cues in the sidebar file tree about modified or added files, like vs codes does. makes it a lot easier to navigate.
so is switching worth it? sublime is so much faster than the electron based editors it's ridiculous. when i'm comparing opening this repo's folder with code .
and subl .
from the command line, i understand how gaslighted i've been with the electron editors. sublime just flashes and it's open while vs code is busy booting another chromium app or whatever it's doing.
but i dislike having to carry around a set of plugins and settings when i switch computers. vs code has this nice settings sync feature built in, but i'm 100% sure i need to sort that out myself for sublime with some esoretic github gist based thing…
maybe Jetbrains Fleet will be The One editor: native, without bloat, and configurable?
if anybody uses any life saving plugins for sublime, please give me a shout.
My couch in Stockholm
i love creating playlists. it's like the lost art of making mixtapes for yourself of somebody else. even though Spotify (and other services surely) have invested a ton content curation, i still love my own hand made playlists. spotify, for instance, have a lot of both automated and handmade playlists for a myriad of occasions. they're kinda niche and cool, but… i still think they're a bit bland.
what i appreciate is that it's a constant, living project. this categorisation builds up over time as i discover new material, and i'm now wired to place it in a playlist if i like the track. good for future johan and others.
here are some of them:
My kitchen table in Stockholm
i've bought a new bedside alarm clock from Braun, and it's so pretty. when activating the back light, it glows in a cool amber light, and then fades away. drool. i have no idea about the timeline of things, but the green details feels very Apple-esque. i'd guess Apple borrowed this from Braun when the former designed the iPods, which had similar green details around the physical knobs and switches.
On the run
Kyla La Grange has released new music and it’s really really good.
My couch in Stockholm
i've bought a new domain for this site! from now on, it's johan.im. short and sweet. johanbrook.com redirects to johan.im.
i appreciate these services/tools soooo much right now:
Cloudflare's dashboard is easy to understand and efficient enough to be dangerous — even though i'm not a DNS/networking/cache elite ninja. Cloudflare might look simplistic compared to beasts like AWS, but if you look under the hood, they support more than what they show off (perhaps they should show off more?). example: like the noob i am, i just redirected johanbrook.com/* → johan.im/*
. but the paths after that slash of course weren't kept. so a URL johanbrook.com/writings
would just end up at johan.im
(the root). uh-oh. i read in a help article that Cloudflare's Page Rules feature supports wildcard referencing. tears of joy! so i could just do johanbrook.com/* → johan.im/$1
to keep those nice paths.
Fastmail's wizard for adding a new custom domain is so lovely. i could even pick Cloudflare as my DNS manager, and they'd customise the wizard for Cloudflare's dashboard UI.
On the run
the artist Meat Loaf died a few days ago. his album "Bat Out Of Hell" was the first album I recall playing on CD on my brand new music player when I was ~10 years old. that album – and especially the title track – was absolutely the thing that got me listening to classic rock as a kid, and then went on to widen my interest in music overall. i have such a strong memory of playing that album in my old room.
"Bat Out Of Hell" was so "grand and majestic", and the songs were sooo long. a stark contrast to the pop songs that was around in the 90s. and the guitar solos sure impressed me as a young child!
bye, Meat Loaf 💖
On the run
“Dad and the Ten Commandments of Egoless Programming” are all very nice.
On the run
hello world. this is me testing my new GUI for posting these small notes. i'll probably write a longer post about it later.
in a nutshell, i've written a barebones JS client to talk with GitHub's API to post a new file in this repo. no dependencies used. it was a fun challenge writing old school DOM JS manipulations again.
i'm coding together something that will let me write post and notes in my static site from anywhere, and it's super fun. need to deal with github auth and their api, learning about Cloudflare Workers, and extending lume as i go.
the idea is to create a new post or note file with a request from an authed github session. not sure how generic i want to make this code – it could be of use for others. the existing "CMSes" i've seen for static pages are just too much.
My couch in Stockholm
i've rewrote my site (using lume 💛) and made a ton of tweaks. classic neverending parental leave chores. it's built with deno, which I love even more. i'm finally free from the node/npm APIs and build systems! everything is much simpler now, and i should probably write about it in the even more classic post of "i've rewritten my blog" which usually shows up in January every year.
Summer is over, after vacation in August down on the Swedish west and south coasts. Weather was so-so, but it was nice with a change of scenery. We also spent the month of September in Florence, Italy, which was such a blast. We travelled abroad with our 10 months old daughter for the first time, and everything went quite well actually (I had expected the worst). I was so inspired by the stay in Italy, and hope I can bring some of that energy into the day-to-day life back in Sweden.
On Monday I'll officially start my parental leave until April 2022. Scary but exciting. I'm actually looking forward to just not work for the first time in 7 years. Who knows what kind of person I'll be after this leave?
I was inspired by the book "What I Talk About When I Talk About Running" by Haruki Murakami, so I want to start running this Autumn.
Also, I'd like to start making my own pasta. I took a pasta making course in Florence, and it was super fun. So simple! So fresh!
Last day in the Swedish mountains, after a week of chilling and hiking. I wonder if I'd like living here for longer periods of time, or if I'd get cabin fever. I think I'd adjust, but friends and family are far away.
Still learning programming in Rust. Still not 100% sure of what I'm doing when it comes to memory management, but the official guide and "Possible Rust" have been of huge help. Rust feels like a very "intellectual" language (sooo much language theory has gone into it!), but I'm struck every day of how friendly the documentation and 3rd party writings on the language are. I think a super good way of learning Rust would be to actually pair program with some existing Rust programmer you know, in a non-trivial project. So that you can ask about all the small things you run into, and can be unblocked and learn forever.
I'm going to be on parental leave from October until ~April 2022. Am nervous, but looking forward. Will be a bit weird to be off work for 6 months since I started. But I have zero doubts in that I'll be able to chill in the new role of being a parent 100% of the time. I'll miss coding for work though, BUT I guess I'll need to find myself a sIdE PrOjEct like everybody else?!