
{"id":774,"date":"2003-08-09T14:12:00","date_gmt":"2003-08-09T21:12:00","guid":{"rendered":"http:\/\/www.oblomovka.com\/wp\/2003\/08\/py-vs-pl\/"},"modified":"2003-08-09T14:12:00","modified_gmt":"2003-08-09T21:12:00","slug":"py-vs-pl","status":"publish","type":"post","link":"https:\/\/www.oblomovka.com\/wp\/2003\/08\/09\/py-vs-pl\/","title":{"rendered":"py vs pl"},"content":{"rendered":"<p>I&#8217;ve got a new medium-sized project to be working on. It&#8217;s just me coding it at the moment but at some point (if it comes together), I do want to be able to pass it on to someone else, preferably without apologising first.<\/p>\n<p>I&#8217;m utterly torn between Perl and Python. My first choice in this case would be Python, because bad Python code doesn&#8217;t seem to be quite so <i>personal<\/i>.  I&#8217;ve seen people spit blood at other coder&#8217;s Perl, just because it&#8217;s not the way that they would do it. Perl demands rather more sympathy with your predecessor than does Python. With Python, it&#8217;s just more code to stare at.<\/p>\n<p>That said, your successor does need to actually know the language. Most of the people I can imagine maintaining this code will know Perl but not Python. Python doesn&#8217;t take that long to learn, but reading Python to take on someone else&#8217;se project just isn&#8217;t much *fun*. Sitting down to learn someone&#8217;s Perl, while tough, does teach you about the way they were thinking when they wrote the application.  Python&#8217;s clarity, I think, cuts down on its expressiveness in depicting why certain decisions were made. When I had to hunker down and learn POE or Moveable Type, for instance, I came away with a very deep understanding of <i>how<\/i> it was supposed to work. It was fun, albeit time-consuming. I sometimes have problems doing the same with slabs of Python code, just because they can be very lacking in personality.<\/p>\n<p>That said, I&#8217;m not paid to be a programmer. What is fun is a hobby can be skull-crackingly frustrating in a job with a deadline.<\/p>\n<p>I eventually made the decision to go with Perl and <a     href=\"http:\/\/www.masonhq.com\/\">Mason<\/a> &#8211; mainly because of Mason. I know a lot of people who know Mason who I can ask when I got stuck, and there&#8217;s a fair bit of this code that will end up being on a Website, eventually. There don&#8217;t seem to be any Python templating solutions that stand head-and-shoulders above the crowd (and whose implementors I know). I felt that going with Perl would provide my successor with a clearer understanding of the whole project, and not necessarily lock me into an immature Web tech that no-one knows.<\/p>\n<p>Now, a couple of days into it, I&#8217;ve begun to seriously reconsider. I&#8217;m nowhere near the Mason bit of the application, and I&#8217;m getting continually bogged down in Perl style issues that really don&#8217;t have anything to do with what I&#8217;m trying to write.<\/p>\n<p>To be honest, I  think this is my Perl rustiness kicking in; and I think it may go away after a few more days hacking. Worse, though, is the effect of something I thought would be a real boon &#8211; <a href=\"http:\/\/www.cpan.org\/\"     title=\"The Comprehensive Perl Archive Network, the gateway to all things     Perl. The canonical location for...\">CPAN<\/a>. There&#8217;s a bunch of useful utilities there that I&#8217;d love to suck in and use in my program. But they all have different idioms &#8211; all of which I have to sit down and learn. Plus there&#8217;s the whole dependency issue: sooner or later I&#8217;m going to have to install all of this on the working server, and there&#8217;s a real penalty to be paid for being dependent on a lot of scattered Perl modules. Will they work? Will they still be maintained? Which of alternative implementations should I choose?<\/>  <\/p>\n<p>So, I&#8217;m going to spend this weekend <a     href=\"http:\/\/c2.com\/cgi\/wiki?SpikeSolution\">having a bash<\/a> at a Python version. My <a     href=\"http:\/\/c2.com\/cgi\/wiki?ExtremeProgrammingRoadmap\">XPish<\/a> working style has recently become dependent on a lot of Python features, and the Python core library has most of what I need in the way of modules. I really haven&#8217;t written much code, so there&#8217;s not much time lost. And I figure that if it all goes to hell in Python too, I&#8217;ll learn my lesson quickly and go slinking back to Perl with my tail between my legs.  Plus, no-one&#8217;s paying me to be decisive here. As if  anyone would.<\/p>\n<p>I still don&#8217;t know of a good, solid, Python templating language though. Or rather, I know of three or four, but I don&#8217;t know anyone who has used any of them seriously in high-volume production environments. I&#8217;m not interested in Zope or Twisted (tempting though they are) because I&#8217;d be obliged to wrap my solution in their terms, but I really don&#8217;t know whether I should go for SkunkWeb or WebWare or Spyce or <a     href=\"http:\/\/www.python.org\/cgi-bin\/moinmoin\/WebProgramming\">any of the     others<\/a>.<\/p>\n<p>Right now, I&#8217;m delaying the decision until I&#8217;m a bit deeper into the code. Which feels a bit uncomfortable. But under the terms of XP, perhaps <a     href=\"http:\/\/c2.com\/cgi\/wiki?YouArentGonnaNeedIt\">forgiveable<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve got a new medium-sized project to be working on. It&#8217;s just me coding it at the moment but at some point (if it comes together), I do want to be able to pass it on to someone else, preferably without apologising first. I&#8217;m utterly torn between Perl and Python. My first choice in this [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-774","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/posts\/774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/comments?post=774"}],"version-history":[{"count":0,"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/posts\/774\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/media?parent=774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/categories?post=774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oblomovka.com\/wp\/wp-json\/wp\/v2\/tags?post=774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}