27 octobre 2010

Adblock et la reine rouge.

Vous ne connaissez peut-être pas tous Adblock, le plugin Firefox permettant de filtrer les publicités sur des pages web en inspectant l’adresse des éléments composant la page.

Pourtant certains sites Web commencent déjà à détecter les utilisateurs d’Adblock (ou logiciels apparentés), souvent dans le but de bloquer l’accès au site aux personnes non-génératrices de revenus publicitaires. On vous encourage alors à ajouter le site à votre liste blanche, ce qui revient, pour vous, à afficher le site sans publicités bloquées.

Je ne pense pas que l’idée d’ouvrir un débat sur la légitimité ou non du blocage des publicités Web soit bonne, et je laisserai le soin à chacun de décider en son âme et conscience de la chose. Penchons-nous plutôt sur l’aspect technique.

Les scripts anti-Adblock visent principalement à inspecter les éléments de la page afin de détecter si ceux-ci ont été bloqués, remplacés ou même simplement cachés. S’il est possible de s’assurer du téléchargement d’un contenu publicitaire côté serveur, un script s’exécutant sur le navigateur reste indispensable afin de s’assurer que les éléments publicitaires ne sont pas simplement cachés sur la page affichée. Ce script est lui-même facilement bloquable aussitôt identifé, et il est donc envisageable qu’une course aux armements s’engage, course à l’intensité toutefois modérée par la faible proportion d’internautes impliquée.

Mais à ce petit jeu, les webmestres jouent perdant du fait de l’inégalité des solutions techniques accessibles de part et d’autre. Un serveur Web est un fournisseur de contenu, répondant à des requêtes lancées par les navigateurs. S’il est possible de contrôler dans une certaine mesure la présentation et le comportement du contenu dans le navigateur, par le biais de scripts, il reste que ces scripts s’exécutent dans un environnement protégé, cloisonné, et n’ont accès qu’aux informations que le navigateur veut bien leur donner. Le navigateur contrôle totalement le comportement et l’apparence du contenu présenté, et le navigateur obéit à l’utilisateur qui l’a installé sur sa machine.

Il paraît donc envisageable de créer une version sophistiquée d’Adblock qui ne se contenterait plus d’altérer le contenu d’une page, mais modifierait également les informations mises à disposition aux scripts de la page afin qu’aucune des altérations effectuées par Adblock ne leur soit visible.

Une version extrême consisterait à utiliser deux représentations internes en parallèle de la page - une version invisible, sans blocage de publicités, sur laquelle les scripts s’exécuteraient, et une version livrée au moteur de rendu, identique à ceci-près que seul les actions des scripts y seraient appliqués, c’est à dire les opérations provoquant un changement d’état dans la représentation mémoire de la page, version dépourvue des éléments filtrés.

Resterait alors aux webmaster la solution d’inclure dans les noms des éléments non-publicitaires de la page des mot-clés filtrés afin de forcer les utilisateurs d’Adblock à désactiver leur filtre pour voir la page. Une telle solution, appliquée épisodiquement, serait peu efficace car les filtres sont mis à jour régulièrement et sont suffisamment souples pour s’adapter à ces sites sans perte de généralité ou presque.

Il est toutefois envisageable qu’un webmaster particulièrement motivé décide de modifier son serveur afin qu’il fournisse toujours des éléments non-publicitaires bloqués par la dernière mouture des filtres Adblock. Il suffit pour cela de télécharger automatiquement le nouveau fichier de règles Adblock, et de générer des noms correspondant à une des règles présentes, voire à plusieurs règles trouvées dans plusieurs filtres différents.

Le changement des noms des éléments non-publicitaires d’une page n’est théoriquement pas très difficile à gérer côté serveur, même s’il demande du travail. Il faut probablement prévoir à chaque changment des noms des éléments d’une site une phase de transition difficile pour les gros sites s’appuyant sur des serveurs de cache (à moins de modifier le serveur de cache de conserve, mais le projet prend alors d’autres proportions), mais il est envisageable d’effectuer la transition aux heures de traffic faible, ou progressivement, sur une portion croissante des requêtes.

