Tales from the jar side: Stupid AI Tricks, A Devin video rant, Java 22 is out, Open source drama, and the usual silly tweets and toots
Five out of six scientists agree that Russian roulette is harmless. (rimSHOT)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of March 17 - 24, 2024. This week I taught week 3 of my Spring and Spring Boot in 3 Weeks course and my Spring AI course on the O’Reilly Learning Platform, and my regular Large-Scale and Open Source Computing course at Trinity College in Hartford, CT.
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 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.
Stupid AI Tricks
At long last, I published that video on silly things large language models so when you ask them basic math questions.
I’ve been working on this video, off and on, for several weeks. The production values are decent, though I had to add a section after the initial recording that didn’t quite match the rest but explained the overall problem. I had to do that because I accidentally forgot to share the right screen when using Tella.
With Tella, you can share your entire screen, a single window, or even a single tab on Chrome. With my regular tool, Screenflow, I always share my entire screen. With Tella, I like the results better when I restrict it to a single window, but ONLY IF I REMEMBER TO SHARE THE RIGHT WINDOW. Grr. I wound up sharing the wrong window, or forgetting to share the screen at all, three times in two days. Grr again.
Anyway, there’s some good demos in this video. I used LangChain4j to access the LLMs via Ollama, which meant they were all running on my local machine. All I asked them was:
Sum the lengths of the words in the sentence,
“The quick brown fox jumped over the lazy dog”.
I did this with about 15 different models, ranging from llama2 to orca-mini to gemma, and chaos appropriately ensued, especially with small models like tinyllama. I finished the video on Tuesday, uploaded it to YouTube, and waited for the views to roll in. Several days later, the total is a whopping .. 34.
Huh? I figured this was just the sort of click-baity topic that would attract lots of viewers, but no. I didn’t announce it on social media, which was probably part of the problem, but usually the algorithm finds more of an audience than that. I thought the thumbnail was pretty good, too, but either I’m wrong or it didn’t matter.
My original plan was to make this the first of a series. Now I think not. Of course, maybe now that I’ve included it in a newsletter, the views will skyrocket, but I doubt it.
Devin the Destroyer
As a result of the poor performance of the AI tricks video, I decided to do something I’d considered but hadn’t done yet. Last week’s newsletter included a rant about Devin, the new AI tool from Cognitive Labs, which is supposed to be the world’s first AI software engineer. In last Sunday’s newsletter, I wrote rather extensively about it, and in the video I published on Monday I went into more detail.
Since the other video wasn’t performing, though, I thought I’d extract the video portion of last week’s newsletter video about Devin, add a bunch of video clips to it (what the professionals call B-roll), and release that. I even came up with what I thought was a clever title, namely, I Am Become Devin, the Destroyer of Software Jobs:
To my surprise, that video did a lot better. It’s got 77 views so far, which isn’t bad at all for just a few days, and that’s despite the fact that most of it was already included in the regular newsletter video.
I guess there’s a lesson there. When I go on a rant in a newsletter video, I should consider extracting it later in the week and publishing it separately. I already have a candidate for that: in a newsletter a couple of weeks ago I went on an extended discussion of the complexity of RAG, Retrieval Automated Generation. I’ll either extract that into a separate video, or maybe I’ll make a new one based on that. We’ll see.
Counting Wins
In the meantime, the Tales from the jar side YouTube channel achieved a milestone:
Cool. I still need a lot more watch hours to reach the YouTube Partner Program, but as the number of subscribers goes up, the watch hours accumulate more quickly. Funny how that happens.
Java 22 released
Java 22 was released on March 19, as part of the regular six-month release schedule for major Java versions. As usual, the awesome JVM Weekly published a special issue that went into details about all the changes, so if you want the real goods, take a look there.
For me, the parts that might change my coding (and, therefore, my future training courses) are:
Unnamed variables and patterns. That’s a pretty cool feature I liked in both Groovy and Kotlin. I’ve been missing that in Java.
The new string templates, which is still in preview mode. If they really do eliminate the template processors (the parts that start with “STR.”), I’ll be much more willing to give them a try.
Stream gatherers (again, still in preview) look cool, but I’ll have to see some examples to understand when they’re really helpful.
From what I saw in that JVM Weekly post, statements before this() and super() are a feature I didn’t realize I needed until I saw it in action. That, too, is another preview feature.
In fact, of the twelve new JEPs (Java Enhancement Proposals) added to Java 22, eight of them are in preview or incubators. The other released features (region pinning for G1, foreign function and memory API, and launching multi-file source code programs) probably won’t affect me much.
I must admit, I’m intrigued by the foreign function one, mostly because it’s held up as a possible replacement for JNI, the Java Native Interface. That brings back memories (no pun intended) for me. Way back in the late 90s, I was still at United Technologies Research Center. I had a project that was supposed to put a user interface on a statistical program that analyzed elevator performance data. Ultimately that meant putting a Java Swing user interface (!) in front of a Fortran program (!!), because that’s how they analyzed the data.
I asked DALL-E 3 to give me an image that illustrated the phrase, “you can’t get there from here,” and this is the result:
Um, okay. I had to connect Java to Fortran, and the only way to do it was to go from Java to C (using JNI) and from C to Fortran, and sadly C and Fortran index arrays in opposite directions (don’t ask). All I can say is that when I showed a demo to the client, it was a classic example of “it worked on my machine,” which I also just asked DALL-E 3 to illustrate:
Wow. Seriously creepy. I certainly didn’t see that coming, but my system was about that complicated at the time.
These days the continuation of the phrase, “it works on my machine” is: “Then we’ll ship your machine. And thus Docker was born.”
Don’t worry if you don’t get that gag. It’s pretty esoteric. But I know at least a couple of jarheads that will laugh at it, and thus my work is done, too.
To finish this section, I’ll wait a few weeks for all my tools (like IntelliJ IDEA and especially Gradle) to catch up to the new features in Java 22 before adopting it, but I’ll stick with Java 21 or even Java 17 for a while for anything real.
Open Source Drama
There’s an open source database product known as Redis. Redis, short for Remote Dictionary Server, is an open-source, in-memory key-value data store known for its speed and flexibility. It stores data in RAM, so it’s very fast and it’s great for caching data.
A friend of mine on the NFJS tour once told me a story about how they used it. They had a client who ran an e-commerce site that occasionally offered flash sales, meaning everything would be on a huge sale for the next twenty minutes. The problem is that the site would get overwhelmed during that time, and they didn’t want to pay Oracle the money it would require to scale up their databases to handle that load. So instead they purchase metric tons of RAM and added a huge Redis database to it, whose job was to record all the transactions that occurred during the sale. Afterwards, when everything calmed down, they could migrate the transactions into their regular Oracle back-end database.
This week Redis announced a change to their license.
Starting with Redis 7.4, Redis will be dual-licensed under the Redis Source Available License (RSALv2) and Server Side Public License (SSPLv1).
The open source community, predictably, lost their collective minds. The problem is that developers who are happy to contribute their work to an “open” model that benefits the whole community may be reluctant to add to a product being sold without paying them, crediting them, or even asking them for permission. On the other side, the owners and maintainers of the project hate seeing billion dollar conglomerates simply absorb their code into its own cloud environments without paying or barely even acknowledging the work of all those contributors. (I’m looking at you Amazon Web Services.)
For me, this is all a reminder that there’s always money involved somewhere in the system, even open source projects done for ostensibly altruistic reasons. Sometimes the compensation comes only in the form of prestige or tech cred and reputation, and that’s a good way to get started, learn your craft, and participate in an important project that involves really good developers who are making their own decisions about tools, processes, and technologies. A lot of my technical reputation started with the Groovy programming language. I wasn’t much of a contributor in terms of code (I have one — ONE — actual commit to the codebase, and as I recall, broke the build), but as the core team assured me, writing blog posts, articles, and books, running a podcast on Groovy, and making presentations about Groovy at conferences all count as contributions as well.
But if there are no actual dollars involved, nobody wants to do the stuff that nobody ever wants to do, like writing documentation, updating old code, solving annoying issues, and so on. Sometimes the money comes from companies directly sponsoring projects they use. Sometimes they pay their employees to work on important open source projects. Sometimes companies make money selling services, like training, customization, and consulting, around open source projects. As soon as there is money involved, however, there are going to be issues about fairness and compensation, and here we are yet again.
The typical way open source projects handle problems like this is to route around them. When Oracle tried to enforce ownership of the Hudson continuous integration server, the community make a fork, called it Jenkins, and went their merry way. Nobody uses Hudson any more, and eventually Oracle gave to the Eclipse foundation. Similarly, LibreOffice was created as an open source variant of Microsoft Office. GitLab is an open source rival to GitHub. And so it goes.
With Redis, it looks like there have already been several forks created, and we’ll just have to wait and see which one(s) are ultimately successful. In the meantime, we’re living in the midst of another case study for my Trinity course in Open Source Development.
Tweets and Toots
Use the force…
Okay, that’s funny. 😂
Science fiction vs fantasy
That’s getting to be an old gag, but it’s still true.
Beware the IDEs of March
I meant to include that last week, but as usual the newsletter went long.
Spot the Ejection
According to the linked article at NOAA, this is a “moderate” event and the public should not be too concerned. We could get some cool auroras pretty far south, though I doubt they’ll reach us here in Connecticut.
Spring is here!
Don’t worry, it’s good for them.
Hey, it was hard on all of us
I used to have hair like that. I think. It’s been a while.
Profound
Holy dichotomies, Batman!
Finally, a Dad joke
Have a great week, everybody!
The video version of this newsletter will be on the Tales from the jar side YouTube channel tomorrow.
Last week:
Week 3 of my Spring in 3 Weeks course on the O’Reilly Learning Platform
Spring AI, on the O’Reilly Learning Platform (APAC time zone)
Trinity College (Hartford) class on Large Scale and Open Source Software.
This week:
Gradle Concepts and Best Practices, an NFJS Virtual Workshop
Trinity College (Hartford) class on Large Scale and Open Source Software.