On Simplicity, Complexity, and/or Bad Design

When I was first starting out in my career and I’d encounter a complicated system I couldn’t understand, I blamed my own inexperience.

Mid-career, I started to realize that, no, a lot of systems are just really poorly designed, and I was experiencing cognitive dissonance, trying to find a complex and subtle logic where there was none.

Now as I’m entering (eek) the late stages of my career, I’m experiencing those systems in a third way that I’m still trying to comprehend. It’s not specifically that they’re badly designed (though they may be). It’s that they’re necessarily convoluted because they’re trying to model an inherently convoluted human process.

No matter the skill of the developer, sometimes it’s just impossible to translate the messy, inconsistent, illogical, organically assembled, internally conflicted and occasionally politically-motivated* ways humans concoct to complete a task, into a simple, intuitive program.

Anyway… I just spent a half hour trying to make a little bit of sense of a system that had a clean and modern interface, but one that concealed an unbelievably arcane, niche-specific database model. Now my brain hurts.

*By “politically-motivated” I’m talking about internal politics within an organization, not government-level politics.

How to get your upgrade from Ubuntu 16.04 LTS to 20.04 LTS to work properly

So, like me you’ve decided to procrastinate on the OS upgrade on your server running Ubuntu 16.04 LTS. Yes, support for it ended almost 6 months ago. Maybe you’ve even set up ESM (Extended Security Maintenance) to avoid the upgrade. But if you’re like me you may also have discovered that you can no longer access new PHP versions from the “ondrej” repository once LTS ends. So you reluctantly acknowledge that it would be a very good idea to do the OS upgrade.

But it doesn’t work.

That’s OK, I’m here to help. A few months ago I scraped together tips from a few different resources (which I regrettably did not make note of for citation here), and came up with a rough script for myself that seems to work. I’m running it again today on another server, so I thought I’d consolidate it into a blog post here while I’m at it. Let’s go.

Before the 16.04 to 18.04 update

First off, caveat emptor. This is what I did, and it worked. If you do the same and it breaks something, don’t blame me. Also note that I am brazen and always run sudo -s before I get started. If you don’t like to do that, you may need to prefix some of these commands with sudo in order for them to work.

It’s probably also a good idea first to do a full backup of your server that you can restore from if things go totally off the rails.

Yes, this is going to be a two-step upgrade. First we’ll upgrade from Ubuntu 16.04 LTS to 18.04 LTS. Then we can do the 18.04 LTS to 20.04 LTS upgrade to get ourselves current. Then we won’t have to think about this for another 3 1/2 years! Whew!

There’s some stuff to do before you run that do-release-upgrade command. First, edit /etc/apt/sources.list in your text editor of choice (I like nano) and add these lines at the end:

deb http://archive.ubuntu.com/ubuntu/ xenial main universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-security main universe multiverse

Save that. Then if you’re running ufw, which you should be, do this to give yourself a back door in case something goes wrong (assuming you’re running this update over ssh, which of course Ubuntu will warn you is a Bad Idea).

ufw allow 1022


Hold on! Failure may be looming in the near future. Before doing anything else, try this:

apt-get update
apt-get upgrade

I almost always run apt-get dist-upgrade instead of just apt-get upgrade because I always assumed the former does everything the latter does, and more. Not so. I’ve run into a problem on some servers with messages that cloud-init was held back. My fix for that is to do this:

apt-mark unhold cloud-init
apt-get upgrade
reboot

When things come back, let’s do this:

apt-get dist-update
apt-get autoremove

Then proceed as normal…


Now we’re ready to get started. Run these commands:

apt update
do-release-upgrade

Don’t walk away at this point… you’re going to have to answer some prompts along the way. In general I would always recommend keeping your existing versions of any files it asks you about. Once all of that is over, your server will reboot, and you should be able to log back into a fully functioning Ubuntu 18.04 LTS install. I would recommend testing whatever services you have running on the server, just to be sure everything is working properly, before you continue to the 20.04 LTS upgrade.

After the 16.04 to 18.04 update, before the 18.04 to 20.04 update

Run all of the regular updates, just to be sure you’re fully current. If you’re brazen like me you’ll tackle that with one command:

apt update; apt -y dist-upgrade; apt -y autoremove; reboot

Once you’re back up and running, throw this in. I don’t recall why I needed it now, and if you’re not using cURL you may not need it at all, but anyway, I did this here:

apt install libcurl4

Now, just to be safe, let’s back up the existing /etc/apt/sources.list file, because we’re going to replace its entire contents with this:

