Carl

Carl Mastrangelo

Hi, My name is Carl and I'm a software engineer and aspiring artist.


Final Interfaces in Java

“W…what?” I hear you say. Java can’t have final interfaces! Sometimes however, it is convenient to expose an interface, but assert that API users not implement it. This is the case when multiple-inheritance may be needed, but you don’t want to break people’s code when adding new methods. This issue came up when designing gRPC stubs in Java. In this post, I’ll show a neat trick to work around it.

Read more…


Java’s Mysterious Interrupt

One of the lesser known parts of Java is InterruptedException. With its vague-sounding name and non-committal Javadoc, few people are able to figure out what they need to do with it. Since I myself didn’t really grok it, I decided to put together a post explaining how interruption works. If you are looking for a more practical guide on how to handle it, I recommend Dealing with InterruptedException by Brian Goetz. This post is more focused on how interruption works.

Read more…


Risk vs. Reward

In order to be a good investor, you need to be able to determine if an investment is a good idea. A good investment is one that has a good chance of having high returns, and a low chance of poor returns. This seems obvious, but I find myself having a hard time keeping this in mind when trying to decide where to put money.

Read more…


More Thoughts: