Monthly Archives: December 2022

Don’t Use java.util.Optional

This is a class that attempts to replace null with different way to check for null.  While I can imagine some very rare cases that this could be useful, in general it is more complicated, slower, and takes more memory … Continue reading

Posted in Coding, Design, practice | Tagged , , | Leave a comment

Catching Generic Exception Classes

In Java you can have a try statement with multiple catch clauses.  In a method that handles exceptions, by for example wrapping and rethrowing, it is important to catch the root-most “Exception” class and this post explains why even though … Continue reading

Posted in Coding, Design, Poor Error Msg | Tagged , , , , , , | Leave a comment

Holographic Testing Technique

I write a lot of code, and I want there to be solid tests on that code.  Creating tests can be tedious, and that prevents many good tests from being written.  Also, because tests can be fragile, maintaining those tests … Continue reading

Posted in Coding, Example Code, practice | Tagged , , , , | Leave a comment