What does software composability mean?

Googling software composability leads to many different definitions. This is due to the fact that there are many different ways of writing composable software.  I’ll cover two simple examples that show composability. The command line is a good first simple example of composability. There are three main reasons that the command line is composable. The first is that commands output …

What Is a Fluent Api?

The real question is what does fluent mean? It really relies on method chaining. The goal is to make making the code very easy to read. If you were to read the code out loud you might find it’s close to being grammatically correct. Lately it’s been very common to see libraries adopt this concept, which often uses the builder …

What is a static reference?

A static reference is reference that exists only once for an entire class.  No matter how many instances of that class exist there is only one that one reference. Why are static references bad?  Because they make testing harder. Imagine the following class that has a static method: class Foo{ static int addTax(Item item){ return item.price *=1.65 } } You …

What is dependency injection?

Dependency injection is a software technique to make creating composite objects easier. A provider object has the dependencies another object needs in order to operate.  Dependency injection frees developers from having to do two main things.  One helps free them from having to manually create objects.  Secondly, it also frees them up from having to lug individual dependencies around in …

Caster.io Giveaway

I’m trying something new.  I’m doing a giveaway for Caster.io.  You can checkout the details here.

Retry Sometimes Using RetryWhen

Continuing from the last post aboutRetryWhen in RxJava. Last week I was working through a way of retrying attempts. As a result, I thought of an easier way of retrying. Previously, I demoed a way to do this recursively. But I realized there is an easier way. Namely, using the RetryWhen operator. As I was working through it, I had …

Retry Sometimes in RxJava

If you’ve ever looked into retrying in RxJava. You’ll know there are two operators for retrying. First, repeat is for when a completion event. In addition, retry is for when an error event. Maybe, you find yourself asking about retrying with a regular onNext event. In particular what if you only want to sometimes retry in RxJava? This is the …

Creating Type Safe Builders In Kotlin

An Easy Example Today we are going to cover creating Type Safe Builders. If you’ve heard of Kotlin’s DSL or Domain Specific Language capabilities this is what they are referring to. A Type Safe Builder is really just that. It’s building an object in a particular domain. For example if you are working on code for a purchasing system then …

What RxJava Book Should I Buy?

If you’re here you’ve probably asked yourself “What RxJava Book Should I buy?” I’ve seen this question a number of times. If you are looking at picking up a RxJava Book you should first know that there are two major versions of RxJava. Since version 1 has a limited support time line all new projects should be using RxJava v2.  …