piątek, 29 maja 2015

Most common (anti-)pattern

I guess that by now everyone knows that Singleton is considered mostly harmful and definitely overused. Many people have said that it hinders testing but there is nothing more convincing that unit test that completes fine on its own but mysteriously fails when whole suite is launched. It looks strange when even after doing reset() and adding new when() rules the mock created by Mockito behaves in wrong way. It is a lot less mysterious when you find a singleton that was injected with mock object on class load and ignores the fact that whole Spring context was created and destroyed multiple times ever since.

czwartek, 26 marca 2015

ORA-00932: inconsistent datatypes: expected - got (N)CLOB

If you are modifying query and suddenly started getting ORA-00932 out of nowhere, remember that this error comes not only from comparing CLOB column with something else but also from using distinct on table that has CLOB columns.

czwartek, 29 stycznia 2015

Spammers hall of (f|sh)ame

I decided to reward  all spammers that are able to bypass gmail filters with place on this short list. It helps me remember which companies can't afford to pay for real marketing, have inferior product and think that best way to gain a customer is to waste their tame and annoy them.

  • Volkswagen Group Polska Sp. z o.o. 
  • TERG S.A. (Media Expert)
  • T-MOBILE POLSKA S. A. +1