Holy crap, Let's Encrypt is super easy!

Well, I just set up Let's Encrypt on my home server for the first time.  When I was finished, my first thought was, "Damn, that was awesome!  Why didn't I set that up a long time ago?"

Let's Encrypt logoIf you're not familiar with Let's Encrypt, it's a non-profit project of the Internet Security Research Group to provide website operators with free SSL certificates.  The idea is to make it easy for everyone to have SSL properly enabled for their website, as opposed to the old days when you had to either buy an SSL certificate or use a self-signed one that browsers would complain about.

I didn't really know much about Let's Encrypt until recently, other than then fact that they provide free SSL certs which are actually trusted by browsers.  And really, that was all I needed to know to be interested.  So I decided to try it out on my home server.  I was already using them on this website, that that was a slightly different situation: my web host integrated Let's Encrypt into their control panel, so all I had to do to set up a cert for one of my subdomains was click a button.  Super convenient, but not really any learning process there.

It turns out that setting up my home server to use the Let's Encrypt certs was pretty painless.  The recommended method is to use certbot, which is a tool developed by the EFF.  It basically automates the entire process of setting up the certificate.  Seriously - the entire process.  It's actually way easier to set up a Let's Encrypt cert with certbot than it is to make your own self-signed cert.  You just need to run a command, answer a couple of questions, and it will get the certs for each of your sites, install them, and keep them updated.  The only catch is that you need root shell access and your web server has to be accessible via port 80 (for verification purposes).

Compared to the old self-signed cert I was using, this is way easier.  You don't have to generate any keys, or create a CSR (Certifiate Signing Request), or edit your server config files.  Running certbot takes care of everything for you.  So if you haven't tried Let's Encrypt and you're running a site that could use some SSL, I definitely recommend it.

Isn't SanDisk considerate

Author's note: Here's another article from the archives. This one was written way back on March 17th, 2007. At the time I was still working for the county government and using Linux on all my home computers. This rant came out of frustration at the interaction of not-fantastic bespoke software and annoying semi/anti-features in a commercial flash drive.

We don't have that in the Linux world. Most of our software is free or open-source and is installed from a single trusted distributor. We don't have to worry about whether a package is bundled with spyware, a crappy browser toolbar, or a useless systray icon.

This was brought home to me today when I had to deal with a user's flash drive at work. His department has a number of laptops that can't connect to our network, but this crappy application that the state foisted on us requires them to move data from back and forth between our file server and the laptops. The easy solution to this is just to use flash drives.

Well, this user's flash drive broke and the department didn't have any spares, so he went out and bought a 1GB Cruzer Micro. Nice enough drive, plenty of capacity for his purposes. The only problem was, it didn't work with The Crappy Software Foisted On Us By The State (TCSFOUBTS, pronounced 'ticks-fouts').

You see, TCSFOUBTS is one of those half-baked, government consultingware type of systems. It has a bazillion features and is highly customizable. On the down side, it's slow as all hell, has a terrible user interface, and is difficult to configure. For example, some customization options require manually editing MS Access database tables and quite a number involve hand-editing INI files or other text files.

Now, having planned ahead, the TCSFOUBTS people built in a feature to let users automatically copy their data onto a removable drive with just a couple of clicks. However, by "removable drive," what they really meant is "a path." For this feature to work, you have to configure TCSFOUBTS with the drive letter for your removable device.

By now, you probably see where I'm going with this. TCSFOUBTS needs the drive letter, which has to be configured by the system administrator. However, unlike the old flash drive, the Cruzer Micro has a bootable partition that displays as a CD-ROM drive. (Note from the present: this was before booting from USB was a common thing.) Of course, that's the first partition, and so get the drive letter where TCSFOUBTS wants to copy its files.

What was on that first partition? I don't remember. Some useless utility software that nobody asked for. One of those "value-adds" that they put on flash drives because they want to use the space for something. But it meant that the drive was stuck with an unusable partition that I didn't immediately have the ability to remove. So for the user to use this drive, they would have to hand-edit some INI file, and then edit it back when they got a different drive. And since the users for this system were all non-technical, that sounded less than appealing.

Eventually the user decided to just not bother and requisition an "official" drive. It was just a frustrating series of events. It goes to show how a few misplaced assumptions can completely mess up a user experience.

Mobile phone woes

Something strange happened the other week.  I was expecting a call at a certain time.  I was sitting at my desk, with my phone directly in front of me.  It was turned on, it had reception, and the ringer was on with the volume turned up.  But it never rang.

A few minutes after the time I was expecting the call, I got a visual voicemail notification.  Apparently the person had called and it had gone to voicemail.  Yet my phone didn't ring, and there was no indication of a missed call.  Weird.  So I tried to call the person back.  And when I did...nothing happened.  As in, the call didn't connect.  I mean, I didn't even ring.  And it wasn't just this one person.  It was everything.  I tried a bunch of calls to a bunch of numbers and only a handful - maybe 1 out or 10 - even rang, and when they connected the quality was pretty bad.  Same thing when I had other people try to call me - not even a ring.

And it wasn't just me.  It turned out my wife was experiencing the same issue. And the really strange part was that the problem was just with voice calls.  We could both still send and receive SMS messages and use mobile data.  It was just voice calls that didn't work.

OnePlus 5

We're both using basically the same setup - OnePlus 5's on Cricket Wireless.  So if there was some issue, it's not surprising that it might affect both of us.  But nothing had changed on our end since this started.  There was no software update for our phones, or anything like that.  Our phones had been working just fine up until then.

