Articles on Java

Last updated: 2022/09/27

Top deep-dives on Java

Trade-offs of Using Compilers for Java

Mark Stoodley is the project lead for the open source Java Virtual Machine project called Eclipse OpenJ9 and he gave a talk at a conference on the trade-offs of using different types of compilers for Java applications. <br>Some highlights: <ul> <li>JIT: good steady state performance, adaptable, and easy to use, but issues with start-up performance and with ramp-up performance</li> <li>AOT: inverse of JIT in terms of what it's good and bad at</li> <li> AOT/JIT &lt; JIT + Caching &lt; JIT Server</li> </ul>

It's probably time to stop recommending Clean Code

As humans, most of us are subject to authority bias, which can be described as the natural tendency to follow the leader. But the fact is, authoritative figures aren't always right. In this extensive article, Sam Hughes questions the merit of preaching ALL of the teachings of Clean Code by Robert C. Martin, by picking at some of the "questionable assertions" made.

The JPA and Hibernate first-level cache

The Java Persistence API is a Java application programming interface specification that describes the management of relational data in Java. It's basically the built-in Java way of interacting with relational databases. In this article, Vlad Mihalcea lists the possible states for a JPA entity, outlines the Hibernate first-level cache implementation, and explains the transactional-write behind cache strategy.

Why does Go not need a fancy expensive garbage collector like Java and C#?

Java is notorious for its bulky garbage collector, but a lot of effort has gone into making it more and more efficient. Erik Engheim's extensive article starts off with explaining memory management in Java, then goes on to explore how the Java garbage collector compares to Go's, and all of the factors that go into making Go's better(?).

Why General Inheritance is Flawed and How to Finally Fix it

Uncontrolled inheritance can start to suck a lot because it leads to a convoluted web of dependency. In this explanatory article, Per Minborg discusses when Java classes and methods should be made final and other general good practices for controlling composition in your software.

Disassembling Hello World in Java

You might think yourself above a simple "Hello world" example written in Java, but do you really understand every single part of the program? In this concise article, Metin Özyıldırım picks apart the titular program, explaining the .class file format, diassembling, interpreting the bytecode, and the Java native interface and system calls.

100% CPU: My Fault?

"You broke something" isn't usually what you want to hear from a system admin. Unless maybe we're talking about a record. In this case, Joseph Mate is not talking about records; instead his article is about how and why a well-intended optimization led to a JDK8 bug that caused 100% CPU utilization.

Java Concurrency: Deadlock

Writing Environment-Agnostic Functional Acceptance Tests

Modularity is pretty important when it comes to creating prototypes or tests. You want to be able to quickly switch or change things out, depending on evolving circumstances or requirements. Jamie Tanna's article brings to light a technique using class structures for writing modular and adaptable testing suites for services in Java.

Why I rewrote my open source virtual reality server

Virtual Reality has been growing in popularity over the past couple of years and for good reason; the hardware is becoming more practical and accessible. Unfortunately, the open source space for VR is pretty limited, with big companies vying for control of the space and your data. Josip Almasi describes his privacy (and practicality) based motivations for creating an open source virtual reality server, while also outline some of the resources used and design approach.

The difficult problem of managing Java dependencies

Paulo Renato de Athaydes dives into the state of dependency management in Java, demonstrating how different tools work and why.

Hash, displace, and compress: Perfect hashing with Java

Andrei Ciobanu demonstrates implementing a perfect hash function in Java.

Consolidating the user model

Project Valhalla is an experimental OpenJDK project led by Brian Goetz, with the aim of adapting the Java language and runtime to modern hardware. Now that the "primitive classes have taken shape" Brian Goetz has written an article-esque email where he once again explores one of the main objectives of Valhalla, "providing user-programmable classes which could be flat and dense in memory".

Loop Fission

Loop fission is usually done by the compiler (although you can use it in your own coding to) to break up big loops into smaller loops, which can then potentially be optimized on their own. In this article, Richard Startin presents two examples where manually fissioning his loops resulted in better performance when using Java's C2 compiler.

Benchmarking Non-shared Locks in Java

Locks are a key component in thread programming. In this practical article, Andrey Pechkurov explores several different options for spin locks in Java; specifically focusing on their performance in terms of latency.

Did You Know the Fastest Way of Serializing a Java Field is not Serializing it at All?

Per Minborg dives into the performance of different methods for the serialization of data in Java.

Want to see more in-depth content?

subscribe to my newsletter!

Other Articles