|
|
an even better Spelling Bee Tuesday, June 18 2024
Our neighbor A unexpectedly showed up in our yard this morning with her dog Henry and her kid W. She's all done with here role as a supporting actor in a Broadway show, so Gretchen is excited to be spending more time with her. Amusingly, she'd suffered from contagious pink eye near the end of the run of the show she'd been in, and she'd somehow been able to act through it, despite waking up every morning with one of her eyes sealed shut from infection. After Grethen made smoothies for everyone (except me), she and A mostly talked shop talk about the acting world in New York City. Recently Gretchen discovered that more of our neighbors are actors in New York City (they'd had roles in some flavor of Law & Order), and A responded that roles like that can keep an actor alive for a long time in the City.
I spent most of my day working on a replacement for an offline version of the New York Times Spelling Bee that I put together a year ago. That version had been built on someone else's code; I'd figured out how to inject the data from the day's Spelling Bee into it so that I could play games that wouldn't conflict with the game Gretchen was playing using the conventional New York Times website or app. But there were always problems with that code, as there always is when using someone's choice of a Javascript framework. I tried very hard, for example, to implement keyboard equivalents (something the author had overlooked), but nothing worked. Another serious problem with the code was that it wouldn't render on an older Chromebook; and in Hurley I use four different old Chromebooks that it wouldn't work on. So I'd been thinking of redoing the whole thing from scratch without using any stupid framework, particularly the kind that require a Javascript recompilation. So to begin the process, I asked ChatGPT if it could please produce some code in Javascript that could produce seven hexagons in the following formation: a ring of six hexagons around a seventh one. It came back with pretty good code, though all the hexagons were pointy-side up, which was not what I wanted. After telling it to orient the hexagons so the top edges were parallel to the top of the page, the result was almost perfect. After a few tweaks, I began implementing the code to flow in the data from the demo version of the game on the New York Times website. By late in the day, I had playable game, featuring correct scoring, highlighting of panagrams, and a list of found words. It was so different from my old offline Spelling Bee that I decided to create a new Github repository. I was delighted by the fact that the code needed to render and display a playable game came to under twelve kilobytes. Compare that to the many megabytes of Javascript dependencies that weigh down any application built on a modern Javascript framework.
At a break in the development of that code, I decided to take the dogs for a walk. By then it was nearly 7:00pm and conditions were less torrid (it had been an unusually hot day), but even so only Charlotte came with me. We walked up the Farm Road to the abandoned go cart track and then back along the highlands west of the Farm Road. Due to the heat, I was shirtless, so I expected the deer flies to attack my entire torso. Interestingly, though, they mostly just went for the top of my head, as if they're programmed to avoid lighter-colored or lower surfaces. They were brutal, but I was able to keep them from biting just by waving a stick over my head as I walked.
For linking purposes this article's URL is: http://asecular.com/blog.php?240618 feedback previous | next |