Saturday, October 17, 2009

Zkušenost s duchodovepojisteni.cz: nebrat!

Kdybyste jako já hledali relativně výhodného agenta pro penzijní připojištění, jděte někam jinam.

Uzavření penzijního připojištění na http://duchodovepripojisteni.cz/ (Jupiter Praha s.r.o.) tehdy fungovalo v pořádku. Posledního čtvrt roku ale byl na infolince jen záznamník, e-mailový kontakt je přesměrovaný na neexistující doménu, jednatel společnosti (podle adresy z whois) také nereaguje.

Na inzerovaných 110% měsíčního příspěvku můžete samozřejmě zapomenout—kromě výše uvedeného také proto, že účetní závěrka v obchodním rejstříku uvádí k 31. 12. 2008 závazky po splatnosti ve výši 197 tisíc Kč.

Zkrátka, nebrat...

Thursday, October 1, 2009

Power of story telling: Test-driven Development by Example

I generally prefer reference books to introductory tests, so when I got the opportunity to read Kent Beck's Test Driven Development By Example, I was really surprised how easy to read—dare I say fun?—it was. It seems human brain is really set up to handle stories better than pure facts, and to enjoy them more—the book propels the reader through the text in no time, using the "what's happening next?" feeling usually experienced only when reading fiction.

Taken from a very high level, most of the book is unsurprising: the basic idea of test-driven development can be explained in roughly five sentences, and the rest of the book follows naturally. The book does show quite a few techniques and tips on using the test-driven methodology, and it's useful to read them all in one place, although most programmers would eventually discover most of them independently—but did I mention reading the book was fun?

The third part of the book, titled "Patterns for Test-Driven Development", deviates from the "telling a story" format, and the difference is quite noticeable. Although the section is still interesting and useful, it tends a bit closer to the "patterns are so important the text must be repetitive and boring" style (of which The Gang of Four book is an instructive example) than I'd like. One particular section, which describes a very nice way to replace an internal data representation without breaking anything (this single section is a good enough reason for me to recommend the book!), contains two five-step recipes in a "How" subsection, and a detailed description in the "Why" subsection. The immediately following sections use the same "How"/"Why" pattern, in most cases unnecessarily—culminating with a completely ridiculous "How do you add a parameter to a method?" three-step program. Fortunately the "How"/"Why" pattern is gone in the next chapter.

I really missed a larger-scale example in the book; the examples provided very rarely contained a method longer than 10 lines, with roughly 3 lines being the average method size. Splitting a real-world program in so many small pieces of code seems to me rather impractical—it requires introducing too many helper objects to hold variables, and holding too many additional concepts (e.g. method names, object relationships) in one's head at a time to be able to think about the overall algorithm spanning perhaps 100 or 200 lines. A larger-scale example that demonstrated how real-world code written using the test-driven development methodology could look like would be quite useful to evaluate the methodology in other terms than achieving outstanding test code coverage.

In any case, the book is interesting and fun to read - even if you "never have time to write tests", don't hesitate to read it if you get the opportunity.

Tuesday, March 10, 2009

The real competition in payment card interchange

More competition brings consumers better products for lower prices - but be careful who the customers are. Aneace Haddad points out that the competition in payment cards schemes is not for merchants, who will accept all major schemes anyway, and not for customers, who know their card will be accepted, but for banks - and banks prefer the highest interchange fee, not lowest.

One more fact about interchange fees that should have been obvious - will merchants pass lower interchange fee to customers if their lobbying succeeds?:

If merchants pass along reductions to consumers, then their margins would be the same - so why all the cost and effort of lobbying the government to cut interchange? It doesn't make sense. Of course they will keep the savings.

Wednesday, January 7, 2009

Notes from CCC 2008

While attending [CCC 2008](http://events.ccc.de/congress/2008/), I was making notes, as usual (see [DIMVA](http://carolina.mff.cuni.cz/~trmac/blog/2008/notes-from-dimva-2008/), [DeepSec](http://carolina.mff.cuni.cz/~trmac/blog/2007/notes-from-deepsec-2007/)). Slides for some talks are available on talk pages in the [Fahrplan](http://events.ccc.de/congress/2008/wiki/Fahrplan), or try to find a [recorded video](http://events.ccc.de/congress/2008/wiki/Documentation#Conference_Recording). I hope the notes are useful.