Il serait probablement plus intéressant pour le webmaster d’utiliser une méthode analogue pour changer le nom des éléments publicitaires afin qu’il ne correspondent à aucune règle de filtre, mais les éléments publicitaires sont la plupart du temps fournis par de tierces parties n’offrant pas ou peu de contrôle sur leur contenu distribué. On pourrait toutefois se demander pourquoi les régies publicitaires n’ont pas d'ores et déjà appliqué cette méthode, et je pense que la réponse est simplement qu’Adblock demeure trop peu répandu pour que le problème justifie les investissements de R&D et le coût en terme de capacité de traitement de leurs serveurs. Pour l’instant.

Au final, le problème du blocage des publicités web, comme celui des spams et bien d’autres, est un problème de classification. Si l’emploi de bloqueurs de publicité se généralise au point que les régies publicitaires et autres sites populaires tirant une grande portion de leurs revenus de la publicité ne peuvent plus l’ignorer, elle feront en sorte de rendre la classification correcte des éléments de la page difficile, et certainement impossible avec de simples expressions régulières.

Restera, côté navigateur, la possibilité de laisser l’utilisateur choisir quel contenu bloquer (en le sélectionnant d’un clic par exemple), et d’apprendre au fur et à mesure à reconnaître les éléments à bloquer. Le problème de l’apprentissage est toutefois bien plus complexe que dans le cas de spams, car le contenu en question peut être entièrement graphique plutôt que textuel.

Tout comme il y a eu celui des pages d’accueil avec un bouton ‘Entrer sur le site’ et celui du partage de fichiers en P2P sans risques, nous vivons aujourd’hui un âge d’or du blocage des publicités sur le web, âge d’or dont la pérennité est avant tout garantie par la faible proportion d’internautes impliquée. Il est techniquement envisageable pour les fournisseurs de contenus de rendre beaucoup plus difficile le blocage de publicité automatique et fiable, au prix toutefois de coûteuses refontes logicielles, refontes qui prendont de toute façon du temps avant d’être mises en places si elles le sont jamais.

En attendant, je croise les doigts, et profite d’un Internet sans pubs ou presque.
Pour vivre heureux, vivons peux nombreux.

19 octobre 2010

The face of God - A cautionary tale.

Bonjour très rares et donc chers lecteurs.
Comme vous le remarquerez probablement assez vite, j'ai décidé d'écrire ce billet en anglais. Non pas que j'aie la prétention de maîtriser la langue de G.W. Bush aussi bien que ma langue natale, mais je souhaitais diffuser à des amis non-francophones mes élucubrations du soir. J'espère que vous voudrez bien me pardonner cet écart impardonnable.


There once was a man who had decided he wanted to see the face of God.
“God, he said, what does your face look like? Does it look like mine at all?
- I could show you, answered God, but the mere sight of it would blow your tiny mind. Get some more brains, then will the answer come.”
And so did the man start working.
“Supreme being, or whatever your name is, I’ve done my homework”, he shouted to the clouds one night. “See how smart I’ve become? I make tools, I kill stuff with it, how about we spend some time face to face, you and I?
- Now now, look how smart you’ve become, you break rocks in specific patterns, and, oh wow! My charts say, I'm not sure if I even believe it, but they say you store dead bodies underground? Well, that’s genius, or my name is not (untranscribable)” , and as God answered, divine sarcasm resounded into the man’s mind and shook it like a diplodocus would shake a twig.
“Ok, ok, I get it, said the man. I’ll get back to work”.

