Java 8 HashMaps, Keys and the Comparable interface

* This post is intended to be a 101 quickie for the less experienced.
* It does not provide new or innovative ways of solving a certain problem,
* just summarizes a topic the way I see it.


Java 8 is coming with a lot of improvements/enhancements compared to the previous version. There are pretty many classes that have been updated, HashMap -as one of the most used data structure – is no exception. In this post, we are going to discover a new, important feature that Java 8 brings to us in case of hash collisions.

Continue reading “Java 8 HashMaps, Keys and the Comparable interface”

Writing integration tests for RabbitMQ-based components

I’m writing this post after days of misery, reverse-engineering, github browsing and finding (sort of) clever ways to get yet one step closer to the goal mentioned in the title.

Before we dive into the topic, let me clarify a few things. RabbitMQ, an AMQP (advanced message queueing protocol)  compatible message oriented middleware, (in my understanding) has no in-memory message broker implementation. ActiveMQ, another AMQP compatible implementation, on the other hand does provide such a component – easy to configure and use. The problem is that ActiveMQ implements version 1.0 of the protocol, while RabbitMQ is on version 0.9.1, and the two versions, of course, are not compatible. That is the main reason one might need QPID, a third MOM implementation that comes with an in-memory message broker and is able to “speak” multiple versions of the protocol.

Continue reading “Writing integration tests for RabbitMQ-based components”

Top 10+1 professional “deal breakers” of 2013

This little list is my favorite top 10 (and one extra). I did hear some of them personally, some were told by my friends.
Without any kind of further comments, let’s see the list itself:

  1. Starting with this release, we do not have bugs. At all.
  2. Eeeh, unit testing is not for me.
  3. We want to be agile, but not so strict agile. We only want the cool stuff like standups, but not retros. Retros are bullshit anyway.
  4. – “I need a bit of help”. -“No, you don’t”.
  5. I don’t think our way of working should be adjusted at all.
  6. Unit tests will make your code less flexible.
  7. I understand it can be useful, but don’t write clean code; you’ll confuse everyone with so many classes and methods.
  8. Don’t do refactoring, it only breaks working code.
  9. Don’t write unit tests, nobody’s paying for those. Customers are paying for features.
  10. We will implement an automated test system sometime, but first we have to conduct a feasibility study.

And get ready for my favorite one:

+1.  Hudson’s been broken for the past few weeks. Somebody should take care of it.