Tales from the jar side: New Mockito video, CodeRanch appearance, Saving daylight at the South Pole, A blurry JPEG of the web, and Tweets and Toots
My wife said I was unnecessarily mysterious. OR DID SHE? (side eye, spooky music, eventually followed by rimshot)
Don’t feel like reading this newsletter? That’s fine — I’ll read it to you on the Tales from the jar side YouTube channel. Today’s newsletter is tomorrow’s video.
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of February 12 - 19, 2023. This week I taught Week 3 of my Android Development Bootcamp on the O’Reilly Learning Platform.
Regular readers of (and listeners to, and now 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.
New Mockito Video
On my companion YouTube channel I released a new video talking about the Mockito testing framework:
As you can see, the title is How Mockito Mocks Help. What wasn’t obvious to me, but may be clear to you, is that I totally missed the double meaning in the title. My intention, and what the video actually contains, is a demonstration of how mock objects generated by Mockito make your testing job easier. What I totally missed until later was that you can interpret the work mocks as either a noun (my intention) or a verb:
If mock is a noun, Mockito is generating mocks that help you.
If mock is a verb, somebody or something named Mockito is making fun of the help, which is totally not cool.
Sigh. If I’d realized the alternative meaning I would have changed the title. Oh well.
A few good things came out of this, however:
My son liked the thumbnail, meaning the cover image with me looking all thoughtful and everything.
My subscriber count is all the way up to 97. Hopefully my next video will somehow increase that past 100, a totally meaningless, but round, number. We’ll see.
(My friend Dan Vega recently celebrated a somewhat higher number:
Ironically, he neglected to add a link to his channel to that tweet. It appears I still have a ways to go. But, then again, haven’t been doing this very long. Sadly, patience is not my strong suit. In the meantime, feel free to watch Dan’s videos on everything Spring related. I certainly plan to do so.)
To be a bit more serious, I am planning to keep adding technical videos to my channel. I hope to add a few more Mockito ones in the coming weeks, probably a series on Managing Your Manager based on my Help Your Boss Help You Book, and maybe some Groovy and/or Gradle ones as well. I figure if I’ve already got blog posts on all these topics, I might as well make decent short videos on them. It’s like already having the script ready, though I no doubt need to update them and clean them up. We’ll see.
Appearance on CodeRanch
According to the statistics at the CodeRanch site, I’ve been a member there since September 18, 2002. I know that’s wrong, because its predecessor site was called JavaRanch, founded by (among others) Kathy Sierra and Burt Bates, and I used that site actively in the late 90’s when I was studying for my first Java certification. Still, that date does mean I’ve been there a while.
CodeRanch maintains a set of discussion boards on a wide range of topics, most of which are technical. As I implied, it started out as a certification study group, and then evolved into an overall discussion board. One thing they do is to run book promotions, where an author answers related questions for a week in one of their forums, and the site gives away four copies of their book at random to the people who ask questions. You can see the book promotion schedule here.
I’ve done that for all of my books, and this week was my week for Mockito Made Clear, in the Testing forum.
The marketing of that site has been rather underwhelming, however, and it’s been a little sad to see the number of participants drop over the years. This week I did receive a handful of questions, though not nearly as many as I might have liked. Still, I’m glad to participate and help support the site.
The only reason I didn’t bring this up in last week’s newsletter was that I completely forgot what week it was. Sorry about that. I’ve never been particularly good at marketing either.
The South Pole is on DST
(I know I’ve talked about this gag before, but I found a simpler way to express it. Plus, I’m thinking of turning this into a YouTube short. We’ll see.)
When I teach classes on Java, I try to include some material on the
java.time package, which was adapted in Java 8 from the existing Joda Time library. The problem with date/time discussions is that they can get very boring very quickly, so I like to bring up this figure, from the Wikipedia page on Time in Antarctica:
Those are the time zones in Antarctica. They say you can tell if someone is a developer by whispering the words “time zones” in their ear and watching a shudder going down their spine, but can you imagine having to deal with that mess?
The funny part doesn’t even jump out at you right away. The funny part is that the South Pole is part of that red-and-white striped section known as the Ross Dependency. The Ross Dependency follows the time zone rules for New Zealand. Recall that the South Pole day consists of six months of daylight followed by six months of darkness every year. But because of those time zone rules, that means that from September 25, 2022 until April 3, 2023, the South Pole is on Daylight Saving Time.
Seriously. Here’s a quick Java demo I like to show, using the
Of course the South Pole (or, more properly, the Amundsen-Scott South Pole Station) is currently on Daylight Saving Time. It’s the middle of Summer down there, so why not save that extra hour during the six months of daylight?
(The real reason they do this is to make communications between the station and their home base in New Zealand easier, but why spoil a decent joke?)
My favorite somewhat related obscure time zone fact, however, is that New Zealand also manages the time zone for the nearby Chatham Islands. Their time zone is officially UTC+12:45, making it one of only three time zones in the world with a 45 minute offset, the others being Nepal and an unofficial one in central Australia. I’m sure there’s a story about why this is, but I couldn’t find it. Let me know if you know and I’ll reference you in the video.
A Blurry JPEG of the Web
This week, The New Yorker published a fascinating article called ChatGPT is a Blurry JPEG of the Web, by Ted Chiang. You may remember him as the science fiction writer whose story Stories of Your Life and Others was adapted into the excellent movie Arrival.
Chiang makes many good points, but I want to highlight one of them. ChatGPT, like other AI tools, doesn’t really understand addition, which is the first thing regular computers are programmed to do. If you ask ChatGPT to add two three-digit numbers, especially if “carrying the 1” is required, it will probably get the wrong answer. That’s because it is not doing actual addition — it is pattern matching with examples it has seen on the web. Lots of web pages contain addition expressions with single digits, but very few show three-digit numbers being added. So it guesses, based on patterns it’s seen before, and probably guesses wrong.
Chiang argues that this is because what AI tools is compress the information on the web into a stored form, which it can then search and expand again as needed. The problem is that the compression process loses information. The technical term is lossy compression, because data is lost in the process. The ultimate lossless compression (the opposite of lossy) of the sum of a pair of numbers would be to actually understand how to add them together. Then it wouldn’t need to store anything but the rule, and that’s how people do it. You learn how to add in elementary school by memorizing a handful of results and learning the procedure to generalize from those. But computers, even great pattern matchers like ChatGPT, don’t really understand anything. They are trained with tons of data, and when they guess wrong in training, they are corrected and given another example, and the programmers hope that the neural network will eventually be able to generalize from the pattern. Their internal models don’t really store all that information — they’re a blurry JPEG of the web, not even the full form of the web itself.
Another fascinating article this week was written by Stephen Wolfram, creator of the Mathematica program among many other accomplishments, entitled What Is ChatGPT Doing … and Why Does It Work? I haven’t been through the whole thing (it’s a very long article), but it shows that these AI tools basically come up with the first part of an answer, and then use a weighted probability model to guess what should come next, and after that, and so on, until they have a complete answer.
ChatGPT is creating answers based on what words typically go together based on frequencies its measured on the web, and hopes that’s good enough. It often is. It is so much, in fact, that people can fool themselves into believing they’re dealing with an actual intelligence rather than some pattern matching algorithm.
Presumably, that’s how you can get results like this from the new ChatGPT-enhanced Bing, in response to the question “what is the population of the planet Mars?”:
Won’t Elon be surprised.
(Actually, he won’t, because (1) somebody at Microsoft already fixed that bug, and (2) at this point nobody with any sense would trust Elon to fly to Cleveland, much less to another planet. But I’m not going to talk about Elon this week, despite the latest idiocy at Twitter after the Super Bowl. Enough already.)
Whenever I wonder about the future of these neural network tools, I go back to the chess world, which has been dealing with computers that can beat the World Champion for decades now. The way Grandmasters use computers today is for research and exploring interesting lines. They’re time savers, and the best computers combine pattern matching with calculation, much like real people do.
So does Bing, incidentally, at least to an extent. If you ask Bing to add two three-digit numbers, it opens up a calculator and enters the numbers there. That’s the right way to go about the problem anyway. It expect more hybrid solutions like that to appear in the future.
By the way, yes, I’m aware of the article in the New York Times where one of their journalists had an extended, multiple hour conversation with the AI in Bing and discovered that its name is Sydney and that it fell in love with him and wanted him to leave his wife for her. To me that says way more about the human running the conversation than the computer responding to him. AI networks reply to inputs and give back what it thinks you want to hear. I believe that means the journalist is going to be seriously embarrassed once he realizes what really happened, and he’s got a rather unpleasant conversation with his wife some time in his future.
Tweets and Toots
Three Laws Safe
That explains a lot.
I have no idea what to do with this
That’s right, and yet so, so wrong. Also, is that Grover at the end of his tail?
Where Does It End?
I thought this was a riot:
But honestly, a couple of the replies are just as good:
I don’t have imposter syndrome. My psychological issues are way too complicated to be captured in a simple label like that.
An important lesson for us all
I can’t help wondering if the bird doing all the work knows the other bird is even there. Or maybe they’re friends and the big one is giving the little one a ride. I wish I knew.
The video version of this newsletter should be uploaded onto the Tales from the jar side YouTube channel tomorrow.
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.
Android Development Bootcamp, week 3 of 3, on the O’Reilly Learning Platform.
Reactive Spring and Spring Boot, on the O’Reilly Learning Platform (APAC time zones)
Another interesting and informative issue. Can't wait until the film is released. ;-)