Tales from the jar side: Transactions in Spring, A couple of YouTube Shorts, A smart rant about stupid fascists, I stand with Pride Month, and the usual Tweets and Toots
A man tried to sell me a coffin today. That's the last thing I need. (rimshot)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of May 28 - June 4, 2023. This week I held a live stream on the Tales from the jar side YouTube channel and I taught both my Functional Programming In Java course (in the APAC time zones) and the first week of my Spring and Spring Boot in 3 Weeks 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.
Transactions in Spring
My big video this week was on the big problem I ran into with transactions in the Spring framework:
(Hope you find the thumbnail amusing. I spent a lot of time debating whether to pose in such a silly way, but it seems to work.)
The basic problem can be summed up this way:
When you run on a test server, a rollback in a test doesn’t trigger a rollback on the server.
I ran into this as I was recording my updated Spring and Spring Boot training course. I’ve been updating that course for the O’Reilly Learning Platform, and it’s been more of a learning experience than I anticipated. My older versions of the same course stuck to the basics — create an app, create a restful web service, test everything, and show how the Spring solutions for persistence work.
This time, however, I decided to add the last module, which put everything together, the way I do in my Spring in 3 Weeks course on the same platform, and suddenly I ran into a problem. I described it last week, so I won’t go into it again. This week I recorded the above video about it, which I believe is the best video I’ve produced so far.
Let me not overstate that, however. The best I can do now is still a long way from the quality I need to really succeed on YouTube, but it’s definitely an improvement. So far it’s got 124 views (which is a lot for me) and 15 likes (my highest number), and I can almost watch it without seeing the flaws at every turn. As I say, I have a ways to go, but I’m getting there.
Btw, I have a new head shot
See what you can do with Canva and a decent webcam? :)
My YouTube Shorts
As I kept watching videos about how helpful YouTube Shorts can be to grow your channel, I’ve struggled with the limitations of my preferred tool, ScreenFlow from Telestream. The biggest problem I’ve had is that I never seemed to get the formatting right. I can make landscape videos that share my screen, but turning to portrait mode has been a challenge.
This week I created a new YouTube Short entitled No errors and No warnings:
It’s about how I couldn’t get rid of the warnings when I tried to mock generic types, but it turns out using the mock() method with no arguments and assigning to the generic reference on the left-hand-side works. Totally obscure stuff with a very limited audience, but you might find it entertaining. At least it’s less than 60 seconds lone.
The version I embedded here works fine, but it took me three tries to get there. The first two times I exported it, the video came out in landscape mode with the portrait view embedded inside it, but I didn’t realize that fact until:
I’d already uploaded it to YouTube, and
I’d already added links to it to Twitter, Mastodon, and LinkedIn.
Ugh. Eventually what I had to do was to export it to my local drive, create a YouTube Short using the right aspect ratio in Canva, import my local video into Canva, add it to the new short, and crop it to fit. Then I was able to export it all over again and upload it to YouTube. Not ideal.
I was frustrated to the point that I was ready to switch to a different tool, like VN Editor or Davinci Resolve. But then I was watching a recording of an expert using Screenflow, and I happened to notice his window when you export the video:
Can you tell which setting I was missing? Yup, I needed to change the Resolution dropdown, which — and here’s part of the problem — isn’t available when you upload directly to YouTube. In order to try out my new understanding, I made a second short:
Lo and behold, that worked. Plus, I got to wear a hat. I also should give an acknowledgement to ChatGPT, because I asked it for title choices and it suggested this one, but I didn’t have time in the video.
Now I’m back to using ScreenFlow again. I still should consider learning those other editing tools, but they don’t also make recordings. It’s nice having everything in one product.
This week I hope to add more shorts, and I’m planning to upload new thumbnails on some of my older videos to make them look better. I also would like to do a larger video on Testcontainers support in Spring Boot 3.1. I have a busy training schedule this week, however, so we’ll see.
As for that live stream, here’s a tweet about it:
I really enjoyed talking to Dan this week, and we had enough people attending to keep the conversation lively. I really hope I can keep this going indefinitely.
A smart rant about stupid fascists
Catherynne Valente is truly unique. She’s a science fiction writer, but her writing style is all her own. It’s hard to describe, but if pressed I’d have to say it’s very dense, full of exotic metaphors and descriptions, and filled with amazing amounts of bile directed at people who deserve it. I realize that doesn’t really describe it at all, but it’s the best I can do at the moment. This week she released a free article on her Substack. It’s called There’s No Such Thing As A Smart Fascist, and it’s simply brilliant.
I linked it above and added the link to that image. Please give it the time and effort it deserves. You won’t be sorry.
Pride Month
Sharat Chandler (a leading member of the developer advocacy team at Oracle) tweeted this:
I don’t know how Oracle really feels, if you can even apply that notion to a company rather than an individual. There’s no doubt that many companies this year are retreating from what is often called Corporate Pride, where they act like they support the LGBTQ+ community if it helps their marketing, but back off at the first sign of pressure.
Rainbow capitalism raises questions about corporate commitments and Pride Month’s purpose (on PBS)
Pride month was once an easy win for brands. Now, the stakes are much higher (on CNN)
Culture wars test corporate America’s commitment to Pride month (from the Financial Times)
Companies pull back from Pride month after backlash and threats towards employees (NPR)
I could go on and on. Look, I get it. Corporate support for Pride was performative anyway. All they wanted was a market to sell to, and for a few years there was no real cost to doing so.
In the last several months, however, the anti-LGBTQ+ forces have gone way over the top, to the point of getting violent. Target supposedly pulled some items and moved the rest to the back of the store because products were being destroyed and employees were being harassed.
How do you handle that sort of irrational violence when you can’t count on the authorities to be there, or even show up? Most companies aren’t willing to take that chance. Supporters of trans rights care and are generally willing to say so, but the opposing crowd is filled with just enough violent nut jobs that showing support can get legitimately dangerous, and it’s reasonable to assume some of those loons are armed. Then what?
As someone who grew up Jewish and spent way too much time reading about the build up to the Holocaust, the resemblances are scary. I wish I knew a good answer. All I can do is make sure that I, personally, stand with them in their fight for their rights, even simply to exist.
I do so not just because it’s the right thing to do, or because doing so fits my own beliefs and principles, but also because it is frankly inevitable that my turn will come. I mean, harassment of the Jewish community is already active in this country, but not nearly to the same extent and has not hit my area yet. But the more you tolerate intolerant people, the more awful they get, and I’m not letting that happen without a protest.
If nothing else, it’s worth bringing up the whole issue in my newsletter. To all my friends in the LGBTQ+ community, whether I know you or not and whether you are out or not, I welcome you and will support you in any way I can.
Exactly. “We the people” means everyone. I know it didn’t when it was written, but it should now.
Tweets and Toots
Let’s lighten things up, shall we?
Puns FTW
I don’t know. I hear the Soymilky Way galaxy has too much gas. (rimshot)
One Ring to Call Them All
When I flew back from San Francisco to Boston a few weeks ago, I tried to get an Uber ride from Logan Airport all the way to my home in Connecticut. That’s about 1 hour 45 minutes away. I had four drivers accept and then cancel on me when they realized I meant Marlborough, CT and not Marlborough, MA. Can you imagine getting a driver to take you to Mt. Doom?
This reply was great:
Sad Truth
Why not both?
(Yeah, I know. I’m not as obnoxious as Vizzini, I hope. At least I never got involved in a land war in Asia.)
Can’t Believe I Didn’t Think Of This
I’m still not willing to try an Impossible Burger. Sorry.
Science in Media
You mean it isn’t really like that? Aww.
(Don’t get me started on how IT professionals are portrayed on TV. Yikes.)
Really Geeky Joke
I’m thinking that in Java, that would be lambda expression of the form:
(double, double) → Toil.and(Trouble)
I’d like to use operator overloading on the right hand side, but that would require me to switch to Groovy and/or Kotlin.
I remember way back when Google was pretty good
Why ask why?
I’ve seen this sentiment expressed several times, but this is one of the best.
Finally, this bit of genius
Yes, that’s Seven of Nine to Five. (rimshot)
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:
Functional Programming In Java, on the O’Reilly Learning Platform (in the APAC time zones).
Week 1 of my Spring and Spring Boot in 3 Weeks course on the O’Reilly Learning Platform.
This week:
Week 2 of my Spring and Spring Boot in 3 Weeks course on the O’Reilly Learning Platform.
Functional Programming in Java, on the O’Reilly Learning Platform.
Making New Java Features Work For You, ditto, in the APAC time zones.
Did not see the Dolly joke coming.