Tales from the jar side: GIDS Java, Fun with Phones, and Video Royalties
The calm before the storm, which hopefully will only be a brief shower
Welcome to Tales from the jar side, the Kousen IT newsletter, for the week of October 25 - November 1, 2020. This week I taught a course on the O’Reilly Learning Platform on Mockito and the Hamcrest Matchers and an NFJS Virtual Workshop on Functional Modern Java, and then did another of my private Kotlin for Android Developers courses.
GIDS Java This Week
Let me start with an upcoming event. This week is another session of the Great International Developer Summit series, all of which have moved online. Originally I was supposed to be in Bangalore, India, in September, and Melbourne and Sydney, Australia, in October for this series, but you know how that turned out.
This week is the GIDS Live Java event. I am scheduled to give two talks and a workshop:
Groovy 3: All The Major New Features, 4th Nov at 19:00 EST (50 min)
Kotlin: Coroutines And More, 5th Nov at 06:00 EST (50 min)
Kotlin Basics and Beyond Workshop, 5th Nov at 19:00 EST (3 hours)
The GIDS conferences are extremely well managed and well attended, and I’m looking forward to my presentations, even if they are at odd hours for me in order to accommodate the Asia/Pacific time zones. November 5th is going to be particularly challenging, because I have a talk at 6am, then day two of my private Kotlin for Android Developers class from noon to 7pm, and then roll right into my Kotlin workshop from 7pm to 10pm immediately afterwards. That ought to be fun. But as they say, if it was easy, anybody could do it.
If by some chance you are able to attend the conference, please say hi while you’re there. :)
Phone Issues
I lost a lot of time this week to an unexpected problem. I noticed a few weeks ago that I was having trouble adjusting the volume on my phone (a Pixel 3 XL from Google by way of Verizon). That problem got worse and worse until I then unable to even trigger the power on and off using the button on the side.
As it turned out, my phone had fallen victim to a relatively common problem: a swollen battery.
Not mine, but similar
This is a dangerous situation, because every time you charge the phone you make it worse. I found out that I needed to avoid using my wireless charger, because that has the side effect of making the battery particularly hot, but I could still charge the phone other ways.
I was already planning to replace the phone, but I wanted one of the new Pixel 5 phones that hadn’t yet been released. I visited the Verizon store in Glastonbury, CT (my new local one in Marlborough was worthless), I found out that because I already pay for insurance on my phone, I could put in for a warranty replacement, which I immediately did. The Pixel 5 phones were scheduled to be released at the end of October, so I only needed the replacement for a week or two, but still I figured it was worth it.
The replacement came on Monday (which was really fast), but then I ran into a different problem. As you may realize, I’m both an individual and a one-person company, and apparently in the time since I bought my last phone Google started separating those profiles. I wound up with lots of apps in my personal profile that couldn’t use my professional email address for logging into existing accounts, and professional apps where I couldn’t use my personal email. It was an absolute mess.
In the end, I finally managed to turn off mobile management for my organization, which Google strongly discourages but was causing all this chaos. Unfortunately, that has no effect on my existing phone unless I do a factory reset, and I’m not going through that again now that I’ve sent back the original. I’ll just have to live with the current mess until I get my new phone in a week or two.
I understand why Google did this. They’re trying to appeal to businesses, and businesses want control of their data and any mobile devices that access it. But I’ve been using my professional email address for virtual everything for years, and that’s a disaster from their point of view. So in the end it cost me lots of time and effort. Hopefully when I get my next phone, I can avoid all that. We’ll see.
Royalties And More
My royalties report for my O’Reilly books and videos came out on Friday. The report is issued monthly but is always one month behind. This being November 1, the current report is for September.
The results rarely correlate to anything that makes sense, because they are so heavily dependent on the O’Reilly Learning Platform in ways that even the insiders I talk to at O’Reilly can’t explain.
Parts make some sense. I have a couple of books published by O’Reilly, and the royalty report lists a “Unit Sold” column. Those I understand. In September, my Kotlin Cookbook sold 19 units, Modern Java Recipes sold 15, and even my older Gradle Recipes for Android sold 3, netting me a tidy $9.28. (The first two were worth about $200 and about $100, respectively.) Those numbers are modified by whatever happened on Safari, and of course that part is a mystery.
(On an unrelated note, my first book, Making Java Groovy, published on Manning, also sent me a royalty report this week. That report was for the second quarter (not just month) of 2020, and I earned about $15. Not bad for a book published in 2013 though.)
That problem is particularly severe, however, when I look at my recorded videos. According to the report, I have the following videos available, in descending order of how much each made in September:
Spring Framework Essentials, 2E
Spring Framework Essentials, 1E
Reactive Spring, 2E
Gradle Fundamentals
Advanced Java Development
Introduction to Groovy Programming
Mastering Groovy
Practical Groovy Programming
Managing Your Manager
Gradle for Android, 1st Edition
Understanding Java 8 Generics
Advanced Database Principles and REST in Grails 3
Learning Android
Working with Grails 3 Controllers and Services
Practical Android
Understanding the Grails 3 Domain Model
Starting a Grails 3 Project
Reactive Spring, 1E
Gradle for Android, 1E
That last one made a whopping $0.88. All of those Grails 3 videos were intended to be part of a single course on Grails 3, and they got split into multiple offerings for reasons my editor at the time was never adequately able to explain, but so be it. Also highly confusing is the fact that Gradle for Android shows up twice. One is a video and one is … also a video? But different? I don’t quite understand it, but since combined they’re worth less than $35 this month, it doesn’t seem worth resolving.
Since I didn’t attach any numbers to that list, I need to tell you the significant result — the Spring Framework Essentials video listed at the top is worth more than the entire rest of the list combined, including the first edition of that same video. Seriously. That’s true every month as well. If you combine it with the first edition, royalties from that course dwarfs everything I’ve done before or since.
They say the movie industry is driven by the hits, meaning a single hit movie pays for all the others produced by the studio that year. That’s certainly true in my case. If I had recorded nothing other than that one video coure, and written no books at all, my royalties would be almost the same as they are now.
Of course I didn’t know that at the time. I just knew I wanted to make another video and I’d been teaching Spring for years. I was confident I could put together something interesting. But nothing about that particular situation stood out. It wasn’t obviously different from any of the other recordings. It simply turned out to be the right topic at the right time, presented in a way that a lot of people found appealing (it has 57 five-star reviews) and continues to do well to this day. I’m glad, but still kind of mystified.
There is, however, one other notable video on that list that I want to discuss: the one called Understanding Java 8 Generics. One of my students this week mentioned watching it, which is pretty cool, but there’s a story behind it.
While I was writing my book Modern Java Recipes, I kept running into the fact that the JavaDocs (the library documentation) for the language made much more extensive use of Java generic types than before. Generics were introduced way back in Java 1.5 (circa September 2004), so they were and are well established. I was struggling with them, though, for anything beyond the basics. By the time Java 8 was released (about March 2014), the docs themselves had become almost unreadable. Check out these monsters from the java.util.stream.Collectors class (the generic types are the capital letters inside angle brackets, like <T>).
Seriously, what the what? The return type on the first groupingBy method has five (five!) generic type variables in it, plus a question mark. The function itself uses both super and extends, making them “bounded” wildcards as well.
I decided that if I was going to write a book on Java 8, it was high time I dug into generics enough to understand them, or at least enough to read the documentation. I set aside three days to do it, figuring it was all established material by now, so how hard could it be?
Two weeks later I was still uncertain, though I understood the basics. I decided to write up the results into an appendix for the book (which worked, mostly). Also, one of the lessons I’ve learned from my friend and fellow NFJS speaker Neal Ford is to try to get paid multiple times for the same work, so I proposed a video course on the same material for O’Reilly. That would make a nice synergy with the book, which they were going to publish later that year.
Back then they were letting me record videos on a regular basis in their studio in Boston, MA. We scheduled the recordings and I headed out there, though I wasn’t quite ready (what else is new?). I drove to the hotel in Boston Tuesday evening, figuring I’d finish the slides and record everything on Wednesday before heading home.
I didn’t mention the date yet. That night in the hotel was Tuesday, November 8, 2016. You may remember it. Like so many people, I’ll never forget it. Just to be clear, it was the last Election Day in the U.S before this upcoming week. I voted before I came to Boston. I planned to celebrate on the phone with my wife by 9pm or 10pm at the latest, and get back to work on my slides.
Yeah, as it turned out, not so much. I won’t rehash the results and likely causes here. I’ll just say that somehow I had to record my video course the next day, knowing that the video would likely be watched for years and that I couldn’t let on the magnitude of the disaster I knew this to be for the country I love show on my face.
Apparently I managed it, because nobody ever said anything to me about looking particularly shell-shocked in that video. I don’t think of myself as much of an actor (my wife has the real acting talent in the family), but that recording session was by far the toughest one of my life.
I haven’t watched that video since. That’s not all that unusual; I don’t make habit of watching myself. But every time somebody mentions that one course on Java Generics, all those feelings come flooding back. Ugh.
This week we finally get to change all that. I’m not going to encourage you to vote. I’m sure that all the readers of my newsletter are far more intelligent (and unquestionably far more good-looking) than the average person, and you know what the stakes are and what we’re up against. Personally, my vote will mean next to nothing, because (1) we already know how Connecticut is going to go in the presidential election, (2) we have no senate races this time, and (3) all of our house representatives are in safe seats. I’ll vote anyway, because of course I will. But then, like everyone else, I’ll be trying to survive the ensuing storm.
That said, let me make a couple of predictions, based on the pundits and sites I follow and all my years of election watching. Next week we can evaluate how well or badly I did.
We won’t know the results on election day itself because of all the absentee ballots, and many states (like Pennsylvania) prohibit starting the count before election day. That said, Florida and North Carolina are already counting the early votes, and if both go for Biden (as I expect them to), it’s over. We won’t know the definitive answer that night, but we will know a lot.
Regardless, Trump will declare victory and try to generate chaos, because that’s what he’s done his entire life. He wants controversy which he can blame for the landslide against him.
There will be incidents of violence, because Trump is encouraging them and the groups that favor him know they’re going down anyway. I believe, however, that the actual outbursts will be relatively few and far between, though they will get a lot of press.
Many, many court cases will be filed, on both sides, but almost nothing will make it to the Supreme Court.
Despite the mess, I fully expect that by this time next week, the magnitude of Biden’s victory will be so clear and so many states will have certified their results that it will be effectively over. It’s going to be ugly and nerve-wracking for a few days, but only for a few days.
The real question will be control of the Senate, and that’s where the voter suppression and intimidation tactics will occur the most. I believe the Democrats will win anyway. It’s not like everybody isn’t already expecting problems and preparing for them, and I’ve never in my life seen people care more about their votes than now.
I want to be like Princess Leia. She was the real hero of the entire series, and the very definition of lending privilege to those in need.
I think we’re going to be okay. It will be a struggle, but everything worth having is worth fighting for.
See you all next week.
Last week:
Mockito and the Hamcrest Matchers, O’Reilly Learning Platform
Functional Modern Java, NFJS Virtual Workshop
Kotlin for Android Developers, private class
This week:
Spring and Spring Boot, O’Reilly Learning Platform
Kotlin for Android Developers, private class
Managing Your Manager, O’Reilly Learning Platform
GIDS Java conference, presentations listed above