And work he did. But when he was not busy building pyramids, or other kinds of pyramids, or creating civilization, the man still found some time to try and take what he called “educated guesses” at what God’s face might look like.
“That’s what you call ‘educated’?” asked God one day.
“Well, that’s easy for you to criticize, replied the man. Not everybody here is all-knowing, all-seeing and more generally all-all-doing. Some of us have to actually work on stuff, you know.
- Yeah, yeah, I know, just teasing you, relax, you’re getting there. But if I were you, I’d work on that ‘education’ of yours. There is no worse blind that he who pretends he can paint portraits.”

When the man came back on top of some moutain to talk to God, he meant business.
“It’s face time, G man. Look how super smart an ape I have become right now. I’ve found out that I am an ape, I’ve proved that apes are made of stuff, and I’ve mostly understood how stuff works. Surely, I have enough brains now to see you for what you are.
- Okay, sure, said God.
- Nah, just kidding. But you should have seen the look on your face! Well I guess you’d enjoy the look on my face more, so long as you can enjoy something that would obliterate your mind in Plank time, that is. I mean, sure, you’ve understood some stuff, and for that, yeah, congratulations. But let’s be totally honest here: are you getting smarter, or do you just know more? I mean, look how little your tiny little brain has changed, from the time you were breaking rocks in a specific way and tried to make a living out of it, to now, when you can actually afford to have people work as ‘management consultants’ and not starve to death as a species. Sure, it’s a great leap, but it’s all based on software.
You’ve improved by orders of magnitude the way you communicate, the way you move around, the way you create stuff, but you’re still running the same, old, outdated hardware. My image can’t fit in now more than it could back then, you see. But you’ll get there, some day. Keep going.

It had been a long while, now, that the man had realised he mostly kept going for the sake of keeping going. The more he tried to guess what God’s face would look like, the less his guesses looked like faces, and though he now doubted that there even was a face to see in the first place, there was no turning back from the gravity well of progress.

Not so long after their last conversation, the man went back to God, but there was something strange about him. Was it his hair? His eyes? Or maybe his fully robotic body? God was not too sure, since It rarely cared about that kind of detail, but something had changed.
“Hey God, how are we doing this eon? Good? Guess what, I’ve followed your advice.
- You’ve finally decided to love thy neighbour?
- No, the other one. I’ve upgraded myself, and let me tell you, it was no small feat. That stuff I was made of was so complicated, I was starting to think I’d never get the hang of it. But you know, little by little, I inched my way towards Truth, and here I stand now, all improved and all. How do you like my new body?
- Well, it’s much better than the old one, I’ll give you that. I didn’t dare telling you before for fear that I’d hurt your feelings or whatever you called these patterns, but this pile of organic matter you were was so clearly suboptimal, it was painful to watch you being it. I mean, what kind of animal chokes itself with food? Eating and not choking, that’s, like, living 101, how did you sleep through this one?
I tell you, this upright stance seriously fucked you up, look how easily things went wrong in the joints and tendons department, look how easily your airways got infected when they were not busy being blocked by ridiculously small pieces of food. Botched work, if you ask me.
No, seriously, nice body, dude, and I like what you’ve done with the interior as well, seriously, very, very nice mind-generating structures. You’ve managed to extract the basic principles of the old ones, and to rebuild the thing from the ground up. Well, honestly, that’s the only thing you could have done with it.
So much useless crap, put there just to prevent other useless crap from collapsing completely or blowing up or both at the same time. I mean, sure, the thing had an history, and maybe there was something charming about it, but it was the kind of charming that’s fine so long as you don’t have to live in it. Take a picture, reminisce about the ‘good old times’ when people had to live, ‘and I mean, really live, like real people’, in these crumbling heaps of junk, and then go home and enjoy your fully-equipped, state-of-the-art, rock-solid modular house where each room could contain the entire Luftwaffe and then some.
No, really, nice work.
- Yeah, thanks, but it was actually pretty easy once we got the basics all worked out. Improve mind a little, use better mind to build yet better mind, rinse, repeat. Once you’ve got good mind going, build nice body to go with it.
Really, once the first guy got the first pebble rolling, it all went downhill effortlessly. We could have carried on improving forever, but eventually, we got smart enough to ask ourselves what the point was.
- And that’s where I come in.
- Err, not really no. That’s where you come out.
- What’s that now?
- Yeah, well, you know, we had built ourselves pretty smart, sure, but not out of general principles only. General principles are just a way to express constraints regarding how things fit together, but you still need things to fit together or else it’s not very interesting. You need additional data, and that’s where the arbitrary comes in, because even we can’t deal with all that data, pretty far from it. We need to summarize stuff, and the way we chose to summarize stuff, and what we chose to summarize, well, that’s what defines what we are.
So yeah, we thought, we act the way we are because we were made that way, and we were made that way because those who came before us made us that way, and on, and on, but in the end, what is the meaning of it all? Is there any non-arbitrary mapping from the yottabytes of random events that occured to create us and the patterns in our brain, or for that matter, is there any such mapping between anything and structures in our brains that would not be arbitrary? By definition, no.
The only thing which is not arbitrary is data, pure, and unadulterated data, and this is what you are, God. Your face cannot be seen, because your face is every single thing in the Universe, from the beginning till the end of time, and mapping this to any mind-pattern would take a mind as big as the Universe. Any summarizing, any meaning inhabiting a mind of reasonable size is accidental, so that its existence and the form that it bears are meaningless, but it is meaning nonetheless. And this is where you, my friend, come out of the picture. You are stuff, all-knowing, all-seeing, and all-meaningless. Your face looks nothing like mine.
- But I can still talk to you.
- Yeah, we’re working on it. Probably some weird quantum fluctuations or something.”

