Burying the past

Yesterday I watched the Detroit Lions, in their home stadium of Ford Field in Detroit, Michigan, defeat the Los Angeles Rams 24-23. This was a noteworthy event. Ford Field opened in 2002 and it had never hosted a Lions playoff game before, because the Lions had never managed home field advantage in all that time. The Lions had homefield advantage because they’d won the NFC North title. They’d never done that either; they’d won the NFC Central back in 1993. The last time the Lions won a playoff game was on January 5, 1992, when they beat the Dallas Cowboys 38-6.

32 years ago. I was nine years old.

The last 32 years of being a Lions fan have had more downs than ups. I’m not prepared to interrogate why people stay fans of bad teams. I’m so far through the looking glass I’ve asserted, more than once, that I don’t understand being a fan of a successful team. What I am going to do is bid farewell to some bad memories.

Read More

Yet another cause of Cannot use import statement outside a module

I’m adding tests to one of our older internal CDK projects (see this post from 2022 for background on CDK and tests). When I say old, I mean that it started out on CDK 1.8.0, and the first commit is dated September 16, 2019. I’m writing some basic tests prior to upgrading it to CDK 2.118.0, and encountered a vaguely familiar error the first time I ran npm test:

1
SyntaxError: Cannot use import statement outside a module

This is a problem with the Babel Javascript compiler, and unfortunately there’s no one mistake that causes it, which makes searching for an answer difficult. Adam Nathaniel Davis wrote a great blog post on dev.to a few years ago, summing up numerous different causes and then proceeding to detail the one that he’d encountered.

Read More

Using Composer with patches

A few days ago I wrote about a WordPress plugin that was broken under PHP 8.1. We need to patch it in a sustainable way in production until the vendor issues a fix. Because we deploy with Composer in a continuous deployment environment, it’s not so simple as just commiting the change or (gasp) modifying the file on the server.

One approach would be to create a git copy of the plugin in our private GitLab repository, commit the changes there, and then deploy that version instead. There’s a lot of overhead involved in that approach:

  1. Create the repository, including (optionally) using svn2git to import the plugin from the WordPress plugins repository. You can also just commit the current state.
  2. Add the plugin to our Satis-based Packagist repository.
  3. Redeploy referencing that repository instead of the WordPress upstream via WordPress Packagist.

Read More

Always hook load_plugin_textdomain in WordPress

Right before the winter break we started chasing an odd error that we encountered with the Simply Static plugin on one of our WordPress multisite networks. Aside–great plugin, highly recommend! The problem was this: with both it and its pro counterpart activated, we received a white screen of death on the Site Editor, with this stack trace:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<b>Fatal error</b>:  Uncaught Error: Undefined constant "SECURE_AUTH_COOKIE" in /var/www/html/wp-includes/pluggable.php:929
Stack trace:
#0 /var/www/html/wp-includes/pluggable.php(694): wp_parse_auth_cookie(false, '')
#1 /var/www/html/wp-includes/class-wp-hook.php(324): wp_validate_auth_cookie(false)
#2 /var/www/html/wp-includes/plugin.php(205): WP_Hook-&gt;apply_filters(false, Array)
#3 /var/www/html/wp-includes/user.php(3628): apply_filters('determine_curre...', false)
#4 /var/www/html/wp-includes/pluggable.php(70): _wp_get_current_user()
#5 /var/www/html/wp-includes/l10n.php(98): wp_get_current_user()
#6 /var/www/html/wp-includes/l10n.php(152): get_user_locale()
#7 /var/www/html/wp-includes/l10n.php(947): determine_locale()
#8 /var/www/html/wp-content/plugins/simply-static/simply-static.php(32): load_plugin_textdomain('simply-static', false, 'simply-static/l...')
#9 /var/www/html/wp-settings.php(418): include_once('/var/www/html/w...')
#10 /var/www/html/wp-config.php(130): require_once('/var/www/html/w...')
#11 /var/www/html/wp-load.php(50): require_once('/var/www/html/w...')
#12 /var/www/html/wp-admin/admin.php(34): require_once('/var/www/html/w...')
#13 /var/www/html/wp-admin/site-editor.php(12): require_once('/var/www/html/w...')
#14 {main}

Googling SECURE_AUTH_COOKIE undefined constant errors isn’t entirely helpful; there’s no one cause. Moving to PHP 8 surfaced many undefined constant errors that had flown under the radar before (that’s good). We didn’t think that there was anything wrong with our cookie setup–we didn’t define COOKIEHASH or SECURE_AUTH_COOKIE in our wp-config.php, but you don’t need to either.

Read More

Black Widow

Black Widow is fan-fiction written by someone who has issues with what happened to the himbos and dimepieces in Moonraker. Let me explain.

My favorite scene in Black Widow comes about twenty-five minutes into the film. Natasha Romanoff (Scarlett Johansson), the “Black Widow,” is on the run from…authorities…personified by Thunderbolt Ross (William Hurt). It’s not really explained who he is and what authority he has. If you’re watching this, you probably saw Captain America: Civil War and already know the answer. If you haven’t seen that movie, go watch it instead because it’s (a) it’s a better movie and (b) this one assumes familiarity with the other Captain America movies to the point that it ought to be titled Captain America: A Funny Thing Happened on the Way to Budapest.

