Tales from the jar side: New videos, Reactive Spring and GitHub Copilot, Resolving moral dilemmas, and Tweets and Toots
Why did the chicken click on the PowerPoint presentation? To get to the other slide. (rimshot)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of February 19 - 26, 2023. This week I taught my Reactive Spring course as a No Fluff, Just Stuff virtual workshop, and my Making New Java Features Work For You course on the O’Reilly Learning Platform.
Regular readers of (and listeners to, and now video viewers of) this newsletter are affectionately known as jarheads, and are far more intelligent, sophisticated, and attractive than the average newsletter reader (or listener, or viewer). If you wish to become a jarhead, please subscribe using this button:
As a reminder, when this message is truncated in email, click on the title to open it in a browser tab formatted properly for both the web and mobile.
New Videos
I made a video this week about the differences between Mockito and BDDMockito:
I’m happy this one, though in retrospect I’m not thrilled with my expression on the thumbnail. So be it. I’m still experimenting. I left out any background music, too, so I didn’t have any issues there. I showed the code I wanted to show and kept the video relatively short. For anyone interested in Mockito, I hope you like it.
I then spent several hours putting together a one-minute-long YouTube short, which I described as by far the silliest video I’ve ever made:
Here’s the actual short:
I’m not sure why that shows up regular width in the newsletter, but so be it. The result met with moderate approval from my Official Unofficial Social Media Consultant (my son), who liked what I did but felt (1) the coding part should have been speeded up, and the crescendo of Also Sprach Zarathustra should have matched the penguin rather than the code. Both are fair points.
What I actually learned doing this project:
How to speed up a section of the video (I really did speed up the coding, but apparently not as much as I should have).
How to use my library of video clips. I’m using Screenflow a lot, so I finally decided to pay for their Stock Media Library, which is where I found the penguin (both of them, actually), the flowing snow, and the space image.
How to resize the canvas to match the dimensions of a YouTube short.
Writing it down like that makes it all sound pretty easy, but as I say, it took hours to get it all working properly. That’s progress, though for some reason the short didn’t get as many views as my last one. So be it.
I’m going to keep adding videos to the Mockito series. I plan to add other series on topics like JUnit Jupiter, AssertJ, Functional Java, and others, possibly including Groovy and/or Gradle. We’ll see. My plan is to try to maintain a pace of two videos a week, with one being the narration of this newsletter and the other being something technical. The short this week was just a bonus.
Reactive Spring and GitHub Copilot
I mentioned last week that I needed to revise my Reactive Spring materials for Spring Boot 3 and Spring 6, because I wanted to use the R2DBC (reactive relational) project with an actual relational database, among other things. That meant a fair amount of work, especially because I planned to add a rest controller in front of the database that supported all the major HTTP verbs, GET, POST, PUT, and DELETE.
I discovered my problem last week when I taught a similar course the previous week and discovered during the class that my materials were out of date. Not only did the restful web service I typically use for my first couple of exercises not work any more (the site is no longer available), the MongoDB driver I used in that course didn’t work in the latest version of Spring. Since I had to teach the similar course this week on Tuesday, that didn’t leave me a lot of time to update my materials.
Fortunately, I’ve been using GitHub Copilot for a few weeks now. The web page describes it as “Your AI pair programmer”, which sounds about right. Like the other major AI tools these days (notably ChatGPT), it is based on the OpenAI neural network model. This network has been trained on projects stored in GitHub, as well as your own projects.
That’s a rather controversial notion, as these articles describe:
First Open Source Copyright Lawsuit Challenges GitHub Copilot
GitHub launches Copilot for Business plan as legal questions remain unresolved
I get that. It’s certainly an issue. Nevertheless, everything is legal at the moment, and I’ve found the tool to be quite effective, especially when I’m generating common code. The lawsuits focus on code with some degree of uniqueness, and checks how often the AI tool reproduces that code exactly. I’m not trying to do that — I just want it to suggest the most commonly accepted ways of implementing what I need to do, which is exactly what an AI tool like that is designed to do.
Plus, and I realize this rationalization is potentially the first step down a dangerous path, I was in a hurry.
I have to admit, the tool helped me enormously. I wound up generating both the controller code and tests for it that worked remarkably well, though I did have to verify that it was right. The primary concern for me is that I show the students the “right way” to solve a problem, and this tool is very good at coming up with that. I’d honestly say that this week GitHub Copilot earned my annual subscription fee.
If you want to see “my” code (and it’s still mine, or at least my responsibility), it’s in this GitHub repository.
A Rationalization Framework
Speaking of moral dilemmas, I’ve been struggling with a couple of them recently. One is pretty clear cut — the treatment of trans people by the extreme right (I don’t think the term Christofascists is too strong a term for those people) is appalling. My only dilemma there is what, if anything, I can do about it. In a way, I’m already doing something. I support three trans women financially through Patreon:
Contrapoints, also known as Natalie Wynn, describes herself as “a PhD dropout who makes YouTube videos, mostly discussing Internet culture, politics, and LGBT issues.” I’ve learned a ton about trans issues from watching her videos.
Jessie Gender is a huge Star Trek fan who creates YouTube videos about a variety of topics, and was notably called out recently by the disappointing author of the Harry Potter books (She Who Shall Not Be Named). Jessie is quite insightful. My only problem with her is that her essays tend to be very long, so I have to free up a fair amount of time to watch them. I’m glad she’s now putting her content on Nebula.
Philosophy Tube, now known as Abigail Thorn, is an actor and philosopher who I watched frequently before she (publicly) transitioned, and is arguably the most well-known trans person in the UK. Her original play The Prince ran for a week in London, and my wife and I very much enjoyed the recording hosted on Nebula.
At least, those are the trans creators I know about it. It’s possible I support others who are also trans, just not in a public way that I would notice. That’s fine, of course.
Honestly, I’m at the point where I no longer think of them as trans people, but as just people. I suppose that’s inevitable once you get to know someone, even remotely via their work. You cease to see them as members of a group, but rather as the people you’ve come to know.
I really wish those monsters trying to banish all trans people out of existence (see the speeches at the recent CPAC conference or horrible people like Florida Governor Ron Desantis) would take the time to get to know them as I have, but that would go against their boundless ambition so it will never happen. I just wish I could do more to help. Maybe mentioning those three creators in my newsletter is a tiny step in the right direction.
My other dilemma came up recently when I wanted to record music over a karaoke track, and decided to Google the singer who made that song famous. That turned out not to be a good idea. Let me describe what I found as simply, “it looks like Grandpa spent too much time watching FOX News,” and leave it at that.
This all came up when I was watching a video from Maggie Mae Fish about the Tár movie, which has been nominated for an Academy Award (the movie, not Maggie’s video, though that too is very good). The lead character is a famous conductor, and when she is teaching a master class, one of the students confesses his difficulty dealing with a long-dead composer’s music because of his problematic history. It’s the classic Death of the Author problem, where you try to separate the work from the person who made it, or, more simply, the art from the artist.
For what it’s worth, here’s my approach to the problems:
In the case of the karaoke track, I decided to use it anyway. The original singer is long gone, and none of the money would go to his estate anyway. Skipping the track just to avoid him felt like hurting only myself, and I didn’t want to give him that much power over me. Admittedly, that was a bit self-serving, but hopefully justifiable.
In the case of the trans issues, in addition to my Patreon support, I have no intention of buying anything ever written by that Harry Potter author again, including the recent video game release that caused a fair amount of controversy. Again, that’s not exactly a sacrifice for me, because I’m not much of a gamer. It seems like the least I can do, but hey, at least I can do that much.
I’m very troubled about the creeping fascism growing in the US, and feel increasingly helpless to do anything about it. At least I live in Connecticut, which I believe will be one of the last states affected, though I suppose you never know. In the meantime, I’ll try to muddle on, one dilemma after another, hoping to find my way through.
I suppose that means I’m just like everybody else. I just want to state, for the record, that trans people (and LGBTQ+ people in general) are always welcome wherever I am, and I will do what I can to support them. That’s not just because it’s the right thing to do — it obviously is — but because I’m all too aware that my time will come soon enough.
Tweets and Toots
That didn’t go where I expected
Oookay. Moving on, quickly.
I guess I’m not the only person whose humor seems to have a darker edge recently.
Good Choice
I could see that, yes.
Erik Killmonger has issues, too
I can’t believe that gag never occurred to me.
But if you drink it, are you the Monster?
Scary thought.
Speaking of AI
I’ll bet they do.
Stabby
And finally, something for my wife and her crafting friends:
Have a great week, everybody!
The video version of this newsletter will be on the Tales from the jar side YouTube channel tomorrow.
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:
Making New Java Features Work for You, on the O’Reilly Learning Platform
Reactive Spring, an NFJS Virtual Workshop
This week:
Java Testing, Part 1: JUnit Jupiter and AssertJ, an NFJS Virtual Workshop
Java Testing, Part 2: Mocks, Stubs, and Spies with Mockito 4, ditto
https://github.com/kousen/reactive-spring is the repo for all the reactive projects, including the reactive-customers
The Java class was last week, so it's probably in the completed section. This week is JUnit and Mockito