Automated updates: 2022-03-21
This commit is contained in:
parent
56a77615b6
commit
7c84e80b37
1 changed files with 84 additions and 0 deletions
84
2022-03-21-discrim.md
Normal file
84
2022-03-21-discrim.md
Normal file
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
layout: post
|
||||
title: Developer Journal, Elimination of Racial Discrimination
|
||||
date: 2022-03-21 07:29:05-0400
|
||||
categories:
|
||||
tags: [programming, project, devjournal]
|
||||
summary: Progress on assorted projects
|
||||
thumbnail: /blog/assets/Mother-Tongue-Day-Islamabad.png
|
||||
proofed: true
|
||||
---
|
||||
|
||||
Today is [International Day for the Elimination of Racial Discrimination](https://en.wikipedia.org/wiki/International_Day_for_the_Elimination_of_Racial_Discrimination), commemorating the slaughter of almost seventy peaceful protestors in 1960 South Africa. I assume that it probably doesn't need more explanation than that.
|
||||
|
||||
![Islamabad demonstration supporting the Punjabi language](/blog/assets/Mother-Tongue-Day-Islamabad.png "Without language, we would have no puns or wordplay")
|
||||
|
||||
You don't need to learn a new language now, though. You can wait until after I ramble about projects.
|
||||
|
||||
## Morning Dashboard
|
||||
|
||||
{% github jcolag/dash %}
|
||||
|
||||
Some refactoring turned out to be necessary, here. The code previously tested for the existence of a date-line several times, for some reason, so that is now a single check with multiple subordinate conditions.
|
||||
|
||||
You could rightly ask why this is an issue now, instead of cleaning up that code far sooner, and the answer is...time zones. Twice a year, I have trouble updating the blog, because posts written ahead of time don't account for the changing clocks. To fix that, the dashboard code now validates the offset from UTC and, if it doesn't match the current time's offset, warns that it needs fixing.
|
||||
|
||||
Of course, this code goes in just as the United States Congress is deliberating whether to [eliminate daylight saving time](https://en.wikipedia.org/wiki/Sunshine_Protection_Act) permanently.
|
||||
|
||||
## G.L.O.B.E.
|
||||
|
||||
{% github jcolag/g-l-o-b-e %}
|
||||
|
||||
As promised by both the title and my rambling about the game, **G.L.O.B.E.** now has its *enemy*.
|
||||
|
||||
As mentioned [on Sunday]({% post_url 2022-03-13-globe %}), players now have a travel budget of roughly twenty-five thousand miles (the circumference of the Earth) to find the destination country. If the player goes over that budget to reach the target, an Agent of E.N.E.M.Y.---I'll probably work out the acronym later...or maybe not---wins instead, represented by the 🕵🏿♀️ detective emoji of varying genders and skin tones.
|
||||
|
||||
Unicode doesn't have a "spy" emoji, but many font creators have apparently realized this oversight and dressed their detectives in trenchcoats and sunglasses, rather than the expected magnifying glass. Surely, that won't cause some sort of apocalypse, when Unicode eventually adds a "secret agent" code-point in a few years...
|
||||
|
||||
## Iungimoji
|
||||
|
||||
{% github jcolag/iungimoji %}
|
||||
|
||||
During the week, I happened to notice that a player can win the game, then continue clicking the finished game to bump the click total. I doubt that anybody would do that *deliberately*, so it was time to change that.
|
||||
|
||||
Unfortunately, **Iungimoji** doesn't really *have* a custom win-state---because players can see that they have exposed all cards without any special feedback---so this requires a sneaky move in the click-handler. Yes, that last phrase originally read "quick trick in the click-handler," before realizing...well, *ick*.
|
||||
|
||||
```javascript
|
||||
if (
|
||||
document.getElementsByClassName('success').length ===
|
||||
document.getElementsByClassName('cell').length
|
||||
) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
Because the game adds and removes CSS classes for its basic animations, it can count the exposed cards to compare them with the total number of cards using those CSS classes.
|
||||
|
||||
## Ham Newsletter
|
||||
|
||||
{% github jcolag/ham-newsletter %}
|
||||
|
||||
It's certainly not a sophisticated problem to have solved, and it should have---and definitely would have---gotten quietly lumped in with a different issue if I noticed it in time, *but* I finally fixed the inane rogue period in the newsletter boilerplate text.
|
||||
|
||||
For those not signed up to [the newsletter](https://entropy-arbitrage.mailchimpsites.com/), (a) you're missing out on great content 😇, but more relevant here, (b) I had at least a couple of months when my description of changed posts ended a sentence prematurely, *probably* because my finger slipped when expanding that text. You might think that the grammar checker would spot "hey, there's a period after the word *it*, and then the next sentence starts with a lowercase letter," but apparently not, even though it definitely harasses me about each of those issues whenever I include code in a post, like above, where it complains that `length` isn't capitalized...
|
||||
|
||||
## Entropy Arbitrage
|
||||
|
||||
{% github jcolag/entropy-arbitrage-code %}
|
||||
|
||||
In an effort to catch more potential issues in future blog posts, two static checkers now join the standard analysis process.
|
||||
|
||||
* [**alex**](https://alexjs.com/) tries to catch terms that a reader might not consider inclusive.
|
||||
* [**write-good**](https://github.com/btford/write-good) makes stylistic recommendations.
|
||||
|
||||
Neither tool is perfect. Both have a tendency to make blanket pronouncements about an assortment of words---that certain words are profane or that certain adverbs "weaken meaning"---without explaining their contexts or looking at the word's context in the text. However, the false-positives feel potentially worthwhile, since other tools ignore passive voice and exclusionary language.
|
||||
|
||||
Maybe of interesting to some readers, neither tool outputs JSON, which the blog's analysis script presents. This required writing formatters. The **write-good** code takes a `--formatter` argument to present the output in useful forms. However, **alex** only has a `--parse` option to output a colon-delimited list of issues. In both cases, I wrote some quick JavaScript to output what I need, stored in the `_plugins` folder.
|
||||
|
||||
## Next
|
||||
|
||||
I haven't quite decided. I would like to finish the game aspects of **G.L.O.B.E.**, by adding the artifacts to find. Also, as the number of tools checking these blog posts grows, the output becomes more difficult to follow, as I need to keep jumping back to the top of the file and start over, so---especially now that I handle some intermediate processing of output---I may try to unify the different JSON blobs.
|
||||
|
||||
* * *
|
||||
|
||||
**Credits**: The header image is [Mother Tongue Day, Islamabad](https://commons.wikimedia.org/wiki/File:Mother_Tongue_Day,_Islamabad.JPG) by [Khalid Mahmood](https://commons.wikimedia.org/wiki/User:Khalid_Mahmood), made available under the terms of the [Creative Commons Attribution Share-Alike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/deed.en) license.
|
Loading…
Reference in a new issue