Category Archives: programming

Nonrandom Thoughts on a Holiday Afternoon

Oh, lots of things going through my head. No real coherence to speak of, though.

Let’s see,

Victor / Victoria

Before I ever moved out of my parents’ house, I saw the movie, “Victor / Victoria” and took to heart an exchange that doesn’t even make it to the quotes section on IMDB. There’s this bit early on where Robert Preston challenges Julie Andrews with, “Name me one thing a man can do that a woman can’t,” and she responds, “Peeing standing up,” but he’s not flustered; he says there’s no reason a man can’t pee sitting down.

And you know what? If you pee sitting down, there’s no splashing that spatters all over the rim of the toilet bowl and when it’s time to clean the bathroom, it’s an easier job. If the mark of genius is laziness, I’m fucking brilliant. You know what else? My wife loves that our bathroom isn’t spattered with urine. She’s called this out, specifically, contrasting me with other men of her acquaintance.

Lesson for so-called incels: if you were less objectionable, people wouldn’t mind hanging out with you. It’s not them, it’s you.

Also: solve the whole seat up / seat down debate: lid down. Dunked by Miss Manners, y’all! I’m telling you, other people matter.

Slack Integrations

I’ve been keeping my bagpipe music as ABC files for years. Because I’m a curmudgeon and I hate all the WYSIWYG score editing software in the world, but still. Anyway, when I joined a band, I started transcribing that music to ABC, too, and now I’ve got the job of being the music librarian. It turns out that there are several good reasons to use ABC instead of CelticPipes or whatever, not least of which is that a text file is an excellent candidate for inclusion in a git repository.

Anyway, I’ve been asked by several people if I could email them or otherwise let them know when the music has been updated in our band folder on Box. Sure, I can. Get on our Slack group and join the music channel and you’ll see a notice every time someone commits a change to the tunes, and every time the PDF files get rebuilt.

80s Nostalgia

I don’t care what Ernest Cline says, the 80s sucked. For the most part, those of us who remember them fondly at all do so because the 70s sucked even more. Even so, not everything was horrible. Amidst the shitshow that is late December 2018, there are a few bright lights from the 80s that still make me happy. Among these is X.

Something They Leave Out

Here’s something the tutorials don’t tell you, but that is kind of important: Flutter plugins add their own CocoaPod dependencies to the iOS project. This is why the installation instructions for Firebase tell you to skip through everything in the iOS installation after you install the GoogleService-Info.plist file. The rest of the installation gets handled by the Flutter plugins for Firebase.

Team of One

I have been writing programs of varying complexity since I was in the 6th grade, so, call it 39 years. For a portion of that time, call it 14 years, I worked on code that had other people contributing to it. During that, what, 36% percent of my programming life, I learned many lessons that I’ve carried into my solo programming.

Tools, best practices, all kinds of work patterns and code idioms show up in my personal projects not because they’re the most efficient way to get the project done, but because I’ve learned that if I ever do want to collaborate with someone, then that’s made a heck of a lot easier if I do some planning in the beginning. Also, because I love future me, I don’t want to give future me some big pile of spaghetti code with all kinds of undocumented special cases just built in.

Continue reading

I Hate Your Bot

I dunno, something like a year ago, a guy I know started retweeting a client of his who was working on building a chatbot platform. Now, let’s be honest: in customer facing positions, a lot of interactions are going to be the same. People are way more similar than they are different, and so if one person has a problem, it’s probably true that lots of people have the same problem. So, as a customer service operator, you’re going to spend a lot of your day saying the same things over and over. It’s understandable, then, that companies want to use automated systems to handle customer requests. Why pay a human to tell customers the same thing over and over when you can pay a human to type it once and have a computer send the text a zillion times?

I get irritated by this, though. Given that I understand the motivation and the logic, why do I get cranky? Because although I am far from unique, I am still far from the 80% case and there’s never a clear path past all the B.S. to get to a real, problem-solving human being. (And even when I get to a human, empirical evidence suggests that the human in question is more likely to hit a hotkey response than to actually answer my question.)

Chatbots, artificial voice systems, call center scripts, they all bug me a LOT. Why? Because they all are trying to send the signal, “I am a human being who deserves compassion and respect and engagement,” all simultaneously with sending the signal, “I do not respect you, I do not actually care about you, I am not going to listen to you, and I am going to consume your time and energy.”

If you’re going to build a system that pretends to be human, you need to build it to feel and to empathize.

It’s Never Easy

So, the Internet of Things is a thing that’s mostly just a security nightmare, but there do exist some services that I find actually helpful. For instance, I put an Ambient Weather station on our roof and hooked it up to Weather Underground and that lets me get ad-free weather forecasts. Lots of people have one or two such services that are helpful for them.

And then there’s IFTTT, which is a service that lets you wire services together. Common uses are package tracking (“when my package arrives at the destination, send a text message to my phone”) or weather alerts (“when tomorrow’s forecast calls for rain, remind me to take an umbrella to work”). This is super nifty and helpful, and lots of people use it to make their lives a little bit more convenient. I wanted to create an alert based on comparing the temperature from my weather station to the temperature inside our house.

You can’t do that. You can compare a measurement to a constant (“when the outside temperature falls below 72 degrees…”) but not to another measurement. Technically, that would wind up being harder to implement and consuming storage space that would probably scale in costly ways, so I understand why IFTTT hasn’t done it yet. However, it’s pretty straightforward to do as a one-off program. But, I thought, if I have this desire, I can’t be the only one. I bet there are other people who’d like to compare a measurement from one service against a measurement from another service and then fire off an action based on the three possible outcomes (less than, greater than, equal to — see, your elementary school math does have applicability in life).

It turns out that IFTTT is pleased to offer a straightforward API to let you integrate your own service with theirs. The first stumbling block I hit was that my service would need to be an OAuth 2.0 provider. It shouldn’t be a surprise that being an OAuth provider involves a lot of infrastructure; it’s not having that infrastructure that makes being an OAuth client so attractive.

So now, with no clear path to monetization and this huge pile of complicated work in front of me, I’m thinking that no, I don’t actually need to write this service. I can just write a simple program that will poll for the information I actually care about and send me an email when the conditions are right. Trying to solve the problem for everybody just isn’t worth the expense (because dedicated servers with static IP addresses and domain names and databases with same are all readily had but they aren’t free and they cost way more than the Raspberry Pi that I’ve already got).

Here’s A Useful Testing Application

So, a few years back, I consulted at NASA doing some work on a really cool system for storing and retrieving documentation on systems in flight. Basically, it was a very customized Bugzilla that winds up saving the American taxpayer millions of dollars every year. There’s a post I wrote at the time about how to print to PDF from Perl that is still the single most popular blog post I’ve ever written. It still gets traffic, and that tells me that the library is still terrible at telling you how to use it. Anyway, that’s not what I want to talk about today. Today, I’m advertising another application that arose from the same gig: a dummy SMTP/POP3 server.

Continue reading

Because of Course

Today I received the April newsletter from JetBrains, wherein they provide links to a bunch of Java news. Most of it is stuff that isn’t immediately interesting to me, but this time there was a swell one-two punch. One, Java 10 is out and Java 11 has been announced (what? 9 just came out, like, a few days ago, right?). Two, JavaFX is gonna be deprecated and won’t even ship with Java 11, so if you want to build a GUI app with Java you’d better dig out all your old broken-ass Swing/AWT tools and get happy about that.

Hey, JetBrains? Would it be too much to ask you to build a nice Maven packaging plugin for your interface builder stuff, and while you’re at it, can you update your UI builder plugin so it works, again? Sheesh.