Beware of Java’s inconsistent MIN_VALUE

An astute user of my Tektosyne library noticed that I had made a simple but disastrous copy-paste mistake regarding the floating-point versions of some basic algorithms, such as finding the maximum of an array of numbers. The integral versions initialize the return value to e.g. Integer.MIN_VALUE and then check for any greater values. I copied … Continue reading “Beware of Java’s inconsistent MIN_VALUE”

Class Diagrammer 2.2.0 Released

I intended to summarize the ongoing Java SE 9 updates of my open-source projects in Moving Projects to Java 9. However, Class Diagrammer 2.2.0 accumulated enough changes to merit a dedicated release post. You can find a summary in the What’s New file. New Leading Option First off, a couple of days ago I discovered … Continue reading “Class Diagrammer 2.2.0 Released”

Moving Projects to Java 9

Today I’m starting to move my open-source projects to Java SE 9. I’ve covered the various significant changes in that release in four previous posts: Java SE 9 First Look Java 9 Incompatibilities JavaFX DPI Scaling in Java 9 JavaFX Spinner for Numbers (updated) As described there, some unexpected factors came up that turned the … Continue reading “Moving Projects to Java 9”

Java 9 Incompatibilities

Last year I took a quick look at the newly released Java SE 9 but wanted to delay updating until the corresponding NetBeans version was out. Nothing happened, so that’s the first incompatibility to discuss, followed by JavaMail and JavaFX issues. NetBeans MIA(pache) After four months NetBeans is still in Apache incubator limbo with no … Continue reading “Java 9 Incompatibilities”

Effective Java (3rd ed.)

Effective Java — Joshua Bloch, Pearson Addison-Wesley 2018 (3rd ed.), ISBN 978-0-13-468599-1 This is not just the best book on Java, but one of the best I’ve read on any programming subject. Every Java developer will benefit from Bloch’s solid advice and thorough exploration of language and library quirks, on a par with classic namesake … Continue reading “Effective Java (3rd ed.)”

Core Java 9 for the Impatient

Core Java SE 9 for the Impatient — Cay S. Horstmann, Pearson Addison-Wesley 2017 (2nd ed.), ISBN 978-0-13-469472-6 The Impatient series condenses the traditional monumental Core Java tomes (2,072 pages for Java SE 8) into a single book a quarter the size – 538 pages for Java SE 9, 480 pages for the first edition … Continue reading “Core Java 9 for the Impatient”

Java SE 9 First Look

Oracle has finally released Java SE 9, now available on the Oracle Technology Network. As usual the official end-user portal java.com will switch versions later, so for now it still distributes Java SE 8u144. I have yet to install the JDK, as the corresponding NetBeans update was delayed by its transition from Oracle to Apache. … Continue reading “Java SE 9 First Look”

Java Performance Notes

There have been several remarkable articles on Java performance issues in the last couple of months. Those links tend to get lost on Twitter, so I wanted to compile them here with brief overviews. All articles are based on the OpenJDK which also underlies Oracle’s distributions. Java and SIMD Piotr Nowojski tests automatic loop vectorization, … Continue reading “Java Performance Notes”

Myriarch for Java

Myriarch Combat Simulator is now available in an enhanced Java version, with a JavaFX user interface. I removed the download of the original .NET version as it was fairly rudimentary; I had already planned moving to Java at the time and so didn’t bother properly finishing that version. Overview Myriarch attempts a precise real-time simulation … Continue reading “Myriarch for Java”

Catching Java Assertion Errors

The Java assert statement can be used for conditionally checking program invariants. Assertions are enabled or disabled with the desired level of granularity by Java Virtual Machine flags, as described in the linked guide. So far, so similar to assertion facilities in other languages. However, whereas .NET Debug/Trace.Assert shows and logs a message by default, … Continue reading “Catching Java Assertion Errors”