JDD.14 dev contest solutions

JDD conference is behind us.
We had a great time doing a github dev contest
(Chief Troublemaker Officer) for conference attendees.
Some guys complained that the contest was too hard, good to hear!
It was out intention not to make it too trivial.

We received less than 10 solutions.
The Jury had a hard time doing Code Review,
it wasn’t easy to agree which one is the best.

Three solutions were really good and to be honest, equally good.
We decided not to draw lots, and choose the winner by delivery date.

And the next two, equally good solutions, delivered later.
Both guys were rewarded with Dice+ cubes.

Jerzy Chałupski - https://github.com/chalup/jdd-14-dev-contest

Mateusz Buczek - https://github.com/mzb/jdd-14-dev-contest

What are the other options

Guava is the right tool to solve the problem but it has some limitations.
First, you can compare only generic structures (like Maps),
so the original object structure (tree in this case) has to be transformed into a Map.

In the Map, keys are Employees and values are their salary.
It works well, but what if we think about adding and comparing more fields to Employee class?
Things goes also harder when we think about tracking changes on boss-subordinates relation.

What we like to recommend is JaVers, a dedicated tool for calculating
an object diff on complex
data structures.

Software engineer with 15+ years of professional experience. He focuses on lightweight and modern technologies around JVM. At Allegro, he works as a development team leader. JaVers project lead. Spock advocate. Editor in chief of allegro.tech/blog.