Grand Slam

1967’s Grand Slam belongs to two overlapping traditions. First, it’s an international heist movie, in good company with The Italian Job, Topkapi, and The Great Train Robbery. Second, it’s one of those European productions where the top-billed stars turned up for a day’s work and a paycheck, and are promptly never seen again. It’s easy to envision Ray Milland in the Edward G. Robinson role, if this was made in the 1970s.

We open with Edward G. Robinson, recently retired from 30 years of teaching at a Catholic school in Rio de Janeiro, dropping in on his old friend Adolfo Celi (dubbed, but not by Robert Rietty), now in the rackets. Robinson, as one does, has spent the last 30 years developing the perfect plan to steal $10 million in diamonds from the building across the street from the school, and he needs Celi to provide the team.

Compared to other heist movies the team is small. We have Robert Hoffmann as a French playboy, Klaus Kinski as a German ex-soldier, Riccardo Cucciolla as an Italian mechanical engineer, and George Rigaud as an English safecracking expert. Cucciolla makes toys for a living; Rigaud is a manservant; he cracks safes on his holiday.

Read More

Composer aliases for fun and profit

I’ve used PHP Composer for package management for years now and I’m still learning new things. Today’s cool new capability is aliases. Let me start with a tip of the hat to Laurence Gellert; I stumbled across his blog while trying to extricate myself from a dependency problem. Somewhat akin to proxying Cloudfront with Nginx, I want to emphasize that I chose this solution after considering and rejecting other options and I do not intend to make a habit of it.

We use Composer to build our Moodle deployment packages. Moodle has about fifty different plugin types. Each plugin has a component name: mod for activity modules, qtype for question type, and so on. Each has a different installation path, which means that our build process depends on the Composer installers plugin supporting each type.

Moodle shipped a revamped TinyMCE integration beginning with Moodle 4.1. CLAMP did a thorough evaluation at the 2023 Winter Hack/Doc Fest at Swarthmore. While the new TinyMCE integration itself is of the editors type, any plugin that extends it would be a Tiny editor plugin (tiny). That means that we’ll need support for that plugin type added to the Composer installers project. Unfortunately, that project isn’t very active right now–no new releases since 2022, and no response to two separate pull requests to add that change.

Read More

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