Wednesday, February 21, 2007

Stupid feelings...

Why do I necessarily feel stupid when using other people's libraries for REAL things?

I'm using now bdb xml and saxon8 for some code and I really feel retard... Nothing goes right, just when I think I nailed it I find out about another 'undocumented feature' or 'oh, so well known and so reported bug' to workaround, not to talk about the situations when I just want to find out more, or to do things 'by the book' (when I only have the 'quick-quickest-in-the-flashiest-of-the-flashes getting started' guide).

I admit, I'm no specialist in anything, I just happen to be able to handle multiple domains and, in my humble opinion, I should be able to work with things... I'm not saying I'm that smart, I'm just saying that things should be stupid enough... :)

I read a blog about why one hates frameworks, and, since then, I tend to find those flaws in everything I use: huuuuuge bushy architectures (incompatible, just to make things more fun), some interfaces to access the huge bushy things (don't instantiate it, GET an instance) and the polymorphism that isn't always the best choice (don't get an instance since the framework does not dispatch your call properly, just instantiate the FactoryImpl).

I know, I know, I choose java (known for some other bad things besides being slow) so I did it consciously to myself but I appeal to your better nature!

All the libraries are great as long as you just want to see if and how they work (that would be to take the "Hello, world!" and modify it in "Bonjour, monde!"), or maybe use it as a 'buzz-import' (you know, that import that we all love because it proves that we know how to 're-use code' and 'not reinvent the wheel'). When one gets over this and really wants to understand what is happening there, write code that not only works but is also readable, safe and in fully agreement with the principles of writing programs (if X.createY() actually returns a cooler subclass Z of Y, but the documentation states that it should return Y, I will never cast Y to Z), then one is in big trouble and the clouds of complete idiocy threaten to darken his/her blue skies of knowledge aspiration.

P.S. The title is NOT wrong, is a pun!

No comments: