Java Advent Calendar

javaadvent.com · Group blog · on HN since 2012

An annual advent calendar of articles by various authors on Java, the JVM, concurrency, performance, and related tools.

What HN saysHN commenters link it for articles on Project Loom, structured concurrency, and the Developer's Legacy Index, as references in Java discussions.
47HN people shared it
10linked it in comments
87stories submitted
730story points
4 months agolast shared
2012people per year2026

Most-shared posts

  1. 1
    Measuring Time: From Java to Kernel and Back
    6 people · 10 points · first shared 2019 · discussion on HN
  2. 2
    Smalltalk with the GraalVM
    5 people · 119 points · first shared 2019 · 33 comments on HN
  3. 3
    JavaAdvent: Project Jigsaw Hands-On Guide
    3 people · 5 points · first shared 2016 · discussion on HN
  4. 4
    Java Advent
    3 people · 5 points · first shared 2014 · discussion on HN
  5. 5
    Project Loom and Structured Concurrency
    2 people · 171 points · first shared 2020 · 108 comments on HN
  6. 6
    The importance of tuning your thread pools
    2 people · 9 points · first shared 2015 · 1 comments on HN
  7. 7
    A Zero-Dependency WebAssembly Runtime for the JVM
    2 people · 6 points · first shared 2023 · 1 comments on HN
  8. 8
    Reactive file system monitoring using Akka actors
    2 people · 4 points · first shared 2015 · discussion on HN
  9. 9
    How jOOQ leverages generic type safety?
    2 people · 3 points · first shared 2014 · discussion on HN
  10. 10
    Java Advent: Mutation Testing
    2 people · 3 points · first shared 2019 · discussion on HN
  11. 11
    Getting Started with GraalVM
    2 people · 2 points · first shared 2019 · discussion on HN
  12. 12
  13. 13
    Seeing Escape Analysis Working
    2 people · 1 points · first shared 2021 · discussion on HN
  14. 14
    Project Loom
    2 people · 1 points · first shared 2019 · discussion on HN
  15. 15
    Changes to stringsubstring in java 7
    2 people · first shared 2013

What HN people wrote when they linked it

seinecle · 2022-07-31
Loosing in attractivity relative to some other languages, for some popular use cases? Yes. Like, Python is king for data science /ML, and js is king for front end.* It translates into a community of java devs which is less hegemonic by its relative size than it used to be. That said, it doesn't imply that Java is loosing ground in other capacities. It makes great and frequent progress in terms of the JVM, language features, inter-operability with other languages. That makes it perfectly adapted to cloud environments. Old and tired statements about start-up times and memory footprint ignore the developments of Java in the last 15 years. Now Java instances can start in milliseconds with total memory footprints of a few mb [0] Comparisons between Java and Cobol, that are sometimes made (even on this thread), are not enlightning: as far as I know, Cobol didn't evolve very much in the past decades. Not the case for Java - it has a 6-month release cycle [1], and these releases bring ambitious and significant changes[2], like virtual threads for one. I would advise to stay updated on Java development by following key accounts of advocates on Twitter (eg, @nipafx), subscribing to the Java Magazine[3] or watch the many videos being posted by advocate devs on Youtube[4] * even this needs a caveat. Many market leading solutions in data science are actually built in Java / Scala, like the Data Science Studio by Dataiku or H2O. 0:…
youknownothing · 2026-04-08
I like the mindset, it reminds me of "Your code as a crime scene" by Adam Tornhill: https://www.adamtornhill.com/articles/crimescene/codeascrimescene.htm Also, very tangentially, to the notion of the Developer's Legacy Index: https://www.javaadvent.com/2021/12/using-jgit-to-analyse-the-legacy-of…
gunnarmorling · 2023-11-28
I've written about two applications of custom JFR events in the past: * Monitoring invocations of a REST API: https://www.morling.dev/blog/rest-api-monitoring-with-custom-jdk-fligh… * Tracking SQL queries issued by your ORM: https://www.javaadvent.com/2021/12/keep-your-sql-in-check-with-flight-… The latter is about injecting event-emitting code with a Java Agent rather than manually implementing custom events (latest Hibernate ORM version comes with JFR support OOTB, too).
shagie · 2022-10-29
The "if you want to get into it..." - Escape Analysis in the HotSpot JIT Compiler - https://blogs.oracle.com/javamagazine/post/escape-analysis-in-the-hots… If you can prove that that a particular value never escapes the scope, it may be possible to allocate it on the stack instead which also reduces the amount of garbage collection needed later. And other related reading: https://web.archive.org/web/20120214195433/http://www.ibm.com/develope… https://www.javaadvent.com/2020/12/seeing-escape-analysis-working.html
frankpf · 2022-03-20
Would you say that Java's Loom[1] matches your definition of structured concurrency? [1]: https://www.javaadvent.com/2020/12/project-loom-and-structured-concurr…
kasperni · 2020-12-04
In the examples with structured concurrency. The point of using an executor service is not to reuse the threads. But instead to control their termination. If you read Nathaniel J. Smith's primer [1] on structured concurrency. The ExecutorService in the examples act as the nursery. Loom is just being "lazy" and reusing ExecutorService for something that it wasn't originally intended to do. Earlier versions had a specific class called FiberScope [2]. Whether or not we will see more specialised classes for this in the future I don't know. [1] https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statemen… [2] https://www.javaadvent.com/2019/12/project-loom.html
em-bee · 2020-08-17
pathikrit · 2016-02-12
Kinda related - I wrote a library to hook up file system monitoring to Akka actors: https://github.com/pathikrit/better-files#akka-file-watcher Here's a Java article describing its internals: http://www.javaadvent.com/2015/12/reactive-file-system-monitoring-usin…
stygiansonic · 2015-07-10
Here is an explanation of the change to `substring()`[0] and why it was done. The change was done in Java 7u6. In short, the previous way of keeping the same underlying character array and just updating the {offset, count} indexes has a drawback in that if the original string is large, it is prevented from being GC'd if one keeps a reference to even a single substring generated from it. So, it's a trade-off between the original and new behaviour; the original way more or less caps the memory usage at the size of the original string, but at the expense of not being able to GC it if even a single substring exists, while the new way increases memory usage for each substring generated but does not prevent any of the strings from being GC'd. This is why the article's code example yields such a huge difference in memory usage in Java 6 vs Java 7; it is effectively a sort of "anti-pattern" when used against the new `substring()` method. (i.e. iterating through a large string and generating lots of sub-strings) The article I linked to, which came out in late 2012, basically had the same advice: "If you are writing parsers and such, you can not rely any more on the implicit caching provided by String. You will need to implement a similar mechanism based on buffering and a custom implementation of CharSequence" 0. http://www.javaadvent.com/2012/12/changes-to-stringsubstring-in-java-7…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close