A quick AI experiment
13 September 2026 permalinkI grew up at just the right time, to have access to broadband when the internet was still wild. Ever since then, I’ve ignored the Spotify’s and relied on an every growing collection of mp3’s. Every new pc starts with the same ritual: install the venerable Foobar2000 as a music player, point it to the collection, and wait for it to load in the folder structures it needs to allow searching. I always wait for the first album to pop up, and for the 20 years, it’s been 50 Cent’s ‘Get Rich or Die Tryin’, the only time I ever listen to it.
It’s simple, it works, it’s perfect. Except for one problem: my phone. I use local files there too, but I only have space for a tenth of my collection. Once in a blue moon I’ll upload some new music, but it’s a hard to navigate the collection if you’re not looking for anything specific. I end up scrolling for a while, picking things at random, ending up not listening to most of it.
So I wondered if AI could help me with it. I told it to gather 100Gb of music. Maintain a genre split similar to my listening history (stored by last.fm). Bias it towards critically acclaimed albums, but allow merely good or mediocre ones. Add albums I listen to a lot, but also add things I never listen to. And convert lossless files to mp3’s (something I didn’t bother with before). I also told it that 30% should be full albums suited for running, with my existing running playlist as a guide.
It worked first-try ish (most problems were uploading so many files, ambiguity of greatest hits collections, and some bad folder structure on my part). It grabbed genres and rating online, faster than a copy of a file. The whole process took about 5 prompts and 90 minutes. I spotchecked the output, and it looks fine. Which is an excellent result.
So why did it work well?
- I specified. I didn’t ask it for just a ‘varied’ set of albums. I told it to look at critical reception, and have a spread. Same for ‘famousness’ of the artist (eg 33% famous, 33% known, 33% obscure)
- I pointed to existing data. I had an export from lastfm listing everything I ever listened to, of which it inferred genres, and the great shortcut of also giving me partially albums I already listened to a lot
- I had a huge margin of error. Even if 75% of the albums don’t appeal to me at all, I still have 200 that do. I think this, if anything, sets the bar low enough
Ultimately, I spend 20 minutes of my own time on it, so I would call it a success. I first put on my wireless headphones, paired with my phone, I immediately hear a coin drop. Usually it continues the previous played song, but I deleted the entire folder to make room for the new list. It must have just played the first song it could find, in alphabetical order. 50 Cent’s ‘Get Rich or Die Tryin’.
… it also gave me Drake
Website iteration 2.0: the layout bugs strike back
2 June 2017 permalinkOver the past couple of weeks, I’ve slowly been building a new version of this website. Externally, not much has changed, but it now has infinite scrolling, and should render a lot better on mobile. Internally, I’ve chucked out Wordpress, and started using Hugo. Instead of using in a database, all pages in Hugo are statically generated. This means they are easily hosted, eg on Dropbox, GitHub. It does mean there is no web interface: you’ll need to run Hugo and upload the new content every time you post.
Using Hugo instead of Wordpress is a no-brainer. Wordpress is a lot more than I need, and, when I exported all my content, it turned a lot of it was quite badly formed, or even invalid HTML. I also dreaded updating it, which is a non-issue for static pages. Probably the only thing I’ll miss from Wordpress is a web interface for posts, and the ability to post at some time in the future. I can probably hack something together for both in the future though. On the plus side, Hugo uses markdown, and has it’s own simple web server used for iteration.
A more interesting/difficult choice would be between using Hugo, or rolling out your won script. Unfortunately, Hugo is still firmly in the driver’s seat, and it can fight you if you want to do anything in a different way than it expects. Most of it’s features wouldn’t be too hard to implement, apart from the templating engine. Losing it’s live reloading wouldn’t be fun either. The loss would be the inability to use (or modify) one of the existing themes.
Personally, I’m a bit perfectionist about this website, especially considering I don’t really want to revisit it for the next 10 years (same timespan since I first created it). I didn’t want to use any existing themes, spend quite some time getting the output “just right”, and banged my head against Hugo quite some times. Even if rolling my own would have taken me some extra time, it would be something I could build on in the future. That probably would have been the right path, but ¯\(ツ)/¯. Most of the hard work was in transforming my content to a sane format anyway, and that work is reusable.
EDIT
After using it for a week or two, I miss being able to post from my phone more then I expected. Which is a bit annoying to fix, as I would have to run hugo from inside my VPS.
Anyway, let me know if there’s something wrong with the new version. Webdev is definitely not a talent of mine.
TL;DR Choosing blog platform as a programmer
If you don’t want to fiddle with the command line / FTP every time you post, go for Wordpress (or anything else with a web interface). If you want easy maintenance and creation (eg minor theme modification), use Hugo. If you don’t mind spending quite some more time building something from scratch, build your own.
Test post, please ignore this hell
16 May 2017 permalinkH1
H2
H3
H4
H5
H6
Alternatively, for H1 and H2, an underline-ish style:
Alt-H1
Alt-H2
Emphasis, aka italics, with asterisks or underscores.
Strong emphasis, aka bold, with asterisks or underscores.
Combined emphasis with asterisks and underscores.
Strikethrough uses two tildes. Scratch this.
- First ordered list item
- Another item ⋅⋅* Unordered sub-list.
- Actual numbers don’t matter, just that it’s a number ⋅⋅1. Ordered sub-list
- And another item.
⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we’ll use three here to also align the raw Markdown).
⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅ ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅ ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
- Unordered list can use asterisks
- Or minuses
- Or pluses
I’m an inline-style link with title
[I’m a reference-style link][Arbitrary case-insensitive reference text]
I’m a relative reference to a repository file
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself].
Here’s our logo (hover to see the title text):
Inline-style:
![]()
Reference-style:
![]()
Inline code has back-ticks around it.
var s = "JavaScript syntax highlighting";
alert(s);
s = "Python syntax highlighting"
print s
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.
Colons can be used to align columns.
| Tables | Are | Cool |
|---|---|---|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don’t need to make the raw Markdown line up prettily. You can also use inline Markdown.
| Markdown | Less | Pretty |
|---|---|---|
| Still | renders |
nicely |
| 1 | 2 | 3 |
Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.
Quote break.
This is a very long line that will still be quoted properly when it wraps. Oh boy let’s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.
Three or more…
Hyphens
Asterisks
Underscores
Here’s a line for us to start with.
This line is separated from the one above by two newlines, so it will be a separate paragraph.
This line is also a separate paragraph, but… This line is only separated by a single newline, so it’s a separate line in the same paragraph.
