31 March 2013

Gradle, Groovy and other...

That probably will be a shortest post in this blog. Shortest coz I do not think that this subject deserve more. I should admit, more and more noise I can hear around this. I would say an any thread about a build system eventually diluted by Gradle. And you know what I think about this?

15 March 2013

Part 2. "Какая гадость... Какая гадость эта ваша заливная рыба"

- You should avoid the assertion and use an IllegalArgumentException.
- Why?
- Coz assertion will be disabled in production. It changes behaviour of your application and may lead to confuse.
- (?!)

Actually reasoning could be different, from "misuse of feature" coz "it generates java.lang.AssertionError that indicates significant error, like java.lang.OutOfMemoryError" up to "it put application on unpredictable state". I was pointed out to google such matter. And I actually did this, after all...

I won't dive into the jungle of distorted perception of the world. So many people, so many opinions. I don't care, really. That is depend on how bad experience had been in past. What actually I should admit, if experience was overdosed by Spring, the reasoning could jump a really unexpected direction. That actually may not surprise, if you never saw your application in profiler, just a Spring configuration… How you may know what really your application are doing, right?

So often in past, hunting the idea what the heck burning the Joules on a CPU, I can see the ridiculous situation when simple action followed by tremendous effort in attempt to do so. Just from top of my head, an update the element of array of rates of the currency pair with an incoming price may go through dozen of checks that this price is not null (or symbol it related to). Yes, dozen times! Damned org.springframework.util.Assert.* calls were everywhere. Just because application was written by many developers and each one decided to check input parameter(s) on each method entrance, on each f..n layer. I pretty sure that happen not only to me. Just have a look at the stack trace of your code, you may found similar cases on some of an execution paths. Especially if you uses Spring.

Yeah, it could be the my fault. Just a case of cognitive dissonance, but last time the insidious thought creeps my mind: continuous using of Spring may hurt. Let's have a look why the old fashion JDK assertions may be very attractive and I would encourage people to use them more broadly.

19 February 2012

QuickFIX buns

Writing applications with QuickFIX has some fun. The FIX engine there is a classical IoC, event driven. Application that uses it has to have only business specific things don't bother with tedious FIX noodles. Easy peeasy.

However, sometimes I have had anxiety because that specifics were not covered properly by tests. No, I tried, tried hard really. With mock or without it, tests for application with QuickFIX looks ugly and non readable due its restrictive and cumbersome design. Very often I had to remove them or simplify their verification because clearly understood that after couple months even I will not be able support it.

Eventually I came to an idea to simplify all that. QuickFIX users may appreciate this. :)

18 February 2012

Co - (r)relation?

Sometimes there are interesting things happen in a life. Interesting in a perspective of unexpected correlation. Or rather pretending to. Second time I fall back to Javascript , and second time in transition to a new job. What would it mean? :)

Anyway, here is just a modest announcement about the new reincarnation of an old syntax highlighter. Now it is all as it should be: project in SCM and so on... Ok, almost as it should be.

TomorrowOn Monday will check it on IE at work. WebKit it seems like works.

06 January 2012

FIX logs or why I love AWK

Some time of past year I spent in attempts to convince people did not rely on FIX logs especially if they collected from different JVMs or even hosts, in their attempts to measure latency on FIX message exchange. That may sounds silly, but finally I gave up and made some scripts that helps to automate process. Unexpectedly (for people, not for me) results were controversial and unpredictable. But this post is not about this. I decided pay tribute to a wonderful utility without which I just can't imagine how would I cope with that task. Let me write some warm words about AWK. It really outstanding one beside other data driven script engines due its power and flexibility.