Tales from the jar side: AI books and my approach to them, Managing managers, and the usual silly tweets and toots (with some funny political ones)
Why don't pirates travel on mountain roads? 'Scurvy! (rimshot)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of July 21 - 28, 2024. This week I taught my Managing Your Manager course and my Reactive Spring course on the O’Reilly Learning Platform.
Regular readers of, listeners to, and 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 form:
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.
AI Developments, or, What Am I Doing, Anyway?
If you check the Tales from the jar side YouTube channel, you’ll see that my first few AI-related videos were published about a year ago. That’s when I realized all these cool AI tools provided REST-based web services, and if there’s one thing we know how to do in Java, it’s interact with REST-based web services. I started with a simple example of listing the available models at OpenAI, and everything flowed from there.
By about February of this year, I had over a dozen videos on assorted AI topics, ranging from chat to image generation to text-to-speech and more. By then I was convinced that my basic approach was a good one:
For any given service, map the input and output JSON structures to Java records.
Use a networking library (either in regular Java, or inside Spring) to transmit the inputs and receive the outputs.
Add a convenience class to make it easier for clients to work with the underlying system.
Point out that the combination of records, sealed interfaces, and pattern matching for switch meant that the systems I built were great examples of Data-Oriented Programming in Java, a paradigm shift starting to spread throughout the community.
I accessed every system that way: the various GPT models at OpenAI, their text-to-speech system, DALL-E and Stable Diffusion image generation, transcribing audio, working with Anthropic’s Claude and Google’s Gemini, the works. I even got to play with the Ollama system as an easy way to install and run AI models on your local hardware, thus avoiding all the security and privacy issues endemic to the commercial tools.
I knew there was a problem, though. Effectively what I was doing each time, was arguably the hard way to solve the problem. Along the way, at least two Java frameworks sprang up: LangChain4j and Spring AI, both of which did most of what I was doing, but were simpler to use and lots less work for their client developers. Both were very early in their lifecycle, meaning they were subject to significant changes with little notice. That’s just the nature of beta (and in this case, alpha) software: you have to expect version 1 of any product to change a lot, and neither framework was anywhere near version 1.
That said, I still knew I was in a race. In March I managed to convince the Pragmatic Bookshelf (publisher of my last two books, Help Your Boss Help You and Mockito Made Clear) that my approach was worthy of a short book, which I was confident I could crank out quickly. Still, this is a very rapidly changing field, and one potential author had already cancelled a book because events were moving too quickly. That was going to be an issue for me as well, though I believed what I was doing was sound, regardless of the details.
I therefore started writing, based on what I’d already learned from creating my videos. I made a lot of progress very quickly. In fact, by the end of April I had nearly seven of the originally planned nine chapters completed and figured I was on my way.
Unfortunately, progress since then has been steadily, inexorably, backwards. My original writing included a lot of weaknesses (like I have this really annoying tendency is write in passive voice, at least when I’m writing in third person), partly because I was just cranking out material based on what I’d learned, rather than thinking it all through from a reader perspective. I also didn’t follow the regular model the publisher uses, which meant I had to adapt to that. As it happens, I can’t revise anywhere near as quickly as I generate text. That was only part of the problem, however.
The other issue — that this field keeps moving at breakneck speed — is still a thing. Most of that has been helpful. The new image generators are way better than the old ones. Claude 3.5 and GPT-4o are far superior to their predecessors. Even Ollama, despite being only on version 0.3 (!) keeps getting better and better, and this week even added function calling to its API.
The frameworks keep moving, too, even though still neither of them is at version 1. LangChain4j has been the most stable. It’s at version 0.33, which sounds low, but I expect they’ll easily make their implied goal of releasing 1.0 by early October. The progress in Spring AI has been far more, shall we say, erratic. I don’t think they’ve hit a single announced deadline from the beginning of the project. Still, the online SpringOne conference is going to be at the end of August, and I’m sure they’ll announce something by then. Also, it turns out Microsoft has a framework called Semantic Kernel and released a Java-compatible version, though I’m not sure how that compares to their Azure AI services.
Worst of all, however, is that when I’ve presented my approach to developers at conferences, or in the chapters I prepared for our initial evaluation, they stubbornly refused to get excited about it. I mean, nobody disliked it, and some reviewers were complimentary, but they weren’t exactly jumping for joy (“The silver bullet! We’ve found it at last!”). That was not entirely unexpected, but still, I was hoping for more.
Also, to make life a bit more complicated, when I originally proposed the book I had no idea I was going to wind up with an actual full-time job* starting in September. I’m glad about that, but it’s definitely a complication.
(*Professor of the Practice of Computer Science and Associate Director of the Entrepreneurship Center at Trinity College in Hartford, CT; quite a mouthful)
So what’s the bottom line? I’ve had to reset more than once and change my approach. Now I think I have to include examples from both LangChain4j and Spring AI, just to show what’s coming. After all, it’s hard to advocate for mapping to records and sealed interfaces and pattern matching when LangChain4j can get you up and running in about ten lines of code. I’m not writing a book on either framework, but I can’t ignore them, either. The result feels like I’m back to the drawing board, again, and I’ve got about a month to get everything together in a decent form. The very idea makes me tired.
I’m certainly not giving up. I still feel I have something important to contribute, and I really like my approach as an example of Data-Oriented Programming that works with any REST-based API. Plus I’ve learned a ton about how these services work, and I want to communicate that. I don’t work for any of the major vendors, so I’m free to express my own opinions, and I’d like to believe they have value.
Hopefully this month was the nadir, at least from an emotional perspective. I’m sure a lot of what I already have is usable after I’ve massaged it a bit, and my schedule in August is flexible. Sure, it’s a lot, but as they say, if it was easy, anybody could do it.
(And where, exactly, is this anybody? Much like that stupid butterfly in China that keeps messing up our whether, we need to track them down and make them stop.)
Besides, it gives me a major task to focus on while I try to get through this election season, and that’s got to be a good thing. We’ll talk about it again in about a month and I’ll let you know where I am.
Managing Your Manager
I mentioned I taught my Managing Your Manager course again this week. It went quite well. There’s a lot of good material in that course, and in my book about it, though I must confess I always have this nagging worry in the back of my mind that what I’m saying isn’t right. I mean, it does come largely from my own experiences, which are colored by own biases and perceptions. I’ve tried hard to listen to people who are as different from me as I can find so I can take their feedback into account, but I still worry about how much I say so confidently is either wrong, or at least an oversimplification.
(Geez, it’s been a tough couple of weeks for my confidence level.)
Now that I’m joining a new organization, I have the opportunity to apply the principles I’ve learned there, and it took me less than a month to run into trouble. It’s mild and nothing I can’t handle, but that didn’t help my mood this week either.
Interview
That reminds me. I did an interview while at GIDS in Bangalore last April, and it’s now available:
The interview focused on my academic experiences and the social and technological challenges faced by current students. According to the description, the interview “explores the challenges of teaching in a male-dominated field, the significance of supporting underrepresented communities in tech, and the evolving landscape of AI and its impact on beginner developers.”
Let me know what you think, or if you disagree with everything I said. :)
Tweets and Toots
Training Grok
Apparently all your tweets are used for training Grok, the AI tool sponsored by Elon, and you’re opted in by default. I though it might be good to take advantage of that fact.
If you want those instructions, the original tweet is here.
Yeah, no
I mean, I laughed, but yeah, don’t do that. I doubt any jarhead would fall into that trap, but for those who might not know, “rm” is remove, the “fr” flags are “force” and “recursive”, you’re running it from root, and the “sudo” part means to use superuser privileges. In other words, assuming you have the rights to do it, this will wipe your hard drive clean. I’m sure you do regular backups, though, right?
I, too, am with her
I’m trying to avoid much politics in this newsletter, but it’s not exactly difficult to figure out where I stand in this battle for democracy itself.
On a related note:
I remember the disasters that accompanied VP picks Dan Quayle and Sarah Palin, and neither comes anywhere near the fiasco of JD Vance. The good news is that this will destroy his political career forever (assuming he loses).
Speaking of him:
Clever. One last meme:
I must admit, I am not brat. I can say, however, that now I know what color chartreuse is supposed to be.
Deadlock
Perfect. For those who have no idea what this is about, a deadlock occurs when one thread needs a resource held by a different thread, while that one needs a resource held by the first one. Neither can let go, and neither can proceed. Everything just stops. This Mastodon post is about the best illustration of that I’ve ever seen.
Holy Dad Joke, Batman!
Long way to go for that joke, but I’ll say it: Nailed it! (rimshot)
Earworm
Now get that song out of your head for the next hour or so.
Beep Beep!
I seem to vaguely remember an old Plymouth called a Road Runner, but I’m not going to argue with a bird.
It may not be chartreuse, but at least it’s green. Speaking of which:
Have a great week, everybody!
Last week:
Managing Your Manager, on the O’Reilly Learning Platform
Reactive Spring, on the O’Reilly Learning Platform
This week:
No classes! Lot of book writing.