{"id":301,"date":"2009-01-05T21:49:21","date_gmt":"2009-01-06T05:49:21","guid":{"rendered":"http:\/\/wp.colliertech.org\/cj\/?p=301"},"modified":"2009-01-05T21:49:21","modified_gmt":"2009-01-06T05:49:21","slug":"quest-for-the-re-usable-software-grail","status":"publish","type":"post","link":"https:\/\/wp.c9h.org\/cj\/?p=301","title":{"rendered":"Quest for the re-usable software grail"},"content":{"rendered":"<p>I&#8217;ve been reading <a href=\"http:\/\/www.dreamingincode.com\/\">Dreaming in Code<\/a> and discussing project planning &#038; management with <a href=\"http:\/\/www.linkedin.com\/profile?viewProfile=&amp;key=10660794\">my housemate<\/a>.  These topics have reminded me of the quest for &#8220;plugable,&#8221; re-usable software components.  The quest has been ended for the most part for those who use Perl.  <a href=\"http:\/\/search.cpan.org\/\">The CPAN<\/a> provides users of this particular language with a repository of code libraries (modules, in Perl parlance) which can be acquired, installed and applied with minimum fuss.  The barrier to entry for getting your code into The CPAN is low to permit new ideas proposed by folks who don&#8217;t have the know-how to prepare and revise applications.  This tends to cause some problems with regard to the signal-to-noise ratio, but I think it&#8217;s one of the primary reasons that the system is so successful.<\/p>\n<p>In addition to this repository of code, which contains a great deal of duplicated effort, lots of modules intended only as prototypes, and pipe dreams which were never completed, third parties provide statistics about the robustness, applicability, and overall &#8220;<a href=\"http:\/\/www.perlfoundation.org\/perl5\/index.cgi?kwalitee\">kwalitee<\/a>&#8221; of the code archived therein.  As famously noted in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Zen_and_the_Art_of_Motorcycle_Maintenance\">Zen and the Art of Motorcycle Maintenance<\/a>, &#8220;Quality&#8221; is a subjective concept and cannot be measured as such.  &#8220;Kwalitee,&#8221; on the other hand, is &#8220;a set of formalities that tend to coincide with quality, according to consensus.&#8221;<\/p>\n<p>There exist tools to analyze code for known problems which cause reduction in &#8220;kwalitee.&#8221;  The action performed by such tools is often called &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Static_code_analysis\">static analysis<\/a>.&#8221;  The sets of rules used in such systems to govern which parts of code are marked as somehow problematic are called &#8220;policies.&#8221;  There can be different classes of policies, for example security, complexity, cosmetic.  When developers write code keeping such policies in mind, they are said to be &#8220;using best practices.&#8221;  It&#8217;s hard to keep every such policy in mind when building software, so static analysis tools were developed to help gently nudge contributors back to the narrow path.<\/p>\n<p>Why am I mentioning all of this?  Why should any more effort be put into building a system of re-usable software if The CPAN already exists and provides all of these tools?  As much as I love Perl (and I do! :) ), it has a tendency to be used to fix all problems, even when it may not be the best approach.  Sometimes you need to get closer to the processor than an interpreted language lets you.  Sure, there&#8217;s always XS when you need to do that.  But the barrier to entry is high.  Another reason is that not everybody loves Perl as much as I do.  Some folks want to use (for instance) C++.  If the library is written in Perl, and your application is written in C++, you either need to embed a perl interpreter in your application or break your application into different processes and communicate between them.  This complicates the application and such complications and prone to error.<\/p>\n<p>So I guess what I&#8217;m trying to say here is that we need to take the lessons learned from The CPAN and apply them to a framework that all languages can interact with.  In my experience, the most accessible language in terms of inter-language co-existence, the language most capable of getting close to the processor is C.  All languages have a means by which they can re-use C libraries.  The primary difficulty with C, though, is that it&#8217;s hard to get object orientation right with.  It&#8217;s hard to create an object model that is flexible enough and consistent enough that interface bindings which feel &#8220;native&#8221; can be generated for every language.<\/p>\n<p>Lucky for us, that hard work has already been performed by the folks at Sun, RedHat, Ximian and Novell.  I&#8217;m referring, of course, to the <a href=\"http:\/\/en.wikipedia.org\/wiki\/GObject\">GObject<\/a> framework, the cornerstone of <a href=\"http:\/\/en.wikipedia.org\/wiki\/GNOME\">The GNOME Desktop<\/a> and the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Mono_(software)\">Mono<\/a> CLR.<\/p>\n<p>So the next is a question for you, readers: What are your opinions about building a software repository intended to be &#8220;The CPAN of GObject modules&#8221;?  Are there enough modules in existence to warrant the effort?  Is the current system of distribution &#8220;good enough?&#8221;  Is there a critical mass of people interested in using such a system?<\/p>\n<p>Most importantly, is there anyone else out there interested in building this infrastructure?  I&#8217;ve finally come to accept the fact that as much as I&#8217;d like to deny it, I just can&#8217;t do everything I want to in the time I&#8217;ve been allotted.  This seems like a project that would do a lot of good for a lot of people, but it&#8217;s just too much for me to do by myself.<\/p>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=cjamescollier\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Why should any more effort be put into building a system of re-usable software if The CPAN already exists and provides all of the tools necessary to create re-usable software?<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[188,190,79,62,116,7,15,18,166,193],"tags":[],"class_list":["post-301","post","type-post","status-publish","format-standard","hentry","category-cli","category-compiler","category-free-software","category-gtk","category-language","category-mono","category-novell","category-perl","category-software","category-test"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1YDIB-4R","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=301"}],"version-history":[{"count":5,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":306,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/301\/revisions\/306"}],"wp:attachment":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}