Comment by cafeinux

15 days ago

I was just thinking about this yesterday. A few weeks or months ago I started learning something new from an online course.

Because I like using Anki to help me remember, I started copy-pasting stuff from that course to a spreadsheet to then export it as a CSV to import into Anki.

One thing leading to another, my spreadsheet quickly ended with weird formatting everywhere that would be converted through macros to HTML tags to style the resulting Anki notes.

This was still implying much manual work, so I finally figured I could just scrape the lessons for which I want notes via some script, and get the resulting CSV with a simple command.

I'm been working on that scraper for two weeks now, and I just realised yesterday that that's the most time I've spent on a side project since too long to remember, and it brings me joy and motivation in the evenings and weekends. Also, apart from the occasional script, I haven't wrote a line of code for years, and I don't know why I ever stopped coding since I love this so much. And last but not least, I decided to go for Python, and I've never learnt Python so it's quite a challenge but also a satisfactory experience.

All in all, this side project is spaghetti code with a dirty hacks sauce, I would never open-source it, and it's never going to be useful for someone other than me.

But it feels like I'm dusting off my brain, and rediscovering skills and passions I had long forgotten. Like finally waking from a long slumber. I'm currently a bit depressed, struggle to focus, and feel burnt out, but at least I am motivated by something and I create something for me, and this makes all the rest bearable.

> I decided to go for Python

Great choice and keep going! At my last job, we actually created and sold Anki decks and I can tell you that Python was the main language we used for this. In fact, it's also one of the main languages used to build Anki (it's built with PyQt + Rust & Svelte).

  • What type of job does sales of Anki decks? I never though this to be have like a market, so curious to know

It almost certainly would be useful for someone other than you. Everything you described automating is something at least thousands of people also do. And most of them don't care about the code quality if it works.

  • I'm really not sure: it's highly specialized to scrape the pages of that particular course and output it in my own HTML and CSS classes. Luckily for me, their format is quite standard across chapters, but may not be across courses, and I didn't write the code to be modular or adaptive given my need (and the fact that I'm learning Python, not application design).

    Still, the code lives in a git repo, so it's not excluded that I'll make it evolve to something more generic and maintainable in the future. But today, it's my own little dirty code that I will jealously keep and hide like that lewd drawing I did when I was a teenager.