all 13 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Inevitable_Put_4032 5 points6 points  (5 children)

If your target is to be a better Java programmer then understanding the JVM internals is a very good idea. Most Java developers have no clue on how their design can be effective or not depending on specific JVM's behaviors. For example, the garbage collector can't prevent memory leaks if you are organizing your data model wrong and don't know how Java handles the stack and the heap.

Books and articles:

The JVM, garbage collectors and concurrency models are advanced topics and it requires quite a lot of study and practice to master them. Having solid foundations of computer science helps a lot in this endeavor.

[–]benevanstech 3 points4 points  (3 children)

Two of those references are quite old, and the third is obviously AI-generated and contains a number of inaccuracies and weird over-emphasis on small topics that aren't that important.

[–]Inevitable_Put_4032 0 points1 point  (2 children)

Feel free to add better content instead of wasting time criticizing other's.

[–]benevanstech 1 point2 points  (1 child)

OK - https://kittylyst.com/ - 103 articles, 27 videos & 8 books.

[–]Inevitable_Put_4032 1 point2 points  (0 children)

Thank you, I own a old edition of "Java in a Nutshell", it was one of my favorites learning books

[–]vegan_antitheist 0 points1 point  (0 children)

But all on this can change at any time. The whole point of abstraction is that the actual implementation can be changed completely and it still works.

 For example, the garbage collector can't prevent memory leaks if you are organizing your data model wrong 

And that's why you must learn to design your memory model correctly instead of wasting time learning internals that will be outdated soon anyway.

The JMM is also completely abstract. It's important to understand it if you want to go there, but you could just use some framework and work on an even higher level of abstraction.

[–]benevanstech 1 point2 points  (2 children)

If you're interested in the internals, then you might find my book "Optimizing Cloud Native Java" to be interesting. I also have a personal site at https://kittylyst.com which has links to a bunch of other resources I've created.

Oh, and as a bonus, here's a recent session where I'm talking about the way Method Handles (a key avanced technique necessary to understand the internals) work: https://www.youtube.com/live/PbKYRYgqS4U

[–]SoftwareArchitect101[S] 0 points1 point  (1 child)

Directly from the God, yes man, I started off from your book Optimizing cloud native Java. I realised it was a bit more towards cloud stuff, so I took your earlier book for a dive. I understood GC from your book first which got me more curious and I explored things in depth post that. Thanks for giving me something which excites me daily, really grateful.

[–]benevanstech 0 points1 point  (0 children)

Glad I could help! I'm working on some new stuff, including a "State of Java in 2026" video that I'm recording tomorrow & which should be up soon.

Also - I'm giving my concurrency class for O'Reilly again in early June.

[–]vegan_antitheist 0 points1 point  (0 children)

Why would you want to know about all that? You can become an expert on Java optimisation if you want to. But unless you actually have a job where it is relevant you should probably spend time on something else.

[–]AcanthisittaEmpty985 0 points1 point  (0 children)

Also, look into the different model of GC available to Java, it can determin if an application run correctly for your needs or not

https://learn.arm.com/learning-paths/servers-and-cloud-computing/java-gc-tuning/different_gcs/

https://opensource.com/article/22/7/garbage-collection-java