Kotlin first impressions

other

Recently while starting work on a project we’ve (team of two ;)) decided to try something new and use Kotlin. The project is far from ready and still under active development, but after writing some code in Kotlin I’ve got few observations I’d like to share.

29 Nov 2017

Conversions in spring

java

The story is really simple. I wanted to accept my class as rest controller method param. I decided that I don’t want to convert a simple string to object every time and it would be faster if I do the conversion in the single place. After a quick research I’ve found Converter interface which looked like perfect for the job. After some digging and investigation it turns out that there is a lot of automagic in the Spring conversion service.

10 Nov 2017

Database migrations

java

Most of the application we are working on are built around the data. Since the information is the core value of the application we store it in the persistent and reliable storage - database. Applications evolve in time so does the way we store the data. In this post, I’m going to present my experiences and thoughts on evolving database schema.

31 Oct 2017

Poor's man domain events

java

While investigating @EventListeners in spring I’ve noticed very interesting annotation - @DomainEvents. In this post I’m going to check what can be achieved using @DomainEvents annotation and how to effectively use it with old good JPA. Let’s start with short introduction to domain event idea if you are not yet familiar with it. Now let’s go back to the @DomainEvents annotation in spring-data. Spring-data by default provides support for this annotation and it’s complementary annotation @AfterDomainEventPublication.

16 Oct 2017

Mock verifications in spock

groovy

I do like to write tests in Spock. I’m not sure if I know every feature available but until lately I felt comfortable with my knowledge. Obviously, I should not. There is always something that can catch you off guard. The question is how long will it take to figure out what’s happen.

9 Oct 2017

Events in spring v2

java

Last time I wrote about events in a spring based application I’ve introduced some basics on how events can be dispatched using spring infrastructure. In this post, I’m going to dig deeper into an order of handlers, exceptions and asynchronous events handlers.

29 Sep 2017

Jumping ships

other

At some point in your career, you will not be happy with just a job, you’ll be looking for something which will keep you interested and will sharpen your skills. Lately, I’ve been looking for something new to do. Since I got burned last time I’ve jumped ships I decided it is the time to prepare a list of the interview questions for my potential employer.

19 Sep 2017

On behavior verifications

best practices

When I’ve got some free time I try to add new features to springmock. Lately, after adding some new stuff I realized that double definition parsing class has more than one responsibility (class parsing, naming, definition creation, etc). So I’ve decided it’s time to refactor it and split responsibilities into dedicated classes. Once I did that and tests in the shared kernel started to pass I executed mvn verify just to be sure that everything was working and it wasn’t…​

6 Sep 2017

Code reviews

best practices

Code review is a great process which gradually improves code quality. It is a system you can implement in many ways. In this post I’m going to grumble about one particular way of performing code reviews - when there is only one person responsible for doing code reviews and suggesting/accepting/rejecting changes.

29 Aug 2017