Developer Journal, International Day of Education
- Testing Jekyll Plugins â Small Technology Notes from Jan 26, 2022, 6:51am
Today is the International Day of Education, adopted in only 2018, specifically celebrating the role of education in peace and sustainable development.
Otherwise, welcome to the first developer journal post of the year.
Morning Dashboard
The dashboard now combines data from Open Weather Map with that from the National Weather Service. You might question this decision, of course, because it seems like a waste to make two requests for what should mostly be the same data. The issueâat least in my experience, living where I doâis that Open Weather Map has seemed to have a lower probability of being accurate, but when it is accurate, itâs also far more precise and thorough. So, this uses the National Weather Service data for the âbroad strokesâ of the day ahead, while filling in details like precipitation amounts and the UV index from the Open Weather Map API.
In addition to that, I also cleaned up some silly issues, like pointing the wind direction arrows where the wind is going, rather than where it comes fromâan east wind blows to the westâand not showing null
values when data isnât relevant.
Entropy Arbitrage
GitHub - jcolag/entropy-arbitrage-code
I have spent more time with the blog plugins, this week.
The simpler story is that I have started running the plugin code against Rubocop, so that Iâm no longer showing fragile code that only makes sense to me.
More intricate has been continuing work to improve the GitHub plugin. I fixed a really silly bug that was cutting apart the repository titles. The code alsoâas predictedânow caches GitHubâs OpenGraph metadata, so that rebuilding the blog doesnât require repeatedly making the same network request.
Testing
Maybe interesting to some readers, while the actual caching code was mostly straightforward, testing the caching code was more of an adventure. As far as I can tell, the state of the art of testing Jekyll plugins has been to just rebuild the blog and watch for errors.
Now, I freely admit that Iâm not as diligent a tester as I should be. Iâm old enough to have always wanted automated testing systems, but spent at least a decade without them available. However, even I can see that this is a terrible process, especially when rapid but minor changes are expected, especially when itâs not being developed alongside changes to posts, so I tried to do better. Waiting a minute or two just to find out that thereâs a bug is not only a delay, but also prevents my local server from running until I can patch the code and start over, meaning that I canât change tasks.
The plugins are written in Ruby, after all, so it would only be reasonable that a plugin can be tested using the same processes used to test any Ruby code. However, my first attempts didnât go well, leading me to post a question on Stack Overflow .
That question didnât bring in any responses beyond an up-vote, so I continued investigating and tinkering, leading to answering my own question, the next morning. So, I now have a basic test harness for my GitHub plugin. On Wednesday, Iâll turn the aforementioned question, answer, and other thoughts into a tech tips post to walk people through the process.
Cooking
If I remember correctly, I havenât posted anything like a recipe since an attempt at baked oatmeal almost two years ago, when the blog was still new. This weekâs big culinary discovery, though, was the humble âcabbage steakââŚwhich doesnât appear to be traditional.
I wonât bother with picturesânot that any have been takenâso the short version is that you start with the densest cabbage that you can get your hands on. The tighter the leaves are, the better this will hold together during and after cooking. âCarveâ the head of cabbage into roughly inch-thick slices, first halving through the stem, each steak a disk parallel to that first slice. I ended up with six of the disks, with two (from either side) that obviously retain their round side, coming from the outside of the head.
Lay the steaks out on a sheet trayâline with parchment paper, to minimize clean-upâbrush both sides with olive oil, and add whatever spices you want. I remember using coarse-ground pepper, garlic powder, and paprika. Bake at 400 °F (200 C) for at least twenty-five minutes. Flipping them and rotating the sheet tray halfway through cooking seemed like a good idea, but may not be. If the outside leaves arenât browning or the center of the biggest steaks are still tough, give them more time in the oven.
This certainly wonât pass as meat, if thatâs a concern in your household, but it makes a great center dish for dinner. Itâs nothing like the sulfurous boiled cabbage that we were subjected to in the 1970s. The larger steaks have been substantial enoughâand tasty enough, especially given how little work is involvedâthat I regretted adding a side dish, though I canât speak to the nutritional aspects of only eating cabbage for dinner on a regular basis.
I normally donât write about what I cook, since Iâve made many of the same dishes for years and even those dishes are mostly just improvised, but this was novel enough and specific enough to warrant a mention in a âdeveloper diaryâ entry.
Next
I suspect that Iâll continue on these projects, though as Iâve mentioned, I also see library updates piling up.
Credits: The header image is Khamla Panyasouk of Big Brother Mouse reads to children by Blue Plover, made available under the terms of the Creative Commons Attribution Share-Alike 3.0 Unported license.
By commenting, you agree to follow the blog's Code of Conduct and that your comment is released under the same license as the rest of the blog.
Tags: programming project devjournal recipe