deb http://in.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse

deb http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://in.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse

deb http://in.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner

(Looking just now at that in.archive.ubuntu.com domain, I’m not sure if that’s a mirror in India and you could just use archive.ubuntu.com, or what. Just an observation. Do as you will.)

Once you’ve saved those changes, run these commands:

apt update
apt install –reinstall ubuntu-keyring
do-release-upgrade

Again with the do-release-upgrade command you’ll need to follow the prompts, keeping your existing copies of config files when asked.

I’ve found that after running this, the server might not come back up on its own. I had to log into my Digital Ocean account after a few minutes and do a hard reboot, but once I did that, everything came back fine and I was on Ubuntu 20.04 LTS!

One additional note: one server I ran this on needed all of the PHP 7.4 libraries reinstalled for a reason I could not determine. Your exact setup may vary, but this is what I ran to resolve that issue:

apt install php7.4 php7.4-cgi php7.4-cli php7.4-common php7.4-curl php7.4-dev php7.4-gd php7.4-gmp php7.4-json php7.4-mysql php7.4-odbc php7.4-bcmath php7.4-bz2 php7.4-mbstring php7.4-soap php7.4-zip

And then I needed to edit the corresponding php.ini file with my preferred settings.

Do What You Like

How “Do What You Love” Is a Recipe for Disappointment and/or Exploitation

Note: This is a rough sketch of some thoughts that have been simmering in my head for years and that were catalyzed by a conversation I had this morning on a walk with SLP. I may turn this into something more substantial and cohesive at some point in the future. But since I also may not do that, I wanted to post this early version, such as it is, so I don’t lose these ideas altogether.

The expectation that you will find a career doing The Thing you truly love tends to lead in one of three directions:

  1. Exploitation by an industrial complex that knows you will work more hours, for less pay, with more personal sacrifice, if you believe you are following your true passion.
  2. Loss of love for The Thing as you realize the compromises you need to make in order to turn a passion into a career.
  3. Cognitive dissonance as you struggle to rationalize that whatever it is you’ve ended up doing is The Thing you believe you truly love to do, when it is not.

Don’t give away The Thing that you love.

Many industries, especially academic and creative fields, are structured in a way that assumes the majority of their most talented workers do truly love the thing that they do, and they’re optimized to exploit that passion. The expectation that you will always go above and beyond, first because you want to but eventually because the structure of the job forces you to, is baked in. You will work more hours than you should, demand less pay than you deserve, and sacrifice other aspects of your life, because you are told it’s what the job requires, and you believe it. But what the job really requires is you. Your talents and your passion, and you should be compensated adequately for those, both in terms of pay and time off. But that rarely happens.

Compromise can be a killer.

There are many aspects of life where compromise is necessary and good. But compromising The Thing you love in order to turn it into a career can very easily suck that love out of The Thing. Clients may have unrealistic or illogical demands. Promoters will want you to do The Thing their way instead of the way you know works best for you.

“Do what you love” ≠ “Love what you do”

This may be the most dangerous path of all. Very few of us can land a job doing The Thing we truly love. Incremental shifts over time, impulsive decisions made long ago, or unexpected changes due to the complex challenges of life, all can lead a person into a place where they’ve invested years of time and energy into something that has little or nothing to do with their true passion in life. But that investment is hard to throw away, and it’s easy to try to convince yourself that you are doing The Thing you love, whatever it is that you’re actually doing. Admitting to yourself that you have no real interest or passion for the job you do can feel like a massive personal failure, but the real failure is denying your personal truth.

Do what you like.

Find a job that gives you satisfaction and fulfillment, but that you can walk away from at the end of the day… or walk away from entirely, if you realize it doesn’t suit you. This is a job that you are willing to invest in enough to take seriously, to do good work, to make a decent living and to contribute to society. It is not a job that you are willing to let make unreasonable demands upon your time, your energy, your family or your personal well-being.

A job you like doesn’t crush your spirit during the working hours, and it leaves you with a good amount of non-working hours to pursue your true passion, hobbies, leisure activities, family time, whatever it is you most want out of life.

Scott’s “So Spice” Roasted Corn Salsa

For the past couple of summers we’ve been members of a local CSA, and this summer we’re back to trying our hand at growing vegetables in pots in our backyard as well. (We’ve learned that we can basically grow herbs, cherry tomatoes and — especially — chili peppers. Oh so many chili peppers.)

