Recently, I've been struggling with spending my time over Reddit, Discord, Youtube, procrastinating over tasks that I should be doing.
I tell myself, I'll do it later, I have time, but I end up wasting the entire day. And it became a pattern.
That's when I came across: https://addons.mozilla.org/en-US/firefox/addon/block-website/
It's a very good extension to block any website, it tells you how long it's been and how many attempts you made to open that site!
What I really liked was that they also allow you to redirect to something else. That can probably be your educational content, or anything. So I started looking for sites that would guilt-trip me a bit, but couldn't find any that fit my use case.
At that point, I thought let's make one myself, a simple GitHub page would suffice, and it would also prevent me from clicking "Remove blocking" immediately, adding more friction.
So I open up nvim and start coding :P
Lately, I've been trying to use AI as little as possible in personal projects to actually learn what I'm doing. I could've prompted it and got done with it in 10 minutes instead of spending 2 to 2.5 hours.
But I decided let's do it the hard way, I can't keep running from the fact that I can't upskill if I don't reduce my reliance!
So I googled and kept googling, looked up mozilla docs for JavaScript functions and syntax. I've forgotten it for the Nth time now.
I never really understood flex box in CSS, this website called flexboxfroggy REALLY helped a lot!! It was so fun clearing all the levels and at the same time understanding what each property does. Otherwise reading it would be super boring and hard to grasp!
The code I ultimately ended up writing was extremely simple, just a list of quotes and randomly selecting one. I actually thought of using some API, and for inspiration I looked at Motivational Quotes generator, I wondered how they worked, so I inspected their code and they were calling this endpoint.
Which is literally just 2130 quotes inside json, and they probably randomly selected one. So I thought yeah, why complicate something so simple?
After coding the simple layout, I did ask AI to come up with 100 good quotes, but they were super bad, I tried re-prompting and different models, but they weren't good. In the end, I did take 4-5 good quotes AI did generate, and wrote the rest 20 or so myself.
Here is the GitHub and GitHub Pages
It's probably the smallest thing I've built all year, but I'm happy I was able to solve a problem I specifically had :)
And another reason to write this blog was to get more quotes! If you have more such hard hitting quotes to make me instantly close the tab, do suggest!
Top comments (0)