When Coding, Always use Descriptive Function Names

This evening I’ve been coding up something on a tight deadline. A few minutes ago I wrote a function named:

handlePluralTypeNameBecauseRESTWasInventedByIdiots()

REST is an acronym for… you can look it up if you care. It’s a way for code running in your browser to communicate with services off somewhere else. Some guy got his Phd making this nonsense up, and it has now become an industry standard. That guy is very lucky I was not one of the ones to review his dissertation, and the rest of the world is very unlucky that I wasn’t.

Like with HTML before it, someone came up with a half-assed solution to a real problem, and before the smart people in the room could say, “hey, that has some pretty serious flaws, but with only a little more effort we could fix most of them” the whole world went romping off with the flawed solution. And here we are.

Not only does REST violate previously-existing standards, it does so for no technical advantage. Servers and programming languages had to be updated to accommodate those violations. Maybe that should have been a red flag.

It would be SO DAMN EASY to fix most of the problems with REST. Use your head(ers)!

But here we are sweating over REST. And here’s a fun thing: for no technical advantage people who use this standard-violating standard have to understand the rules of pluralization in American English. At least in any implementation of REST I’ve had the pleasure of working with. Not only is that fucking annoying, it’s exclusionary. Sorry, kid in Senegal, we’re making a standard that disadvantages you.

Sure, you can get a code library to do plurals for you, and with any luck the rules in the browser code will match the rules on the server. Up until now, I’ve chosen the approach, “always name your data types in a way that just adds ‘s’ for the plural.” Tonight that wasn’t an option, so I a made a way for specific REST servers to keep only the rules relevant to them. More efficient and more reliable than someone else’s library.

And as I’ve often said, your code should express what it does without resorting to comments.

5

Quantum Leap is Out of Focus

Much like many of you out there, the Official Sweetie of Muddled Ramblings and Half-Baked Ideas and I will choose a show on television and watch the whole damn thing from beginning to end. Right now we’re working on Quantum Leap, with Scott Bakula.

I will not bother explaining the conceit of the show to you; but for a brief respite during season two, every episode starts with an explainer. Note to producer: The last six people watching your show in season five already know what is going on. But the explainer does eat minutes of airtime that would otherwise have to be filled with newly-produced entertainment.

In season one, there were some serious technical problems that made it all the way to my screen. Focus was dicey, and whoever was holding the boom mic was fully incompetent. Audio quality during a tedious monologue would degrade until suddenly it shifted to terrible ADR. No attempt was made to make the dubbed audio match the sound that had come before.

And no show I have ever seen has piled the stereotypes up in such a magnificent heap. Sexy Nun, Nice-Girl Stripper, and evil fight fixer were all in the same episode! Hoo, boy, when you get to the serious issues, the straw men and insulting archetypes come swarming out of the rafters. When a story about desperate measures so a Native American can die under the sky on his own land suddenly turns to scalping, you just want to kick Hollywood in the balls.

One of my favorite performances from Johnny Depp is when he played Ed Wood. Wood was perhaps the worst director ever, but Depp turned him into a hopeless optimist. As long as the words were there, as long as the actions were there, the kids watching would see through all the flaws and love the story as much as he did.

I do not credit the makers of Quantum Leap for such a fantasy. They were making a TV show for a major network, and it is baffling to me that simple, fixable flaws made it to the screen. Ed Wood would roll a scene and shout “Perfect! Move on!” even though the shot was a disaster. Somehow, the directors and producers of Quantum Leap were allowed to do the same thing.

“Good focus on Al’s ear,” I said last night.

There is a person on most sets whose entire job is to get the focus right. In some shots that’s incredibly complicated, keeping tight on a particular part of the action as actors move thought a scene. Other times, when people are holding still, it’s just about carefully measuring the distance from the subject to the lens, and getting everything set up right.

