Category Archives: programming

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.

More MIME Tricks

Several days and a lot of testing later, I think I have the answer: don’t try to build a play-by-email service in Google AppEngine. The limitations imposed by the environment make it a bad place to do a lot of email traffic that requires anything other than text/plain or text/html. Because Google has defined javax.mail.Transport to use the AppEngine mail service, you can’t choose to connect to a different SMTP host; if you specify an external SMTP server (such as SendGrid or Pobox) in the Session, Google’s Transport implementation ignores it and still uses the AppEngine mail service. When you try to use a web API to send your message through SendGrid, that screws up the MIME headers and your message won’t validate (if it’s even readable) at the receiver’s end.

That said, I have finally figured out how to prepare and send a PGP signed MIME message such that it arrives and validates properly. Since nobody else has written that down on the web (that I could find), I’ll detail the recipe here.

Continue reading