Tales from the jar side: Pattern matching in Java, Babylon 5, Russel Winder, and my final Bernie memes
Blessedly, no politics this week, other than to say I celebrated by taking a nap. It was glorious.
Welcome to Tales from the jar side, the Kousen IT newsletter, for the week of January 17 - 24, 2021. This week I taught a Reactive Spring and a Kotlin and Spring Boot course on the O’Reilly Learning Platform, and a Kotlin Basics and Beyond NFJS Virtual Workshop.
A lot more than that happened, though. It’s been an eventful week, so let’s get to it.
Newsletter Milestone
This week my newsletter reached a significant milestone:
Tweeting that fact encouraged a few more people to subscribe. I also mentioned it during my courses this week. The result is that as of today, I have 1012 subscribers:
Oh, wait, I have zero subscribers, because this newsletter is, and always will be, free. I have 1012 addresses on the email list, however, which is not bad for a company newsletter for a one-person company. :)
Pattern Matching In Java
In last week’s newsletter, I talked about the new sealed classes capability in Java, which I discuss as part of my What’s New In Java training course. The previous week I had an example of records, which is another new feature. I mentioned in passing that Java also added pattern matching, but that it wasn’t a significant capability.
This week the online site InfoQ included an article entitled Java Feature Spotlight: Pattern Matching, by none other than Brian Goetz himself. Brian is listed as a Java Language Architect at Oracle, which sells him considerably short.
(I often think the term “technical trainer” does the same to me, but I haven’t come up with a good alternative.)
Brian is one of the most brilliant people I’ve ever met. He spoke on the NFJS tour for a few years before moving on, and I always made sure to attend his talks. His topic of choice was concurrency, and he is the author of the book Java Concurrency In Practice, which is still one of the primary references in the industry despite its age (published in 2006, which is an eternity ago in this world).
When Brian talks, I listen. I generally don’t understand, but at least I listen.
The article demonstrates what I already knew, which is that the instanceof operator in Java can now take an extra variable, and if the expression is true, you don’t have to cast to the variable.
He demonstrated in the article a simplified way to implement an equals method. Say you have a Point class that contains int values for its x and y locations. Then a normal equals override would look like:
With the new pattern matching capability, you can now simplify that to:
That’s quite a simplification, and it’s all because I can declare the p variable after the instanceof operator.
The article goes on to talk about the future, where pattern matching can be used in switch statements and (best of all) ultimately to destructure records. Take a look at the article for details, which I’ll add to my GitHub repository when they’re ready. I did add the example above, however, along with some test cases.
Brian is a very impressive guy, and one of the few developers I still kind of fanboy around. I’m getting over that, but it’s taking time.
Incidentally, if you ever get the chance to play poker with Brian Goetz, just hand him your wallet. That’s going to happen anyway, and it’s less painful if you just recognize that fact from the beginning. There’s an event I occasionally go to where many of us geeks sit around, drink, and play various games all weekend. The joke is if Brian knows one particular person (who shall go unnamed to save him the humiliation — but if he’s reading this, Hi Mark!) is coming, Brian doesn’t bother to bring any money for the return trip, because he knows that person will fund his trip home.
Babylon 5
Many of you are probably aware that I’ve been a huge fan of the TV series Babylon 5 since it came out in the mid- to late-90s. My wife and I watched each week for the entire five-year arc, and have re-watched the series several times since.
I want to mention for those who haven’t seen it, that Babylon 5 will join HBO Max on January 26 (i.e., this coming Tuesday).
Sadly, the show is notable for another reason — way too many of the main cast members have passed away since the show ended. They include Richard Biggs (Dr. Stephen Franklin), Stephen Furst (Vir Cotto), Andreas Katsulas (G’Kar), Jeff Conaway (Zack Allan), Jerry Doyle (Michael Garibaldi), and Michael O’Hare (Jeffrey Sinclair). Though he wasn’t a featured character, Tim Choate (Zathras) is also no longer with us.
Sadly, this week we lost Mira Furlan, who played Delenn and played her brilliantly. Here she is in one of my favorite scenes:
From all the tributes that rolled in from fellow cast members, it’s clear that she was as admired and loved as she was respected. If you get a chance to watch her performances, you’ll see why.
Russell Winder
We lost a few famous people this week. In additional to Mira Furlan, we also lost Hank Aaron and Larry King. But closer to home, the Groovy programming language community lost one of our own.
Russel Winder described himself as an ex-theoretical physicist, ex-UNIX system programmer, ex-computer science academic, ex-analyst, ex-expert witness, ex-consultant, ex-trainer, and “not yet an ex-human being” (from his GitHub profile). Sadly, this week he lost an extended battle with cancer.
I met him a couple of times and always admired him. He was a key contributor to the GPars concurrency and parallelism framework for Groovy, which never got the publicity I felt it deserved.
Tributes poured in. I’ll just include a few tweets and a link to one of his conference presentations.
I don’t really know what else to say. Just a sad time for all of us.
Bernie Memes
That was sad and I don’t want to end on that. I have a couple more items, but I’m going to hold them to next week because this issue is already getting long. Instead, I’ll finish with a couple of those Bernie in Mittens images that were literally everywhere on the internet this week.
Hakuna matata.
“I’ve seen detergents that left a better film than this!”
Btw, five seasons of The Muppet Show are coming to Disney+ starting February 19. That’s basically a good thing, but I have to warn you — I watched some old clips on YouTube a couple months ago of their Pigs In Space sketches, and they have NOT aged well. Staggering amounts of sexism played for laughs. We’ll see how this works out.
I keep hearing the MTV theme in my head, but I’m old.
Got to be better than Bran The Broken, but, then again, anything would be.
Opa Bernie Style. :)
The whole idea of midichlorians is elitist, so this is a twist.
“What’s your ideal first date?”
“Something involving naps and an early-bird special, why?”
Bernie himself put his meme on a sweatshirt, priced them at $45, sold out the entire run in minutes, and gave all the proceeds to Meals on Wheels in his home state of VT. That’s the right way to handle becoming a meme.
One last item, regarding COVID-19:
Please stay safe and healthy everybody.
Last week:
Reactive Spring, on the O’Reilly Learning Platform
Kotlin and Spring, ditto
Kotlin, the Basics and Beyond, an NFJS Virtual Workshop
This week:
Introduction to Gradle, for Gradle, Inc.
Functional Modern Java, an NFJS Virtual Workshop
News about the Managing Your Manager book coming soon