Abstract: Today marks our 25th newsletter anniversary, when I sent out an email to 80 colleagues and friends. To celebrate, we are looking at some of the most popular newsletters over the years. Thanks for being part of this adventure.
A hearty welcome to our 330th edition of The Java(tm) Specialists' Newsletter. As I was
preparing to write this newsletter, a whole bunch of topics
were going through my head. I could write about the cool
new imports with import module java.base
or the latest JDK bug that I discovered whilst teaching our
Extreme Java -
Concurrency Performance Course this month. I have a
bunch of other topics ready for publication. And then I realized.
Today is the exact day when I began my newsletter writing spree,
25 years ago. To my knowlege, The Java(tm) Specialists' Newsletter is the longest Java
newsletter on planet Earth (but not sure about the entire
galaxy). The second longest is from Jack
Shirazi, who started three weeks after me. Both of our
newsletters are about writing good, fast, performant, professional
Java code. And this sticks.
Thus I cannot just write a normal Java newsletter, about the latest Java syntax gimmic or performance improvement. Instead, we are going to do a fun retrospective of what the most popular newsletters were, and a few stories of how it all began.
Black Friday 2025: We are running our promotion until my birthday on the 4th of December. Be sure to check it out, especially our live concurrency courses in two weeks time and our Java Specialists Superpack.
javaspecialists.teachable.com: Please visit our new self-study course catalog to see how you can upskill your Java knowledge.
Our son was born in June 1998 and usually our brain only remembers things from about three years of age. This means that for his entire living memory, his dad was sending out The Java(tm) Specialists' Newsletter. It started with about 80 friends and colleagues, some of which are still on the list. The first newsletter I sent filled me with trepidation and fear. "What if my colleagues laughed at me?" And this they did. It did not take long for them to be mocking me behind my back, and sending out emails to each other in my tone. And yet I continued, for 25 years... It was always a hobby, and I've enjoyed the thrill of sending them out.
I still remember after the first newsletter, I did not even want to open my email to read the responses. Most of the comments were positive. But one almost stopped me from continuing. It read: "Unfortunately, I'm not interested in your newsletter, because Java is not the world I live in." This message should not have affected me at all, but it did. It was a perfectly neutral response that didn't judge my newsletter as being worthless. It just wasn't for her. I find sending out newsletters terrifying, far more so than public speaking.
Thus I want to thank you for your support over the last 25 years and holding me up. I could not have done it without you.
As a celebration, I went through several years of logs to see which newsletters the most popular were. Here they are by category - enjoy:
At the beginning of my Java career, we coded a fair amount of Swing code. One of the tricks was to create an applet that provided remote access to an ERP system. Even though we never quite got that project working to our satisfaction, it allowed my client to negotiate better conditions for a remote access client. We had to figure out a lot of workarounds for Swing, and hence the newsletters:
In the early versions of Java, we were running on Pentium II 266 MHz machines, with a single core, and with 64MB of RAM. And those were the good PCs. At the time, Java was always running interpreted, which made things much much slower. We developed a whole swathe of techniques to make our code run fast enough. Over time, many of those tricks were incorporated into the JVM itself, making our hacking less necessary. Here are some performance oriented newsletters that have stood the test of time:
getThreadAllocatedBytes method from the
ThreadMXBean to accurately estimate the number of bytes
allocated by a single thread. I have used this class over and over in
hundreds of courses and demos.-Xmx2g. Can you figure
out why the polite version works? We need to set the max heap, because the
JVM will use 1/4 of our physical RAM as the maximum heap, and on
modern machines, that would often exceed the maximum size for an array.
hashCode(), besides equals(),
we should also make our compound keys implement Comparable.
This way, if there are a lot of clashes, they can arrange our entries in a
binary tree, instead of a linked list of nodes.
Earlier versions of Java were clunky at best. We did not have generics, no autoboxing, old-fashioned switch statements with fall-through cases. It gave me endless fodder for The Java(tm) Specialists' Newsletter. A lot of these issues have been fixed in later versions of Java. Here are some newsletters to do with the Java Programming Language.
switch to emulate a bubble
sort algorithm written in BASIC. It wasn't an April's Fool
newsletter, but may well have been.
Concurrency and parallelism have always felt natural to me, and so it is no surprise that my very first newsletter was about finding and solving Java deadlocks.
ThreadMXBean to check for deadlocks in unit tests.
ConcurrentModificationException is notoriously hard to
weed out of our code base. One thread merrily walks through a collection,
whilst another thread changes it. The walker sees the exception, caused
by a side effect of an external change. However, these exceptions might
also manifest differently, for example as a NullPointerException.
We thus have to get rid of them wherever they occur. Here we see a
technique we can use to throw the exception on modification, rather
than iteration.
There are also lots of fun tips and tricks in my newsletter, here for example are to approaches with reflection that might help for testing systems.
Again, thank you for being part of this community and for also supporting my JavaSpecialists by purchasing courses and giving me truly fascinating consulting opportunities.
Kind regards
Heinz
P.S. Be sure to check out our Black Friday specials for 2025, which run until my birthday on the 4th of December.
We are always happy to receive comments from our readers. Feel free to send me a comment via email or discuss the newsletter in our JavaSpecialists Slack Channel (Get an invite here)
We deliver relevant courses, by top Java developers to produce more resourceful and efficient programmers within their organisations.