Philipp Hauer's Blog

Java Ecosystem, Kotlin, Distributed Systems, Sociology of Software Development

Effective Staff Appraisals with Employee Journey Maps

Posted on Nov 19, 2019

Effective Staff Appraisals with Employee Journey Maps

Employee journey maps are a tool for preparing and structuring staff appraisals. They trigger reflection processes and reveal the employee’s motivation. Moreover, they can lead to interesting insights as they compare the different perceptions of the participants. And the best is: You only need two sheets of paper and a pencil.

Don't Put Fat Jars in Docker Images

Posted on Oct 14, 2019

Don't Put Fat Jars in Docker Images

Putting a fat jar into a Docker container is a waste of storage, bandwidth and time. Fortunately, we can leverage Docker’s image layering and registry caching to create incremental builds and very small artifacts. For instance, we could reduce the effective size of new artifacts from 75 MB to only one MB! And the best is that there is a plugin for Maven and Gradle handling everything for us.

Modern Best Practices for Testing in Java

Posted on Sep 9, 2019

Modern Best Practices for Testing in Java

Maintainable and readable test code is crucial to establish a good test coverage which in turn enables implementing new features and performing refactorings without the fear of breaking something. This post contains many best practices that I collected over the years of writing unit tests and integration tests in Java. It involves modern technologies like JUnit5, AssertJ, Testcontainers, and Kotlin. Some recommendations might be obvious to you, but some might conflict with what you’ve read in books about software development and testing.

MongoDB: Useful Development Tools and Snippets

Posted on May 8, 2019

MongoDB: Useful Development Tools and Snippets

I’m using MongoDB in production for many years. In this time, I tried different tools and development approaches; some turned out to be useful for us, others don’t. In this post, I like to share handy CLI tools for working with MongoDB, a Docker-based local development approach and helpful Mongo shell snippets.

Vaadin 10+: SASS Integration and CSS Refresh during Development

Posted on Apr 15, 2019

Vaadin 10+: SASS Integration and CSS Refresh during Development

Since Vaadin 10, SASS is no longer supported out of the box. Fortunately, it’s really easy to integrate SASS in a Vaadin 10+ app and its Maven build. But how can we ensure a fast feedback cycle during the SASS development? Restarting the app is cumbersome. Even a page reload would reset the UI state, which leads to annoying clicking through the app. Luckily, there is an approach that automatically exchanges the changed CSS without any browser refresh or app restart.

Focus on Integration Tests Instead of Mock-Based Tests

Posted on Apr 1, 2019

Focus on Integration Tests Instead of Mock-Based Tests

Testing classes in isolation and with mocks is popular. But those tests have drawbacks like painful refactorings and the untested integration of the real objects. Fortunately, it’s easy to write integration tests that hit all layers. This way, we are finally testing the behavior instead of the implementation. This post covers concrete code snippets, performance tips and technologies like Spring, JUnit5, Testcontainers, MockWebServer, and AssertJ for easily writing integration tests. Let’s discover integration tests as the sweet spot of testing.

Sealed Classes Instead of Exceptions in Kotlin

Posted on Feb 5, 2019

Sealed Classes Instead of Exceptions in Kotlin

Exceptions are a common mean to handle errors. However, they have some drawbacks when it comes to compiler support, safety and traceability. Fortunately, we can leverage Kotlin’s sealed classes to create result objects that solve the mentioned problems. This way, we get great compiler support and the code becomes clean, less error-prone, easy to grasp and predictable.

How to Motivate a Team of Software Developers

Posted on Jan 7, 2019

How to Motivate a Team of Software Developers

Motivation leads to higher performance and satisfaction in the job. But how can we motivate a team of software developers? Sadly, there are common misconceptions about motivation that do more harm than good. Fortunately, science has already discovered the motivators that work: autonomy, mastery, and purpose. This post presents these three pillars of motivation and concrete actions to implement them in software development environments.

Talk 'Best Practices for Unit Testing' at the KotlinConf 2018 in Amsterdam

Posted on Oct 15, 2018

Talk 'Best Practices for Unit Testing' at the KotlinConf 2018 in Amsterdam

On Oct 05, 2018, I held a talk about Best Practices for Unit Testing in Kotlin at the awesome KotlinConf in Amsterdam. I’m still overwhelmed by the packed room taking about 650 people. Thank so much for your interest! I’m also thrilled by the positive feedback on twitter. In this post, you can find the recording and the slides of my talk. The KotlinConf was an awesome conference. It was so great to meet the kind and open Kotlin community in person. Let’s carry on!