almost done


nietaki's notes on software and stuff

Owning your music (collection)...

...without losing your mind, part 1

Recently, after learning how bad spotify is for its artists I made a deliberate effort to move my family to Tidal - 8/10 decision, would recommend.

But to take step further I decided to slowly move towards “owning my music” - maintaining my own digital collection of music and making sure I have a convenient way of listening to it.

There were a number of reasons for it

  • a push against the you’ll own nothing and be happy about it shift in consumer culture
  • moving back to listening to music in a more deliberate way, without phone distractions
  • the joy of using a dedicated device - you can listen to music for hours without worrying about draining your phone’s battery, the UX can be better, and you can use good wired headphones
  • I’m turning into the “old guy yells at cloud” guy and I’m recently gravitating towards maintaining my own “infrastructure”

Let me share what setup/workflow I ended up with. In this post I’ll talk about where I get my music from and what I play it on (plus the reasons behind the decisions). In the next one I’ll share how I store and manage the collection in a pain-free and player-agnostic way.

read more


Elixir string operations seem slow

...and why it's a good thing

I personally hate it when people post clickbait titles and take their sweet time getting to the point, so let’s do this first:

TL;DR: Some Elixir string operations, most notably String.at/2 work in linear time, as opposed to constant time, like the intuition might suggest. This is because the String module is UTF-8 aware. UTF-8 encodes characters outside of ASCII with more than one byte, so in order to find the n-th character in a string you need to process it from the beginning, you can’t just use an offset in memory.

In this blogpost I go a bit more in depth about how UTF-8 works and compare some approaches to getting performant results, so even if you knew the tl;dr you might find something interesting here regardless.

Context

I as doing an algorithmic exercise containing string manipulation in Elixir and saw that even though my approach was correct and seemed pretty optimal, it was timing out on larger inputs - and timing out by a lot. After looking into it a bit I realised

read more


Notion Buttons

...and what they need to be truly useful

I’m a long time power-user of Notion. For the last couple of years I’ve been using it for all of my note-taking, work organisation and tracking, online documentation, storing cooking recipes and much more. Recently they introduced a new Buttons feature and it excited many people who thought it would be the missing piece in their workflow organisation.

I played around with it for a while and I can see the current functionality is a great starting point, but it needs a bit more to actually be useful (to me)

read more