So, of course, I contacted Cricket's tech support.  Obviously I couldn't call them, so I used the online chat.  The person I chatted with was pleasant enough, but ultimately couldn't help and recommended I either get a new phone or go to a store and see if swapping out the SIM card would fix it.  So the next day I went to the store.  The people were, again, very pleasant and tried a bunch of things, including a SIM swap and the usual litany of restarting and resetting things on the phone, but they ultimately came up with nothing.  The only things they could suggest were to try a factory reset of the phone or call tech support again and see if they can reset something on the back-end that might fix it.  So I had another web chat with support and they created a support ticket and said that a technician would contact me to help resolve the problem.

There was one red flag at this point - the person I was chatting with wasn't clear on how the technician would contact me.  They asked for my phone numbers, but neither of our phones could reliably receive calls.  When I pointed this out, the representative didn't seem to get it and simply repeated that they would contact me within 24 hours.

Fast forward to the next morning.  While we were on our way to do some shopping at the public market, a notification goes off on my wife's phone.  It's visual voicemail, with a message from the Cricket technician whose call we apparently just missed.  Because our phones can't receive voice calls.  Which was the entire reason he was calling us in the first place! 

Don't get me wrong - I know tech support is a tough job and I don't mean to put down the people who do it.  But come on!

Simple Mobile SIM kit

Anyway, I was so disgusted by that episode that I decided to take matters into my own hands and see if I could definitively pin down whether it was the network or the phones.  So, to that end, I went over to the local Walmart and bought a Simple Mobile SIM starter kit for $10.

I don't know much about Simple Mobile - just that it's a pre-paid cellular provider that runs on T-Mobile's network.  And I know that Cricket uses AT&T's network, so, by process of elimination, if I can make calls from my phone using the Simple Mobile SIM, then that means my phone is fine and it's something in the network that's broken.

The setup process was pretty painless.  I just stuck the Simple Mobile SIM card into the second SIM port (the OnePlus 5 supports dual SIM cards, which is actually pretty cool and it was nice to have a reason to test that out), signed up for the basic $25/month service online, and waited a while.  After a bit, I got a bunch of text messages from Simple Mobile and I was in business.

Naturally, the first thing I did was try to call a few numbers from my phone book using the new SIM.  And, of course, the calls went through just fine.  So my phone is officially not broken, which is good news.  Also, I now had a secondary phone number that I could give to the Cricket tech support people.  Which is what I did.

Well, the next day I got another call from the Cricket technician.  He just asked if I was still having the issue, asked a couple of basic questions, and said they'd get back to me.  Well, they never got back to me.  But the next day I tried making a few calls and my phone was working again.  I have no idea what the problem was, or what caused it, but apparently they fixed it, which is all I really care about.

While this experience does not incline me to go get a land-line, it does make me a little hesitant about having a single phone provider.  Fortunately, the ready availability of cheap, pre-paid SIMs helps mitigate that concern.  It's nice to know that if my current provider becomes unreliable, short-term solutions are easy to come by.

Vim and ctags

Today's post is random Vim trivia, featuring ctags!

If you've used Vim casually or been around the UNIX world for a bit, you may have heard of ctags, but not really been sure what it was good for.  Well, ctags is a code indexing tool.  It scans a bunch of source code and creates an index of it.  The goal is the same as creating a  database index - to allow you to look up specific things quickly.

That's straight-forward enough, right?  But what the heck do you do with the index once you create it?  Well...nothing.  At least, not directly.  Sure, you can manually create and query the tag index from the command line, but you wouldn't really want to.  Following the UNIX way, ctags is really just one part of the pipeline.  It creates the index and it's your editor that queries it and does stuff with the result.

If you want to use Vim for any non-trivial development, then you really want to be using ctags.  It provides you with a handy way to jump between definitions of classes, functions, and so forth, much like you get with Visual Studio or PHPStorm.  It makes your life significantly easier.

The only problem is that there's a little setup that needs to be done.  Reading the ctags index doesn't require anything special if you're using the default "tags" files for the index.  However, generating that file takes a little more effort.  You can do it manually, but really you want it to happen automatically in the background.  Luckily, there's a plugin for that - Gutentags.  This plugin will basically just update your tags file in the background at appropriate intervals.  Although it has some options available, there's not really anything you need to configure for it - it just works out of the box.

Once you've got your tags file auto-updating, the next thing is to figure out how you want to browse tags.  The workflow that works best depends on your preferences, and I can't claim to have mastered it.  This page gives a good overview of the different commands and default keybindings that are available for tag browsing.  As with everything else in Vim, there are a lot of options available, but you can get by with just a few to start.  Personally, I find that just ctrl+] and :tselect work for 80% of my needs, but your mileage may vary.

How about some flowers?

It's a long weekend for Memorial Day.  I spent most of yesterday and this morning cleaning.  And I had a late and very large lunch of braised pork ribs, which was delicious but filling.  So I just don't feel like coming up with anything substantial right now.  So how about some flowers?

The lilac trees from my yard are starting to bloom

Since the Rochester Lilac Festival was postponed this year, here's a picture of the lilac trees from my side yard.  They've got quite a few flowers this year.  Last year they didn't do as well because I didn't prune them sufficiently the previous season.  However, I did a better job last season.

Actually, it's just as well the festival was postponed.  The blossoms have only come out in the last week or so, and the festival is normally early in May.  So it probably would have been a lilac festival without many actual lilacs.  Though it still would have been nice to get out and roam around the park....