-
I waffle.
My first draft of that sentence was:
When writing, I have a tendency to waffle.
Last week’s notes were a perfect example of this. When I first published them, E proofread and found so much to cut and simplify. So I did, over and over and over and over again.
In the words of Blaise Pascal (not Mark Twain):
I have made this longer than usual because I have not had time to make it shorter.
-
I’m experimenting with writing these notes on my phone during the week. The main issue is how inept I am at editing text on iOS, especially when trying to place the insertion pointer to paste text. It turns out there are three finger gestures for cut, copy and paste which make things much easier. I doubt I would have ever discovered them on my own.
-
Piotr flagged that my unminified JavaScript from last week fits into a single TCP packet when gzipped. As gzip compression has been supported in browsers for the past 20 years and I’m using Cloudflare to compress my JavaScript with Brotli, there really isn’t any need to minify it.
Still, I couldn’t resist playing a little code golf.
-
I ported the original
distance_of_time_in_words
test suite from Rails to JavaScript and used it as an excuse to set up my first workflow with GitHub Actions.Running the test suite revealed JavaScript’s
Date.prototype.getYear()
doesn’t return what I expected:A number representing the year of the given date, according to local time, minus 1900.
Sure enough:
> (new Date("2020-04-26")).getYear() 120
Thankfully, you can use
Date.prototype.getFullYear()
instead:> (new Date("2020-04-26")).getFullYear() 2020
-
I disappeared down a bit of a rabbit hole trying to add a Content Security Policy to this site in pursuit of a perfect score from Mozilla Observatory.
-
Following both Nat and Tom mentioning the 2017 BBC News interview with Professor Robert Kelly that was famously interrupted by his children, Leo told me about a colleague using the footage as a Zoom virtual background. This was too good an idea not to copy, so I downloaded a version of the video with Professor Kelly removed and set it as my background. Sadly, I had to quickly turn it off when the meeting I was hoping to brighten with that entrance dance turned unexpectedly gloomy.
-
On an impulse, I bought Doom Eternal from the PlayStation Network. The jury is still out on whether blasting fiends from hell at an intentionally unrelenting pace is an activity that can be considered “relaxing”.
-
C is fascinated by anyone drinking. When he gets chance to drink water himself, he goes into a kind of joyful frenzy, finding every aspect of the experience wonderful. His enthusiasm for mundane things is an inspiration.
Weeknotes 26
By Paul Mucur,
on