r/JavaProgramming • • Mar 10 '26

Don't guess, measure.

4 Upvotes

​I built a project to truly understand what happens inside the JVM when pushed to the limit.

The goal wasn't just "working code," but a deep understanding of memory utilization, CPU cycles, and runtime behavior.

​The task: Scanning a log file of one million lines and counting errors per hour.

​The process was divided into 4 versions, starting from the most naive implementation to optimization at the Bytecode and Assembly levels.

At each stage, I identified a specific bottleneck and improved it for the next version.

​The tools I used:

​JMH: For accurate micro-benchmarking while neutralizing Warmup biases.

​JITWatch: For analyzing C2 Compiler decisions and examining the final Assembly.

​The results:

​I started with a standard implementation running at 872ms with a significant load on the GC, and ended with an optimal implementation running at 78ms with 0 allocations. (On a limited hardware environment, which emphasizes the execution efficiency).

​To keep the code readable and focused on single-core performance, I chose to work with only one thread. The difference in performance stems solely from improving code efficiency and adapting it to the JVM architecture.

​You are welcome to view the process, the measurement documentation, and the source code on GitHub:

https://github.com/Yosefnago/java-deep-dive

​#Java #JVM #PerformanceTuning #BackendDevelopment #SoftwareEngineering #CleanCode #JIT #LowLatency #SoftwareArchitecture #DeepDive #CodingLife #JavaDeveloper #TechWriting


r/JavaProgramming • • Mar 09 '26

Should I buy fasal memon Udemy course

2 Upvotes

I Currently learning Core java from Telusko,Going for back-end to microservices,It has yt channel video,yt video is good or should I buy the course,if any one has bought please give me some suggestions


r/JavaProgramming • • Mar 09 '26

Learning java with the Telusko Channel: From Basics to Microservices

30 Upvotes

Firstly I learned java on brocode ,felt like learning in school.This is 2nd time I ma learning java .I’m currently working through the beginner course on the Telusko channel to build a solid foundation in Java. So far, I’ve completed about 75% of the playlist, and it's been a great learning experience. I'm planning to move on to Java Spring and microservices next, is this good .Like I don't wanted learning again And I also started making notes,I wanted to learn the backend.


r/JavaProgramming • • Mar 09 '26

JAVA course

4 Upvotes

I'm learning Java so I can do DSA in Java, but I'm not sure if I need to study on YouTube or take a course. Would it be better to watch Durga Sir's playlist or some other channel?


r/JavaProgramming • • Mar 09 '26

For anyone who wants free 250 credits on windsurf

Thumbnail
reddit.com
2 Upvotes

r/JavaProgramming • • Mar 08 '26

For JAVA group

5 Upvotes

Im a btech student learning java nd dsa .Is there any serious coding whatsapp group for practice? I want to connect with serious learners.


r/JavaProgramming • • Mar 08 '26

Build Email Address Parser (RFC 5322) with Parser Combinator, Not Regex.

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Mar 08 '26

uh so i made YouTube for J2ME dumbphones

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Mar 08 '26

Spring AI

10 Upvotes

Does anyone know what it is?. I'm planning to learn it will it be useful for my career?


r/JavaProgramming • • Mar 08 '26

Don't guess, measure.

2 Upvotes

​I built a project to truly understand what happens inside the JVM when pushed to the limit.

The goal wasn't just "working code," but a deep understanding of memory utilization, CPU cycles, and runtime behavior.

​The task: Scanning a log file of one million lines and counting errors per hour.

​The process was divided into 4 versions, starting from the most naive implementation to optimization at the Bytecode and Assembly levels.

At each stage, I identified a specific bottleneck and improved it for the next version.

​The tools I used:

​JMH: For accurate micro-benchmarking while neutralizing Warmup biases.

​JITWatch: For analyzing C2 Compiler decisions and examining the final Assembly.

​The results:

​I started with a standard implementation running at 872ms with a significant load on the GC, and ended with an optimal implementation running at 78ms with 0 allocations. (On a limited hardware environment, which emphasizes the execution efficiency).

​To keep the code readable and focused on single-core performance, I chose to work with only one thread. The difference in performance stems solely from improving code efficiency and adapting it to the JVM architecture.

​You are welcome to view the process, the measurement documentation, and the source code on GitHub:

https://github.com/Yosefnago/java-deep-dive

​#Java #JVM #PerformanceTuning #BackendDevelopment #SoftwareEngineering #CleanCode #JIT #LowLatency #SoftwareArchitecture #DeepDive #CodingLife #JavaDeveloper #TechWriting


r/JavaProgramming • • Mar 08 '26

Core JAVA notes

12 Upvotes

If anyone has it, please share it.


r/JavaProgramming • • Mar 08 '26

I found Leetcode for System Design and its Awesome

Thumbnail
javarevisited.blogspot.com
6 Upvotes

r/JavaProgramming • • Mar 07 '26

From Transactions to Queries: Breaking Down SAGA and CQRS

Thumbnail
javarevisited.substack.com
2 Upvotes

r/JavaProgramming • • Mar 05 '26

AxiomIDE

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Mar 05 '26

PSA: If you use pac4j for JWT authentication, you need to patch immediately, CVSS 10.0 auth bypass

4 Upvotes

Heads up for anyone running pac4j-jwt in production.

CVE-2026-29000 dropped yesterday. CVSS 10.0. The issue is in JwtAuthenticator, if your app accepts encrypted JWTs (JWE), an attacker who has your RSA public key (which is... public) can craft a JWE-wrapped PlainJWT with arbitrary claims. Arbitrary subject, arbitrary roles. They bypass signature verification entirely and can impersonate any user, including admins.

Affected versions:

•⁠ ⁠ppac4j-jwt< 4.5.9

•⁠ ⁠pac4j-jwt < 5.7.9

•⁠ ⁠pac4j-jwt < 6.3.3

Advisory from pac4j: https://www.pac4j.org/blog/security-advisory-pac4j-jwt-jwtauthenticator.html

Technical writeup: https://www.codeant.ai/security-research/pac4j-jwt-authentication-bypass-public-key


r/JavaProgramming • • Mar 05 '26

Building immutable objects in Java is not trivial.

Post image
0 Upvotes

In clean architectures, maintaining immutability is key to avoiding unexpected side effects and facilitating testing. The Builder pattern helps encapsulate complex object creation without sacrificing clarity or flexibility.

Key points:

⚙️ Builder decouples object construction from its final representation.

🧱 Ensures immutability by creating objects with all their properties defined at the end.

🔧 Facilitates extensibility without modifying existing code, aligned with the open/closed principle.

🚀 Improves maintainability and readability in domain layers where objects are at the core of the logic.