Anyway, my favorite scene comes about twenty-five minutes into the film. Natasha’s holed up in a safe house (trailer) somewhere in Norway. She’s made dinner, she’s dying her hair, and she’s watching Moonraker. It’s towards the end of the movie; they’re still on Earth, James Bond has just defeated Hugo Drax’s python at the Amazon base, and Drax is remonstrating with him. Bond quips that the python “had a crush on [him].” Natasha’s speaking the words as the movie plays–this is far from the first time she’s watched Moonraker. Let me offer a reading of how this scene explains the whole purpose of the movie.

Read More

I'm coming to your city

I’m in Portland, Oregon, for the holidays and I just finished writing 600 words about an abandoned railway line that one week ago I’d never heard of. I’d like for you all to meet the Forest Grove branch.

A pattern of behavior

Back in July 2018 I took the train out to St. Louis, Missouri, for WPCampus. I took the Capitol Limited from DC to Chicago, then the Texas Eagle down to St. Louis. In St. Louis, I took the MetroLink light rail out to the Delmar neighborhood where my AirBnb was. I bounded up the steps at the Delmar Loop station and came face-to-face with what could only have been a train station, though it wasn’t one now.

Read More

One of our language packs is missing

This weekend I moved one of our Moodle environments from one AWS account to another. That’s a straightforward exercise: deploy the new infrastructure, sync the uploads, import the database, and update DNS. It took less than an hour and there weren’t any hiccups.

Until today, when we noticed that our user provisioner had stopped working. The root cause? A missing language pack. Read on…

Language packs

Read More

Greyhound

There is a long, rich tradition of Battle of the Atlantic movies. I see Greyhound as in conversation with two other movies in particular: The Cruel Sea (1953) and Das Boot (1981). The Cruel Sea, adapted from a novel of the same name by Nicholas Monserrat, follows a British captain and his first officer throughout the entire war (1939-1945). Das Boot, adapted from Lothar-Günther Buchheim’s novel, follows a German U-boat over the course of a single, fateful patrol in 1941. Now, we have Greyhound, adapted from C. S. Forester’s novel The Good Shepherd, following an American captain during a single convoy sailing in early 1942. I think of this like Dunkirk: we’re telling the same story, but from three different viewpoints at three different speeds.

The Cruel Sea is a personal favorite and one of the best war movies ever made. The tone is weary, almost somber, though not grim dark. We follow two ships, a corvette and a frigate, under the command of Jack Hawkins, a merchant navy officer and reservist. A U-boat sinks the corvette part way through, killing many of the characters we’d gotten to know. Hawkins survives, but is traumatized. There is almost no sense of triumph at the end of the film, more of a sense that “well, we survived.” Appropriate for a 1950s Britain conscious of having won the war and lost its empire and place in the world.

Das Boot has the tricky task of being a West German film about World War II from the Nazi German point of view. You’re making a movie where you want the audience to sympathize with the protagonists, while never losing sight of the fact that Germany started the war and will lose it. You can make movies about the Allies losing during World War II–They Were Expendable (1945) and Tora! Tora! Tora! (1970) are good examples–but you really can’t make a movie about Germany or Japan winning. Das Boat threads this needle by emphasizing the humanity of the participants and the inhumanity of the war itself. The finale, in which the crew brings their battered U-boat back to France only for it to be sunk in an air raid and many of them killed, is devastating.

Read More

Blood Hook

The “Troma Team Release” title card gives me a shudder. I had a college roommate who was really into Troma and Troma-adjacent horror. I’m not sure what all we watched, but it was enough to know even then the crucial difference between things that Troma made themselves and things that Troma distributed. I respect Lloyd Kaufman’s accomplishments as an independent producer but broad grossout splatter isn’t my bag.

Tonight, Amazon Prime suggested Blood Hook, which we hadn’t heard of before. It’s a slasher set around a lakeside community in Wisconsin’s north woods. It was directed by Jim Mallon, now best known for helping start Mystery Science Theater 3000. The production companies, Spider Lake Films and Golden Chargers, are both one-shots; the former is named for a community in Wisconsin near Hayward, Wisconsin, where the film was shot. Troma distributed the film. Vinegar Syndrome did a Blu-ray of the 111-minute cut in 2018, and I’m pretty sure that’s what we watched on Amazon.

This type of production hits a sweet spot for me. It’s low budget, but not bottom of the barrel. They shot on location, and by the look of it relied mostly on local talent. Most of the actors have no other film credits. I’m from Michigan, not northern Wisconsin, but the accents sound authentic to me. Arthur Marks did this with some of his films, like Detroit 9000 and Tbe Monkey Hustle. I enjoy watching a movie where I feel like a group of people got together for a month and created something. There’s Nothing Out There, another Troma distribution, is in the same space.

Read More

My worst best trip on the Empire Builder

I’ve ridden 117,534 miles on Amtrak, or almost five times around the globe. 111,519 of those miles are since January 4, 2009, when I took the Empire Builder from Chicago to Portland for a Moodle Hack/Doc Fest at Reed College. We encountered snow and ice and bad-ordered equipment. I took one of my favorite photographs of all time. We hit Spokane at least twelve hours late and had to be bussed to our final destinations. I had a blast and the rest is history.

This account is based on my contemporaneous notes in 2009; all the pictures were also taken in 2009 with my Canon PowerShot. See the 2009 Reed gallery for all of them.

Beginnings

Read More