All that assumes, of course, that when the camera is rolling, that the subject is still at that same distance from the camera. Maybe the focus puller did their job, and then the actor moved. But these are professionals. Someone has to notice and speak up when the actors are off their marks.

And if you shoot three episodes in a row with serious focus problems, maybe you should realize that it’s time to change something. If you suck at focus, stop down the camera to make it more forgiving. Maybe the background is more distinct, and maybe your Director of Photography doesn’t like that, but tough shit, asshole. We’re putting the training wheels back on.

OSMRHBI and I have only four episodes left in the series, and we will watch them. We’ve come this far; we will see it through. At this point, I think the entire crew is saying the same thing β€” let’s just end it and go home β€” with the possible exception of the two stars of the show. It seems like they still give a shit, most of the time. Bakula is still the earnest doofus he was in the pilot, and that is the only thing that has earned this show a fourth season, let alone a fifth.

I have to say that this show confronts racism without blinking, and I appreciate that. The n-word is used by white cops, with all the bile and violence it carries. The word is also used by people who imagine themselves better, and prove they are not. Sexism is confronted, and while it took a few seasons, homophobia is brought into the network TV spotlight as well. This is a show with justice as a pillar of its very existence, and they are mostly brave about that.

The fifth and final season, when the writing was already on the wall, put our leaper in and around famous icons β€” Kennedy, Monroe, Presley. It felt desperate, but Official Sweetie and I started making shark jokes at the opener of season four.

And they all keep saying “leaped” instead of “leapt” and while the dictionary doesn’t support me on my distaste for that form it still bugs me.

* * *

Official Sweetie and I, in the scant hours since I wrote the above, have watched the final episodes of the series. The last episode is really pretty good. Well-written, and almost always in focus. If there is a little last-show-of-the-series indulgence, it’s thematically accurate and not overwhelmingly sappy. It could go down in the annals of great series endings but first you have to wade through a bog of shit to get there.

It’s over, now. We are done. There is better TV to watch, and better things to do with our lives.

5

Hibernation

I have in my email in-boxes and message app threads a growing pile of unanswered correspondence. I have a long to-do list. Or lists, actually. I’ve not been exercising or even flossing. Writing has been reduced to random noodling.

Like most people my age, I have a couple of prescriptions. I was proud to support a local pharmacy, even prouder because the pharmacy served a community that is often overlooked. But while communication was challenging in person (they would see me coming and shift around so a better English-speaker was available), but on the phone it just became too much to deal with.

So instead of dealing with them, I did… nothing. One by one, I ran out of my medications. And still did nothing. Finally, I turned to a pharmacy that requires no human interaction whatsoever, and contributed to the destruction of small business in our nation.

Human interaction is work. Often this work is rewarding; friendships and relationships are cornerstones of the human experience. There have been times throughout my life, however, when those interactions have just been too much work for me. Driving to a party in a Seattle suburb only to turn around outside the house and go back to my hotel. Bailing on a balloon festival in Slovakia. It’s a long list.

Back when humans evolved, meeting new people was probably pretty rare. Maybe I haven’t adapted from those times.

That doesn’t mean I’m unhappy. I’m doing all right. But over the last few months I’ve just had a hard time developing energy for any challenge. I am fully aware that expending energy generates more energy, especially when referring to exercise.

There’s a catch, though. A trap. It is a somnolent quicksand that puts you to sleep even as it engulfs you, a quiet, comfortable tomb. If it is temporary, it’s hibernation. Recharging the batteries, as people say. I’ve curled up in that warm embrace before. But you have to wake up eventually.

I’m working on that now. I’m consciously working on waking up. I’m flossing and doing the little chores around the house. Writing more often, even if there is no focus. Wrote a really nice (tight, sorrowful) Allison in Animeland scene the other night. Words that served no purpose other than their own.

To my friends who have so patiently maintained contact, thank you. I really don’t deserve your faith, which makes me appreciate it all the more.

I’ll see you all on the Sunny Side.

6