Tales from the jar side: LangChain4j webinar, Silly AI tricks, My romantic video, Buckaroo Banzai, and the usual silly tweets and toots
If a canoe turns upside down in the water, you can safely wear it on your head. It'll be capsized. (rimshot)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of August 11 - 18, 2024. This week I taught a two-day private course on upgrading from Java 8 to 17. I also gave a webinar on LangChain4j.
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.
LangChain4j Webinar
On Friday, I gave an online webinar for No Fluff, Just Stuff called LangChain4j Quickstart. Here is the web page, and if you log in or register, you can watch it for free.
I didn’t use a lot of slides, but if you want to see them, here is a link to the Google Slides document. That’s a new approach for me. Usually I download the slides in pdf form and put them in my DropBox, but it’s probably easier just to share out the Google Slides presentation directly and make so anyone with the link can view them. Let me know if you have a strong preference either way.
The webinar went well, though I went longer than expected. We started at 1pm Eastern time, and I tried to end 10 minutes after 2pm, but a few people stayed and asked even more questions.
The highlights of LangChain4j, at least for me, are:
The ease in connecting to any of the major AI models.
How simple it is to use what they call AI Services, where you simply define an interface and LangChain4j implements it in a generated class.
The ability to return records or POJOs from those service methods without doing anything special.
The tool support / function calling, where I can supply methods for the AI tool to invoke at the right time and it all works automatically. One example I used was to access the Open Exchange Rates service to download the exchange rates for the current day, and then have the AI tool compare prices from around the world for a given product. I supplied the prices, btw, by looking up the product on various Amazon.com web sites around the world. The AI converted them all and compared them.
The RAG example I did was easy as well. I gave LangChain4j a pdf of my Mockito book (Mockito Made Clear) and asked questions about it, which worked well enough.
On Thursday, Aug 29, I’m giving a half-day NFJS virtual workshop on LangChain4j, in case anyone is interested. Unlike the webinar, that’s not free, but it is only four hours long. If you decide to attend, be sure to say hi.
Silly AI Tricks
Humor is a high-risk / high-reward addition to any training activity. When people are confused, they don’t want to hear jokes. On the other hand, humor immediately gets people’s attention and keeps things from getting too boring. In a webinar, I figure it’s basically okay, because it’s really a giant demo rather than a training course.
With that in mind, I wanted to illustrate how any time you access an AI tool programmatically, each request is independent of all the others. That’s different from the web sites, btw. If you go to chatgpt.com, or claude.ai, or gemini.google.com, or any of the others, you can have a conversation with the AI tool that remembers the previous questions and answers, within limits. That’s not true programmatically. In code, you have to re-submit all the old question/answer pairs each time if you want the tool to “remember” what you just discussed.
Many times you can live with that.
Here’s the first response:
[Your Name]
[Your Address]
[City, State, ZIP Code]
[Email Address]
[Phone Number]
[Date][Hiring Manager's Name]
[Company's Name]
[Company's Address]
[City, State, ZIP Code]Ahoy, [Hiring Manager's Name]!
I be writin' to ye with the wind in me sails an' a hearty passion fer joinin' yer crew as a Java Developer in yer grand AI department. With many moons o' experiencin' the high seas of Java programming, I reckon I be the right matey to navigate the uncharted waters of artificial intelligence aboard yer fine vessel, [Company's Name].
I’ve weathered many a storm, havin' wielded Java like a trusty cutlass fer over [X] years. Me adventures include buildin' robust systems, craftin' intricate algorithms, an' plunderin' vast datasets with the precision of a seasoned buccaneer. While I be a Java developer by trade, I’ve got a compass that's always pointin' towards AI, an' I’ve been chartin' courses through machine learnin' frameworks like TensorFlow an' PyTorch, an' dabblin' in natural language processin' an' computer vision.
In me last port o' call at [Previous Company’s Name], I led a crew of developers on a quest to optimize a recommendation engine, resultin' in a treasure trove of a 30% increase in user engagement. I be certain that me skills in Java, paired with me fervor fer AI, will make me a valuable asset to yer team.
Why be I so keen to join [Company's Name]? Well, yer reputation in the AI realm be legendary, an' I be eager to contribute to such groundbreaking endeavors. I be drawn to the challenge of pushin' the boundaries of technology, an' I thrive on teamwork, innovation, an' the occasional grog to celebrate our victories.
Enclosed with this missive ye’ll find me resume, which be brimming with the details of me exploits an' accomplishments. I’d be honored to parley with ye further about how I can be a part of [Company’s Name]'s journey towards AI excellence.
Thank ye fer considerin' me application. I look forward to the possibility of sailin' under yer flag an' workin' together to conquer new horizons.
Fair winds and followin' seas,
[Your Name]
P.S. If ye be needin' anythin' else, don’t hesitate to send a message in a bottle or give me a hail at [Phone Number] or [Email Address]. Arr!
That’s a bit more than I intended, but okay.
Here’s the answer to the second question:
Subject: Request for Medical Exemption to Work from Home
Dear [Boss's Name],
I hope this message finds you well. I am writing to formally request a medical exemption to work from home due to a health condition that has recently come to light.
After consulting with my healthcare provider, I have been diagnosed with a severe form of stress-induced allergic reaction that is specifically triggered by prolonged exposure to traffic. This condition significantly impacts my ability to commute to the office without experiencing adverse health effects.
To manage my condition effectively and maintain my productivity, my healthcare provider has recommended that I work from home. This arrangement would allow me to avoid the triggers associated with traffic, thereby ensuring that I can perform my duties without compromising my health.
I am fully committed to maintaining the high standards of work expected from me. Working from home will not affect my ability to meet deadlines, attend virtual meetings, or collaborate effectively with the team. I have a reliable home office setup and am confident that I can perform all my tasks remotely.
I have attached a letter from my healthcare provider that outlines my condition and their recommendation for a work-from-home arrangement. I am happy to discuss this further and provide any additional information you may need.
Thank you for your understanding and consideration. I look forward to your response.
Best regards,
[Your Full Name]
[Your Job Title]
[Your Contact Information]Attachment: Medical Recommendation Letter
Promising the medical recommendation letter might be tough, but hey, maybe the AI will be able to do that for me, too.
(As an aside, whenever I see phrases like, Dear [Boss’s Name] or Best regards, [Your Full Name], all I can think of is, “Dear Mr. Kotter, Please excuse Juan Epstein from…” and “Signed, Epstein’s Mother”. I guess it’s a generational thing. Now I’m going to try to get out of my head Freddie “Boom Boom” Washington, Vinnie Barbarino, or the horrid laugh of Arnold Horshack. See this page for details.)
LangChain4j makes configuring memory easy.
That code tells OpenAI (GPT-4o in my case) to remember the last 10 messages. I could also set a max number of tokens instead, but this works well enough.
Given that, I had the following conversation with the AI:
Me: What are the FAANG companies?
AI: The term "FAANG" is an acronym that refers to five of the most prominent and high-performing technology companies in the U.S. These companies are:1. **Facebook** (now known as Meta Platforms, Inc.)
2. **Amazon**
3. **Apple**
4. **Netflix**
5. **Google** (now under the umbrella of Alphabet Inc.)These companies are known for their significant influence on the technology sector, their large market capitalizations, and their impact on the stock market. They are also often cited as leaders in innovation and technological advancement.
Me: Are they called that because they are run by vampires?
AI: No, the term "FAANG" does not have any connection to vampires. It is simply an acronym created to refer to five of the most influential and high-performing technology companies in the stock market. The term was popularized by investors and financial analysts to easily reference these companies due to their significant impact on the tech industry and the overall economy. The names represent the initials of Facebook (Meta), Amazon, Apple, Netflix, and Google (Alphabet).Me: Do any of them have offices in Transylvania?
AI: As of my latest update, there is no widely known information about any of the FAANG companies—Facebook (Meta), Amazon, Apple, Netflix, and Google (Alphabet)—having offices in Transylvania. These companies typically have a significant presence in major global cities and tech hubs, but Transylvania, which is a historical region in Romania, is not commonly recognized as one of those key locations. However, these companies do have a global presence, and it's always possible for them to expand to new regions as their businesses evolve.Me: Have any of them worked with Tom Cruise? Everybody knows he's a member of the undead.
AI: There is no evidence to support the humorous claim that Tom Cruise is a member of the undead. However, Tom Cruise, being a prominent actor, has had various associations with media and technology companies, including those in the FAANG group, mainly through their entertainment and streaming divisions.For example:
- **Netflix**: While there isn't a well-known Netflix original featuring Tom Cruise, Netflix does stream many movies, and it’s possible that some of his films have been available on the platform at different times.
- **Apple**: Apple has been expanding its entertainment arm through Apple TV+. Although, as of my last update, there hasn't been a partnership announced between Tom Cruise and Apple TV+, it remains a possibility for future projects.
- **Amazon**: Amazon Prime Video might have streamed some of Tom Cruise's films and could potentially collaborate with him on future projects.
- **Facebook (Meta)** and **Google (Alphabet)**: These companies are not primarily focused on film production, but they do have platforms (like Facebook Watch and YouTube) that host a variety of video content, including trailers and promotional materials for movies starring Tom Cruise.
While there’s no direct, specific collaboration that stands out between Tom Cruise and any FAANG company, his work in the entertainment industry naturally intersects with these firms' media platforms and services.
Me: Let's focus on Amazon. Give me ten potential names for an Amazon division, based in Transylvania, that is run by vampires.
AI: Sure, here are ten playful and imaginative names for an Amazon division based in Transylvania that is run by vampires:1. **Amazon Nocturne**
2. **Transylvanian Prime**
3. **Vampire Ventures**
4. **Eternal Echo**
5. **Nightshade Nexus**
6. **Bloodline Logistics**
7. **Shadow Shipment**
8. **Dracula's Dispatch**
9. **Moonlit Market**
10. **Crypt Commerce**These names blend the mystique and allure of vampire lore with Amazon's recognized branding and operational themes.
You get the idea. Keep in mind that AI tools are notorious for lacking a sense of humor, nor do they “get” irony. They can, however, be unintentionally hilarious. I also imagine you’re not surprised my webinar ran long.
My wife’s status
I mentioned last week that my wife had knee-replacement surgery about 10 days ago. I want to thank all of you who reached out to me about it. She’s recovering nicely, thank you very much, though I think she’s getting tired of how long it’s taking to heal and get rid of the pain. The physical therapist is very happy with her progress, and she’s seeing her doctor for a follow-up exam this week.
This process overlapped her birthday, and that reminded me of the video I made for her back in 2016:
I went to a real studio and recorded a couple of karaoke tracks and added a slide show on top. Many of my friends have already seen the video, but if you’re interested, here we are.
We will celebrate our 34th anniversary in October, assuming I don’t accidentally bump her knee before then. I’m pretty sure if that happens (1) the response would not be pretty, and (2) no jury would convict afterwards.
Tweets and Toots
Tabs, or Spaces?
Yup. I use a tool called Workona, which helps. More honestly, I have a tool called Workona, which I mostly forget to use, and therefore have multiple browser windows filled with tabs on most of my virtual screens. Sigh.
In praise of older women
Amazing how JD Vance constantly manages to say offensive things. I’m certainly not going to repeat the idiotic comment that triggered this response, but any excuse to reference Chrisjen Avasarala, Secretary-General of the United Nations, from the TV show The Expanse is a good one. Avasarala was played by the brilliant Shohreh Aghdashloo. I’d follow her anywhere.
Buckaroo Banzai
Here’s the direct link to that post, just so you can listen to and watch the closing credits music.
I could go on and on about that movie, but I’ll just say I first saw it in a largely empty theater in Princeton, NJ, and when one of the evil black lectroids said, “red lectroid thermopod radiation detected back on Rt. 3!” I knew exactly where he was pointing.
It looks like I’ll never get the chance to join Starfleet, but I still haven’t quite given up hope of being a member of the Hong Kong Cavaliers, or at least a Blue Blaze Irregular.
I guess it’s more likely I’ll finally buy a Yoyodyne Propulsion Systems mug.
The Adventures of Buckaroo Banzai: Across the 8th Dimension is still one of the greatest sf/f movies ever made.
(I don’t yet have that mug because my wife has a rule that any time I buy a new mug, I have to get rid of an old one, and that’s a not easy.)
Should ChatGPT write that for you?
Send in the clown
Twitter released a new version of its Grok AI tool this week, and supposedly you can use it to make images that no other AI tool will allow. This one, for example. That’s not remotely worth getting a paid account on Twitter (nothing is), but I like the result.
Yes, I get that
Have a great week, everybody!
Last week:
Two-day private class on Java upgrade from 8 to 17.
NFJS webinar on LangChain4j
This week:
Java Upgrade course as an NFJS Virtual Workshop
Thanks! The PT she saw today was very happy with her progress.
As for the videos, I've decided not to take the time needed to make the newsletter videos, at least for the moment, but more technical videos are coming. In fact, I have one planned for tomorrow. :)
Best wishes to you and Ginger.
Soon, you'll be dancing again.
Miss the videos, but understand.