The state of logging in Java

The State of Logging in Java

Nicolas Frankel Developer Tips, Tricks & Resources

When developing an application, chances are that it won’t perform as expected on the first run. In order to check what went wrong, developers in general use debuggers. But experienced developers know that if it happens in production, most debuggers won’t be available. Hence, they pepper the source code with logging statements to help their future self debug the next …

Generics and type erasure

Generics and Type Erasure on the JVM

Nicolas Frankel Developer Tips, Tricks & Resources

Introduction In UML, it’s possible to parameterize types in a class. Those types can then be used in different locations: attribute types, parameter types and return types. This is called a template class. Here’s an example of such a class in UML: This Foo class should be read as the following: The bar attribute is of type T The baz() …

The power of Optional

Is Java Optional Only Smoke and Mirrors?

Nicolas Frankel Developer Tips, Tricks & Resources

There are a lot of misconceptions in the software development world. Today we are going to address this one: “Java 8, for example, introduced the Optional class. It’s a container that may hold a value of some type, or nothing. In other words, it’s a special case of a Monad, known in Haskell as the Maybe Monad. You can now …