Tales from the jar side: The Quest for the Holy Grails 5, Cetacean Ops, and Lots of amusing links
Good tweet I saw this week: What if UFOs are just billionaires from other planets?
Welcome, jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of October 17 - 24, 2021. This week I taught an O’Reilly Learning Platform course on Reactive Spring and an NFJS Virtual Workshop on Gradle Concepts and Best Practices. I also had a pleasant time experimenting with Grails 5.
If you wish to become a jarhead by actually subscribing to this (free!) newsletter, please use this button:
The Quest for the Holy Grails
For the first time in a few years, an opportunity came up that might let me get involved in a Grails project.
For those who don’t know about Grails (pause while I weep silently but then move on), Grails is an open source web application framework for the JVM built on top of Spring Boot and Hibernate. I’ve talked about it here before, so I’ll just say that I first encountered it back in 2007, and I liked it so much I decided to learn Groovy as a result. Training work centered on Grails kept me very busy from around 2010 to 2013, and to a lesser extent 2015, but for a variety of reasons it eventually fell out of favor.
Grails is still active and still supported, mostly by Object Computing, Inc, though they have also established a Grails Foundation to support and advance the project.
When I used the framework the most, it was on version 2, moving to version 3. I spent a little time with version 4, but not much. Grails 5 was released on October 12, just 12 days ago. According to the What’s New section of the user guide, most of the changes involved updating it to use the latest versions of Spring and Spring Boot.
We’re going to have a Groovy Podcast about the new release, but a few scheduling issues have delayed it a bit. In the meantime, I decided to re-implement my teaching app into the new version.
If you know my sense of humor, you won’t be surprised to know that the name of my application is The Quest for the Holy Grails.
I have a series of exercises we use during class to build the application, and as an excuse to tell way too many Monty Python jokes. The domain model involves classes called Quest, Task, Knight, and Castle.
We discuss relationships (like quests have many tasks, which belong to quests), constraints (like the titles for the knights or the priority range for tasks), scaffolding, tests, and more. One of my favorite parts in when we implement a GeocoderService that translates the address of each castle to latitude and longitude, using Google’s geocoder. The user specifies a city and state (for very broad interpretations of the word state — this is Google, after all; it works all over the world) and the geocoder fills in a latitude and longitude.
Ultimately use the fact that Grails automatically makes it easy to expose the domain classes via a RESTful web service, so we can add the castles to a Google Map:
Getting everything working in Grails 5 took some doing. Sadly, my IntelliJ IDEA editor doesn’t understand Grails 5 projects yet, so I had to work with the Grails interactive console. Fortunately, that worked like a charm. I also ran into a few minor issues:
The new testing environment has some quirks (reminder to myself: move the generated service tests into the integration-test hierarchy to make the GORM problems go away) and is filled with asserts I had to fix, though the results are a good user guide in themselves.
I needed to add the groovy-datetime dependency to the Gradle build file to be able to subtract LocalDate instances.
I had to remember how to skip the bootstrap while in testing mode (I used an if statement checking Environment.TEST to avoid running it).
As you can see from the images (and the source code hosted on GitHub), eventually everything worked and all the tests pass. I’ll be happier when IntelliJ works with the new version, but that’s the frustrating part of working with a technology that is no longer popular — the tools take their time catching up.
I spent a lot more time on this than I intended, but it was fun. If all it does is get you to re-watch Monty Python and the Holy Grail again, I’ve done my job.
Miscellaneous
I realized writing this that I’m in the middle of several opportunities that may or may not pan out. I also read several items online that were illuminating, but somewhat on the depressing side. I’m going to keep things short this week (at least, short for me), and just give you some links you can follow or not, as you wish.
First, one of the groups I sponsor on Patreon is the two ladies from The Take, who create video essays on movie and TV topics. This week they did a fantastic job explaining how the Netflix series Squid Game is a serious criticism of capitalism that backed off at the last moment:
Also, ABBA put out their third video from their upcoming Voyage album. This one is called Just A Notion:
I have to say I found it okay. It sounds like them, but it’s another mediocre release from what I’m starting to fear will be a mediocre album. We’ll see.
My wife and I managed to watch the new Dune movie this week. I thought it was good for what it was, but I’ll be very disappointed if they don’t make the second half. The best description of the movie came from this tweet, however:
Also from Twitter, this thread is fascinating:
Here’s the direct link to the underlying presentation. The author makes a lot of good points, though I’m not sure if I agree with everything in it.
For raw humor, it’s hard to beat this quote, which I saw on Twitter:
This New Yorker cartoon rivaled it, though:
This too was profound:
Finally, here’s a post from LinkedIn to make you feel better today:
Cetacean Ops or Bust
By far my favorite of the new generation of Star Trek series (Discovery, Picard, etc) is the animated series Star Trek: Lower Decks. Maybe it’s because its irreverent tone fits my sense of humor, or maybe because I’m enough of a Trek person that I get almost all the references to events in older Trek series, but either way I’m really enjoying it.
The series recently completed its second season. One of the running gags, mentioned in the very first episode, was the existence of Cetacean Ops, a facility onboard the USS Cerritos that hosts cetaceans, i.e., whales (and maybe a few other species). I thought that was a riot, as well as being a callback to Star Trek IV: The Voyage Home, which was basically a “save the whales” episode with a decent amount of humor, directed by Leonard Nimoy himself.
After mentioning Cetacean Ops in the first episode (Second Contact) and alluding to a year later (with one crew member inviting another to join her and a couple of girls for a swim there), they finally went there in the second season finale, First First Contact.
There we finally met Lieutenants Kimolu and Matt, two beluga whales who serve there.
No spoilers, but I’ll say this much: I’m a fan.
I must confess that I put in for a transfer, so if next week’s newsletter is late, you’ll know why.
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.
This week:
Mockito and the Hamcrest Matchers, on the O’Reilly Learning Platform
Last week:
Reactive Spring and Spring Boot, on the O’Reilly Learning Platform
Gradle Concepts and Best Practices, an NFJS Virtual Workshop