Tales from the jar side: Testcontainers Issue Resolved, Doc Hopper's offer to Kermit, Armageddon (the movie), and other tweets
Dumb Dad Joke of the week: How do two arsonists hook up? A match on Tinder
Welcome, jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of November 20 - 27, 2021. This week I finished up my Spring in 3 Weeks course on the O’Reilly Learning Platform.
If you wish to become a jarhead by subscribing to this (free!) newsletter, use this button:
Testcontainers Issue Resolved
Last week I wrote about my difficulty initializing a database using the testcontainers project. Testcontainers makes it easy to do many things, but what I wanted was to add the Sakila sample database to MySQL without installing it. More specifically, for an upcoming class (this week, actually), I wanted the students to be able to do that. The Testcontainers project wraps the database inside a Docker container and adds it to your project automatically, so everything is downloaded and installed effortlessly.
My problem last week was while I could ask for a container with the MySQL database, I couldn’t get it to run the initialization scripts required to set up Sakila. When I posted last week’s newsletter, I tagged the @testcontainers Twitter feed just in case someone there might be able to help.
I received this reply:
I hesitated, because the last thing I need right now is yet another Slack channel to monitor, but in the end that seemed like the best way to resolve the problem. I set up a simple sample project on GitHub and posted about it on their Slack channel.
As it turned out, the fix was easy, though I never would have found it myself. Here is the proper set up, creating the database as an attribute of my test class:
I had to concatenate the two SQL setup files together to make it work, but everything worked after that. The idea came from the Docker documentation about initializing a fresh instance of MySQL. I want to thank both Oleg Šelajev (@shelajev) and Sergei Egorov (@bsideup), who are active in the Testcontainers project and along with others have founded a company called AtomicJar to provide Testcontainers support in the cloud.
I’m going to add this to my teaching repository for my Spring Data course this week and see how it goes. I really should write this up as a blog post, but somehow, unlike this newsletter, writing that seems like work.
Doc Hopper Remembered
The villain in the original Muppet Movie was Doc Hopper, owner of the fast food chain Doc Hopper’s French Fried Frogs Legs. He wants Kermit the Frog to be the spokes-frog for all his restaurants.
This leads to one of the best lines of dialog in the movie. When Doc Hopper first meets Kermit, he asks him to act in his television commercials. Then he makes his big pitch:
There’s $500 in it for you, up front. Five hundred dollars is just the beginning. You could be earning this much … every year!
Even in 1979 (the year the movie was released), that was pretty funny.
Btw, I am truly appalled that the clip with that line is not on YouTube anywhere, or at least not anywhere I could find. Most of the conversations between Kermit and Doc Hopper are available, but clip with the beginning of this conversation stops just short of that awesome line, for reasons I find baffling. I had to cue up my own copy of the movie to make sure I got the quote right.)
Why bring this up? When I went to my Substack dashboard to write this week’s newsletter, I encountered this little gem:
So you’re saying I could go to a paid edition of Tales from the jar side, breaking the promise I made to stay free to all my readers and driving most of them away, and I could earn as much as $2K … every year. Seriously, every single year? Where do I sign?
Look, I get it. That’s not a trivial amount of money for many people. But somehow I don’t think that’s worth giving up my day job.
My favorite part, btw, is that extra $90. It’s not two thousand — it’s $2090. I have no idea where they got that number. To do a bit of investigating, I followed their process for a bit. I connected my account to Stripe, which I’ve always wondered about anyway. At the end, Substack recommended I charge $7/month, with a discounted rate of $70/year. By that measure, if I got 30 (!) annual subscribers, that’s $2100/year. But that means if I got 300 subscribers, I could make $21K. At 3000 subscribers, that’s $210K, and at 30,000 subscribers, I’d be up to just over $2 million a year.
I could live on that. I currently have just over 1300 people on my mailing list, so I only need to increase that by a factor of about 25 to (almost) join the 0.1%.
(According to this Ivestopedia article, in 2018 you needed to make $158K per year to be in the top 10%, $309K to be the top 5%, $737K to make the top 1%, and $2.8 million/year to be in the top 0.1%. I expect those numbers are higher now.)
How could I increase my subscriber base that much? I’m guessing adding porn might do it, at least until they cut me off (insert your own joke here). Maybe I could create a meme cryptocurrency (JarheadCoin? Or is that too close to Jar-Jar Binks?), or even sell NFTs…
Ew. Never mind. Now I need to go take a shower.
Two updates: First, I realized I forgot to account for the cuts taken by Substack and Stripe, which looks to be about 15% together. So scale up those subscriber numbers a bit, but don’t hold your breath waiting for me to add a paid version.
Second, I actually spent some time to see what it would take to launch my own silly cryptocurrency. I made sure to use my browser in incognito mode, hoping to avoid attracting the attention of zillions of bots hawking coins and NFTs. My conclusion was that there is a way to do it, but it gets complicated quickly and runs into issues like hosting, selecting a blockchain, and possibly dealing with actual financial issues, none of which I want to do. Heck, I don’t even want to write the websites and the apps necessary to launch my own coin. Of course, there are plenty of companies willing to do all that work for me, for a fee…
A world of NOPE. I closed that browser window. Hopefully I won’t have to delete all my cookies and reformat my hard drive. We’ll see.
Random Musings
Speaking of NFTs, apparently Quark got into the act, because how could he not:
Excellent job.
Here’s a tip about the IntelliJ IDEA environment:
I had no idea (hah) you could do that, but it works. That means I can right-click copy all those NFTs and paste them into IntelliJ and watch the howls from the “rights holders.” Lol.
This week NASA launched their Double Asteroid Redirect Test (DART) mission. About a year from now, the satellite will deliberately crash into an asteroid to see how much it can deflect its orbit, which is certainly a better option than sending up Bruce Willis and the boys.
Armageddon is a deeply silly, highly entertaining, Michael Bay movie. The very notion that drilling a hole is too tough a job for trained astronauts is absurd, not to mention the rest of the plan. In fact one of the trivia items at IMDB says:
NASA shows this film during their management training program. New managers are given the task of trying to spot as many errors as possible. At least 168 have been found.
Even Ben Affleck asked Michael Bay if it wouldn’t be easier to train astronauts to drill than drillers to become astronauts. Supposedly Bay told him to shut up.
Still, Willis is good, as is Ben Affleck, Liv Tyler, Steve Buscemi, Billy Bob Thornton, Owen Wilson, Michael Clarke Duncan … pretty much everybody in that awesome cast. It also gave Aerosmith one of their biggest hits ever. As long as you put your brain on hold, it’s a fun movie. I think of it as science fiction movie cotton candy.
Anyway, this tweet summed up the DART mission nicely:
I presume somebody needs to hear this this week:
Finally, we have this:
My question is, how many Americans could identify all those the EU countries from just the two letter abbreviations?
(Answers: Austria = AT, Belgium = BE, Bulgaria = BG, Croatia = HR, Cyprus = CY, Czechia = CZ, Denmark = DK, Estonia = EE, Finland = FI, France = FR, Germany = DE, Greece = GR, Hungary = HU, Ireland = IE, Italy = IT, Latvia = LV, Lithuania = LT, Luxembourg = LU, Malta = MT, Netherlands = NL, Poland = PL, Portugal = PT, Romania = RO, Spain = ES, and Sweden = SE.)
I totally missed Croatia, Cyprus, and Malta (turns out MT is not Montana :), fumbled a bit on Bulgaria, and for some reason blanked on Portugal (hangs head in shame). Still, for an American, my geography is really good, but that’s a very, very low bar.
One more COVID comment, before I get to my own update:
COVID Update
Last week I mentioned that my vaccinated son, who moved back home a few months ago, tested positive for COVID. That led to my wife and me being locked down for about a week. Neither of us experienced any symptoms. We then got a test on Friday, which resulted in the following text exchange with my son:
Me: We both tested negative, so your nefarious plot to get your inheritance early has been FOILED!
Him: You’re healthy. Yay.
Wow, you can almost feel the eye roll. Completely legitimate sarcasm aside, though, booster shots FTW, baby!
As a reminder, you can see all my upcoming training courses on the O’Reilly Learning Platform here and all the upcoming NFJS Virtual Workshops here.
Last week:
Week 3 of Spring in 3 Weeks, on the O’Reilly Learning Platform
This week:
Spring Data and the Java Persistence API, an NFJS Virtual Workshop
Managing Your Manager, on the O’Reilly Learning Platform
Upgrade to Modern Java, an NFJS Virtual Workshop
On Saturday I’m playing in the 2021 Connecticut State (Chess) Championships, at Wesleyan University, though I’ll be in the Open section rather than the actual Championship section. The time control is pretty fast (G/55 + 5 sec delay), which is how they fit 4 rounds in one day. Wish me luck.