Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

Cay Horstmann

@cayhorstmann@foojay.social
mastodon 4.7.3
  • Open on foojay.social

In my copious spare time I write books and develop online courses for beginning and professional programmers.

299 Followers
250 Following
27 Posts
Joined October 09, 2023
Home page:
https://horstmann.com
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 2w ago

On Wednesday 10:20 am I will present "Observing Project Valhalla" at BED-CON in Berlin. The organizers assembled a really interesting program this year: https://bed-con.org/2026/programm. Hope to see some of you there!

bed-con.org
2
0
1
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 3w ago

Are you using Anki flashcards? Do you ❤️ its open source awesomeness? If so, consider donating through the app right now. Google is apparently making them remove the donation link in the next update. https://github.com/ankidroid/Anki-Android/issues/21656

github.com
3
0
1
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 4w ago

Why not allow special characters and longish file names in a contact form? Making it difficult to do something easy is a German specialty. We call it the Korinthenkacker (raisin shitters). And apparently the IT outsourcing providers support it as a service when bidding on German jobs.

3
0
2
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 1mo ago

I just got back from the JavaZone conference in Oslo. It was a lot of fun--highly recommended. All videos: https://vimeo.com/javazone My video: https://vimeo.com/1223388783 My slides: https://horstmann.com/presentations/2026/javazone/

vimeo.com
3
0
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 3w ago

On Wednesday October 14 I will present a workshop on using Java for small programming tasks at Basel One (https://baselone.org/#programm). I invite you bring your own tasks, or learn from some of mine. Hope to see some of you there!

baselone.org
1
0
1
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 2mo ago

1/2 Now that Valhalla is in mainline (https://jdk.java.net/28/), let's see what it can do:

$ cat Ids.java
value record Id(int value) {}

public class Ids {
void main() throws Exception {
var ids = new Id[100_000_000];
for (int i = 0; i < ids.length; i++) ids[i] = new Id(i);
IO.println(ids);
Thread.sleep(10000);
}
}
$ javac --enable-preview --source 28 Ids.java
$ java --enable-preview Ids && (jcmd Ids GC.class_histogram | head)

jdk.java.net
5
0
3
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 6mo ago

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.

foojay.social
34
8
9
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 2mo ago

Valhalla has arrived in mainline Java (build 28-ea+10-569): https://jdk.java.net/28/

$ cat Points.java
value record Point(double x, double y) {
public Point moveBy(double dx, double dy) {
return new Point(x + dx, y + dy);
}
}

void main() {
var p = new Point(0, 0);
for (int i = 0; i < 100_000_000; i++) {
p = p.moveBy(Math.random() - 0.5, Math.random() - 0.5);
}
IO.println(p);
}
$ java --enable-preview Points.java

jdk.java.net
4
0
8
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 4w ago

Why my chagrin with German web sites? In a contact form, I tried to explain a problem with another form of the provider. And typed in their URL. Oh noes. Special characters are not allowed! So I had to spell out https Doppelpunkt Schrägstrich Schrägstrich etc. And I tried to attach the PDF they sent me. It was not to be. File name (their choice, Leuchtenberger Kirchweg47B_20260908_Unser\ Angebot_VK20102356538.pdf) more than 50 characters.

1
0
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 1mo ago

My trip report from JCrete: https://horstmann.com/unblog/2026-08-10/index.html

horstmann.com
3
0
2
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 2mo ago

Who would have thought—a documentary about Java. Pretty cool. Watch it at https://www.youtube.com/watch?v=ZqGSg4b_cZA

The Java Story | The Official Documentary

5
0
5
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 6mo ago

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/settings/copilot/features: Allow GitHub to use my data for AI model training.

github.com
23
6
59
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 2mo ago

2/2 Here the histogram:

num #instances #bytes class name (module)
-------------------------------------------------------
1: 1 800000016 [LId;
2: 8841 356272 [B (java.base@28-ea)
3: 1732 229232 java.lang.Class (java.base@28-ea)

* No individual Id objects
* A flat array of Id objects
* Why 8 bytes per element?
* Each Id is 4 bytes
* Another byte for a nullness indicator
* And 3 bytes padding

Valhalla has arrived

foojay.social
2
0
1
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 1mo ago

Interesting issue about Java Valhalla performance: https://mail.openjdk.org/archives/list/valhalla-dev@openjdk.org/thread/3P5463B2OWURWM4LIMYIQMQOMZCOR6LN, details at this nice blog: https://johan-sjolen.github.io/post/compiler-sympathy/compiler-sympathy

mail.openjdk.org
1
0
1
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 1mo ago

At Basel One, I will present a workshop on Java for small coding tasks on October 14 and a deep dive into Java streams internals on October 15. This is one of my favorite conferences for networking. Hope to see you there! More at https://baselone.org

baselone.org
1
0
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 5mo ago

PSA about white space in modern Java. Character::isWhitespace and String::strip are aligned. Stay away from legacy Character::isSpace and String::trim. But the regex "(?U)\\s" differs in eight code points: 28, 29, 30, 31, (Information separator 4...1) pass isWhiteSpace and not \s. Conversely, 133 (Next line), 160 (No-break space ⚠), 8199 (Figure space), 8239 (Narrow no-break space) don't pass isWhiteSpace but match \s.

8
0
5
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 5mo ago

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/presentations/2026/jcon/

horstmann.com
5
4
6
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 6mo ago

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...

6
0
2
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 6mo ago

My article "Effective Pattern Matching 2026 Edition" is now live at https://javapro.io/2026/03/24/effective-pattern-matching-2026-edition/

javapro.io
3
2
2
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 5mo ago

I never thought much about hash codes of Java enumeration constants, but https://4comprehension.com/enum-map-serialization/ set me straight. Turns out enum hash codes are not stable, so serializing them as map keys will not work. Remedy: EnumMap!

4comprehension.com
2
0
1
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 5mo ago

At JCON, a speaker's slides had a mysterious reference to "danger to the herd". My preferred search engine (Kagi) led me to https://www.reddit.com/r/ProgrammerHumor/comments/azubgl/kantega_the_mysterious_life_of_developers/ I had a good laugh at the "cliché developer with a conference t-shirt". Guilty as charged.

reddit.com
1
0
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 5mo ago
Replying to
@DJGummikuh@mastodon.social It must be hard to follow along when I move through these things quickly. The slides have a link to the code, so you could try repeating the steps.
1
0
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 6mo ago
Replying to
@mlundblad Also check out the jshell-resolve script that is linked from this blog: https://advancedweb.hu/using-external-libraries-in-jshell/
Using external libraries in JShell
advancedweb.hu

Using external libraries in JShell

How to load external JARs and project classes to JShell

1
1
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 4w ago

One of my posts in this sequence did not succeed on BlueSky: Invalid app.bsky.feed.post record: grapheme too big (maximum 300, got 443). Raisin shitting is not limited to Germany...

0
0
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 4w ago

After a day of interacting with German web sites, I am reminded of Hanlon's razor (https://en.wikipedia.org/wiki/Hanlon%27s_razor): "Never attribute to malice that which is adequately explained by stupidity." Or it's corollary, Grey's law: "Any sufficiently advanced incompetence is indistinguishable from malice."

en.wikipedia.org
0
0
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 6mo ago
Replying to
@DanielSchwering@digitalcourage.social Thanks, that's a WordPress conversion bug. I'll try to get it fixed.
0
0
0
0
Open post
Cay Horstmann @cayhorstmann@foojay.social
· 5mo ago
Replying to
@parttimenerd@mastodon.social Sure. I'll be there by noon.
0
0
0
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 04:48:51 UTC