rx test thread

Creative Rx usage in testing setup

I don’t know if events became part of software engineering since Graphical-User Interface interactions, but for sure they are a very convenient way of modeling them. With more and more interconnected systems, asynchronous event management has become an important issue to tackle. With Functional-Programming also on the raise, this gave birth to libraries such as RxJava. However, modeling a problem as the handling of a stream of events shouldn’t be restricted to system events handling.

android dagger dependency injection

Compile-time dependency injection tradeoffs in Android

As a backend software developer, I’m used to Spring as my favorite Dependency Injection engine. Alternatives include Java EE’s CDI which achieves the same result - in a different way. However, both inject at runtime: that means that there’s a definite performance cost to pay at the start of the application, the time it takes for all dependencies to be fulfilled. On an application server, where the application lifespan is measured in days (if not weeks), the start time overhead i

devops spring boot

More DevOps for Spring Boot

I think Spring Boot brings something new to the table, especially concerning DevOps - and I’ve already written a post about it. However, there’s more than metrics and healthchecks. In one of another of my previous post, I described how to provide versioning information for Maven-built applications. This article will describe how this later post is not necessary when using Spring Boot. As a reminder, just adding adding the spring-boot-starter-actuator dependency in the POM, enable

android continuous integration gradle jenkins puppet

Fully automated Android build pipeline

In the course of my current job, I had to automate jobs for building Android applications. This post aims at describing the pain points I encountered in order for you readers not to waste your time if you intend to do so. The environment is the following: Puppet to automate the infrastructureJenkins for the CI serverThe Android projectA Gradle build file to build itRobolectric as the main testing framework Puppet and Jenkins My starting point was quite sound, indeed. Colleagues had already

test unit test

Improve your tests with Mockito's capture

Unit Testing mandates to test the unit in isolation. In order to achieve that, the general consensus is to design our classes in a decoupled way using DI. In this paradigm, whether using a framework or not, whether using compile-time or runtime compilation, object instantiation is the responsibility of dedicated factories. In particular, this means the new keyword should be used only in those factories. Sometimes, however, having a dedicated factory just doesn’t fit. This is the case when

quality sonarqube

Quality Tools: humble servants or tyrants?

I’ve always been an ardent proponent of internal quality in software, because in my various experiences, I’ve had more than my share of crappy codebases to maintain. I believe that quality tools can increase the internal quality of the code, thus decreasing maintenance costs in the long run. However, I don’t think that such tools are the only way to achieve that - I’m also a firm believer in code reviews. Regarding quality tools, I started with Checkstyle, then with PMD,

bug database

Connection is a leaky abstraction

As junior Java developers, we learn very early in our career about the JDBC API. We learn it’s a very important abstraction because it allows to change the underlying database in a transparent manner. I’m afraid what appeared as a good idea is just over-engineering because: I’ve never seen such a database migration happen in more than 10 yearsMost of the time, the SQL written is not database independent Still, there' s no denying that JDBC is at the bottom of every database in

kotlin polyglot webapp

Polyglot everywhere - part 2

Last week, we set up a new project using the YAML flavor of Polyglot Maven. Now is time for some server-side code! As a long time Vaadin advocate, let’s create a very simple Vaadin application. This will have the added advantage to let us hack something on the client-side as well for the last part of this series. As we are fully polyglot, we will avoid the old Java language and use something very cool instead. As I’ve have been to some conferences with its number 1 advocate, I settl

build maven polyglot

Polyglot everywhere - part 1

This is the era of polyglot! Proponents of this practice spread the word that you’ve to choose the language best adapted to the problem at hand. And with a single team dedicated to a microservice, this might make sense. My pragmatic side tells me it means that developers get to choose the language they are developing with and don’t care how it will be maintained when they go away…​ On the other hand, my shiny-loving side just want to try - albeit in a more controlled env