<?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"
	>

<channel>
	<title>Porchoman® is Back!</title>
	<atom:link href="http://www.porchoman.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.porchoman.com</link>
	<description>Porchoman, toujours plus sale!</description>
	<pubDate>Fri, 24 Oct 2008 08:42:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>fr</language>
			<item>
		<title>7 ans d&#8217;éxperiences PHP pour un ingenieur ça donne ça&#8230;</title>
		<link>http://www.porchoman.com/2008/10/20/7-ans-dexperiences-php-pour-un-ingenieur-ca-donne-ca/</link>
		<comments>http://www.porchoman.com/2008/10/20/7-ans-dexperiences-php-pour-un-ingenieur-ca-donne-ca/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 18:34:05 +0000</pubDate>
		<dc:creator>Squirrel</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.porchoman.com/?p=17</guid>
		<description><![CDATA[Pour commencer, le fichier débute avec ce genre de choses...
Un joli doctype ^^"



&#60;!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0 + WebTV//EN" "webtv.dtd"&#62;




Des assignations de variables aléatoires...



if (isset($_REQUEST["aide"])) $aide=$_REQUEST["aide"];


if (isset($_REQUEST["conf"])) $conf=$_REQUEST["conf"];



Aucune séparation affichage/traitement.


Des balises/attributs en upper case systématiquement.


Des balises &#60;script&#62;&#60;/script&#62; pour "protéger" le code et permettre de pré visualiser le rendu
HTML via [...]]]></description>
			<content:encoded><![CDATA[<pre>Pour commencer, le fichier débute avec ce genre de choses...</pre>
<pre>Un joli doctype ^^"</pre>
<div class="de2">
<ol>
<li>
<pre>&lt;!DOCTYPE HTML <span class="kw2">PUBLIC</span> <span class="st0">"-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0 + WebTV//EN"</span> <span class="st0">"webtv.dtd"</span>&gt;</pre>
</li>
</ol>
</div>
<div class="de2">
<pre>Des assignations de variables aléatoires...</pre>
</div>
<ol>
<li>
<pre><span class="kw1">if</span> <span class="br0">(</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">(</span><span class="re0">$_REQUEST</span><span class="br0">[</span><span class="st0">"aide"</span><span class="br0">]</span><span class="br0">)</span><span class="br0">)</span> <span class="re0">$aide</span>=<span class="re0">$_REQUEST</span><span class="br0">[</span><span class="st0">"aide"</span><span class="br0">]</span>;</pre>
</li>
<li>
<pre><span class="kw1">if</span> <span class="br0">(</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">(</span><span class="re0">$_REQUEST</span><span class="br0">[</span><span class="st0">"conf"</span><span class="br0">]</span><span class="br0">)</span><span class="br0">)</span> <span class="re0">$conf</span>=<span class="re0">$_REQUEST</span><span class="br0">[</span><span class="st0">"conf"</span><span class="br0">]</span>;</pre>
</li>
</ol>
<div class="de1">
<pre>Aucune séparation affichage/traitement.</pre>
</div>
<div class="de1">
<pre>Des balises/attributs en upper case systématiquement.</pre>
</div>
<div class="de1">
<pre>Des balises &lt;script&gt;&lt;/script&gt; pour "protéger" le code et permettre de pré visualiser le rendu
HTML via l'IDE... mais bien sur, ça reste tel quel même une fois le développement terminé.
les fonctions scriptdebut() et scriptfin() sont aussi là pour ça. Le programme en question
est HotMetal Pro de SoftQuart, plus maintenu à jour depuis quelques années.</pre>
</div>
<div class="de1">
<ol>
<li class="li1">
<div class="de1">
<pre>&lt;P&gt;&lt;FONT FACE=<span class="st0">"Arial"</span> SIZE=<span class="st0">"-1"</span>&gt;&lt;A</pre>
</div>
</li>
<li class="li2">
<div class="de2">
<pre>HREF=<span class="st0">"&lt;? echo $PHP_SELF; ?&gt;?aide=1"</span>&gt;Aide&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;SCRIPT&gt;</pre>
</div>
</li>
<li class="li1">
<div class="de1">
<pre>&lt;?scriptdebut<span class="br0">(</span><span class="br0">)</span>;</pre>
</div>
</li>
<li class="li2">
<div class="de2">
<pre><span class="coMULTI">/* Aide */</span></pre>
</div>
</li>
<li class="li1">
<div class="de1">
<pre><span class="kw1">if</span> <span class="br0">(</span><span class="re0">$aide</span>==<span class="nu0">1</span><span class="br0">)</span></pre>
</div>
</li>
<li class="li2">
<div class="de2">
<pre><span class="br0">{</span></pre>
</div>
</li>
<li class="li1">
<div class="de1">
<pre>scriptfin<span class="br0">(</span><span class="br0">)</span>;</pre>
</div>
</li>
<li class="li2">
<div class="de2">
<pre><span class="kw2">?&gt;</span></pre>
</div>
</li>
<li class="li1">
<div class="de1">
<pre><span class="kw2">&lt;/SCRIPT&gt;</span></pre>
</div>
</li>
</ol>
<pre><span class="kw2">Pourquoi faire simple quand on peut faire compliqué....
</span></pre>
<ol>
<li class="li1">
<div class="de1">
<pre><span class="re0">$fp_line</span> = <a href="http://www.php.net/ereg_replace"><span class="kw3">ereg_replace</span></a><span class="br0">(</span><a href="http://www.php.net/chr"><span class="kw3">chr</span></a><span class="br0">(</span><span class="nu0">13</span><span class="br0">)</span>,<span class="st0">''</span>,<span class="re0">$fp_line</span><span class="br0">)</span>;</pre>
</div>
</li>
<li class="li2">
<div class="de2">
<pre><span class="re0">$fp_line</span> = <a href="http://www.php.net/ereg_replace"><span class="kw3">ereg_replace</span></a><span class="br0">(</span><a href="http://www.php.net/chr"><span class="kw3">chr</span></a><span class="br0">(</span><span class="nu0">10</span><span class="br0">)</span>,<span class="st0">''</span>,<span class="re0">$fp_line</span><span class="br0">)</span>;</pre>
</div>
</li>
<li class="li1">
<div class="de1">
<pre><span class="re0">$fp_line</span> = <a href="http://www.php.net/ereg_replace"><span class="kw3">ereg_replace</span></a><span class="br0">(</span><span class="st0">' '</span>,<span class="st0">''</span>,<span class="re0">$fp_line</span><span class="br0">)</span>;</pre>
</div>
</li>
</ol>
</div>
<div class="de1">
<pre>A ceci s'ajoute une indentation totalement farfelue, une conception boiteuse.</pre>
</div>
<div class="de1">
<pre>Le plus amusant dans tout ceci, est que la personne ayant réalisé ce code, est un ingénieur ayant passé 7 ans à programmer en PHP (entre autre).</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/10/20/7-ans-dexperiences-php-pour-un-ingenieur-ca-donne-ca/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HackFr0sT en plein delire</title>
		<link>http://www.porchoman.com/2008/07/15/hackfr0st-en-plein-delire/</link>
		<comments>http://www.porchoman.com/2008/07/15/hackfr0st-en-plein-delire/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 13:30:59 +0000</pubDate>
		<dc:creator>Mahoru</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<category><![CDATA[avion]]></category>

		<category><![CDATA[bétise]]></category>

		<category><![CDATA[HacKFr0sT]]></category>

		<guid isPermaLink="false">http://www.porchoman.com/?p=15</guid>
		<description><![CDATA[Après une petite conversation avec HackFr0sT (alias Alexis Voisin), il m'a offert ce billet d'avion via Aeroflotte :

]]></description>
			<content:encoded><![CDATA[<p>Après une petite conversation avec HackFr0sT (alias Alexis Voisin), il m'a offert ce billet d'avion via Aeroflotte :</p>
<p><a href="http://www.porchoman.com/wp-content/uploads/2008/07/unnamed.png"><img class="alignnone size-full wp-image-16" title="Billet d\'avion de HacKFr0sT" src="http://www.porchoman.com/wp-content/uploads/2008/07/unnamed.png" alt="" width="500" height="352" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/07/15/hackfr0st-en-plein-delire/feed/</wfw:commentRss>
		</item>
		<item>
		<title>fputcsv</title>
		<link>http://www.porchoman.com/2008/01/23/fputcsv/</link>
		<comments>http://www.porchoman.com/2008/01/23/fputcsv/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 21:24:33 +0000</pubDate>
		<dc:creator>seb</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.porchoman.info/2008/01/23/fputcsv/</guid>
		<description><![CDATA[Php est un langage très complet avec un grand nombre de fonction pour faciliter la vie des développeurs. Mais certains aiment le sport et préfère coder eux même des fonctions de base :
fputs&#40;$fichier,$ligne_fic.&#34;\r\n &#34;&#41;;
$i=0;
foreach&#40;$result as $ligne&#41;
&#123;
	$nom = 		$ligne&#91;nom&#93;;
	$prenom = 	$ligne&#91;prenom&#93;;
	$adresse = 	$ligne&#91;adresse&#93;;
	$societe = 	$ligne&#91;societe&#93;;
	$tel = 		$ligne&#91;tel_fixe&#93;;
	$mobile = 	$ligne&#91;tel_port&#93;;
	$fax = 		$ligne&#91;fax&#93;;
	$adresse = 	$ligne&#91;adresse&#93;;
	$ville = 	$ligne&#91;ville&#93;;
	$cp = [...]]]></description>
			<content:encoded><![CDATA[<p>Php est un langage très complet avec un grand nombre de fonction pour faciliter la vie des développeurs. Mais certains aiment le sport et préfère coder eux même des fonctions de base :</p>
<pre class="php"><a href="http://www.php.net/fputs"><span style="color: #000066;">fputs</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$fichier</span>,<span style="color: #0000ff;">$ligne_fic</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span> &quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$i</span>=<span style="color: #cc66cc;">0</span>;
<span style="color: #b1b100;">foreach</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$result</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0000ff;">$nom</span> = 		<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>nom<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$prenom</span> = 	<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>prenom<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$adresse</span> = 	<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>adresse<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$societe</span> = 	<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>societe<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$tel</span> = 		<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>tel_fixe<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$mobile</span> = 	<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>tel_port<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$fax</span> = 		<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>fax<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$adresse</span> = 	<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>adresse<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$ville</span> = 	<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>ville<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$cp</span> = 		<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span>code_postal<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0000ff;">$mail</span> = 	<span style="color: #0000ff;">$ligne</span><span style="color: #66cc66;">&#91;</span><a href="http://www.php.net/mail"><span style="color: #000066;">mail</span></a><span style="color: #66cc66;">&#93;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">//$ligne_fic = &quot;;;;$prenom $nom;;$mail;;;;;;$mobile;;$tel;;;;;;;;;;;;;;;&quot;;</span>
&nbsp;
	<span style="color: #0000ff;">$ligne_fic</span>=<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>$prenom<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>$nom<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>$societe<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>$adresse<span style="color: #000099; font-weight: bold;">\&quot;</span>,,
		,<span style="color: #000099; font-weight: bold;">\&quot;</span>$ville<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>$cp<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>France<span style="color: #000099; font-weight: bold;">\&quot;</span>,,,,,,,,,,,,,,,,<span style="color: #000099; font-weight: bold;">\&quot;</span>$fax<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>$tel<span style="color: #000099; font-weight: bold;">\&quot;</span>,,,,,,,,,<span style="color: #000099; font-weight: bold;">\&quot;</span>$mobile<span style="color: #000099; font-weight: bold;">\&quot;</span>,,,,,,,,
		<span style="color: #000099; font-weight: bold;">\&quot;</span>$mail<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>$mail<span style="color: #000099; font-weight: bold;">\&quot;</span>,,,,,<span style="color: #000099; font-weight: bold;">\&quot;</span>0/0/00<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>0/0/00<span style="color: #000099; font-weight: bold;">\&quot;</span>,,,,,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,,<span style="color: #000099; font-weight: bold;">\&quot;</span>Normale<span style="color: #000099; font-weight: bold;">\&quot;</span>,,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,,,<span style="color: #000099; font-weight: bold;">\&quot;</span>p.N.<span style="color: #000099; font-weight: bold;">\&quot;</span>,,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>
		,,,,,,<span style="color: #000099; font-weight: bold;">\&quot;</span>Normale<span style="color: #000099; font-weight: bold;">\&quot;</span>,<span style="color: #000099; font-weight: bold;">\&quot;</span>Faux<span style="color: #000099; font-weight: bold;">\&quot;</span>,,,,,<span style="color: #000099; font-weight: bold;">\&quot;</span>Non spécifié<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>;
&nbsp;
	<a href="http://www.php.net/fputs"><span style="color: #000066;">fputs</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$fichier</span>,<span style="color: #0000ff;">$ligne_fic</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0000ff;">$i</span>++;
<span style="color: #66cc66;">&#125;</span>
<a href="http://www.php.net/fclose"><span style="color: #000066;">fclose</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$fichier</span><span style="color: #66cc66;">&#41;</span>;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/01/23/fputcsv/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Les dix commandements de Porchoman&#8230;</title>
		<link>http://www.porchoman.com/2008/01/23/les-dix-commandements-de-porchoman/</link>
		<comments>http://www.porchoman.com/2008/01/23/les-dix-commandements-de-porchoman/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 09:34:50 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.porchoman.com/2008/01/23/les-dix-commandements-de-porchoman/</guid>
		<description><![CDATA[Vous avez certainement déjà croisé un porchoman dans votre vie, le problème c'est que le porchoman n' a pas conscience qu'il est un porchoman ! Il pense qu'il est le plus génial programmeur de la terre, et se demande d'ailleurs pourquoi diable Google ou Facebook ne l' a pas encore débauché...
Demandez d'ailleurs au prochain porchoman [...]]]></description>
			<content:encoded><![CDATA[<p>Vous avez certainement déjà croisé un porchoman dans votre vie, le problème c'est que le porchoman n' a pas conscience qu'il est un porchoman ! Il pense qu'il est le plus génial programmeur de la terre, et se demande d'ailleurs pourquoi diable Google ou Facebook ne l' a pas encore débauché...</p>
<p>Demandez d'ailleurs au prochain porchoman que vous croiserez ce qu'il pense des fameuses « Best practices », alors en empruntant la réthorique habituelle des porchoman,  il vous répondra « qu'il est au fait des dernières technologies et qu'il sait parfaitement ce qu'il y a à faire et comment le faire.</p>
<p>Vous vous demandez sûrement d'ou provient l'assurance effrontée de Porchoman, et bien tel une société secrète les porchoman en tous genres se sont imprégnés des dix commandements suivants pour atteindre le stade de l'élévation au rang Porcho.<span id="more-11"></span></p>
<p>Les voici révélés en exclusivité :</p>
<p><strong>Commandement N°1 :</strong></p>
<p><em>« Des bugs tu ne te soucieras »</em></p>
<p>Pour porchoman les bugs n'existent pas, en fait les bugs ne sont que des fonctionnalités pas exploitées ou non documentées</p>
<p><strong>Commandement N°2</strong></p>
<p><em>« Le traitement des erreurs, tu ne gèreras pas »</em></p>
<p>La gestion des erreurs ne signifique quelque chose que pour les utilisateurs enclins aux erreurs.<br />
Porchoman ne commet jamais d'erreur et les utilisateurs des applications de porchoman non plus.</p>
<p><strong>Commandement N°3</strong></p>
<p><em>« La liberté totale à l'utilisateur, tu donneras »</em></p>
<p>Laisser l'utilisateur libre d'entrer n'importe quelle donnée, n'importe ou, n'importe quand, est 	pour Porchoman la définition même du mot « Convivialité »</p>
<p><strong>Commandement N°4</strong></p>
<p><em>« Du réutilisable tu n'utiliseras pas »</em></p>
<p style="margin-bottom: 0in">Porchoman recherche toujours l'efficacité, le rendement maximum, c'est pourquoi le copier/coller à l'arrache est l'ami de porchoman.</p>
<p><strong>Commandement N°5</strong></p>
<p><em>« De la documentation tu ne rédigeras pas »</em></p>
<p>La documentation ne sert pas à Porchoman, d'ailleurs le code de porchoman est parfait et la simple lecture du code permet de comprendre le fonctionnement du programme.</p>
<p><strong>Commandement N°6</strong></p>
<p><em>« Les design-patterns tu ignoreras »</em></p>
<p>Porchoman n'a que faire des design patterns, d'ailleurs comme le précisait MagicalTux dans un des premiers posts de porchoman.com « Porchoman est un ennemi de la séparation du code. Pour lui, plus le code est intégré, mieux c'est »</p>
<p><strong>Commandement N°7</strong></p>
<p><em>« Des spécifications besoin tu n'auras  »</em></p>
<p>Porchoman ignore toujours les spécifications car Porchoman connait mieux les attentes des utilisateurs que quiconque.</p>
<p><strong>Commandement N°8</strong></p>
<p><em>« Les conventions tu oublieras  »</em></p>
<p>Porchoman ignore souvent les règles et conventions en place, d'ailleurs une seule convention s'impose à Porchoman pour le nommage des variables, des méthodes et autres fonctions « la sienne ».</p>
<p><strong>Commandement N°9</strong></p>
<p><em>« La roue tu réinventeras »</em></p>
<p>Porchoman adore réinventer la roue et maîtriser à 101% ce qu'il fait, c'est pour cela qu'il repart toujours de zéro lorsqu'il doit créer un nouveau programme.</p>
<p><strong>Commandement N°10</strong></p>
<p><em>« Du n'importe quoi tu produiras »</em></p>
<p>La dernière règle c'est un peu le zéro absolu du Porchoman, que serait porchoman sans cette qualité essentielle,  la capacité à produire du code mystique incompris de tous sauf de lui-même...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/01/23/les-dix-commandements-de-porchoman/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Heu 2 poulets + 1 dinde = ?</title>
		<link>http://www.porchoman.com/2008/01/22/heu-2-poulets-1-dinde/</link>
		<comments>http://www.porchoman.com/2008/01/22/heu-2-poulets-1-dinde/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 15:15:01 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.porchoman.com/2008/01/22/heu-2-poulets-1-dinde/</guid>
		<description><![CDATA[Notre ami porchoman est du type même de l'aventurier, celui la-même qui repousse les limites de la physique, des mathématiques, de l'espace temps intersidéral...
Aujourd'hui notre Indiana Jones des temps modernes relève un défi majeur, il veut pouvoir additionner deux chaines de caractères, alors vous me direz en vous guaussant joyeusement "concaténation"...
Pas si sûr, en tous [...]]]></description>
			<content:encoded><![CDATA[<p>Notre ami porchoman est du type même de l'aventurier, celui la-même qui repousse les limites de la physique, des mathématiques, de l'espace temps intersidéral...</p>
<p>Aujourd'hui notre Indiana Jones des temps modernes relève un défi majeur, il veut pouvoir additionner deux chaines de caractères, alors vous me direz en vous guaussant joyeusement "concaténation"...</p>
<p>Pas si sûr, en tous cas, pas pour lui.</p>
<pre>
Maybe it's a newbie question, but if I have two strings, let's say s1="4"
and s2="5", how can I get a new string of value "9", that is, add the two
numbers. If I type:
var newStr = s1 + s2
all I get is a concatenation.
How to really add them?</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/01/22/heu-2-poulets-1-dinde/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bonnes pratiques en SSII</title>
		<link>http://www.porchoman.com/2008/01/20/bonnes-pratiques-en-ssii/</link>
		<comments>http://www.porchoman.com/2008/01/20/bonnes-pratiques-en-ssii/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 15:20:48 +0000</pubDate>
		<dc:creator>seb</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.porchoman.com/2008/01/20/bonnes-pratiques-en-ssii/</guid>
		<description><![CDATA[Sous prétexte de respecter les délais, de réduire les couts et de satisfaire les petits caprices de certains clients, certaines SSII n'hésitent pas à cultiver la méthode du code "vite, moche, débile" en embauchant des gens totalement incompétents.
Ainsi je me suis retrouvé à maintenir des horreurs sans nom.
Exemple : un énorme extranet utilisé par un [...]]]></description>
			<content:encoded><![CDATA[<p>Sous prétexte de respecter les délais, de réduire les couts et de satisfaire les petits caprices de certains clients, certaines SSII n'hésitent pas à cultiver la méthode du code "vite, moche, débile" en embauchant des gens totalement incompétents.<br />
Ainsi je me suis retrouvé à maintenir des horreurs sans nom.</p>
<p>Exemple : un énorme extranet utilisé par un gros ministère ; le code ci-dessous (asp 3) était dupliqué sur une cinquantaine de fichier</p>
<pre class="asp">&nbsp;
&amp;lt;% <span style="color: #0000ff; font-weight: bold;">Sub</span> produit<span style="color: #006600; font-weight:bold">&#40;</span>t<span style="color: #006600; font-weight:bold">&#41;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">if</span> oRS<span style="color: #006600; font-weight:bold">&#40;</span>t<span style="color: #006600; font-weight:bold">&#41;</span> &amp;gt; <span style="color: #800000;">0</span> <span style="color: #990099; font-weight: bold;">then</span>
			<span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">write</span> <span style="color: #cc0000;">&quot;&lt;small&gt;&quot;</span> &amp;amp; t &amp;amp; <span style="color: #cc0000;">&quot;&lt;/small&gt;
&quot;</span>
		<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
&nbsp;
	<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #0000ff; font-weight: bold;">sub</span>
&nbsp;
<span style="color: #0000ff; font-weight: bold;">sub</span> tel<span style="color: #006600; font-weight:bold">&#40;</span>t<span style="color: #006600; font-weight:bold">&#41;</span>
	<span style="color: #990099; font-weight: bold;">if</span> <span style="color: #330066;">len</span><span style="color: #006600; font-weight:bold">&#40;</span>t<span style="color: #006600; font-weight:bold">&#41;</span> &amp;gt; <span style="color: #800000;">9</span> <span style="color: #990099; font-weight: bold;">then</span>
		<span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">write</span> t
	<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #0000ff; font-weight: bold;">sub</span>
&nbsp;
%&amp;gt;
&amp;lt;%<span style="color: #990099; font-weight: bold;">set</span> oConn = <span style="color: #990099; font-weight: bold;">session</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;oConn&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">set</span> oRS = oConn.<span style="color: #330066;">execute</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;SELECT * FROM [IntSociétés] WHERE [Numero_de_la_societe] = &quot;</span> &amp;amp; <span style="color: #990099; font-weight: bold;">request</span>.<span style="color: #330066;">queryString</span>  <span style="color: #006600; font-weight:bold">&#41;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">if</span> <span style="color: #990099; font-weight: bold;">not</span> oRS.<span style="color: #0000ff; font-weight: bold;">EOF</span> <span style="color: #990099; font-weight: bold;">then</span>
	oRS.<span style="color: #330066;">MoveFirst</span>
%&amp;gt;
&amp;lt;% <span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span> %&amp;gt;
&nbsp;
 
&nbsp;
 
bgcolor=<span style="color: #cc0000;">&quot;#FFFFFF&quot;</span> style=<span style="color: #cc0000;">&quot;vertical-align: top&quot;</span>&amp;gt;
&nbsp;
&lt;strong&gt;&lt;span style=<span style="color: #cc0000;">&quot;color: #ffffff;&quot;</span>&gt;
&lt;/span&gt;    face=<span style="color: #cc0000;">&quot;Times New Roman&quot;</span> size=<span style="color: #cc0000;">&quot;3&quot;</span>&amp;gt;&lt;strong&gt;Nom&lt;/strong&gt;&lt;/strong&gt;
&lt;strong&gt;&lt;span style=<span style="color: #cc0000;">&quot;color: #ffffff;&quot;</span>&gt;
&lt;/span&gt;    face=<span style="color: #cc0000;">&quot;Times New Roman&quot;</span> size=<span style="color: #cc0000;">&quot;3&quot;</span>&amp;gt;&lt;strong&gt;Adresse&lt;/strong&gt;&lt;/strong&gt;
&lt;strong&gt;&lt;span style=<span style="color: #cc0000;">&quot;color: #ffffff;&quot;</span>&gt;
&lt;/span&gt;    face=<span style="color: #cc0000;">&quot;Times New Roman&quot;</span> size=<span style="color: #cc0000;">&quot;3&quot;</span>&amp;gt;&lt;strong&gt;Type
    de produit<span style="color: #006600; font-weight:bold">&#40;</span>s<span style="color: #006600; font-weight:bold">&#41;</span>&lt;/strong&gt;&lt;/strong&gt;
&nbsp;
    style=<span style="color: #cc0000;">&quot;margin-left: 2px; margin-right: 2; margin-top: 2; margin-bottom: 2&quot;</span> valign=<span style="color: #cc0000;">&quot;top&quot;</span>
    align=<span style="color: #cc0000;">&quot;left&quot;</span>&amp;gt;&lt;span&gt;&amp;lt;% <span style="color: #990099; font-weight: bold;">if</span> oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Presence_HE&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span> = <span style="color: #cc0000;">&quot;O&quot;</span> <span style="color: #990099; font-weight: bold;">then</span>
		<span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">write</span> <span style="color: #cc0000;">&quot;&lt;strong&gt; &quot;</span> &amp;amp; oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Nom_de_la_societe&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span> &amp;amp; <span style="color: #cc0000;">&quot;&lt;/strong&gt;
 &quot;</span>
		<span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">write</span> <span style="color: #330066;">UCase</span><span style="color: #006600; font-weight:bold">&#40;</span>oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Pays1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span><span style="color: #006600; font-weight:bold">&#41;</span> &amp;amp; <span style="color: #cc0000;">&quot;
représentée par :
&quot;</span>
		<span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">write</span> oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Nom_de_la_HE&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>
	<span style="color: #990099; font-weight: bold;">else</span>
		<span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">write</span> <span style="color: #cc0000;">&quot;&lt;strong&gt; &quot;</span> &amp;amp; oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Nom_de_la_societe&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span> &amp;amp; <span style="color: #cc0000;">&quot;&lt;/strong&gt;
 &quot;</span>
		<span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">write</span> <span style="color: #330066;">UCase</span><span style="color: #006600; font-weight:bold">&#40;</span>oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Pays1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span><span style="color: #006600; font-weight:bold">&#41;</span>
	<span style="color: #990099; font-weight: bold;">end</span> if%&amp;gt;&lt;/span&gt;
&nbsp;
    style=<span style="color: #cc0000;">&quot;margin-left: 2px; margin-right: 2; margin-top: 2; margin-bottom: 2&quot;</span> valign=<span style="color: #cc0000;">&quot;top&quot;</span>
    align=<span style="color: #cc0000;">&quot;left&quot;</span>&amp;gt;&lt;span style=<span style="color: #cc0000;">&quot;margin-top: 0px&quot;</span>&gt;&amp;lt;%=oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Adresse1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>%&amp;gt;
            &amp;lt;% 	<span style="color: #990099; font-weight: bold;">if</span> <span style="color: #990099; font-weight: bold;">not</span> isnull<span style="color: #006600; font-weight:bold">&#40;</span>oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;CPAdresse1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span><span style="color: #006600; font-weight:bold">&#41;</span> <span style="color: #990099; font-weight: bold;">then</span>
		<span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">write</span> oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;CPAdresse1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span> &amp;amp; <span style="color: #cc0000;">&quot;
&quot;</span>
	<span style="color: #990099; font-weight: bold;">end</span> if%&amp;gt;&amp;lt;%=oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;CP1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>%&amp;gt;   &amp;lt;%=oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Ville1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>%&amp;gt;
            Tél. : &amp;lt;% tel<span style="color: #006600; font-weight:bold">&#40;</span>oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Tel1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span><span style="color: #006600; font-weight:bold">&#41;</span>%&amp;gt;
            Fax : &amp;lt;% tel<span style="color: #006600; font-weight:bold">&#40;</span>oRS<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;Fax1&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span><span style="color: #006600; font-weight:bold">&#41;</span>%&amp;gt;&lt;/span&gt;
&nbsp;
    style=<span style="color: #cc0000;">&quot;margin-left: 2px; margin-right: 2; margin-top: 2; margin-bottom: 2&quot;</span> valign=<span style="color: #cc0000;">&quot;top&quot;</span>
    align=<span style="color: #cc0000;">&quot;center&quot;</span>&amp;gt;
&nbsp;
&lt;span&gt;
&lt;/span&gt;    style=<span style="color: #cc0000;">&quot;margin-top: 0px&quot;</span>&amp;gt;&amp;lt;% produit<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;PM&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span> %&amp;gt;
&lt;dd&gt; &lt;/dd&gt;
&nbsp;
bgcolor=<span style="color: #cc0000;">&quot;#FFFFFF&quot;</span> style=<span style="color: #cc0000;">&quot;vertical-align: top&quot;</span>&amp;gt;
&nbsp;
&lt;strong&gt;&lt;span style=<span style="color: #cc0000;">&quot;font-family: Times New Roman; color: #330000; font-size: small;&quot;</span>&gt;&lt;strong&gt;N°
        Admission
        à la marque&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;
&lt;strong&gt;&lt;span style=<span style="color: #cc0000;">&quot;font-family: Times New Roman; color: #330000; font-size: small;&quot;</span>&gt;&lt;strong&gt;Désignation&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;
&lt;strong&gt;&lt;span style=<span style="color: #cc0000;">&quot;font-family: Times New Roman; color: #330000; font-size: small;&quot;</span>&gt;&lt;strong&gt;Matériau
        &lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;
&nbsp;
    &amp;lt;% <span style="color: #990099; font-weight: bold;">set</span> oRS2 = oConn.<span style="color: #330066;">execute</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;SELECT * FROM [IntPM] WHERE [Numero_de_la_societe] = &quot;</span> &amp;amp; <span style="color: #990099; font-weight: bold;">request</span>.<span style="color: #330066;">queryString</span> <span style="color: #006600; font-weight:bold">&#41;</span>
	<span style="color: #990099; font-weight: bold;">if</span> <span style="color: #990099; font-weight: bold;">not</span> oRS2.<span style="color: #0000ff; font-weight: bold;">EOF</span> <span style="color: #990099; font-weight: bold;">then</span>
		oRS2.<span style="color: #330066;">MoveFirst</span>
		<span style="color: #990099; font-weight: bold;">DO</span> Until oRS2.<span style="color: #0000ff; font-weight: bold;">EOF</span>
%&amp;gt;
&nbsp;
    style=<span style="color: #cc0000;">&quot;margin-left: 2px; margin-right: 2; margin-top: 2; margin-bottom: 2&quot;</span> valign=<span style="color: #cc0000;">&quot;top&quot;</span>
    align=<span style="color: #cc0000;">&quot;center&quot;</span>&amp;gt;&amp;lt;%=oRS2<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;PPM_N_Admission_Marque&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>%&amp;gt; 
&nbsp;
    style=<span style="color: #cc0000;">&quot;margin-left: 2px; margin-right: 2; margin-top: 2; margin-bottom: 2&quot;</span> valign=<span style="color: #cc0000;">&quot;top&quot;</span>
    align=<span style="color: #cc0000;">&quot;left&quot;</span>&amp;gt; &amp;lt;%=oRS2<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;PPM_Nom_commercial&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>%&amp;gt;
&nbsp;
    style=<span style="color: #cc0000;">&quot;margin-left: 2px; margin-right: 2; margin-top: 2; margin-bottom: 2&quot;</span> valign=<span style="color: #cc0000;">&quot;top&quot;</span>
    align=<span style="color: #cc0000;">&quot;left&quot;</span>&amp;gt;&amp;lt;%=oRS2<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;PPM_Materiau&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>%&amp;gt; 
&nbsp;
    &amp;lt;% 		oRS2.<span style="color: #330066;">Movenext</span>
	<span style="color: #990099; font-weight: bold;">Loop</span>
	<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">if</span>
%&amp;gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/01/20/bonnes-pratiques-en-ssii/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pitié j&#8217;ai mal aux yeux&#8230;</title>
		<link>http://www.porchoman.com/2008/01/17/pitie-jai-mal-aux-yeux/</link>
		<comments>http://www.porchoman.com/2008/01/17/pitie-jai-mal-aux-yeux/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 12:59:26 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.porchoman.com/2008/01/17/pitie-jai-mal-aux-yeux/</guid>
		<description><![CDATA[La communauté porchoman est très ouverte, alors évidemment en tant que développeurs nous avons tendance à recenser le code moche, pourri, boîteux, buggé et j'en passe mais alors aujourd'hui nous ouvrons une parenthèse spéciale, une parenthèse ouvrant une réflexion sur le spirituel, sur l'éveil des sens...
Que de poésie me direz-vous et bien oui, le site [...]]]></description>
			<content:encoded><![CDATA[<p>La communauté porchoman est très ouverte, alors évidemment en tant que développeurs nous avons tendance à recenser le code moche, pourri, boîteux, buggé et j'en passe mais alors aujourd'hui nous ouvrons une parenthèse spéciale, une parenthèse ouvrant une réflexion sur le spirituel, sur l'éveil des sens...</p>
<p>Que de poésie me direz-vous et bien oui, le site que nous allons vous présenter a su tirer toute la quintessance des meilleures pratiques en webdesign, un design clair, sobre, épuré et surtout un effet que beaucoup de sites commerciaux recherchent, le fameux "Eye-catching".</p>
<p>Une étude des couleurs très pertinente et une utilisation parcimonieuse des animations vont vous faire adorer ce site, vous ne tenez plus, vous voulez en savoir plus, allez y !!!</p>
<p><a href="http://www.dokimos.org/ajff/">http://www.dokimos.org/ajff/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/01/17/pitie-jai-mal-aux-yeux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Séparation du code, vous connaissez ?</title>
		<link>http://www.porchoman.com/2008/01/17/7-separation-du-code-vous-connaissez/</link>
		<comments>http://www.porchoman.com/2008/01/17/7-separation-du-code-vous-connaissez/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 08:27:41 +0000</pubDate>
		<dc:creator>MagicalTux</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.porchoman.com/2008/01/17/7/</guid>
		<description><![CDATA[ La séparation du code, vous en avez certainement déjà entendu parler. Ce concept de séparer au moins l'apparence du code. De nombreux outils permettent de façon relativement simple de séparer du code et de l'apparence. L'exemple le plus connu est très probablement Smarty.
Porchoman est un ennemi de la séparation du code. Pour lui, plus [...]]]></description>
			<content:encoded><![CDATA[<p> La séparation du code, vous en avez certainement déjà entendu parler. Ce concept de séparer au moins l'apparence du code. De nombreux outils permettent de façon relativement simple de séparer du code et de l'apparence. L'exemple le plus connu est très probablement Smarty.</p>
<p>Porchoman est un ennemi de la séparation du code. Pour lui, plus le code est intégré, mieux c'est.</p>
<p>Le principal problème de cette technique relève du fait qu'il deviens alors nécessaire à toute personne travaillant sur le site de connaitre à la fois le HTML et le PHP. Impossible pour un designer de travailler sur l'apparence. Impossible à un développeur pur code de continuer en propre sur le site.</p>
<p>L'extrait de code du jour proviens d'un vieux site trouvé entre deux dossiers. Je pense que son auteur doit se repentir aujourd'hui d'avoir écrit ce style de code.</p>
<pre class="php">&lt;img src=<span style="color: #ff0000;">&quot;img/puce.gif&quot;</span> width=<span style="color: #ff0000;">&quot;7&quot;</span> height=<span style="color: #ff0000;">&quot;11&quot;</span>&gt; &lt;a href=<span style="color: #ff0000;">&quot;profile.php&quot;</span> <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;lien2&quot;</span>&gt;Profil&lt;/a&gt;&lt;br&gt;
&lt;img src=<span style="color: #ff0000;">&quot;img/puce.gif&quot;</span> width=<span style="color: #ff0000;">&quot;7&quot;</span> height=<span style="color: #ff0000;">&quot;11&quot;</span>&gt; &lt;a href=<span style="color: #ff0000;">&quot;&lt;? echo $PHP_SELF.&quot;</span>?deconnexion=<span style="color: #cc66cc;">2</span><span style="color: #ff0000;">&quot;; ?&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;lien2&quot;</span>&gt;D&amp;eacute;connection&lt;/a&gt;
<span style="color: #000000; font-weight: bold;">&lt;?PHP</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'relations'</span><span style="color: #66cc66;">&#93;</span> &gt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;br&gt;&lt;img src=<span style="color: #ff0000;">&quot;img/puce.gif&quot;</span> width=<span style="color: #ff0000;">&quot;7&quot;</span> height=<span style="color: #ff0000;">&quot;11&quot;</span>&gt; &lt;a href=<span style="color: #ff0000;">&quot;datingon.php&quot;</span> <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;txt5&quot;</span>&gt;&lt;?PHP <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'relations'</span><span style="color: #66cc66;">&#93;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
relation<span style="color: #66cc66;">&#40;</span>s<span style="color: #66cc66;">&#41;</span>&lt;/a&gt;
<span style="color: #000000; font-weight: bold;">&lt;?PHP</span> <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?PHP</span>
        <span style="color: #0000ff;">$temp3</span> = <span style="color: #000000; font-weight: bold;">new</span> db_tanuki<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$req</span> = <span style="color: #ff0000;">&quot;SELECT `id` FROM `messages` WHERE `nto`='&quot;</span>.<span style="color: #0000ff;">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'name'</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">&quot;' AND `read`='0'&quot;</span>;
        <span style="color: #0000ff;">$temp3</span>-&gt;<span style="color: #006600;">query</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$req</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'nmessages'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$temp3</span>-&gt;<span style="color: #006600;">nb_lignes</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$temp3</span>-&gt;<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'nmessages'</span><span style="color: #66cc66;">&#93;</span> &gt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;br&gt;&lt;img src=<span style="color: #ff0000;">&quot;img/puce.gif&quot;</span> width=<span style="color: #ff0000;">&quot;7&quot;</span> height=<span style="color: #ff0000;">&quot;11&quot;</span>&gt; &lt;a href=<span style="color: #ff0000;">&quot;datingon.php&quot;</span> <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;txt5&quot;</span>&gt;&lt;?PHP <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'nmessages'</span><span style="color: #66cc66;">&#93;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
message<span style="color: #66cc66;">&#40;</span>s<span style="color: #66cc66;">&#41;</span>&lt;/a&gt;
<span style="color: #000000; font-weight: bold;">&lt;?PHP</span> <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/td&gt;
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/01/17/7-separation-du-code-vous-connaissez/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google fédère la communauté porcho !</title>
		<link>http://www.porchoman.com/2008/01/16/google-federe-la-communaute-porcho/</link>
		<comments>http://www.porchoman.com/2008/01/16/google-federe-la-communaute-porcho/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 10:00:44 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[External code]]></category>

		<guid isPermaLink="false">http://www.porchoman.com/2008/01/16/google-federe-la-communaute-porcho/</guid>
		<description><![CDATA[Sous ce titre un brin provocateur se cache une terrible vérité, eh oui messieurs les porchos, vous ne vous sentirez plus jamais seul car google est un formidable outil pour recenser, identifier et traquer tous les plus grands bidouilleurs et bricoleurs de code de la terre,  google serait même sur le point de lancer une [...]]]></description>
			<content:encoded><![CDATA[<p>Sous ce titre un brin provocateur se cache une terrible vérité, eh oui messieurs les porchos, vous ne vous sentirez plus jamais seul car google est un formidable outil pour recenser, identifier et traquer tous les plus grands bidouilleurs et bricoleurs de code de la terre,  google serait même sur le point de lancer une version spéciale de google code appelée google porchocode, mais ce projet est pour l'intant tenu secret.</p>
<p>L'exemple du jour est un site appelé <strong>www.filmbuffs.net</strong> (inconnu en France mais who cares comme on dirait chez l'oncle Sam)<br />
Avec cet exemple la notion de non-modularité prend tout son sens, je dirais même plus on peut voir à travers ce code un porchoman averti et expérimenté capable de mélanger du code PHP/ASP/MySQL/HTML/JAVASCRIPT dans la même page ! (attention ils sont de plus en plus nombreux).</p>
<p>La séparation des concepts (SoC pour les connaisseurs) est l'ennemi de Porchoman, sa gangraine, son fardeau..., alors on se lâche et on fait comme on dit chez les rappeurs "A l'ancienne", le tout parfaitement documenté pour notre plus grand bonheur !</p>
<p>Allez je ne vous fais pas plus attendre.</p>
<pre class="php">&nbsp;
&amp;lt;%
&nbsp;
      dim h
&nbsp;
h=hour<span style="color: #66cc66;">&#40;</span>now<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #b1b100;">If</span> h &amp;lt; <span style="color: #cc66cc;">12</span> then
&nbsp;
   response.write<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Good morning &quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #b1b100;">elseif</span> h &amp;lt; <span style="color: #cc66cc;">18</span> then
&nbsp;
   response.write<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Good afternoon&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
   <span style="color: #b1b100;">else</span>
&nbsp;
   response.write<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Good evening&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<a href="http://www.php.net/end"><span style="color: #000066;">end</span></a> <span style="color: #b1b100;">if</span>
&nbsp;
      <span style="color: #b1b100;">if</span> request.cookies<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;FBFsubname&quot;</span><span style="color: #66cc66;">&#41;</span>&amp;lt;&amp;gt;<span style="color: #ff0000;">&quot;&quot;</span> then
&nbsp;
      Response.Write<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot; &quot;</span>&amp;amp;request.cookies<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;FBFsubname&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
      <a href="http://www.php.net/end"><span style="color: #000066;">end</span></a> <span style="color: #b1b100;">if</span>
&nbsp;
      Response.Write<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
      %&amp;gt;;
&lt;table align=<span style="color: #ff0000;">&quot;left&quot;</span> border=<span style="color: #ff0000;">&quot;0&quot;</span> cellpadding=<span style="color: #ff0000;">&quot;4&quot;</span> cellspacing=<span style="color: #ff0000;">&quot;4&quot;</span> height=<span style="color: #ff0000;">&quot;1&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span>&gt;
&lt;tbody&gt;
&lt;tr <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;normal&quot;</span>&gt;
&lt;td colspan=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;normal&quot;</span> align=<span style="color: #ff0000;">&quot;left&quot;</span> valign=<span style="color: #ff0000;">&quot;top&quot;</span>&gt;
&lt;p align=<span style="color: #ff0000;">&quot;left&quot;</span>&gt;&amp;nbsp;
&lt;p <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;orangeHeader1&quot;</span> align=<span style="color: #ff0000;">&quot;center&quot;</span>&gt;<span style="color: #cc66cc;">2006</span>
&nbsp;
                        Film <a href="http://www.php.net/list"><span style="color: #000066;">List</span></a>
&nbsp;
This is the <a href="http://www.php.net/list"><span style="color: #000066;">list</span></a> of films that are eligible <span style="color: #b1b100;">for</span> voting
&nbsp;
                      in the &lt;strong&gt;<span style="color: #cc66cc;">2006</span> Film Buffs Forecast
&nbsp;
                        end-of-year poll&lt;/strong&gt;
&nbsp;
                               <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$voted</span> != <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Connecting, selecting database */</span>
&nbsp;
<span style="color: #0000ff;">$link</span> = <a href="http://www.php.net/mysql_connect"><span style="color: #000066;">mysql_connect</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;216.86.153.117&quot;</span>, <span style="color: #ff0000;">&quot;cropley_fbf&quot;</span>, <span style="color: #ff0000;">&quot;poll005&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
or <a href="http://www.php.net/die"><span style="color: #000066;">die</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Could not connect : &quot;</span> . <a href="http://www.php.net/mysql_error"><span style="color: #000066;">mysql_error</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//echo &quot;Connected successfully&quot;;</span>
&nbsp;
<a href="http://www.php.net/mysql_select_db"><span style="color: #000066;">mysql_select_db</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;cropley_fbfpoll&quot;</span><span style="color: #66cc66;">&#41;</span> or <a href="http://www.php.net/die"><span style="color: #000066;">die</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Could not select database&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/* Performing SQL query */</span>
&nbsp;
<span style="color: #0000ff;">$query</span> = <span style="color: #ff0000;">'SELECT *
&nbsp;
FROM `2006`'</span>;
&nbsp;
?&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&nbsp;</pre>
<p>Et bien sûr "l'infâmité dans son intégralité" du pur plaisir.</p>
<p><a href="http://209.85.135.104/search?q=cache:TsRGEw3u3gMJ:www.filmbuffs.net/questions.html+worst+SQL+query&amp;hl=en&amp;ct=clnk&amp;cd=2&amp;client=firefox-a">http://209.85.135.104/search?q=cache:TsRGEw3u3gMJ:www.filmbuffs.net/questions.html+worst+SQL+query&amp;hl=en&amp;ct=clnk&amp;cd=2&amp;client=firefox-a</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/01/16/google-federe-la-communaute-porcho/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Qui est Porchoman ?</title>
		<link>http://www.porchoman.com/2008/01/15/qui-est-porchoman/</link>
		<comments>http://www.porchoman.com/2008/01/15/qui-est-porchoman/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 19:05:31 +0000</pubDate>
		<dc:creator>MagicalTux</dc:creator>
		
		<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://porchoman.com/?p=4</guid>
		<description><![CDATA[ Porchoman, c'est qui ?
Après de longues années de recherches, notre département R&#38;D est enfin en mesure de vous confirmer son identité. Porchoman® n'est pas une légende, il existe bel et bien.
Qui est-il ? Tout simplement n'importe quel développeur en manque de temps. C'est vous. C'est moi. Porchoman® est partout. Son profil d'action ? Développeur pressé, [...]]]></description>
			<content:encoded><![CDATA[<p> Porchoman, c'est qui ?</p>
<p>Après de longues années de recherches, notre département R&amp;D est enfin en mesure de vous confirmer son identité. Porchoman® n'est pas une légende, il existe bel et bien.</p>
<p>Qui est-il ? Tout simplement n'importe quel développeur en manque de temps. C'est vous. C'est moi. Porchoman® est partout. Son profil d'action ? Développeur pressé, sous pression, et à qui quelqu'un vient faire une demande en plus de tout ce qu'il fait déjà. La demande est expédiée en beauté, ou plutôt en Porchoman®.<span id="more-4"></span></p>
<p>Nous sommes une équipe de développeurs, et la plateforme que nous maintenons a plus de 10 ans, et est écrite en PHP. Dans ses entrailles se retrouvent encore des pratique de programmation disparues à l'époque de PHP 3; et l'application regorge de preuves de l'existence de Porchoman.<br />
Un excellent exemple est ce fameux fichier de 1100 lignes que personne n'osais toucher, qui  ne contient qu'une seule fonction « ReturnPrices() », qui ne prend que deux arguments. Son secret ? 50 lignes de « global » en en-tête pour récupérer toutes les données nécessaires au traitement. Vous aurez peut être la chance de lire sur ce site les lignes de l'homme qui a terrassé ce fichier.<br />
Évidemment de nombreux autres exemples existent et persistent encore aujourd'hui dans l'application, et la quête pour le code propre est encore longue.</p>
<p>Notre expérience ne se limite pas non plus à notre seule application. De nombreuses heures passées sur Internet nous ont permit de nous trouver nez-à-nez avec de nombreuses traces de Porchoman® qui nous permettent d'affirmer haut et fort : « IL » existe bel et bien, pour notre plus grand malheur.  Nos collègues anglophones de « The Daily WTF » en connaissent également des vertes et des pas mures...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.porchoman.com/2008/01/15/qui-est-porchoman/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