This week we got some corn on the cob and a bunch of tomatoes, plus a head of fresh garlic, from the CSA (amongst a bazillion other things… August is when the CSA boxes really start to get heavy). And our backyard banana peppers and jalapeños are nearing their peak as well. This morning I wanted to make myself a breakfast burrito, as I often do, but I got sidetracked turning all of the above into a roasted corn salsa. I was totally winging it, but the results turned out pretty tasty, so I decided I should write up the recipe. Here goes!

Ingredients

1 cob fresh sweet corn
8 small or 4 large tomatoes
3 fresh banana peppers
1 fresh jalapeño
2 cloves garlic
a few slices of onion
fresh cilantro (optional)
salt and pepper
vegetable oil

Preparation

  1. Preheat oven to 400ºF (convection if possible).
  2. Shuck and rinse the corn, leave on cob. Slice the tomatoes in half, and remove the hard stem area if needed. Leave the chili peppers and garlic whole.
  3. Rub the corn with some oil, then salt and pepper as desired.
  4. Place the corn, half of the tomato halves (cut side up), the chili peppers, garlic and onion on parchment paper on a baking sheet and place in oven.
  5. Check the progress every few minutes; rotate the corn and peppers as needed. Note that some things may take longer to roast than others. As each item appears to be “done” (starting to char), remove from the oven and place on a plate to cool. (I found the banana peppers were ready really fast; the corn took the longest.)
  6. Once cooled, cut off and discard the stems of the banana peppers and jalapeños. Peel the skin off if it is loose. (In my case, the jalapeño needed to be peeled but the banana peppers did not.) Slice each in half. Remove the seeds/pulp from the banana peppers, and from the jalapeños if you don’t want the salsa very spicy. (My jalapeño had already turned bright red and I left all of the seeds in — the salsa is very hot. At least by Minnesota Scandinavian standards.)
  7. Finely dice all of the chili peppers and place them in a mason jar or medium-sized bowl. (Be sure to wash your hands well after handling the jalapeños!)
  8. Finely chop the onion and add it to the jar.
  9. Without peeling, squeeze the roasted garlic bulbs into the jar. The insides should have a mashed potato-like consistency and come out fairly easily. Be sure none of the papery skin gets into the jar!
  10. Cut the corn off the cob and add to the jar.
  11. Place the roasted tomato halves, along with the remaining uncooked tomato halves, into a food processor and process just until broken up. Pour into the jar. (Depending on the size of your tomatoes, you may have too much, or possibly too little. For me, 8 small tomatoes was just perfect. If your jar isn’t mostly filled, purée another fresh tomato or two, as needed.)
  12. If you are using cilantro, wash and dry it, finely chop (removing tough stems), and add to the jar.
  13. Lid it, then shake vigorously to mix all ingredients. Taste and add more salt and pepper if desired. (I didn’t need to.)

This salsa tasted pretty good right away, but it will get better after it’s been in the fridge for a few hours. I should also note that I didn’t use cilantro, because we didn’t have any on hand. The salsa doesn’t really need it, but if you have it, I would use it.

Cassettes of Steal?

I’m going to talk about the 1975 Rush album Caress of Steel for a minute. Unless you’re the roughly one person who is interested in this, feel free to move on.

Whenever I think of this album, I think about the cassette version, which was my introduction to it. Back then, record labels were less interested in preserving the integrity of the album than in cutting every possible cost, so it was common to rearrange the order of the songs on cassettes and 8-tracks, to even out the sides/”programs” (4 total on an 8-track), to use as little tape as possible. (Granted, this may have been because people complained that they’d been cheated when there was a lot of blank tape on one side.)

Anyway… this particular album presented a weird scenario. Side one was four songs, but side two was a side-long suite. (OK, it could be broken up into six separate songs, but they really needed to be together, in a specific order.)

Well, that all made side one a couple of minutes longer than side two, which just wouldn’t do. So the label decided to swap the second song on each side. That meant moving side one’s “I Think I’m Going Bald,” definitely the most absurd track on the album, into a spot right after the first part of the side two suite, and it also meant sticking in side two’s bizarre “Didacts and Narpets” (really just a drum solo and a few guitar chord stabs, plus some random words shouted out representing an argument between the young hero of the suite’s story and his restrictive elders) as the second track on side one, with no context.

All of which made for me having a very warped understanding of what this album was supposed to be, until I finally got it on CD, with the tracks in the right order — and the full side two “Fountain of Lamneth” suite actually acknowledged as such.

Now on streaming services, the album just has 5 tracks… “The Fountain of Lamneth” is one uninterrupted 20-minute song. Today’s nerdy high school sophomores will never understand what I experienced when I was their age.