Tales from the jar side: The Gateway software symposium, Genetic algorithms, and April Fools tweets
Dad joke: "I just burned 2000 calories in two minutes." "Wow! How did you do that?" "I forgot to take my brownies out of the oven."
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of March 27 - April 3, 2022. This week I taught my Deep Dive Into Spring course as an NFJS Virtual Workshop, and gave a lot of presentations at the first No Fluff, Just Stuff conference of the year in St. Louis, MO.
Regular readers of this newsletter are affectionately known as jarheads, and are far more intelligent, sophisticated, and attractive than the average newsletter reader. If you wish to become a jarhead, please subscribe using this button:
Gateway Software Symposium
I always have to look it up to be sure of the dates, but I’m pretty sure that while my first talks on the No Fluff, Just Stuff conference tour were back in 2008 and 2009, I only became a regular member of the tour in 2011. So depending on how you count it, this is either my 12th year on the tour, or maybe my 14th or even 15th. Any way you count it, it’s getting to be a lot.
This year’s live NFJS tour began last weekend, in St. Louis, MO. The Gateway Software Symposium, as it was called, was a hybrid affair, with both live attendees and a handful of remote participants who logged in to Zoom calls for each talk. On most of my talks, that meant I had around ten to twenty people in the room, and another handful on Zoom. Having a remote audience meant that I stayed sitting in front of my camera most of the time, rather than getting up and wandering around in front of the room. If you’ve been reading this newsletter, you may recall my health issues from a couple weeks ago, so sitting down the whole time worked out well for me.
The conference was a two-day version rather than three days, which meant there were five 90 minute talks each day. I gave what I call a Full Venkat, which meant I had a talk in every available slot. My friend and fellow speaker Raju Gandhi gave a Royal Venkat, which means he did the same and also gave the keynote address Friday evening.
(For the record, there’s only one level beyond that. At a Rich Web Experience conference a few years ago, both Nate Schutta and Venkat Subramaniam himself were scheduled to give a Royal Venkat. As Venkat tells it, several of the attendees asked him for more details about a particular topic, so he arranged an additional, informal talk with them as well, beyond the regular talks. Nate claims Venkat did that just so he could have more talks than Nate. Either way, that is the little-known Full Metal Venkat, not seen before or since.)
In St. Louis, I gave 10 talks, a few of which were divided into parts 1 and 2. The talks were:
Upgrade to Modern Java, a two-parter discussing the changeover to using the functional features in Java added back in version 8. That meant streams, lambdas, method references, the Optional data type, static and default methods in interfaces, and a few more smaller topics.
Java Testing, Part1: JUnit 5 and AssertJ, which is my regular JUnit 5 upgrade workshop with some new material thrown in on the AssertJ library.
Java Testing, Part 2: Mockito 4, which is about how and why to use Mockito to create mocks, stubs, and spies, for performing true unit tests.
Latest Features in Java, another two-parter that covered all the major topics added to Java from version 9 through 18, which was released last week. That meant collection factory methods, local variable type inference, the enhance switch expression, records, sealed classes, pattern matching, and lots more.
Help Your Boss Help You, the latest version of my Managing Your Manager talk based on my book of the same name.
Key Gradle Concepts and Practices, which focuses on import topics that involve the Gradle build tool.
Property-based Testing: Concepts and Examples, a new talk on Property-based Testing (PBT) that used the jqwik library to demonstrate how to automatically generate tests that verify your code is working correctly.
Genetic Algorithms for Evolutionary Computing, another new talk that reviewed the topic of genetic algorithms (GA) from artificial intelligence that finds the optimal solutions to difficult problems by using concepts based on biological evolution.
The first NFJS conference of the year always requires extra preparation, and this one was the first live NFJS conference since the pandemic started, with the exception of UberConf last year and a couple destination shows scheduled for December that didn’t include me.
The most stressful talks for me were the Mockito talk and the two new ones, on PBT and GAs. The Mockito talk has been completely rewritten, because I have a new book coming out soon on that topic. I have mixed feelings about how it went. I think my introductory example is still a bit too complicated, but in general it went well.
The PBT and GA talks were what I refer to as ambitious talks, because I propose them largely to learn more about the topic. I know something about the topic going in, but nothing motivates you to learn a subject like knowing you’ll be giving a public presentation on it soon. I played around with GAs back in the 90s, but haven’t used them since and really wasn’t an expert even then. I watched a presentation on PBT and jqwik about six months ago and wanted to learn more about the topic.
Another feature of the NFJS conferences is the Expert Panel, held before lunch on one of the days, where the speakers sit in front of all the attendees and answer whatever questions they might propose. I usually refer to it as the (Pretend to be an) Expert Panel, but we try to make it entertaining no matter how serious the questions get.
As an example, one person asked a question about the path to becoming a technical speaker. That prompted Raju to recall a story about how most normal people fear speaking in public more than they fear death, so at a funeral they’d rather be in the coffin than giving the eulogy.
Okay, that got dark. I admit I haven’t been nervous on the tour as a speaker for years, but I still get nervous when speaking in other, less familiar, settings. But I understand that we’re an unusual group.
Genetic Algorithms
I talked a bit about the subject in my last newsletter, but I wanted to mention again a good summary blog post about them. A Ph.D. student named Vijini Mallawaarachchi wrote a post on Medium about genetic algorithms recently, and while I liked the post, I really liked the figures she created to support it. While preparing my slides, I contacted her directly, and she was kind enough to give me permission to reuse them (with credit, of course).
Here’s one of her figures:
In this GA model, each gene holds a 0 or a 1. A string of genes is called a chromosome, and each chromosome is a potential solution to the optimization problem. The collection of chromosomes is called a population, and in GAs you evolve the population through many generations in order to find an optimum solution.
The right hand side shows the reproduction step, called selection and crossover. The fittest chromosomes are selected by some ranking. Then, after choosing a point along two chromosomes at random, the parents A1 and A2 swap their genes up to that point, creating two new offspring, A5 and A6 in the figure.
That idea led me to the questionable decision to tweet this:
Business Time is a perfect representation of Flight of the Conchords. I highly recommend it, partly because it’s good and partly because maybe that will finally get the song out of my head.
(“You know when I’m down to my socks it’s business time — that’s why they call them business socks.”)
After business time, all the chromosomes go through a mutation step, which randomly flips some bits from 1s to 0s or vice versa:
I can’t believe it didn’t occur to me until now to include a reference to the mutants in the movie Total Recall (the original from 1990 — not that appalling remake from 2010 — with a killer cast that included Arnold Schwarzeneggar, a very young Sharon Stone, Michael Ironside playing Michael Ironside as usual, Ronny Cox as a bad guy (just like in Robocop), and more).
I also decided, reluctantly, not to include an image of the mutants from the movie — you’re welcome — but here’s a Google image search for them if you have a morbid sense of curiosity.
The GA idea is to run each member of the population through an evaluation function to determine its fitness, then let the most fit reproduce, and repeat the process until it converges on an optimum solution.
It’s a pretty cool technique, but there are lots and lots of options that allow for tuning, and some people argue that if you have enough parameters, you can fit anything. That’s true, but if the fitness function is inexpensive and the search space is hilly (i.e., filled with local optima), it’s a good way to find a global optimum rather than get stuck in a local one.
For the more sophisticated examples, I used the Jenetics library, which is an open source implementation in Java. It’s incredibly powerful, and still a bit too complicated for me to understand well, but it’s free, it works, and it includes lots of examples.
One interesting thing about that library: one many open source projects, you’ll find most of the contributions are done by a small handful of developers, and on some projects, that might even be a single person. If you go to the GitHub repository for Jenetics, click on the Insights link and select Contributors, you get this page:
It’s an active project, but the #1 contributor is the jenetics GitHub account, with 10,635 commits, and the #2 contributor has only 9 commits, and #3 has only 2. Whoa. I suppose it’s possible that the jenetics account represents several people, but if you look at its details this is what you see:
It sure looks like a single person, but if he’s the leader of a team, why don’t the team members all have their own individual accounts and commit from there? That’s how most open source projects work. I suspect this one person really does do the bulk of the work, and the Jenetics project dominates his working life.
I was trying to understand his Knapsack example and how to retrieve the optimized items from the best phenotype (which I talked about in last week’s newsletter). I wound up contacting Prof. Wilhelmstötter via LinkedIn to ask him how to do it. I sent my question late at night in my time (Eastern Daylight Time). He’s in Austria, and by the time I got up in the morning, he’s already replied with a simple, workable answer. Nice.
Anyway, the talk went pretty well, though I expect to refine it as the year goes on. Only later did I discover that the open source Apache Commons Math project also includes classes to do GAs. Their listed example is a bit thin, but I’m going to have to try it out before I give this talk again.
The other new talk I gave was on PBT, which I still read as peanut butter testing, but I’ll discuss that in a future newsletter.
Tweet’s 'N Stuff
April Fools Jokes
Fortunately, the tendency of brands to create elaborate, not funny April Fools jokes seems to be dying down, but I really liked this one:
All you need to know is that lichess.org is a chess server whose code is open source, i.e., available to everybody at all times. Nicely done.
Twitter tweeted about an edit button, but I like Trisha Gee’s suggestion even better:
This, from Krispy Kreme, advertises a new perfume based on their donuts:
Yeah, I’d seriously consider that.
Speaking of smells:
Sour cream & onion body wash from Pringles? Yeah, no.
This was clever:
The accompanying text says, “Enjoy cleaner kitchen countertops with our new transparent range, with kettles, toasters, and blenders that really blend in. Functional minimalism at its very best.”
This was geeky, but I liked it:
Okay, that’s enough. As a final tweet, this one is the beginning of a thread that scans perfectly from the original Gilbert and Sullvan:
Have a good week, everybody.
As a reminder, you can see all my upcoming training courses on the O’Reilly Learning Platform here and all the upcoming NFJS Virtual Workshops here.
Last week:
Deep Dive Into Spring, an NFJS Virtual Workshop
The Gateway Software Symposium, the first live NFJS event of the year, in St. Louis, MO
This week:
Week 1 of Spring in 3 Weeks, on the O’Reilly Learning Platform
Managing Your Manager, on the O’Reilly Learning Platform
Spring MVC, an NFJS Virtual Workshop