I never thought much about hash codes of Java enumeration constants, but https://4comprehension.c... set me straight. Turns out enum hash codes are not stable, so serializing them as map keys will not work. Remedy: EnumMap!
I've been paying #Kagi for search since it's worth my time to get results instead of ads and slop. Added benefit: their translate service is fantastic for language learners. Where Google Translate gives the minimum, Kagi goes all out.
My article "Effective Pattern Matching 2026 Edition" is now live at https://javapro.io/2026/...
I just finished my talk at JCON—When Greed is Good: Understanding Java Stream Performance. The title attracted a good crowd. Slides at
https://horstmann.com/pr...
Is there any AI software that can watch a boring compliance video (emergency procedures, nondiscrimination, hazard communication, etc.) and answer the multiple choice questions that check for comprehension? Asking for a friend...
PSA about white space in modern Java. Character::isWhitespace and String::strip are aligned. But the regex "(?U)\\s" differs in code points 28, 29, 30, 31, (Information separator 4...1) , 133 (Next line), 160 (No-break space âš ), 8199 (Figure space), 8239 (Narrow no-break space).
Check out this fun project—Java in your browser in the most inefficient way imaginable, by having Wasm emulate x86_64 instructions running Linux running Java: https://bmarti44.substac...
Jeff Martin and myself will explore better use cases for Java/Wasm at JavaOne.
Github gives you until April 24 to opt out of using your Copilot interactions for model training. The setting is at the bottom of https://github.com/setti... Allow GitHub to use my data for AI model training.
Apparently bsky hates post > 300 graphemes. Mastodon doesn't: foojay.social/@cayhorstman...