<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RTFB</title>
	<atom:link href="http://www.readtfb.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.readtfb.net</link>
	<description>Scientia non habet inimicum nisi ignorantem</description>
	<lastBuildDate>Tue, 17 Jan 2012 21:52:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Snow leopard and Qt/PyQt 4.8.x won&#039;t work</title>
		<link>http://www.readtfb.net/2012/01/17/snow-leopard-and-qtpyqt-4-8-x-wont-work/</link>
		<comments>http://www.readtfb.net/2012/01/17/snow-leopard-and-qtpyqt-4-8-x-wont-work/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 21:52:19 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[OSS]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=866</guid>
		<description><![CDATA[If you try to install, even with Homebrew the latest version of Qt the 4.8.x, you may end up haing a surprise like that : ImportError: dlopen&#40;/usr/local/lib/python/PyQt4/QtWebKit.so, 2&#41;: Symbol not found: _kCFWebServicesProviderDefaultDisplayNameKey &#160; Referenced from: /Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit &#160; Expected in: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation This is coming precisely from a Qt issue that don't seem to be resolved anytime [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">If you try to install, even with Homebrew the latest version of Qt the 4.8.x, you may end up haing a surprise like that :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">ImportError</span>: dlopen<span class="br0">&#40;</span>/usr/local/lib/python/PyQt4/QtWebKit.<span class="me1">so</span>, <span class="nu0">2</span><span class="br0">&#41;</span>: Symbol <span class="kw1">not</span> found: _kCFWebServicesProviderDefaultDisplayNameKey</div>
</li>
<li class="li1">
<div class="de1">&nbsp; Referenced <span class="kw1">from</span>: /Library/Frameworks/QtWebKit.<span class="me1">framework</span>/Versions/<span class="nu0">4</span>/QtWebKit</div>
</li>
<li class="li1">
<div class="de1">&nbsp; Expected <span class="kw1">in</span>: /System/Library/Frameworks/CoreFoundation.<span class="me1">framework</span>/Versions/A/CoreFoundation</div>
</li>
</ol>
</div>
<p style="text-align: justify;">This is coming precisely from a <a href="https://bugreports.qt.nokia.com/browse/QTBUG-23157">Qt issue</a> that don't seem to be resolved anytime soon, so anyway you're warned now, revert back to 4.7.x you have no choice. Except if you want to buy Lion <img src='http://www.readtfb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: justify;"><em>Vale</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2012/01/17/snow-leopard-and-qtpyqt-4-8-x-wont-work/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Handle Celery-dependent tests in Django and with django-jenkins</title>
		<link>http://www.readtfb.net/2012/01/15/handle-celery-dependent-tests-in-django-and-with-django-jenkins/</link>
		<comments>http://www.readtfb.net/2012/01/15/handle-celery-dependent-tests-in-django-and-with-django-jenkins/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 16:45:33 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[OSS]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=861</guid>
		<description><![CDATA[So in your life, one of these days, you're going to realize you need tests, and that "maybe" you also need to test components that depend on several Celery tasks. Well to help you make this day more productive and less painful, here's a few tips. First to make it work with Django-celery, a pretty [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">So in your life, one of these days, you're going to realize you need tests, and that "maybe" you also need to test components that depend on several Celery tasks.</p>
<p style="text-align: justify;">Well to help you make this day more productive and less painful, here's a few tips.</p>
<p style="text-align: justify;">First to make it work with Django-celery, a pretty good but small documentation is available here<a href="http://ask.github.com/django-celery/cookbook/unit-testing.html"> http://ask.github.com/django-celery/cookbook/unit-testing.html</a> it may seems small and not enough, but it actually is enough. To sum up all you need to make it work with <em>./manage.py test </em>is to change the test runner to :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">TEST_RUNNER = <span class="st0">'djcelery.contrib.test_runner.CeleryTestSuiteRunner'</span></div>
</li>
</ol>
</div>
<p style="text-align: justify;">But it's not enough, soon when you think everything's over, you'll want to deploy and make it go through Jenkins's testing processes. Well i don't know about you but to me the <a href="https://github.com/kmmbvnr/django-jenkins">django-jenkins</a> project is quite a good one and i use it everyday but it has one flaw, it already as its designated TEST_RUNNER so if you try to execute your tests through <em>./manage.py jenkins</em> it won't work and you'll get at least a <strong>Connection Refused </strong>error.</p>
<p style="text-align: justify;">Here's how to fix this, the documentation says if you want to replace the TEST_RUNNER you may do so, but the class you'll use needs to inherit from <em>django_jenkins.runner.CITestSuiteRunner </em>and if you want the Celery tasks to work you need to use the <em>djcelery.contrib.test_runner.CeleryTestSuiteRunner</em>.</p>
<p style="text-align: justify;">Fair enough, here's what i did. I created a new class :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">from</span> django_jenkins.<span class="me1">runner</span> <span class="kw1">import</span> CITestSuiteRunner</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">from</span> djcelery.<span class="me1">contrib</span>.<span class="me1">test_runner</span> <span class="kw1">import</span> CeleryTestSuiteRunner</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">class</span> MixedInTestRunner<span class="br0">&#40;</span>CITestSuiteRunner, CeleryTestSuiteRunner<span class="br0">&#41;</span>:</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; <span class="kw1">pass</span></div>
</li>
</ol>
</div>
<p style="text-align: justify;">Why not ? and used it as such defining the new TEST_RUNNER by changing the settings's variable JENKINS_TEST_RUNNER to the newly created class.</p>
<p style="text-align: justify;">And voilà.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2012/01/15/handle-celery-dependent-tests-in-django-and-with-django-jenkins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>La puissance et le contrôle</title>
		<link>http://www.readtfb.net/2011/09/24/la-puissance-et-le-controle/</link>
		<comments>http://www.readtfb.net/2011/09/24/la-puissance-et-le-controle/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 10:45:19 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=836</guid>
		<description><![CDATA[En développement, comme dans beaucoup d'arts martiaux, on peut devenir fort assez rapidement. On peut se fixer des objectifs (une ceinture, une victoire / maitriser une technologie ou réaliser un projet perso) et les atteindre rapidement selon le language, le maître et l'implication qu'on y met. Certains langages, tout comme certains arts martiaux, poussent à [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">En développement, comme dans beaucoup d'arts martiaux, on peut devenir fort assez rapidement. On peut se fixer des objectifs (une ceinture, une victoire / maitriser une technologie ou réaliser un projet perso) et les atteindre rapidement selon le language, le maître et l'implication qu'on y met.</p>
<p style="text-align: justify;">Certains langages, tout comme certains arts martiaux, poussent à l'efficacité, à la rigueur ou aux résultats rapides. En Tae Kwon Doe ou en Jujitsu, on aura tendance à privilégié la rapidité d'execution et les résultats seront assez rapide. Pour utiliser des termes usuels : la courbe d'apprentissage n'est pas très raide, et on peut avoir des résultats imparfait dès le début. En revanche, en <a title="Karaté Shotokan" href="http://fr.wikipedia.org/wiki/Sh%C5%8Dt%C5%8Dkan-ry%C5%AB" target="_blank">Karaté Shotokan</a>, on aura tendance à privilégier un apprentissage long et arride à base de Kata, il suffit de regarder le karaté-kid (vieille version) pour comprendre qu'il y a plus trippant comme apprentissage des bases...</p>
<p style="text-align: justify;">On comprends facilement la parallèle avec la programmation, les langages de scripting (Python, PHP, ...) se concentrant plus sur les résultats et l'execution, et les langages historiques comme Java/C++ étant plus orienté rigueur.</p>
<p style="text-align: justify;">Mon point est le suivant, la puissance s'acquière rapidement à la fois en informatique et en arts martiaux, mais l'évolution et le travail fait qu'on lui substitue la maîtrise de notre art. Je m'explique : si on prends la programmation cette fois, au début on commence par le langage, seulement le langage, on avance et on s'habitue aux <a title="Design Patterns" href="http://en.wikipedia.org/wiki/Design_pattern_(computer_science)" target="_blank">design patterns</a>, on prends en main des architectures usuelles, des technologies afférentes, ensuite des méthodes de travails - des méthodes de tests.</p>
<p style="text-align: justify;">Seulement pour un oeil non-averti qu'est ce qui va différencier un développeur sénior qui travaille en TDD - d'un junior "confirmé" qui a acquis la puissance mais pas la maîtrise. Très clairement le développeur sénior mettra plus longtemps, à specs équivalente, pour réaliser le travail, à cause du TDD, à cause de la rigueur et de la précision des gestes qu'il va chercher à atteindre. Vous allez me dire qu'en terme de qualité il n'y aura pas photos, très certainement. Mais un travail parfait sans bug n'existe pas en temps raisonnable et quelques tests basiques (réalisés par la QA) permettent souvent d'élaguer les erreurs usuelles.</p>
<p style="text-align: justify;">La maîtrise, à terme, se substitue, souvent trop, à la puissance et à l'efficacité.</p>
<p style="text-align: justify;">C'est peut-être là le rôle de ré-apprendre de nouveaux langages au fur et à mesure de son évolution, pour avoir non-seulement de nouveaux points de vue à explorer (chaque langage ayant son paradigme), mais aussi pour redécouvrir la puissance que l'on obtient au début en récompense d'avoir appris.</p>
<p style="text-align: justify;">Sur ce,</p>
<p style="text-align: justify;"><em>Vale</em></p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2011/09/24/la-puissance-et-le-controle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IncidentsRATP - IncidentsTransports est publié</title>
		<link>http://www.readtfb.net/2011/06/08/incidentsratp-incidentstransports-est-publie/</link>
		<comments>http://www.readtfb.net/2011/06/08/incidentsratp-incidentstransports-est-publie/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 18:16:14 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[IncidentsRATP]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[GPL]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=823</guid>
		<description><![CDATA[Voilà c'est fait, après maintes péripéties et une attente longue je l'avoue, le projet est enfin publié en AGPL v3. Le code est disponible ici : https://github.com/ssaboum/IncidentsTransports Le projet est en Python utilisant Django, toute aide est bien sûr la bienvenue et la v2 se prépare tranquillement. Enjoy ! Vale]]></description>
			<content:encoded><![CDATA[<p>Voilà c'est fait, après maintes péripéties et une attente longue je l'avoue, le projet est enfin publié en AGPL v3.</p>
<p>Le code est disponible ici : <a href="https://github.com/ssaboum/IncidentsTransports">https://github.com/ssaboum/IncidentsTransports</a></p>
<p>Le projet est en Python utilisant Django, toute aide est bien sûr la bienvenue et la v2 se prépare tranquillement.</p>
<p>Enjoy !</p>
<p><em>Vale</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2011/06/08/incidentsratp-incidentstransports-est-publie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Etat de fait et fatalité</title>
		<link>http://www.readtfb.net/2011/05/31/etat-de-fait-et-fatalite/</link>
		<comments>http://www.readtfb.net/2011/05/31/etat-de-fait-et-fatalite/#comments</comments>
		<pubDate>Tue, 31 May 2011 19:10:55 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[Management]]></category>
		<category><![CDATA[Réalité]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=818</guid>
		<description><![CDATA[Un état de fait m'énerve, il m'énerve d'une part parce que dans d'autres domaines professionnels, il n'est pas aussi exacerbé, et d'autre part parce que je pense que la tendance s'accélère. Pour résumer, Un cuisiner peut devenir un chef qui se réinvente tout le temps, et fait de sa cuisine un art ; Un architecte [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Un état de fait m'énerve, il m'énerve d'une part parce que dans d'autres domaines professionnels, il n'est pas aussi exacerbé, et d'autre part parce que je pense que la tendance s'accélère.</p>
<p style="text-align: justify;">Pour résumer,</p>
<ul style="text-align: justify;">
<li>Un cuisiner peut devenir un chef qui se réinvente tout le temps, et fait de sa cuisine un art ;</li>
<li>Un architecte construit des edifices, et tire à chaque itération des leçons de ses erreurs ;</li>
<li>Un médecin diagnostique des maladies et construit les contre-mesures adaptées ;</li>
<li>Un manager analyse, planifie et anticipe les problèmes de son projet et de son équipe pour atteindre un objectif ;</li>
<li>Enfin, et ce pour les décideurs et l'opinion publique, un développeur ...  <strong>pisse du code.</strong></li>
</ul>
<p style="text-align: justify;">Il pourrait être en Inde, en Thaïlande ou en région parisienne, ça ne change quasi rien, il lui suffit d'une tête (mal faite ou bien faite) d'un dossier de spec, d'un manager qui gueule, d'une QA (elle-même outsourcée) chargée de vérifier que ça correspond bien aux desiderata du client, <strong>et c'est tout !</strong></p>
<p style="text-align: justify;">Mais alors me direz-vous, "ce n'est pas le cas partout, quid des startups ? quid des méthodologies agiles ? quid du DevOps et du Software Craftsmanship !</p>
<p style="text-align: justify;">Ben rien, en startup, j'en ai vu beaucoup qui considère les devs comme tout le monde, alors que pour moi (biaisé comme je suis) c'est eux qui créé le produit !</p>
<p style="text-align: justify;">Et là on atteints mon favoris, les méthodologies Agiles, Scrum, Lean, Xp, Kanban etc... Quasi-toutes responsabilisantes pour les devs, mettant l'équipe au centre, facilitant leur travail etc... Eh bien désolé de vous décevoir, mais au delà des laboratoires de Toyota, on se retrouve dans le beau petit monde du <strong>Flicage </strong>ou le standup devient un reporting au manager, et où beaucoups de gourous et pratiquant (français) vous expliqueront bien gentiment que les développeurs sont des "gens simples"/ressources/abrutis qu'il faut savoir <strong>controller. </strong>Et qu'une fois leurs pouvoirs débloqués vous pourrez enfin bien vous faire voir de votre hierarchie !!</p>
<p style="text-align: justify;">youhou... Sur ce</p>
<p style="text-align: justify;"><em>Vale</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2011/05/31/etat-de-fait-et-fatalite/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Should i really learn Java ?</title>
		<link>http://www.readtfb.net/2011/05/01/should-i-really-learn-java/</link>
		<comments>http://www.readtfb.net/2011/05/01/should-i-really-learn-java/#comments</comments>
		<pubDate>Sun, 01 May 2011 16:58:26 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[java is not cool]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=815</guid>
		<description><![CDATA[So i've been a professional Java developper for a few years now, and the question seems interesting to me. Should, let's say a student, really learn Java even if he does not want to do "Enterprise applications" ? Short answer, Yes. Long answer, you've got to know what Java is and what it's not, and [...]]]></description>
			<content:encoded><![CDATA[<p>So i've been a professional Java developper for a few years now, and the question seems interesting to me. <strong>Should, let's say a student, really learn Java even if he does not want to do "Enterprise applications" ?</strong></p>
<p>Short answer, Yes.</p>
<p>Long answer, you've got to know what Java is and what it's not, and i'm not talking about technical specs, but more about the place of Java in the world right now. Let's begin with what it's not, <strong>it's not :</strong></p>
<ul>
<li><strong>what the cool kids do right now ! </strong>they do ruby, scala, clojure, even erlang (so cool...), but they don't do java unless they have to.</li>
<li><strong>what the web is all about right now ! </strong>the web is about fast prototyping, agile development, continuous integration and deployment. Java is heavy, not designed for rapid prototyping and deployment is so painful that you need <a href="http://www.zeroturnaround.com/jrebel/" target="_blank">third party drug</a> to ease the pain.</li>
<li><strong>what you'll want to be doing for the rest of your life !</strong></li>
<li><strong>the best way to create distributed, scalable applications !</strong></li>
<li><strong>going to change anytime soon. </strong>It may be an advantage or a drawback, depending mainly on your age and goals.</li>
</ul>
<p>However, <strong>Java is :</strong></p>
<ul>
<li><strong>A de-facto standard, that you need to know !</strong></li>
<li><strong>running on the best VM out here !</strong></li>
<li><strong>the obvious language if you really really need a job ! </strong>So treasure it because it's just like Cobol, it's here to stay. You want it or not.</li>
<li><strong>maybe the last non-Functionnal language you'll see in the coming years ! </strong>At least if we keep on creating languages to leverage the multi-core way.</li>
</ul>
<p>Maybe i'm wrong, maybe it's all bullshit and i don't know what i'm talking about. Even is so, Learn Java, the hard way if you have to. Because even some of the coolest things out there (<a href="http://mahout.apache.org/" target="_blank">Mahoot</a>, <a href="http://hadoop.apache.org/" target="_blank">Hadoop</a>, <a href="http://lucene.apache.org/java/docs/index.html" target="_blank">Lucene</a>, <a href="http://lucene.apache.org/solr/" target="_blank">Solr</a>) are in Java, and Google's main language is still Java. Sur ce</p>
<p><em>Vale.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2011/05/01/should-i-really-learn-java/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Crypto - Vigenère</title>
		<link>http://www.readtfb.net/2011/04/07/crypto-vigenere/</link>
		<comments>http://www.readtfb.net/2011/04/07/crypto-vigenere/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 21:19:20 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[crack]]></category>
		<category><![CDATA[crypto]]></category>
		<category><![CDATA[Vigenere]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=799</guid>
		<description><![CDATA[Je me remet au point niveau sécurité, alors même si j'apprécie beaucoup reprendre les bases de sécurité web, on va commencer par de la cryptographie, histoire de limiter les trucs *****. Donc le but de ces petits exercices, c'est plus de se souvenir de certains cryptages et de prendre des reflexes pour les reconnaître et [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Je me remet au point niveau sécurité, alors même si j'apprécie beaucoup reprendre les bases de sécurité web, on va commencer par de la cryptographie, histoire de limiter les trucs *****.</p>
<p style="text-align: justify;">Donc le but de ces petits exercices, c'est plus de se souvenir de certains cryptages et de prendre des reflexes pour les reconnaître et les casser. On commence par un <a title="Le chiffre de vigenère" href="http://fr.wikipedia.org/wiki/Chiffre_de_Vigen%C3%A8re" target="_blank">Vigenère</a>, je laisse le soin à Wikipedia de vous en rappeler les termes, comment le cryptanalyser ?</p>
<p style="text-align: justify;">Outre le fait qu'on peut penser à un chiffre de Vigenère quand certaines lettres et ponctuations reviennent souvent, la cryptanalyse de ce chiffrement utilise <a title="Test de kasiski" href="http://en.wikipedia.org/wiki/Kasiski_examination" target="_blank">le test de Kasiski</a> et si vous n'avez pas l'envie de ré-implémenter ce crack Simon Liu a codé en Python un utilitaire pour cracker ce chiffrement, et l'appli web est disponible ici : <a title="Pygenere" href="http://smurfoncrack.com/pygenere/index.php" target="_blank">Automatic Vigenere Decoder/Solver</a>.</p>
<p style="text-align: justify;">Si j'ai un peu de temps, j'en ferais un semblable en améliorant un peu son code qui est déjà très compéhensible.</p>
<p style="text-align: justify;"><em>Vale</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2011/04/07/crypto-vigenere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TOR et HADOPI</title>
		<link>http://www.readtfb.net/2011/03/28/tor-et-hadopi/</link>
		<comments>http://www.readtfb.net/2011/03/28/tor-et-hadopi/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 11:00:58 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[HADOPI]]></category>
		<category><![CDATA[TOR]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=810</guid>
		<description><![CDATA[Juste pour faire un petit point autour de la HADOPI et plus précisément de la position de la HADOPI envers les proxy, et plus spécifiquement de la distribution des proxy comme le fait TOR. La HADOPI n'empêche en rien l'utilisation de proxy, en somme l'utilisation de TOR ou d'un quelque autre proxy pour se connecter à internet (et donc [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Juste pour faire un petit point autour de la HADOPI et plus précisément de la position de la HADOPI envers les proxy, et plus spécifiquement de la distribution des proxy comme le fait <a href="http://www.torproject.org/" target="_blank">TOR</a>.</p>
<p style="text-align: justify;">La HADOPI n'empêche en rien l'utilisation de proxy, en somme l'utilisation de TOR ou d'un quelque autre proxy pour se connecter à internet (et donc utiliser une adresse IP différente de la sienne) n'est pas interdite. Le réseau TOR étant conçu par couche de proxy, il est difficile et à ma connaissance pour l'instant impossible d'arriver à remonter au client initial, donc de ce coté là notre anonymat est respecté.</p>
<p style="text-align: justify;">En revanche si vous utilisez TOR comme serveur, et que vous devenez vous-même un proxy, un maillon de la chaîne, vous n'êtes toujours pas hors la loi, mais un risque apparaît. En effet si vous êtes le noeud final (la passerelle apparente) d'une personne qui va télécharger illégalement des oeuvres protégées, votre responsabilité devient engagé au titre de la clause "d'obligation de sécurisation de sa connection internet".</p>
<p style="text-align: justify;">Pour résumé l'utilisation de TOR est autorisée (encore heureux), mais si vous devenez un noeuds du réseau ou plus précisément si vous devenez à un moment le noeud final de connection d'une personne, alors votre responsabilité devient engagée et vous risquez de vous prendre une lettre. Une proposition a été faite que seuls les pays "libre" devraient être des noeuds finaux sur le réseau, je pense que si on continue dans cette direction, il y a peut de chance qu'on reste dans cette liste.</p>
<p style="text-align: justify;"><em>Vale</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2011/03/28/tor-et-hadopi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to be a happy programmer (with Python) ? 2/3</title>
		<link>http://www.readtfb.net/2011/03/25/how-to-be-a-happy-programmer-with-python-23/</link>
		<comments>http://www.readtfb.net/2011/03/25/how-to-be-a-happy-programmer-with-python-23/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:41:44 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[happiness]]></category>
		<category><![CDATA[Happiness is a state of mind]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=787</guid>
		<description><![CDATA[In the series of the Python "features" that makes me happy last time i began with two concepts, the with statement and the list comprehensions, now i'm going to talk about Multiple assignments and the import aliases. Multiple assignments It's a simple idea that lets you return a series of value and on the other end assign those [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="text-align: justify;">In the series of the Python "features" that makes me happy <a title="how-to-be-a-happy-programmer-with-python" href="http://www.readtfb.net/2011/03/18/how-to-be-a-happy-programmer-with-python-13/" target="_blank">last time</a> i began with two concepts, the <em>with</em> statement and the <em>list comprehensions</em>, now i'm going to talk about Multiple assignments and the import aliases.</div>
<div style="text-align: justify;">
<ul>
<li>Multiple assignments</li>
</ul>
</div>
<p style="text-align: justify;">It's a simple idea that lets you return a series of value and on the other end assign those multiple values at the same time, example when you're splitting a string or extracting groups from a regular expression :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&gt;&gt;&gt; split_me =<span class="st0">&quot;here,we, are,again&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1"># splitting we'll get a list of values</span></div>
</li>
<li class="li1">
<div class="de1">&gt;&gt;&gt; split_me.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">&quot;,&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span><span class="st0">'here'</span>, <span class="st0">'we'</span>, <span class="st0">' are'</span>, <span class="st0">'again'</span><span class="br0">&#93;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="co1"># if you don't know the number of values you're going to have</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1"># you can't use this features, example :</span></div>
</li>
<li class="li1">
<div class="de1">&gt;&gt;&gt; <span class="br0">&#40;</span>start,end<span class="br0">&#41;</span> = split_me.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">&quot;,&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">Traceback <span class="br0">&#40;</span>most recent call last<span class="br0">&#41;</span>:</div>
</li>
<li class="li1">
<div class="de1">&nbsp; File <span class="st0">&quot;&quot;</span>, line <span class="nu0">1</span>, <span class="kw1">in</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">ValueError</span>: too many values to unpack</div>
</li>
<li class="li1">
<div class="de1"><span class="co1"># but if you know that there's going to be n values :</span></div>
</li>
<li class="li1">
<div class="de1">&gt;&gt;&gt; <span class="br0">&#40;</span>start,end<span class="br0">&#41;</span> = split_me.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">&quot; &quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&gt;&gt;&gt; start</div>
</li>
<li class="li1">
<div class="de1"><span class="st0">'here,we,'</span></div>
</li>
<li class="li2">
<div class="de2">&gt;&gt;&gt; end</div>
</li>
<li class="li1">
<div class="de1"><span class="st0">'are,again'</span></div>
</li>
</ol>
</div>
<div style="text-align: justify;">
<ul>
<li>Import aliases</li>
</ul>
</div>
<p style="text-align: justify;">It means what it says, when you import a library or module, you can use aliases, example in Django for shortcuts :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="co1"># this is extracted from my own code :</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">from</span> django.<span class="me1">http</span> <span class="kw1">import</span> HttpResponse, HttpResponseRedirect as redirect</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">from</span> django.<span class="me1">shortcuts</span> <span class="kw1">import</span> render_to_response as render</div>
</li>
</ol>
</div>
<div id="_mcePaste" style="text-align: justify;">I won't start to talk about the standard library as a whole, or libs like Numpy, Scypy, scikit-learn, .... that makes it so easy to just think in Python.</div>
<div id="_mcePaste" style="text-align: justify;">And you ? What are the Python constructs (2.x or 3.x) that makes you feel happy and efficient at the end of the day ?</div>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2011/03/25/how-to-be-a-happy-programmer-with-python-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using TOR with Python</title>
		<link>http://www.readtfb.net/2011/03/25/using-tor-with-python/</link>
		<comments>http://www.readtfb.net/2011/03/25/using-tor-with-python/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:12:59 +0000</pubDate>
		<dc:creator>ssaboum</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Privacy]]></category>
		<category><![CDATA[The Onion Ring]]></category>
		<category><![CDATA[TOR]]></category>
		<category><![CDATA[Urllib2]]></category>

		<guid isPermaLink="false">http://www.readtfb.net/?p=792</guid>
		<description><![CDATA[There are many occasion where you may be limited using your own IP address, i will obviously only refer myself to "rightful" cases where you need to use different IP address in very short lapse of time. Let's say you want to test your website localization functionality, or just access it using many different IP address [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">There are many occasion where you may be limited using your own IP address, i will obviously only refer myself to "rightful" cases where you need to use different IP address in very short lapse of time. Let's say you want to test your website localization functionality, or just access it using many different IP address and see how the system deals with it.</p>
<p style="text-align: justify;"><a title="TOR" href="https://www.torproject.org" target="_blank">TOR</a> is a wonderful tool for that. <a title="TOR" href="https://www.torproject.org" target="_blank">TOR</a> (The Onion Ring to be specific) is a tool that allows you to use several IP addresses as gateways to connect to the Internet and change the path you use dynamically. It's main goal is to help you "Protect your privacy and defend yourself against network surveillance and traffic analysis.". I used it a long time ago, when connections were so bad, that using it was mostly a burden and not very practical.</p>
<p style="text-align: justify;">But recently when i had to span HTTP requests through several IP address, i got frustrated by two facts :</p>
<ul style="text-align: justify;">
<li> First : i didn't have enough servers available to do it, and buying them from Amazon EC2 is not a solution as those servers may have the same IP address and <a title="Amazon Elastic IP Guid" href="http://aws.amazon.com/articles/1346/192-9010932-6910822" target="_blank">all accounts are limited to 5 Elastic IP addresses</a> and i don't want to buy myself for 400$ worth of servers i may use only 1 hour !</li>
<li>Second : i need to build a complex distributed environment (like a MapReduce job) and .... well i don't want to, i don't need parallel tasks, i just need a varying exit point.</li>
</ul>
<p style="text-align: justify;">So after a frustrating night of coding, i found myself thinking back of TOR. I installed it back again with Vidalia, and it worked ! Using Vidalia i could change my IP address when i needed and re-execute my tests with a brand new IP address. Of course it wasn't perfect as i was using sometimes 5 different relay points before reaching my goal but as i was not downloading anything heavy, it went well. But still, i had to change by hand my IP address. So the real point of this article is : " how to change dynamically your IP address using Python and TOR ?"</p>
<p style="text-align: justify;">So first you need <a title="TOR" href="https://www.torproject.org" target="_blank">TOR</a> installed, you can get it here : <a title="TOR" href="https://www.torproject.org/download/download.html.en" target="_blank">https://www.torproject.org/download/download.html.en</a> and activate the remote control here  :</p>
<p style="text-align: justify;"><a href="http://www.readtfb.net/wp-content/uploads/2011/03/tor.png"><img class="aligncenter size-full wp-image-793" title="tor" src="http://www.readtfb.net/wp-content/uploads/2011/03/tor.png" alt="" width="642" height="215" /></a></p>
<p style="text-align: justify;">Then i'm going to assume you have <a title="Python.org" href="http://www.python.org/" target="_blank">Python</a>, <a title="Git" href="http://git-scm.com/" target="_blank">Git</a> and <a title="How to install pip" href="http://www.saltycrane.com/blog/2010/02/how-install-pip-ubuntu/" target="_blank">Pip</a> installed. To be clear on the principles of all this, TOR offers a relatively complex control system that you can connect to using Telnet, you can see the full command list and a few examples on the <a title="TOR" href="https://www.torproject.org" target="_blank">TOR</a> website and here : <a title="Kick ass tor control sheet" href="http://thesprawl.org/memdump/?entry=8" target="_blank">http://thesprawl.org/memdump/?entry=8</a> . I'm going to refer only to the command i want to use : "re-new my route".</p>
<p style="text-align: justify;">So to install TorCtl, the library we will want to use to control <a title="TOR" href="https://www.torproject.org" target="_blank">TOR</a>, we'll clone the Git repository of the project, and install the library using Pip (it's pure laziness, i admit, because using python setup.py install works just fine too)  :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">$ git clone git://github.com/aaronsw/pytorctl.git</div>
</li>
<li class="li1">
<div class="de1">Cloning into pytorctl...</div>
</li>
<li class="li1">
<div class="de1">remote: Counting objects: <span class="nu0">555</span>, <span class="kw1">done</span>.</div>
</li>
<li class="li1">
<div class="de1">remote: Compressing objects: <span class="nu0">100</span>% <span class="br0">&#40;</span><span class="nu0">180</span>/<span class="nu0">180</span><span class="br0">&#41;</span>, <span class="kw1">done</span>.</div>
</li>
<li class="li2">
<div class="de2">remote: Total <span class="nu0">555</span> <span class="br0">&#40;</span>delta <span class="nu0">376</span><span class="br0">&#41;</span>, reused <span class="nu0">552</span> <span class="br0">&#40;</span>delta <span class="nu0">375</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">Receiving objects: <span class="nu0">100</span>% <span class="br0">&#40;</span><span class="nu0">555</span>/<span class="nu0">555</span><span class="br0">&#41;</span>, <span class="nu0">145.62</span> KiB | <span class="nu0">213</span> KiB/s, <span class="kw1">done</span>.</div>
</li>
<li class="li1">
<div class="de1">Resolving deltas: <span class="nu0">100</span>% <span class="br0">&#40;</span><span class="nu0">376</span>/<span class="nu0">376</span><span class="br0">&#41;</span>, <span class="kw1">done</span>.</div>
</li>
<li class="li1">
<div class="de1">$ pip <span class="kw2">install</span> pytorctl/</div>
</li>
<li class="li1">
<div class="de1">Unpacking ./pytorctl</div>
</li>
<li class="li2">
<div class="de2">&nbsp; Running setup.py egg_info <span class="kw1">for</span> package from <span class="br0">&#91;</span>...<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1">Installing collected packages: torctl</div>
</li>
<li class="li1">
<div class="de1">&nbsp; Running setup.py <span class="kw2">install</span> <span class="kw1">for</span> torctl</div>
</li>
<li class="li1">
<div class="de1">Successfully installed torctl</div>
</li>
<li class="li1">
<div class="de1">Cleaning up...</div>
</li>
</ol>
</div>
<p style="text-align: justify;">So now if Tor is running and you try to do this :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">$ python</div>
</li>
<li class="li1">
<div class="de1">Python <span class="nu0">2.6</span><span class="nu0">.1</span> <span class="br0">&#40;</span>r261:<span class="nu0">67515</span>, Jun <span class="nu0">24</span> <span class="nu0">2010</span>, <span class="nu0">21</span>:<span class="nu0">47</span>:<span class="nu0">49</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span>GCC <span class="nu0">4.2</span><span class="nu0">.1</span> <span class="br0">&#40;</span>Apple Inc. build <span class="nu0">5646</span><span class="br0">&#41;</span><span class="br0">&#93;</span> on darwin</div>
</li>
<li class="li1">
<div class="de1">Type <span class="st0">&quot;help&quot;</span>, <span class="st0">&quot;copyright&quot;</span>, <span class="st0">&quot;credits&quot;</span> or <span class="st0">&quot;license&quot;</span> <span class="kw1">for</span> <span class="kw2">more</span> information.</div>
</li>
<li class="li2">
<div class="de2">&gt;&gt;&gt; from TorCtl import TorCtl</div>
</li>
<li class="li1">
<div class="de1">&gt;&gt;&gt; connection = TorCtl.connect<span class="br0">&#40;</span><span class="re2">passphrase=</span><span class="st0">&quot;lol&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&gt;&gt;&gt; connection.is_live<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">True</div>
</li>
</ol>
</div>
<p style="text-align: justify;">It's proof that it works, just use close() on the connection object to disconnect yourself. Now all we need to do is use this connection to send signals to <a title="TOR" href="https://www.torproject.org" target="_blank">TOR</a> and tell urllib2 to use this precise connection, let's go :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">import</span> <span class="kw3">urllib2</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1"># using TOR !</span></div>
</li>
<li class="li1">
<div class="de1">proxy_support = <span class="kw3">urllib2</span>.<span class="me1">ProxyHandler</span><span class="br0">&#40;</span><span class="br0">&#123;</span><span class="st0">&quot;http&quot;</span> : <span class="st0">&quot;127.0.0.1:8118&quot;</span><span class="br0">&#125;</span> <span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">opener = <span class="kw3">urllib2</span>.<span class="me1">build_opener</span><span class="br0">&#40;</span>proxy_support<span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw3">urllib2</span>.<span class="me1">install_opener</span><span class="br0">&#40;</span>opener<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1"># every urlopen connection will then use the TOR proxy like this one :</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">urllib2</span>.<span class="me1">urlopen</span><span class="br0">&#40;</span><span class="st0">'http://www.google.fr'</span><span class="br0">&#41;</span>.<span class="me1">read</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1"># and to renew my route when i need to change the IP :</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">print</span> <span class="st0">&quot;Renewing tor route wait a bit for 5 seconds&quot;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">from</span> TorCtl <span class="kw1">import</span> TorCtl</div>
</li>
<li class="li1">
<div class="de1">conn = TorCtl.<span class="me1">connect</span><span class="br0">&#40;</span>passphrase=<span class="st0">&quot;lol&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">conn.<span class="me1">sendAndRecv</span><span class="br0">&#40;</span><span class="st0">'signal newnym<span class="es0">\r</span><span class="es0">\n</span>'</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">conn.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">import</span> <span class="kw3">time</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw3">time</span>.<span class="me1">sleep</span><span class="br0">&#40;</span><span class="nu0">5</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">print</span> <span class="st0">&quot;renewed&quot;</span></div>
</li>
</ol>
</div>
<p style="text-align: justify;">Now you know everything i know. On the receiving end, i don't think there's that much data on how to identify the "source" of the request, if you've got any clue about that, tell me in the comments.</p>
<p style="text-align: justify;"><em>Vale</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.readtfb.net/2011/03/25/using-tor-with-python/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

