Java 8 introduced a few default methods and static factory methods on the Comparator interface using which developers can write Comparators in a declarative way. The Comparator interface combines the principles from Builder Pattern, Factory Method Pattern, Decorator Pattern and Functional Programming to come up with a very expressive API....
[Read More]
RxJava - Part 3 - Multithreading
RxJava makes it easy to write asynchronous and concurrent applications. To be able to do that you
will have to write programs that get executed on multiple threads. In this article I will show how RxJava
helps in writing multithreaded programs using Scheduler and Observable’s
subscribeOn() and observeOn() methods.
[Read More]
RxJava - Part 2 - Creating an Observable
An Observable is the heart of RxJava. It is the source of data or events in Reactive Programming. RxJava provides many methods in its library to create an Observable. Choosing which one to use can be difficult. My goal from this article is to help you in making this choice...
[Read More]
RxJava - Part 1 - A Quick Introduction
RxJava is a library that helps programmers to write asynchronous, concurrent and resilient applications. Using
RxJava you write programs in reactive programming paradigm. In this article I will be
providing a quick introduction to reactive programming and RxJava.
[Read More]
Testing REST APIs with REST-assured
REST APIs are HTTP-based web services that adhere to REST architectural constraints. If you look up now-a-days systems that talk to each other over web, it is highly probable that you will find REST APIs being used. In this article I will focus on REST-assured, a tool from Jayway for...
[Read More]
Scoped Objects in Dagger 2
When you use Dependency Injection, you may want to create objects that have different life-cycles. As an example, you may want some objects to live as long as the application lives, and some to live only for a short duration, like only for the duration of a request. Such objects...
[Read More]
Writing Test Data Builders Made Easy With Kotlin
In this article I will be focusing on few features of Kotlin that help in writing concise and readable code. To explain the features, I will be using the concept of Test Data Builders, as described in the book Growing Object-Oriented Software, Guided by Tests. I hope that by the...
[Read More]
Understanding Thread Interruption in Java
You may come across use cases where you would need to perform some long running tasks on separate threads. You may have to request these tasks to finish doing their work, may be even before the tasks are completely done, so that the threads they would be running on can...
[Read More]
Using Optional to Specify Presence or Absence of a Value
Java 8 introduced Optional which serves as a container for values abstracting out the presence or absence of values.
In this article I will be showing how using it helps in writing null safe code.
[Read More]
Functional Programming for the Object Oriented Minds
In this article I make an attempt to share my understanding of functional programming and how it can help in improving
your daily work.
[Read More]