Tales from the jar side: The Gemini rigged demo, the Gemini Java API (sort of), Java jokes, The kids are all right, and the usual assortment of tweets, toots, and skeets
I asked the librarian if she had the book on Pavlov's dog and Schrödinger's cat. She said it rang a bell but wasn't sure if it was there or not. (rimshot)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of December 10 - 17, 2023. This week I taught week 2 of my regular Spring and Spring Boot in 3 Weeks course on the O’Reilly Learning Platform, my Java Upgrade course as an NFJS Virtual Workshop, and gave the final exam in my regular Software Design course at Trinity College in Hartford, CT.
Here are the regular info messages:
Regular readers of and 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.
Google Launches Gemini with a Rigged Demo
On December 6, Google launched its long-delayed, long-awaited improved AI tool, named Gemini. The launch included a very impressive video, called Hands-on With Gemini: Interacting with multimodal AI, which showed how the AI tool reacted in near real time, identifying shapes as they were drawn, figuring out which game was being played as it was going on, and more.
Then a flurry of articles announced the demo was fake.
It wasn’t fake, exactly. It’s what we used to call in the IT world, rigged. All the time gaps were edited out to make it appear faster, additional text prompts were provided but not shown to make it do the right thing, and oh, by the way, the model being demonstrated isn’t available yet. Gemini is being released in three versions:
Nano, that will supposedly run on mobile devices,
Pro, which is supposedly competitive with ChatGPT 3.5 and available now, and
Ultra, the one that Google claims is even better than GPT-4, will be out Real Soon Now(TM), meaning next month at the earliest.
The collective memory in the IT space is notoriously poor, but this is one of the big reasons we all used to hate Microsoft. Any time someone released a tool that might compete with their Windows or Office monopolies, they announced a better, faster capability that would be build directly into their tools, available next month, or next quarter, or next year, or someday before the heat death of the universe. That was part of their Adopt, Extend, Extinguish approach they applied to all software from competitors. Nowadays, the giants are so huge they don’t have to play those games — they just buy the competition and kill off their products. Facebook does that all the time.
Google can’t buy OpenAI, however, since Microsoft owns about 45% of the company and other major competitors are also involved. Thus apparently the return of the rigged demo, whose purpose is to tell all their business clients that they don’t need to adopt OpenAI software now. Just wait a bit, and all your existing infrastructure will automatically get all these cool capabilities. Stick with us, and you’ll be fine.
This isn’t the 90s, however. People are a lot more suspicious of software companies now, with good reason. It didn’t take long (basically one day) for the discrepancies to be noticed and flagged. My favorite YouTube channel for AI news, Matt Wolfe, released two videos, back-to-back:
Gemini is Here! (And it’s better than GPT-4?), released December 7
Google Lied To Us! (And Other AI News), released December 8
I feel bad for Matt. He’s always so upbeat and positive about AI in his videos, and you can see how he feels so betrayed by Google in the second one.
According to the article in the Verge (“Google’s best Gemini demo was faked”):
Google says that the video “shows real outputs from Gemini,” which is true, and that “we made a few edits to the demo (we’ve been upfront and transparent about this),” which isn’t. It isn’t a demo — not really — and the video shows very different interactions from those created to inform it.
What happened to Microsoft, of course, is everybody stopped trusting them. In fact, everybody’s demos soon became suspect, and promises of upcoming releases were referred to as vaporware, a pretty common term in the industry now.
Google responded by claiming they were trying to inspire developers (yeah, right), and quickly moved on to other releases.
My own experience with Google’s AI tool had been confined to Bard, and it hasn’t been pleasant. In my experience, Bard tends to hallucinate (make up answers) more than the others, and it’s simply wrong way too often to be useful. I tried to use it in a project earlier this year because it was able to save results as Google docs, but the poor quality of the answers overwhelmed any usefulness. I eventually stopped using it and went back to Claude and GPT-4.
Still, Bard has been updated with Gemini Pro, so it’s supposed to be much better. It is able to search the Internet, though it’s stuck using Bing, so I asked it this:
Q. Why is the new Google AI model called Gemini?
A. “Google hasn't officially disclosed the exact reason behind naming their new AI model "Gemini," but there are several potential explanations that hold water:
Duality and Multimodality: Gemini, in Roman mythology, refers to the twin constellation Castor and Pollux, often depicted together. This could symbolize the duality and versatility of the new AI model, which can handle various tasks and modalities like text, code, audio, and images.
Collaboration and Teamwork: Another interpretation links the name to the collaborative effort behind the model's development. Google Research teamed up with other Google departments to create Gemini, reflecting the synergy of diverse expertise.
Stepping Stone and Evolution: In Greek mythology, Gemini is associated with the Dioscuri, heroes known for their bravery and swiftness. This could represent Google's view of Gemini as a significant leap forward in AI technology, paving the way for further advancements.
Openness and Connection: Gemini can also symbolize openness and connection, as the twins Castor and Pollux were known for their strong bond and willingness to help others. This might hint at Google's aspiration for Gemini to be a widely accessible and beneficial tool.
“Ultimately, the precise reason behind the name "Gemini" remains somewhat shrouded in mystery. However, the potential interpretations offer an interesting glimpse into Google's possible intentions and the values they associate with their groundbreaking AI model.
“It's worth noting that Google hasn't officially confirmed any of these interpretations, so the true meaning behind the name might be something entirely different.”
Lol, and I repeat, lol, especially on the “openness and connection” idea.
The Gemini Java API, such as it is
Still, a few days later they released a programming library (an API) for the Pro version. All you need to do is generate a key, and as long as you don’t exceed 60 requests per minute, it’s free.
Here’s a listing of the “Quickstarts” on the documentation page:
Python
Go
Node.js
Web
Swift
Android
Android (on device)
REST API
Both Node.js and Web involve JavaScript. Android works with Kotlin, but only if on mobile (I tried downloading just the library dependency in a local, non-Android Gradle build, but it didn’t work).
Conspicuous by its absence, at least for me, is any mention of Java. They did provide a REST API, however, and that’s enough to make progress.
I’m working on a video about it, but the basic idea is that I map the input and output JSON requests and responses to Java records (and, as it turns out, sealed interfaces), and use Spring to handle the networking and included JSON parsing. I had the basic case working quickly, but I spent a couple days playing with it and improving the results. You can see the results when the video is released this week.
Just after I finished tinkering (I’ll come back to that term), my good friend Guillaume Laforge released a new blog post entitled, Get Started with Gemini in Java. He said he “had the pleasure of working on the Java samples and help with the Java SDK,” and included some sample code in his post.
Huh? I thought there wasn’t a Java API. Well, there is, and there isn’t. Here’s his reply when I asked about it:
In other words, if you want to use Java but you’re not willing to incur the additional cost and complexity of Google’s cloud environment, then you’re just a tinkerer rather than a serious developer. Too bad. Sucks to be you.
Let me be clear about this: Guillaume Laforge is awesome. He’s the former head of the Groovy project, and has done more to help the developer community than any ten other developers. He’s ten times the developer I will ever be. But he works for Google now, and, unsurprisingly, he apparently would like to keep his job. When I objected to the tinkerers designation for those of us who don’t want to pay for Google’s cloud environment (and therefore are unworthy of Google’s respect), he understandably didn’t respond.
I should probably compare the Java API I came up with to the one they provide. Maybe I will. Maybe instead when I make my video I’ll focus on the process rather than the results, because I think the process I followed is really useful. We’ll see.
One last point: Does this experience mean I no longer trust Google? Of course I don’t trust Google. I don’t trust any of those giant behemoth tech firms, who are all only after those sweet, sweet subscription dollars. I certainly don’t trust Apple, whose staggering levels of secrecy resemble the Politburo at its height, and has decided that every app on iOS owes them 30% of its revenue, forever, simply for existing. Facebook? Facebook is my current example of complete amorality — they don’t have morals at all other than expansion. They’ll do anything, to anybody, for as long as they can get away with it, and when they get caught they’ll issue a non-apology apology and then try to work around it. Amazon sees its mission as taxing all ecommerce on the Internet, and will destroy any company that gets in its way. All of the big tech firms are evil, in one way or another, but they’re also inescapable, at least in my field, if I ever want to get anything done.
Welcome to late-stage capitalism. Thanks for coming. That’ll be at least $10 to $20/month.
(Not for this newsletter, though, at least not yet. :)
Kids Doing Remarkably Well
I used to include a fair amount of chess news in the newsletter, but I haven’t been as engaged in it as I was before for a variety of reasons. I do want to mention, however, a rather remarkable result:
Kind of says it all, doesn’t it? English player Bodhana Sivanandan placed 73rd in the European Blitz Championship, with a performance rating of 2316 and gained over 100 rating points in the process.
She’s eight (8!) years old. That’s incredible. She’s better than Magnus Carlsen was at that age, though it’s tough to compare kids given how quickly they change. By all accounts, she’s amazing and will only get better. Everybody raves about the current generation of Indian kids, like Gukesh, Erigaisi, or Praggnanandhaa, who play for India. Prag’s sister made the Candidate’s Matches for the women’s title next year. This little girl (literally) plays for England and is nearly a generation behind them. Wow. Probably worth keeping an eye on her.
As for young athletes in more traditional sports, don’t forget about Rose Zhang, who is basically the Tiger Woods of the LPGA. Just like Tiger, she left Stanford after winning everything there was to win, and has already won on the LPGA tour and been in contention in a major. Again, she’s only going to get better.
Just thought you might like to know.
Java Jokes on a Final Exam
My Software Design course at Trinity College ended on Friday night with the final exam. As the students were working, I posted this:
Picasso’s favorite Java keyword is, of course, abstract.
I got a couple of awesome replies, however.
Took me a minute, but I eventually realized that Yoda’s favorite keyword is do, and his least favorite is try, as in, Try not! Do, or do not. There is no try.
Here’s another excellent reply:
Lol. Stuart wasn’t done, however:
The Jung reference was pretty obscure, but of course Thomas Hardy wrote The Return of the Native. Next year I have to include the Superman and Marx references.
Btw, all the students taking the exam got that question right.
Tweets, Toots, and More
Notable NBA statistic
On Friday, I saw this statistic and forwarded it to my son, who is a huge NBA fan:
In their last 55 games, the Detroit Pistons, the San Antonio Spurs, and the Washington Wizards are a combined 1 - 54. That single win was when Washington beat Detroit.
Of course, that night, San Antonio went out and beat the LA Lakers. That is yet another reason not to bet on basketball, or sports in general.
Mr. Swift
I don’t normally like linking to the hellsite that was twitter, but this is too fun to ignore:
Here’s the direct link. If you don’t want to click, the camera shows Taylor Swift in the stands, and Romo refers to her as “Kelce’s wife, Taylor Swift.”
Um, not yet, Tony. Not. Yet.
I hold to my prediction that I made about a month ago that if the Chiefs make the Super Bowl, Kelce will kneel in front of her at halftime and ask her to marry him on live TV, and she’ll say no, causing the entire Internet to melt down. There’s simply no coming back from that. We’re right on schedule.
Tis the season
According to The Lord of the Rings wiki, the Istari was the Order of Wizards that included Gandalf, Saruman, Radagast, Alatar, and Pallando. I definitely had to look that up. The rest I knew, though I never actually read the Silmarillion.
Another seasonal post
and yet another:
Works for me.
Tis the season for cats, too
On a related note:
Dogs should be included too
That got dark quickly
At least there was nothing about dysentery.
Billy Joel reference
Seems obvious in retrospect.
Do want to build a snowman?
Finally, there’s this:
Inspired.
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:
Upgrade to Modern Java, an NFJS Virtual Workshop
Week 2 of Spring and Spring Boot in 3 Weeks, updated for Spring Boot 3.2, on the O’Reilly Learning Platform
Software Design, my course for undergrads at Trinity College final exam.
This week:
Week 3 of Spring and Spring Boot in 3 Weeks, updated for Spring Boot 3.2, on the O’Reilly Learning Platform
Practical AI Tools for Java Developers, an NFJS Virtual Workshop