This is my adventure log for 2024. Welcome! šŸ‘‹

Day 1

2024 might go to the history as the year I produced the fewest SLOC (source lines of code) ever. At least since 1993 or so. It’s been fun and a nice change for a while, but I also miss coding. As I wrote it in my latest Now page update:

Whatā€™s been really weird for me this year, though, is that Iā€™ve found myself spending an absurd number of hours working in Keynote and Numbers rather than Nova (the code editor), and that definitely says ā€¦ something? Am I turning into a suit?! šŸ˜±

So, I’ve decided to join the #DecemberAdventure to ease into coding again. Here’s Eli describing what it’s all about:

The December Adventure is low key. The goal is to write a little bit of code every day in December.

I’ve written 0 lines of code today. But! I did set the stage with this page. A low key start, one might say. šŸ˜

You’ll find daily updates here and I will occasionally blog about it, too. If you’re interested, here’s how you can tag along for the adventure.


Day 2

No actual code written, but got some preparations in for my adventure. I thought about projects I want to start or revisit and created issues for a couple ideas on GitHub.

And, as usual, thereā€™s no lack of ideas: my website and Micro.blog plug-ins crave some tender love and care, and itā€™s been far too long since I last programmed for the Game Boy. And I would like to set up a Gopher server, and implement a tiny Forth, and play with my AxiDraw, andā€¦


Day 3

Today, life happened. ĀÆ\_(惄)_/ĀÆ


Day 4

Wohoo! 66 lines of codes authored, 39 yanked, and I managed to do a release. Finally, it begins. I’m out here, adventuring.

My popular Micro.blog plug-in, Surprise me!, amuses visitors by taking them to random posts on blogs. You can see it in action if your dare to roll the šŸŽ². It had a long running issue and today was the day I finally fixed it. More details for the curious are in the release notes and the diff.


Day 5

Bug hunting. šŸ›

I noticed a strange issue after yesterday’s release: the back button broke. Here’s the thing: if a visitor hits the Surprise me! link three times, they land on three random posts in succession. But when they hit the back button, they donā€™t go through the previous random postsā€”they jump straight back to the original page where they first clicked Surprise me!

After troubleshooting for a while, I swapped web browsers. Turns out, it’s a Safari-specific issue. šŸ¤¦ā€ā™‚ļø Likely a browser bug related to how redirects are handled in service workers (Response.redirect(url, status)).

If you’ve encountered this issue with Safari and broken history, email me. Tips are welcome!


Day 6

I’m working on a new Micro.blog plugin, and the idea is simple: generate basic favicons. The goal is to make it easy for bloggers to create favicons without having to deal with the nitty-gritty details.

A tab group in Safari showing different favicon variants: an emoji (Christmas tree), a solid color (eggplant-ish), and an emoji with a solid color background (panda with a dark gray background).
Early experimentation with generating favicons.

Here’s what I’m going to offer initially:

  • Solid color favicons
  • Emoji favicons (with an optional solid background color)
  • Dark mode support

Andā€¦ that’s it. Sounds simple enough, right? If we use SVG favicons, we can cover all these features. Plus, generating SVG files is straightforward in Hugo, the static site generator behind Micro.blog.

But there’s a catch. SVG favicons are not supported in all browsersā€”most notably, Safari. To address this, we need a fallback option. Thankfully, generating PNG favicons is possible with Hugo’s image processing pipeline. You can even add text to the PNG using images.Text.

But I haven’t managed to generate PNG emoji favicons in Hugo yet. Text works fine, but emojis render as ā–”. I haven’t dug into why, so if you have any insights, let me know! (Using a purpose-built font made no difference.)

For now, Safari users (like me) will always see solid color favicons. Aside from that, building this plugin has been smooth sailing. There’s still stuff to do, but I will probably release the plug-in in a week or so. The work-in-progress is up on GitHub.


Day 7

Now I know for sure that the browser history quirk from day five is a known issue in Safari. (ā•ÆĀ°ā–”Ā°ļ¼‰ā•Æļøµ ā”»ā”ā”» While I could potentially go with another implementation to work around the bug, Iā€™ll probably just leave it as it is. Safari users might be used to this, as even Wikipedia’s Random article feature works the same way.

The favicon plug-in now has a name: Faviconique. I know, I knowā€”itā€™s very imaginative. šŸ˜‹ In addition to naming the plugin, I also made background color and dark mode actually work for SVG favicons. Itā€™s starting to look like something that could be released.


Day 8

I’m hanging out with my niece today so if I get any low key coding done, that’s a bonus. We’ll see. (Laterā€¦ I climbed jungle gyms, ate ice cream, went down a lot of slidesā€”but wrote zero lines of code.)


Day 9

Not much energy for coding, but I did read a little bit of code. After discovering Tiny Code Christmas and the upcoming Lovebyte 2024 demoparty, I ended up watching and studying the source of several demos.


Day 10

Wrote a README, took screenshots and released Faviconique! šŸŽ‰ Okay, technically, my announcement went live a bit after midnight, but all the work actually happened today. I mean yesterday? Either way! I’m happy this little idea finally made its way out of my head and into something people on Micro.blog can now install and play with.

Now, what about tomorrow? I mean, later todayā€¦ Game Boy, maybe? Or this.