{"id":477,"date":"2008-10-25T21:08:55","date_gmt":"2008-10-26T04:08:55","guid":{"rendered":"http:\/\/162.243.68.163\/blog\/?p=477"},"modified":"2008-10-25T21:11:18","modified_gmt":"2008-10-26T04:11:18","slug":"lucid-code-at-its-best","status":"publish","type":"post","link":"https:\/\/tekhedd.com\/?p=477","title":{"rendered":"Lucid Code at its Best"},"content":{"rendered":"<p>In my opinion, even the best Python programmers, by definition, are incapable of of conforming to established standards, and are therefore incapable of writing maintainable, well-commented code. I have yet to see a python module that was actually well-commented. Not in free software, not in commercial software, not in Mercurial (sorry guys). Here&#8217;s a revelatory moment from IRC:<\/p>\n<p>[21:39] &lt;@tekhedd_&gt; It&#8217;s using the <a href=\"http:\/\/twistedmatrix.com\/trac\/\">Twisted<\/a> python internet libraries.<br \/>\n[21:39] &lt;@tekhedd_&gt; ray of light<br \/>\n[21:39] &lt;@tekhedd_&gt; my god, is it real? It&#8217;s been dark so long, I&#8217;m so afraid to be disappointed again&#8230;<br \/>\n[21:41] &lt;@Urvieh&gt; always worth the risk<br \/>\n[21:45] &lt;@tekhedd_&gt; OK, so I&#8217;m trying to figure out how the login dialog works, and there&#8217;s an object called &#8220;pb&#8221;.<br \/>\n[21:45] &lt;@tekhedd_&gt; And I&#8217;m thinking to myself, this must be a local variable.<br \/>\n[21:45] &lt;@tekhedd_&gt; Then I notice it&#8217;s imported from &#8220;twisted.spread&#8221;<br \/>\n[21:45] &lt;@tekhedd_&gt; it&#8217;s listed right after &#8220;twisted.banana&#8221;<br \/>\n[21:45] &lt;@tekhedd_&gt; and &#8220;twisted.jelly&#8221;<br \/>\n[21:45] &lt;@tekhedd_&gt; in the twisted docs<br \/>\n[21:45] &lt;@tekhedd_&gt; it&#8217;s peanut butter, isn&#8217;t it?<br \/>\n[21:46] &lt;+Sigoya1&gt; O.o<br \/>\n[21:46] &lt;@tekhedd_&gt;\u00c3\u201a\u00c2\u00a0\u00c3\u201a\u00c2\u00a0\u00c3\u201a\u00c2\u00a0\u00c3\u201a\u00c2\u00a0 factory = pb.PBClientFactory()<br \/>\n[21:46] &lt;@tekhedd_&gt;\u00c3\u201a\u00c2\u00a0\u00c3\u201a\u00c2\u00a0\u00c3\u201a\u00c2\u00a0\u00c3\u201a\u00c2\u00a0 reactor.connectTCP(masterIP,masterPort,factory)<br \/>\n[21:46] &lt;@tekhedd_&gt; I&#8217;m not making this up.<br \/>\n[21:46] &lt;@tekhedd_&gt; oh thank goodness, it stands for &#8220;Perspective Broker&#8221;<br \/>\n[21:46] &lt;@tekhedd_&gt; <a href=\"http:\/\/twistedmatrix.com\/documents\/current\/api\/twisted.spread.html\">http:\/\/twistedmatrix.com\/documents\/current\/api\/twisted.spread.html<\/a><br \/>\n[21:47] &lt;@tekhedd_&gt; and of course &#8220;jelly&#8221; is short for &#8220;S-expression-based persistence of python objects&#8221;<\/p>\n<p>&#8230;<\/p>\n<p>[21:56] &lt;@tekhedd_&gt; So, the pb.ClientFactory actually creates S-expression based distributed networking clients.<br \/>\n[21:56] &lt;@tekhedd_&gt; Gosh, lucid code at its best.<\/p>\n<p>Python programmers just don&#8217;t &#8220;get&#8221; standards and maintainability.<\/p>\n<p>You see, Python programmers are the black sheep, the renegades, the self-taught hackers who live in a world without fences or curly brackets. The noobs who haven&#8217;t learned to write quality code yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my opinion, even the best Python programmers, by definition, are incapable of of conforming to established standards, and are therefore incapable of writing maintainable, well-commented code. I have yet to see a python module that was actually well-commented. Not in free software, not in commercial software, not in Mercurial (sorry guys). Here&#8217;s a revelatory [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[187,186,185],"class_list":["post-477","post","type-post","status-publish","format-standard","hentry","category-other","tag-noobs","tag-programming","tag-python"],"_links":{"self":[{"href":"https:\/\/tekhedd.com\/index.php?rest_route=\/wp\/v2\/posts\/477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tekhedd.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tekhedd.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tekhedd.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tekhedd.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=477"}],"version-history":[{"count":4,"href":"https:\/\/tekhedd.com\/index.php?rest_route=\/wp\/v2\/posts\/477\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/tekhedd.com\/index.php?rest_route=\/wp\/v2\/posts\/477\/revisions\/481"}],"wp:attachment":[{"href":"https:\/\/tekhedd.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tekhedd.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tekhedd.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}