Category Archives: Practical Applications of Knowledge

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

VPN, part 2

Well, the configuration I’d put together before turned out not to work when I was at a hotel and trying it out. I got distracted and didn’t do anything about it for a while, but today I had some time and I started digging around. Guess what? Someone solved this problem ages ago and someone else wrote about it last fall!

I uninstalled openvpn from the pi, just to make sure the bogus configuration got deleted, then ran the road warrior script from https://github.com/nyr/openvpn-install. Boom, it worked.

So, VPN

A couple weeks ago I read an article about a guy who set up a caching DNS server for his home network on a Raspberry Pi. The main thrust of the article was, “Hey, checkitout, Cloudflare has a public DNS at 1.1.1.1 and they pinky-swear promise not to write down what IP address originated the resolution request for wombatporn.com or even overthrowthegovernment.com,” but it did get me thinking about the Pi.

Until reading that article, I thought of the Pi as being a cool (I guess) thing if you wanted to build a robot (to do some dumb thing that I don’t wanna do) or if you wanted to let people on the Internet control your irrigation system (what could possibly go wrong?) but that was just my misunderstanding. The cool thing about the Pi is that it’s a super low-power actual computer running an actual operating system that you can use, and it costs hardly anything.

So, I bought a Pi Zero-W and installed bind on it. Ever since the FCC decided that it’s okay for ISPs to provide different service levels to sites based on their whim, I’ve been thinking about how that really hoses applications that depend on the network being always on. So that got me thinking about store-and-forward and periodic connections to the Internet (psst, there’s this awesome thing called “mosh” that’s pretty cool) and inevitably that raises other questions like, “Who’s looking at your traffic,” and, “What if you don’t want your hotel to be providing all your packets to GCHQ?”

Well, I thought and poked and installed OpenVPN on the Pi and, third time around*, got a configuration that lets my laptop connect. However, it doesn’t seem to route traffic properly (at all) and I was never a network engineer. This is going to be a heck of a learning experience.

* It turns out that the micro-USB port on the Pi Zero-W doesn’t actually work. I tried several different connectors on it and nope, keyboard and mouse didn’t work. So I got to do a complete headless setup and spend an afternoon debugging that. Then, the first time around with OpenVPN, the server would start up and then immediately shut down again. Then, the server would start up but the client’s certificate somehow didn’t match what the server expected, so the connection would fail. Regenerate the client, turn off some options in the server, and finally it all connects, but the Internet isn’t reachable over the tunnel. Well, maybe it’ll be better when I’m not on the network I’m tunneling to.

Why Keybase Is Interesting

Unless you are a programmer, it mostly isn’t. Yet. However, if you are a programmer or if you want to send and receive secure messages, then it is kind of interesting. One interesting thing (for programmers) is that it gives you free encrypted git repos. That’s rad. Also, if you want to start sharing the repo with someone, that’s pretty easy, too. Another really neat-o thing is that you can send an encrypted message to a keybase user without having to figure out how to install PGP, how to integrate it with your email client, or how to look up your recipient’s PGP key. That’s pretty cool.