Happy Thanksgiving all!
I finally created the first video of my video series on converting Java codebases to Kotlin. So I present it to you here as a Thanksgiving present.
Sorry if the audio is kind of clippy; I’ll be using more of a script for future videos to help keep me talking cleanly.
I know I said I wouldn’t put up a post until I got the videos done, but this has been nagging at me. As for an update on the videos, I’ve been partially lazy, partially busy, but I’m ready to record the first episode the first chance I get, and I don’t expect to need a lot of editing. Anyway, on with the topic of the day.
The Takipi Blog has recently posted two articles about the top 10 most thrown exceptions (that are logged). These 10 exceptions account for 97% of the exceptions in those logs. I’d like to list off these exceptions in order from most common to least and give a short commentary about them being in the list. Continue Reading
Today, we’ll be talking about something controversial: static methods. I have yet to read anything that says static methods are good and useful, other than Effective Java recommending them in the use of static factory methods. There are some really interesting (and somewhat dumb) arguments out there against them that rarely, if ever, even get explained. Notably, I’m providing a rebuttal to the article, Utility Classes Have Nothing to do With Functional Programming.
Today, we’re going to look at the good and bad of static methods; what they’re good for and what they’re not.
In today’s article, we follow up last week’s article about making Kotlin-like builders in Java and Python, expanding the builder APIs to take some of the optional parameters for more flexibility. We continue on with our HTML example, trying to add tag attributes, such as class, id, and style. Continue Reading
Kotlin is probably my favorite language right now, and possibly one of the coolest things it has to offer is type-safe builders, built upon several features (explained in a bit). I find myself really really wanting to have this feature in my other two primary languages, Java and Python. This article explains what I believe to be the closest we can get to having type-safe builders in those languages Continue Reading
When I first laid eyes on Java 8’s Stream API and found out that it worked lazily (then found out what that meant), I was blown away and utterly baffled. It didn’t seem possible at all. Eventually, I was able to wrap my head around it, realizing it was done with my favorite design pattern: the Decorator Pattern!
In this post, I’m going to go through and write up a simplified implementation, only going through the
reduce() methods. We’ll also be ignoring the ability to parallelize the calls. Lastly, for the sake of readability, I’ll be ignoring
extends in the generics. Continue Reading
Jumping around between multiple languages can help you notice some differences between idioms and best practices in different languages. One of the more interesting differences has to do with one function doing multiple things. Continue Reading