←back to thread

567 points ingve | 1 comments | | HN request time: 0.202s | source
Show context
cafeinux ◴[] No.43588881[source]
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.

replies(3): >>43588935 #>>43589204 #>>43591734 #
lupire ◴[] No.43588935[source]
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.
replies(1): >>43591148 #
1. cafeinux ◴[] No.43591148[source]
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.