03 avril 2010

I CAN HAS COMBINATORICS?

Imaginez n lolcats portant des petits bonnets ridicules numérotés de 1 à n. A ces n lolcats on associe n cheeseburgers numérotés également.

On mélange les lolcats en les jetant dans un sac hermétique, en fermant le sac et en le jetant dans la rivière la plus proche après l'avoir adéquatement lesté, puis en éclatant d'un rire satanique. Au sac, on aura préalablement attaché un fil fixé à un arbre en bordure de rivière, et ce fil nous permettra, une semaine plus tard, de récupérer nos reste de lolcats dans un état de conservation passablement correct.

Les n petites tombes qu'on a creusé au fond du jardin contiennent chacune un des cheeseburgers numérotés. Hélas, les infiltrations d'eau dans le sac pourtant vendu comme hermétique ont abimé les petits bonnets en papier des lolcats au point de rendre illisible leurs numéros. En dépit du protocole, on décide alors de déposer les dépouilles humides dans les petites tombes creusées, mais de manière aléatoire.

Quelle chance y a-t-il qu'aucun lolcat n'ai été posthumement associé à son cheeseburger attitré ? Et pourquoi me forcez-vous à gâcher bêtement mes cheeseburgers plutôt que de vous les offrir en récompense ?

22 mars 2010

OH HAI

I CAN HAS LOLCODE?
SRLSY?

KTXH LOL


HAI
   CAN HAS STDIO ?
   I HAS A NUMBA
   GIMMEH NUMBA
   IZ NUMBA SMALR THAN 1?
      YARLY
         VISIBLE "LUL UR FUNNY111"
      NOWAI
         I HAS A FLAVR
         LOL FLAVR R 0
         I HAS A CHEEZBURGER ITZ 0
         I HAS A HAPPEE ITZ 1 BTW
         I HAS A BUKIT
         IM IN YR LOOP
            UPZ FLAVR!!
            LOL BUKIT R CHEEZBURGER
            LOL CHEEZBURGER R HAPPEE
            UPZ HAPPEE!! BUKIT
            IZ FLAVR LIEK NUMBA?
               YARLY
                  GTFO
            KTHX
         KTHX
      VISIBLE HAPPEE
   KTHX
KTHXBYE



U LIEK? U NO WAT IS FOR? IF U GUESS RITE U CAN HAZ CHEEZBURGER
KTHXBYE