{"id":26,"date":"2007-03-14T20:56:29","date_gmt":"2007-03-15T04:56:29","guid":{"rendered":"http:\/\/blog.richardkiss.com\/?p=26"},"modified":"2021-02-06T20:24:56","modified_gmt":"2021-02-07T04:24:56","slug":"lazy-bones","status":"publish","type":"post","link":"https:\/\/blog.richardkiss.com\/?p=26","title":{"rendered":"Lazy Bones"},"content":{"rendered":"<p>I&#8217;ve always been proud about how lazy I am. I often say that I will do an incredible amount of work just so I can be lazy. Something along those lines happened today, and I realize that what it is is that I hate is routine busywork; so much so that I would rather do a certain quantity of creative work to avoid an equal quantity of busywork.<\/p>\n<p>At my company, we have used Apple&#8217;s deprecated WebObjects 4.5, which uses Objective-C and WebScript. Years ago, WO4.5 was the most fun web development environment, but since it turned 5.0 and substituted Java for Objective-C, it&#8217;s been much less fun and it&#8217;s not used very widely outside Apple, and it&#8217;s not really admired as much as it used to be. It&#8217;s gotten worse (Java over WebScript? Get real) and other environments have gotten better (I like Django a lot right now).<\/p>\n<p>Anyway, we have a specific application that has been bothering us for a long time, and it&#8217;s time to port it.<\/p>\n<p>I&#8217;ve been looking at &#8220;SQLAlchemy&#8221;, a Python-based object-relational modeling tool that works with Oracle (which I hate, but that&#8217;s a story for another time). It seems using this tool will make the port from WO4.5 to Python a fair bit easier.<\/p>\n<p>The first step seemed to be to create new model files that describe the object-relational mapping. Of course, the syntax for these files (pure Python, it turns out) is quite different from the syntax used in WO&#8217;s EOF object-relational mapping layer. We have a lot of objects, so rather than do it by hand, I thought I would write a tool to do it.<\/p>\n<p>EOF uses a plist file format. There are Objective-C routines to read these files, but I couldn&#8217;t find any libraries to do so in Python. So I installed pyobjc so I could use one particular Objective-C call from Python. This made parsing very easy, and creating the Python model file was a piece of cake.<\/p>\n<p>It&#8217;s not 100% yet, but I was quite amazed not only how quickly I could produce the translation tool, but what great lengths I would go to to be lazy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve always been proud about how lazy I am. I often say that I will do an incredible amount of work just so I can be lazy. Something along those lines happened today, and I realize that what it is is that I hate is routine busywork; so much so that I would rather do &hellip; <a href=\"https:\/\/blog.richardkiss.com\/?p=26\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Lazy Bones<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-computers"],"_links":{"self":[{"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":1,"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":630,"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions\/630"}],"wp:attachment":[{"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.richardkiss.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}