Thursday, August 9, 2012

A tale of two twins

"Once upon a time an unfortunate poor design decision in Windows Metro class library had two brave classes named the same: "Uri".
One of them lived in the village of "System" while the other had a gracious hut in the "Windows.Foundation" hood."

Wait! What?!?
Does it mean that there are two different classes both named "Uri" classes in two basic namespaces?

Do I look like one old mage that goes around mumbling some non-sense fairy-tale? No; hence this is exactly what I meant: two classes, same name, same job, two different basic namespaces, both have an one-argument constructor with the same parameter type (string).

No need to say that you'll eventually end up using System.Uri instead of Windows.Foundation.Uri or viceversa (like I did).
And you can trust this old man when I say that you will ("Metro-style .NET application"... does it ring any bell?).

Now, this wouldn't be such a big issue and I will be no putting such a scene up since they are in two different namespaces.
After all namespaces are supposed to be born in this era to support exactly this behavior.
At least to support classes named the same way but that perform different tasks.
But that's not the case: the do exactly the same things.


Well, the story has a happy ending, you know: you end up on this post, know that the world is full of tricky tricks in the shape of class named the same and you return to your code sound and safe.

But I'd like to add an epilogue.
Please, dear Microsoft architect, consider the following two options:

  • Either provide ONLY ONE class to perform the same job
  • Or provide ONLY ONE class to perform the very same job
Choose one.
The End

Tuesday, August 7, 2012

Migliori e peggiori


Ma lasciarlo in pace Schwazer, no? Ha sbagliato, è distrutto e sicuramente la pagherà molto più cara di tanti degli ipocriti che fanno come lui ogni giorno (in tanti ambiti diversi) e la fanno invariabilmente franca.
Gli stessi che adesso lo condannano senza se e senza ma.

Se mai leggerà questo messaggio: "Da oggi cerca di essere solo migliore di te stesso. Non degli altri."


P.S. Il Codacons, nella persona del suo presidente Carlo Rienzi, si infili la sua causa legale su per quel culo flaccido che non pensa mai a denunciare chi davvero denigra e fa sfigurare l'Italia.