There’s probably a morality tale somewhere in here.
A BASH script wasn’t working in the VM I was testing it on, and I thought sure the tutorial I was using was wrong. (I was getting a little bit irritated, in fact.)
I wrote out a question for Stack Exchange, but decided to sleep on it before posting it.
I looked at it the next day and I immediately saw what I did wrong. It was kind of obvious, actually. Stack Exchange would have been a waste of other people’s time.
I’m not exactly sure what the lesson here is, but it does remind me of something that I used to say when I was in grad school: The three most important things in math are patience, coffee, and naps. Patience because you’ll be able to understand something better if you take it slowly. Coffee because, well, coffee. Finally, naps because sometimes, as one of my teachers used to say, your brain can get full, and you just need to take a step back and take a break before coming at it with a fresh mind. I think this applies to programming as well as it does mathematics.