Yesterday I coded a small animated tutorial for the new KernType, and while coding it I realised: the solution of the first two stages was way off because of a technical error! at some point I had changed the way in which I positioned letters, and these two were left with old values.
Since this was already in production, it injected a sense of urgency into finishing my task, and I was blazing through the code, squashing bugs I was finding along the way. I was done in some four hours, though I would sensed it be thirty minutes. I pushed to production, only to have my eternal enemy rear its ugly head: nginx’s caching was serving yesterday’s fudge, when today’s were much better.
I sighed and connected to the remove server via ssh to tweak the site settings as to send
no-cache headers, restarted the web server, and connected to https://type.method.ac to the… old version again? That’s impossible! Unless it’s not my eternal enemy, but a demonic cousin of it, called service worker caching.
I removed the service worker, pushed directly to production and boom! the nginx served the freshest version of the site. I was blaming the restaurant when I had prepared the meal at home.
The service worker was a non-essential, so I completely took it out until I actually understand it. Time and time again I see that I cannot delegate understanding. My two mortal enemies (nginx caching and service worker caching) are not sought to be exterminated, they should be understood. Keep your friends close, but keep your enemies closer.
When I saw the site finally load I felt satisfied and thought: this is good enough to announce publicly, so I tweeted about it. Some kind strangers notified me about certain important problems (didn’t work in Firefox and the Tweet your score button didn’t work).
I finished when the trees produced shadows of their canopy directly beneath them, and I thought: “noon already! Let us pry ourselves away from the computer there’s much work to do”, and so a different kind of work begun.
I was satisfied with the day.