Thus begins the real first article in my new Movie Database App series. Today, we’ll start looking at how I’m working with the IMDb API. Keep in mind it’s still a work in progress and could potentially remain that way until the full application is done. For instance, I still don’t have any of the “safety” features put in yet, ...
Read More »Home »
Subscript Operator Overloading: Python vs Kotlin
Being able to access items in collections using subscripting (i.e. with square brackets, like myCollection[2]) is a really big convenience for me. I hate typing method names for this functionality, especially the boring old get() method. Not only is get() boring, it’s incredibly nondescript. (On a tangent: In my opinion, it would be nice if the “default” name for a ...
Read More »Command and Command Handlers (and Why I Don’t Care Much For Them)
Introduction I want to complain about the pattern of using Commands and Command Handlers in this article, but I don’t want to spend my time explaining what they are, so I’ll link you to another blog post. It’s pretty in-depth, so it may take a bit, but what I really like about it is that it’s part of a collection ...
Read More »Advanced Creation of Hamcrest Matchers in Kotlin
This article is a rewrite of an older one done in Java. This one is done in Kotlin instead. Intro Last time, I went over what a Hamcrest Matcher was, how it’s used, and how to make one. In this article, I will explain more advanced steps in the creation of Hamcrest Matchers. First, I’ll share how to make your ...
Read More »How to Make Your Own Hamcrest Matchers in Kotlin
This article is a rewrite of an older one done in Java. This one is done in Kotlin instead. Intro to Hamcrest Matchers First things first, I should quickly explain what a Hamcrest Matcher is. When doing unit testing, the built-in assertion types that come with the testing framework are generally pretty limited. They make it very easy for a ...
Read More »Converting a Cyclic Dependency into a Directed Dependency
So, this came out over a month late… Woops. This is definitely not my original idea in the least. I wish I knew where I originally found this so I could share that, but seeing that I can’t find it and I haven’t seen it anywhere else, I’d like to share this idea so it can become more well-known. What ...
Read More »Defending Public-By-Default in Kotlin
Some people have spoken against Kotlin’s decision to make classes, methods, etc. public by default (when no visibility modifier is used), and I would just like to pitch in on why I think JetBrains made the right decision on this one. Those who are against it bring up the principle of hiding everything that you can get away with in ...
Read More »Use Matchers for Preconditions and Postconditions
Sorry, this is late. Excuses, excuses. I feel like I’ve seen this somewhere else once before in my life, but it the idea doesn’t seem to have spread much. That’s probably due to the lack of traction for pre- and postconditions in general. So, we’ll start with those. Preconditions and Postconditions Preconditions and postconditions are a little old-fashioned, having been ...
Read More »A New Idea For Functions
Introduction Man, I’ve had this idea in my head for more than a month now (luckily I wrote it down, too), waiting until the day I wrote this post. I didn’t write it because I was busy with the move and new job, but now things are finally settling down! Here’s the thing: When you really dig into it, proper ...
Read More »