If you’re not moving forward, you’re regressing

Posted on: 4 December 2024

I think about this quote a lot. It could be dismissed as being in the bracket of toxic “hustle culture”, after all, there’s comfort in routine and the status quo. Repeating the same thing over and over can feel like it’s working and will continue to work in perpetuity.

But everything decays. As morbid as that sounds. A routine that has seemingly worked flawlessly for years begins to start feeling rough round the edges. Maintenance and innovation is essential behind any great process.

This is obvious with things that move, like cars and bikes. Not so obvious in intangibles like relationships, health and - the topic of this blog post - codebases.

This static site’s codebase had some good early innovation, but has largely remained stagnant for the past 18 months. I have regular weekly interaction with it, in the form of refreshing my weekly stats. For the past 3 years I’ve manually rebuilt my site at the start of each week; pulling in stats from various data sources, populated over the last week.

Mostly, this has just worked with minimal fuss. However recently I’ve started to notice my increased reliance on Notion’s API. There has always been a known bottleneck in the build process of my site, but it’s worked well enough in the past to not warrant changing. Recently the API has been getting slower with increasing timeouts.

As someone who’s worked on the web long enough, this isn’t surprising. No API is bullet proof, least of all a free one. It’s a stark reminder to me that over-reliance on anything for a long period is unsustainable. I’m happy to continue using Notion as my primary tool for journalling. But querying the API for every page of journalling data for the past 4 years every week is both wasteful and prone to error.

I knew this when I programmed it back in 2021. Back then, I had a page or 2 of data and the API response was snappy. But over 3 years on, with little innovation since, I’m now learning my codebase has regressed. Builds request 13+ pages of data from my Notion database and can take 5+ minutes to complete, if they complete at all.

I need a fresh solution. One that relies less heavily on regular, sustained access to Notion’s free API endpoints. Ideally one that brings my build times back down to a minute rather than 5+.

Nothing continues to work forever without fresh ideas or a clean. And an over-reliance on anything you’re not tending to will eventually let you down.