List/Grid Author Archives Subscribe to the RSS feed of Peter Lawrey

java-logo

Inconsistent operation widen rules in Java

Overview When you perform a unary or binary operation in Java the standard behaviour is to use the widest operand (or a wider one for byte, short and char).  This is simple to understand ...
java-logo

Java 8 Optional is not just for replacing a null value

Overview In Java 8, you can return an Optional instead of return null; as you might do in Java 7. This may or may not make a big difference depending on whether you tend to forget to ...
software-development-2-logo

Mixing memory unit messages

One of my pet hates is developers messing up units of memory.  In general, the difference doesn’t matter much, or you can work out what they meant to say, but it does annoy me ...
java-logo

Java Lambdas and Low Latency

Overview The main question around the use of Lambdas in Java and Low Latency is; Does they produce garbage and is there anything you can do about it? Background I am working on a library ...
java-logo

How and Why is Unsafe used in Java?

Overview sun.misc.Unsafe has been in Java from at least as far back as Java 1.4 (2004). In Java 9, Unsafe will be hidden along with many other, for-internal-use classes. to improve ...
java-logo

On heap vs off heap memory usage

Overview I was recently asked about the benefits and wisdom of using off heap memory in Java. The answers may be of interest to others facing the same choices. Off heap memory is nothing ...
java-logo

Chronicle Map and Yahoo Cloud Service Benchmark

Overview Yahoo Cloud Service Benchmark is a reasonably widely used benchmarking tool for testing key value stores for a significant number of key e.g 100 million, and a modest number ...
java-logo

A Java conversion puzzler, not suitable for work (or interviews)

A really hard interview question would be something like this:                   int i = Integer.MAX_VALUE; i += 0.0f; int j = i; System.out.println(j ...
java-interview-questions-answers

Kafka Benchmark on Chronicle Queue

Overview I was recently asked to compare the performance of Kafka with Chronicle Queue.  No two products are exactly alike, and performing a fair comparison is not easy.  We can try ...
software-development-2-logo

Men in Tech

Background Between my partner and I, we have six daughters, and as they have grown I have thought more interested in their long term future, the role of women in society, the way technology ...
Java Code Geeks and all content copyright © 2010-2015, Exelixis Media Ltd | Terms of Use | Privacy Policy | Contact
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close