<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4836027257696992542</id><updated>2011-08-23T13:43:36.460+02:00</updated><category term='lvalue'/><category term='collective knowledge'/><category term='accessors'/><category term='object-oriented'/><category term='perl'/><category term='presentation style'/><category term='bug tracking'/><category term='audit'/><category term='Windows'/><category term='conference'/><category term='development method'/><category term='syntax'/><category term='Catalyst'/><category term='rt'/><category term='metaobject protocol'/><category term='stash'/><category term='bless'/><category term='YAPC'/><category term='ironman'/><category term='operator precedence'/><category term='session'/><category term='perl objects'/><category term='project management'/><category term='blogging'/><category term='encapsulation'/><category term='mutators'/><category term='Perl community'/><title type='text'>ldami</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-7787458467677209852</id><published>2011-08-19T12:41:00.002+02:00</published><updated>2011-08-19T14:40:30.234+02:00</updated><title type='text'>Beautiful Riga</title><content type='html'>This year &lt;a href="http://yapceurope.lv/ye2011/"&gt;Perl YAPC::EU::2011 &lt;/a&gt;conference brought us to Riga : what a nice discovery!&lt;br /&gt;&lt;br /&gt;I barely knew about the existence of this city (apart some vague remembrances of having seen this name when reading Jules Verne's &lt;em&gt;&lt;a href="http://fr.wikipedia.org/wiki/Un_drame_en_Livonie"&gt;Un drame en Livonie&lt;/a&gt;&lt;/em&gt;, long long time ago). Now I will recommend it to friends.&lt;br /&gt;&lt;br /&gt;Riga has a lot of beautiful buildings, mostly from end of 19th-beginning of 20th century. The &lt;a href="http://www.jugendstils.riga.lv/eng/muzejs"&gt;Art Nouveau museum&lt;/a&gt; has an interesting film explaining various architectural substyles during that period; then you can easily recognize them when walking in the city. By the way, walking is a pleasure because there are large pedestrian areas through the old town, and several beautiful parks just around that center. There are various churches of different eras and styles, and a tremendous romantic organ in the Dom Cathedral, with a concert every day at noon !&lt;br /&gt;&lt;br /&gt;I discovered interesting composers at the&lt;a href="http://www.choirlatvija.lv/koncerti.asp?pageId=276"&gt; Sacred Music Festival &lt;/a&gt;(with high-quality choir, orchestra and soloists); and discovered many interesting painters at the &lt;a href="http://www.vmm.lv/en/lnmm/"&gt;Latvian National Museum of Arts&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So Riga has many advantages of a capital with rich cultural life, but seemingly without too many of its inconveniences : most buildings look fresh and unaffected by pollution, I didn't see any traffic jams, prices are reasonable, etc. Maybe that's the positive aspect of Soviet occupation, that the city was preserved so many years from wild capitalism...&lt;br /&gt;&lt;br /&gt;In short, not only was YAPC a very nice conference, it was also the totally unexpected pleasure of a very interesting touristical exploration (albeit too short).&lt;br /&gt;&lt;br /&gt;Thanks to the YAPC organizers for having brought us there!&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-7787458467677209852?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/7787458467677209852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2011/08/beautiful-riga.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7787458467677209852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7787458467677209852'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2011/08/beautiful-riga.html' title='Beautiful Riga'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-7867812080790018375</id><published>2011-08-18T06:32:00.006+02:00</published><updated>2011-08-18T07:42:35.406+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl objects'/><category scheme='http://www.blogger.com/atom/ns#' term='metaobject protocol'/><category scheme='http://www.blogger.com/atom/ns#' term='bless'/><title type='text'>Why not bless objects into … metaobjects ?</title><content type='html'>&lt;p&gt;Yesterday, Jesse Vincent gave a &lt;a href="http://yapceurope.lv/ye2011/talk/3291"&gt;talk &lt;/a&gt;at &lt;a href="http://yapceurope.lv/ye2011/"&gt;YAPC::EU::2011 &lt;/a&gt;about the future of Perl; among many interesting things, he mentioned the idea of adding support for a metaobject protocol , directly in Perl5 core.&lt;/p&gt;&lt;p&gt;This immediately got me thinking, because in the past weeks I have been struggling with a design problem that is closely related to that topic.&lt;/p&gt;&lt;p&gt;My project was to add a layer of meta-information in &lt;a href="https://metacpan.org/release/DAMI/DBIx-DataModel-1.99_05/"&gt;version 2 of DBIx::DataModel&lt;/a&gt;, so that the client code could navigate through the available tables, joins, etc. available within the current datamodel. Since tables and joins are classes, it would seem natural to use class methods for navigation in the metamodel. However, in Perl there are no separate namespaces for class methods and instance methods : any subroutine declared in a package can be called either way; it's the code in the subroutine that has to inspect its first argument to know if it was called as a class or as an instance, and then take “the appropriate action”. So in short, the problem is :&lt;/p&gt;&lt;ul&gt;&lt;li&gt;we want each table to have an C&lt;associations()&gt; method;&lt;/li&gt;&lt;li&gt;a table must be a class (so that rows from that table can be blessed into something)&lt;/li&gt;&lt;li&gt;a call to &lt;code&gt;$row-&amp;gt;associations()&lt;/code&gt; makes no sense, so there is no “appropriate action” (except throwing an exception, which is only halfway satisfactory)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The design decision for DBIx::DataModel was to create a separate set of metaobjects. When a Table() is defined, it simultaneously creates a &lt;em&gt;subclass&lt;/em&gt; of &lt;code&gt;DBIx::DataModel::Source::Table&lt;/code&gt;, and an &lt;em&gt;instance&lt;/em&gt; of &lt;code&gt;DBIx::DataModel::Meta::Source::Table&lt;/code&gt;. The class has a method to reach its metaobject, and the metaobject has an attribute to know which class it is attached to. Now the &lt;code&gt;associations()&lt;/code&gt; method is defined in the metaobject, not in the subclass, so rows are not affected. It works, it's pretty clean in the separation of concerns, so I'm almost happy.&lt;/p&gt;&lt;p&gt;What would be really, really great, however, would be to be able to bless an object &lt;em&gt;directly into its metaobject&lt;/em&gt;. Unfortunately, Perl won't let you do that : it raises an exception “Attempt to bless into a reference”. This makes sense, because Perl needs to know the name of the symbol table where it will start looking for methods. So in order to fool the compiler, let's put in a stringification operator :&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;package Meta;&lt;br /&gt;use overload '""' =&gt; sub {my $self = shift; join "::", @$self};&lt;br /&gt;sub meta_method {print "I'm a clever meta-method for $_[0]\n"}&lt;br /&gt;&lt;br /&gt;package Foo::Bar;&lt;br /&gt;sub m {print "hello from Foo::Bar\n"}&lt;br /&gt;&lt;br /&gt;package Bar::Foo;&lt;br /&gt;sub m {print "hello from Bar::Foo\n"}&lt;br /&gt;&lt;br /&gt;package main;&lt;br /&gt;my $FB = bless [qw/Foo Bar/], 'Meta';&lt;br /&gt;my $BF = bless [qw/Bar Foo/], 'Meta';&lt;br /&gt;my $fb = bless {}, $FB;&lt;br /&gt;my $bf = bless {}, $BF;&lt;br /&gt;$fb-&gt;m; $bf-&gt;m;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It works! This code compiles and runs! But it doesn't bring us very far, because stringification occurs &lt;em&gt;at blessing time&lt;/em&gt;, which is too early : &lt;code&gt;ref $fb&lt;/code&gt; returns the &lt;em&gt;string&lt;/em&gt; &lt;code&gt;'Foo::Bar'&lt;/code&gt;, not the &lt;em&gt;metaobject&lt;/em&gt;; so it is not possible to call&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;(ref $fb)-&gt;meta_method&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This would require a change in the perl5 compiler, allowing &lt;code&gt;bless&lt;/code&gt; to take objects as second argument, instead of just strings. Conceptually this does not seem to be infeasible; it's quite similar to what happened a couple of years ago with exceptions (initially exceptions were just strings; now they can be objects too). And if we have that, we can build a metaobject protocol, we can build delegation chains à la Self or Smalltalk, etc.&lt;/p&gt;&lt;p&gt;Unfortunately, when I came to this point yesterday, it was too late to grab one of the perl5 core guys to discuss that idea. So let's do it online : what do you think of this proposal ?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-7867812080790018375?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/7867812080790018375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2011/08/why-not-bless-objects-into-metaobjects.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7867812080790018375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7867812080790018375'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2011/08/why-not-bless-objects-into-metaobjects.html' title='Why not bless objects into … metaobjects ?'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-3083096753946570554</id><published>2011-08-16T05:09:00.002+02:00</published><updated>2011-08-16T05:42:47.303+02:00</updated><title type='text'>about MsOffice::Word::HTML::Writer</title><content type='html'>Yesterday I gave a lightning talk on &lt;a href="http://search.cpan.org/dist/MsOffice-Word-HTML-Writer/"&gt;MsOffice::Word::HTML::Writer&lt;/a&gt;, a module to produce documents for MsWord from HTML content. To anybody interested, here is some more info :&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;the module only needs Perl, and therefore can run on a server; it doesn't need MsWord to be installed (actually, that's the whole purpose of that module).&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;it was written for the needs of Geneva courts of law, where we needed to generate thousands of documents every day, from hundreds of models, with libraries of reusable content parts, with fusion of complex datastructures ... but the resulting docs must be editable in MsWord.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;Other technologies considered, but rejected, were :&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;remote control of an MsWord instance, through a OLE connection. That's what most other courts do, but it only works on a local workstation : you could hardly do the same on a server, first because you would need to install MsOffice, and second because this architecture is not reliable enough : the MsWord instance is a bottleneck, it might break, or it might suddenly put a popup to ask the user for something ... except there is nobody to answer if running on a server. So this approach can be considered if you have a heavy application, deployed on everybody's PC; but not for a Web application.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;generating RTF, using some templating tool : this works on a server, but authoring models can be tricky (esp. it is not obvious to factorize reusable parts).&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;generating XML, either in ODF (open format used by OpenOffice), or in OOXML (Microsoft proprietary format) : here the main problem is authoring, because both XML specs are huge, so you really need specialists to produce your models&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;generating ODF from &lt;a href="http://search.cpan.org/dist/OpenOffice-OODoc/"&gt;http://search.cpan.org/dist/OpenOffice-OODoc/&lt;/a&gt; : well, ODF can be read by MsWord, but many features are missing. Besides, OODoc uses a programming approach, not a templating approach, so it's harder to delegate authoring of models to people who are not familiar with Perl.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://search.cpan.org/dist/MsOffice-Word-HTML-Writer/"&gt;MsOffice::Word::HTML::Writer&lt;/a&gt; works by assembling HTML content (the main document, the headers/footers, other resources like images or CSS stylesheets), and then packaging the whole thing as a single MIME/multipart file. Model authors just need to know HTML, so it's easy to build an authoring team; and if you have a good templating framework, it's also easy to build a library of reusable content parts.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-3083096753946570554?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/3083096753946570554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2011/08/about-msofficewordhtmlwriter.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/3083096753946570554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/3083096753946570554'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2011/08/about-msofficewordhtmlwriter.html' title='about MsOffice::Word::HTML::Writer'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-7539310974625279230</id><published>2011-08-14T20:51:00.002+02:00</published><updated>2011-08-14T20:56:45.674+02:00</updated><title type='text'>Bad luck with Riga trip</title><content type='html'>I really seem to have bad luck with the trip to Riga for Perl conference YAPC::EU::2011.&lt;br /&gt;&lt;br /&gt;I had booked my flight and hotel several months in advance. A couple of days ago, I received a mail telling that the hotel was overbooked, they had made a mistake, and sent me to another place.&lt;br /&gt;&lt;br /&gt;Now today, my flight from Geneva got delayed by 90 minutes, and I missed the last flight to Riga, so I'm sleeping in Brussels.&lt;br /&gt;&lt;br /&gt;There is a flight to Riga tomorrow morning, so if nothing worse happens, I should still be in time for my talk &lt;a class="moz-txt-link-freetext" href="http://yapceurope.lv/ye2011/talk/3410"&gt;http://yapceurope.lv/ye2011/talk/3410&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-7539310974625279230?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/7539310974625279230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2011/08/bad-luck-with-riga-trip.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7539310974625279230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7539310974625279230'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2011/08/bad-luck-with-riga-trip.html' title='Bad luck with Riga trip'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-1094541566640608976</id><published>2011-08-08T22:06:00.002+02:00</published><updated>2011-08-08T22:35:23.952+02:00</updated><title type='text'>DBIx::DataModel 2.0 is on the way</title><content type='html'>DBIx::DataModel version 2.0 is on the way.&lt;br /&gt;&lt;br /&gt;It will be a major refactoring, introducing a metaobject layer, choice between single-schema or multi-schema mode, support for table inheritance, for arbitrary join clauses, for bulk updates and deletes; the API has been made more "perlish" (replacing camelCaseMethods by methods_with_underscores). A dev version is already on CPAN; the code seems to be quite stable now, but the distribution is still lacking in documentation and tests, so I'm not sure it will be fully ready before YAPC::EU::2011 ... but at least the slides are ready (see &lt;a href="http://www.slideshare.net/ldami/dbix-datamodel-endetail"&gt;http://www.slideshare.net/ldami/dbix-datamodel-endetail&lt;/a&gt; if your are interested).&lt;br /&gt;&lt;br /&gt;The last major refactoring was version 1.0 in 2008, and the first published version was 0.10 in 2005, so I seem to be following a 3-year schedule !&lt;br /&gt;&lt;br /&gt;I really hope that DBIx-DataModel will get some more visibility, because it has some features that are quite original in the (big) world of Perl ORMs, and could probably be useful to other people. For those of you who will be in Riga : come at the talk !&lt;br /&gt;&lt;a href="http://yapceurope.lv/ye2011/talk/3411"&gt;http://yapceurope.lv/ye2011/talk/3411&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-1094541566640608976?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/1094541566640608976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2011/08/dbixdatamodel-20-is-on-way.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/1094541566640608976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/1094541566640608976'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2011/08/dbixdatamodel-20-is-on-way.html' title='DBIx::DataModel 2.0 is on the way'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-4624268251287448526</id><published>2011-08-05T15:39:00.002+02:00</published><updated>2011-08-05T15:41:35.036+02:00</updated><title type='text'>a municipality called Perl</title><content type='html'>I just discovered accidentally that there is a German location called "Perl", close to the Luxemburg border.&lt;br /&gt;&lt;br /&gt;Maybe a place to consider for the next YAPC ?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Perl,_Saarland"&gt;http://en.wikipedia.org/wiki/Perl,_Saarland&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-4624268251287448526?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/4624268251287448526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2011/08/municipality-called-perl.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/4624268251287448526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/4624268251287448526'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2011/08/municipality-called-perl.html' title='a municipality called Perl'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-5935477197255119016</id><published>2011-06-10T04:05:00.002+02:00</published><updated>2011-06-10T04:37:21.442+02:00</updated><title type='text'>Perl dualvar is useful, after all</title><content type='html'>For many years I had been intrigued by &lt;a href="http://search.cpan.org/perldoc/Scalar::Util"&gt;Scalar::Util::dualvar &lt;/a&gt;: why would one store both a number and a string within the same variable ?&lt;br /&gt;&lt;br /&gt;Yesterday I finally found a situation where dualvar was just the perfect answer.I was doing some refactoring in &lt;a href="http://search.cpan.org/perldoc/DBIx::DataModel::Statement"&gt;DBIx::DataModel::Statement&lt;/a&gt; : each object from this class has a status, that goes through steps "new", "sqlized", "prepared", "executed". Originally his had been coded with plain strings; but the problem with strings is that they are not ordered, so I was considering a change to something like&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;use constant {NEW =&amp;gt; 1, SQLIZED =&amp;gt; 2, PREPARED =&amp;gt; 3, EXECUTED =&amp;gt; 4};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However such codes are not user-friendly, so when generating error messages I would need to translate them back into strings. Moreover, that change was not backwards compatible. So dualvar came to the rescue :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;use constant {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;NEW =&amp;gt; dualvar(1, "new"),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQLIZED =&amp;gt; dualvar(2, "sqlized"),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PREPARED =&amp;gt; dualvar(3, "prepared"),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;EXECUTED =&amp;gt; dualvar(4, "executed"),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now I can write things like&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$status &amp;gt;= PREPARED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;or die "can't do that operation when in state $status";&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-5935477197255119016?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/5935477197255119016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2011/06/perl-dualvar-is-useful-after-all.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/5935477197255119016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/5935477197255119016'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2011/06/perl-dualvar-is-useful-after-all.html' title='Perl dualvar is useful, after all'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-1895270742590600199</id><published>2011-01-14T19:26:00.004+01:00</published><updated>2011-01-14T21:20:23.010+01:00</updated><title type='text'>good luck to Plat-forms 2011 Perl teams</title><content type='html'>I just learned from &lt;a href="http://szabgab.com/blog/2011/01/plat-forms-perl-teams.html"&gt;Gabor Szabo's blog&lt;/a&gt; that the 2011 &lt;a href="http://www.plat-forms.org/"&gt;Plat-forms programming contest &lt;/a&gt;is taking place next week, and that 3 excellent Perl teams are participating. This is great news !&lt;br /&gt;&lt;br /&gt;In my &lt;a href="http://ldami.blogspot.com/2010/08/platforms-20102011-call-for-perl-teams.html"&gt;last blog entry &lt;/a&gt;(August 2010 ... so long ago!), I mentioned the importance of that contest for the image of Perl outside of our community. Within a couple of months, when the reports will be published, IT specialists from all over the world will get a strong signal that Perl is alive and produces good results.&lt;br /&gt;&lt;br /&gt;I very much enjoyed participating in the 2007 edition : this was a big stress, but also an enriching experience, not only on the technical aspects, but also on the collaboration skills under strong pressure. Unfortunately I could not register for the 2011 edition, because at work we had to prepare a major organisational change for 01.01.2011, which left us absolutely no time to think of anything else (not even to blog .. see above!).&lt;br /&gt;&lt;br /&gt;So, all the best for the three Perl teams, thanks for having registered, and I'm sure you will show to the world that our technology is excellent for productivity, conciseness, flexibility and so much more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-1895270742590600199?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/1895270742590600199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2011/01/good-luck-to-plat-forms-2011-perl-teams.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/1895270742590600199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/1895270742590600199'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2011/01/good-luck-to-plat-forms-2011-perl-teams.html' title='good luck to Plat-forms 2011 Perl teams'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-7465775781978309879</id><published>2010-08-26T06:18:00.002+02:00</published><updated>2010-08-26T06:21:59.236+02:00</updated><title type='text'>plat_forms 2010/2011 : call for Perl teams</title><content type='html'>&lt;div align="left"&gt;A new edition of the Plat_Forms programming contest is going to take place in end 2010 or beginning of 2011 : see &lt;a href="http://www.plat-forms.org/2010/plat-forms-in-2010"&gt;http://www.plat-forms.org/2010/plat-forms-in-2010&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;The first edition took place in 2007 and our Geneva team on Catalyst was winner of the Perl track (&lt;a href="http://use.perl.org/~dami/journal/33559"&gt;http://use.perl.org/~dami/journal/33559&lt;/a&gt; ). Unfortunately we will not be able to participate again this time; but I wish that another Catalyst team will be present. Reports from that contest got significant coverage in specialised press , and can play an important role in propagating a positive image of Perl. See for example the August 2010 issue of the prestigious "Communications of ACM" (&lt;a href="http://cacm.acm.org/magazines/2010/8/96637-platforms-is-there-one-best-web-development-technology/abstract"&gt;http://cacm.acm.org/magazines/2010/8/96637-platforms-is-there-one-best-web-development-technology/abstract&lt;/a&gt;  , full text available at &lt;a href="http://page.mi.fu-berlin.de/prechelt/Biblio/platforms07-cacm-2010.pdf"&gt;http://page.mi.fu-berlin.de/prechelt/Biblio/platforms07-cacm-2010.pdf&lt;/a&gt; ); the conclusion reads :&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Is Perl outdated? No. In contrast, the small size of the solutions and their good modifiability suggest that Perl may be a particularly strong platform with respect to maintainability.&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;So, Perl programmers, please build up teams to participate in the 2010/2011 edition! &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-7465775781978309879?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/7465775781978309879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2010/08/platforms-20102011-call-for-perl-teams.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7465775781978309879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7465775781978309879'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2010/08/platforms-20102011-call-for-perl-teams.html' title='plat_forms 2010/2011 : call for Perl teams'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-6142536773502030324</id><published>2010-06-13T21:37:00.002+02:00</published><updated>2010-06-13T22:36:40.493+02:00</updated><title type='text'>rakudo perl6 runs on win32</title><content type='html'>The &lt;a href="http://journeesperl.fr/fpw2010/"&gt;French Perl Workshop 2010&lt;/a&gt; had a whole track on perl6; so before going there, I quickly downloaded the &lt;a href="http://sourceforge.net/projects/parrotwin32/"&gt;parrot and rakudo packages for win32 from sourceforge&lt;/a&gt;, with the intent of playing with perl6 during the (long!) trip from Geneva to Calais. I've been reading and hearing about perl6 for some years, but so far I had never taken time to give it a try.&lt;br /&gt;&lt;br /&gt;Alas, the distribution did not work, complaining for a missing DLL that I didn't know where to find. So I had plenty of time for other, more urgent tasks during the travel, but sadly I hadn't written a single line of perl6 yet.&lt;br /&gt;&lt;br /&gt;At the conference, I started telling my neighbour about this misadventure ... and it turned out that this neighbour was François Perrad, the author of the parrotwin32 package ! François quickly found out the problem with the distribution; we fixed it manually on my machine, and François is going to issue a new distribution within a few days.&lt;br /&gt;&lt;br /&gt;So, because of this nice coincidence, I finally was able to write my first "hello, world" program in perl6.&lt;br /&gt;&lt;br /&gt;The next step will be to try to do some real work ... but for this I need a database connection, and as far as I know, the DBI redesign for perl6 by Tim Bunce is not complete yet. I talked about this to Martin Berends, who had given several talks on perl6 during the day .... and nice coincidence again, it turns out that Martin has a &lt;a href="http://github.com/mberends/fakedbi/"&gt;"fakedbi" project &lt;/a&gt;that implements a subset of Perl DBI , ported from perl5 to perl6 !&lt;br /&gt;&lt;br /&gt;So after these lucky coincidences, my only problem is that I no longer have any excuse for not looking seriously at perl6 !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-6142536773502030324?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/6142536773502030324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2010/06/rakudo-perl6-runs-on-win32.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/6142536773502030324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/6142536773502030324'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2010/06/rakudo-perl6-runs-on-win32.html' title='rakudo perl6 runs on win32'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-7265144998256542054</id><published>2010-06-13T12:11:00.002+02:00</published><updated>2010-06-13T12:17:51.608+02:00</updated><title type='text'>slides for the perl french workshop 2010 :  ORM and EDM</title><content type='html'>My slides for the &lt;a href="http://journeesperl.fr/fpw2010/"&gt;French Perl Workshop 2010&lt;/a&gt; are online :&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.slideshare.net/ldami/gestion-documentaire-tribge"&gt;Gestion documentaire pour les tribunaux genevois&lt;/a&gt; : Geneva courts of law rely more and more on Perl for all their information systems. This talk presents three facets of electronic document management : storing justice decisions, preparing projects of documents, and a project for building a paperless justice file, combining webdav and modperl.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.slideshare.net/ldami/dbix-datamodel-endetail"&gt;DBIx-DataModel in detail&lt;/a&gt; : DBIx-DataModel is an object-relational mapping framework for Perl5. Schema declarations are inspired from UML modelling. The API provides efficient interaction with the DBI layer, detailed control on statement execution steps, flexible and powerful treatment of database joins. More on &lt;a href="http://search.cpan.org/dist/DBIx-DataModel"&gt;http://search.cpan.org/dist/DBIx-DataModel&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-7265144998256542054?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/7265144998256542054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2010/06/slides-for-perl-french-workshop-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7265144998256542054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7265144998256542054'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2010/06/slides-for-perl-french-workshop-2010.html' title='slides for the perl french workshop 2010 :  ORM and EDM'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-8289057080733654854</id><published>2010-06-05T11:00:00.003+02:00</published><updated>2010-06-05T11:13:48.115+02:00</updated><title type='text'>A testimony of Perl efficiency</title><content type='html'>Within our team, the person who so far was our specialist in  front-end javascript / ajax recently took up a new project involving quit a lot of back-end Perl programming (Catalyst controllers, data validation, database and ORM, etc.).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now at the middle of the project, she just announced that the initial effort estimate would be cut by about 40%, because she discovered that Perl  and its libraries were easier to learn than she expected, and because Perl data manipulation facilities are surprisingly powerful.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hear that message, you all IT managers who only swear by Java !&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-8289057080733654854?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/8289057080733654854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2010/06/testimony-of-perl-efficiency.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/8289057080733654854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/8289057080733654854'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2010/06/testimony-of-perl-efficiency.html' title='A testimony of Perl efficiency'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-3189386125333357615</id><published>2010-05-20T05:20:00.007+02:00</published><updated>2010-05-27T03:57:38.071+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='ironman'/><title type='text'>talk proposal for MST</title><content type='html'>So people are voting for &lt;a href="http://shadowcat.co.uk/blog/matt-s-trout/iron-man-lost?title=initial+design+notes+for+perl7"&gt;MST's forfeit&lt;/a&gt; for not having posted a blog during the last month.&lt;br /&gt;&lt;br /&gt;My own last blog dates back to october 2009, so I don't really feel like I'm entitled to say anything on anybody dropping the ironman contest. But the idea is fun, and it gets me blogging again, so let's participate !&lt;br /&gt;&lt;p&gt;What I would be most delighted to hear would be if Matt could compensate for &lt;a href="http://blog.afoolishmanifesto.com/archives/822#comment-200"&gt;my poor sense of marketing &lt;/a&gt;and talk about &lt;em&gt;Ten Reasons to adopt DBIx::DataModel&lt;/em&gt; :-)&lt;/p&gt;&lt;p&gt;But for a wider audience, I'd vote for a jump into the future : what about something like &lt;em&gt;Initial design notes for perl7 ?&lt;/em&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-3189386125333357615?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/3189386125333357615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2010/05/talk-proposal-for-mst.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/3189386125333357615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/3189386125333357615'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2010/05/talk-proposal-for-mst.html' title='talk proposal for MST'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-291136304677057674</id><published>2009-10-29T04:18:00.005+01:00</published><updated>2009-10-29T05:12:11.214+01:00</updated><title type='text'>Initial design vs. maintenance and refactoring</title><content type='html'>As &lt;a href="http://ldami.blogspot.com/2009/08/yapceu09-paper-on-managing-genevas-law.html"&gt;previously mentioned in this blog&lt;/a&gt;, our team is busy rewriting a complex application from Cobol to Perl.&lt;br /&gt;&lt;br /&gt;While studying the old Cobol code, I often discover some areas where the initial design was well-thought and well-organized, but later became blurred and confused over 20 years of maintenance. So part of our analysis task is to do some archeology, trying to understand the historical layers, and to sort out what is still relevant to the current needs of our users.&lt;br /&gt;&lt;br /&gt;Unfortunately, the same phenomenon also starts appearing in the Perl code ! Some parts were written two years ago, and then had to evolve for various reasons ... and sometimes the initial design becomes blurred in this process.&lt;br /&gt;&lt;br /&gt;One may think that when this happens, it is because the initial design did not have the proper abstraction / parameterization hooks to make it easy to extend. But sometimes when doing the initial design of a component, you don't have a complete picture yet of what is going to surround that component ... or the requirements may have changed because this is a long-term project, and life doesn't stop while we are working on this application. So what is really needed to keep it clean is constant refactoring.&lt;br /&gt;&lt;br /&gt;The problem is that maintenance operations do not have the same metrics : maintainers are evaluated by how many tickets they solved and how long it took; so there is a natural tendency to just "get it to work". Spending additional time on refactoring operations brings no immediate reward : users won't see a change, managers won't understand why you need to revisit code that was already written, and there is an additional risk of introducing regressions.&lt;br /&gt;&lt;br /&gt;It's easy to understand that on a collective level there would be some rewards on the long-term (better maintainability, cleaner architecture, etc.) ...  but on the long-term the maintainer will probably have gone to another project !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-291136304677057674?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/291136304677057674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/10/initial-design-vs-maintenance-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/291136304677057674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/291136304677057674'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/10/initial-design-vs-maintenance-and.html' title='Initial design vs. maintenance and refactoring'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-7775642434464287564</id><published>2009-10-17T10:29:00.006+02:00</published><updated>2009-10-17T11:39:23.945+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project management'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='development method'/><category scheme='http://www.blogger.com/atom/ns#' term='audit'/><title type='text'>how to reconcile audits and agile development ?</title><content type='html'>According to &lt;a href="http://www.isaca.ch/files/DO6_Arbeitsgruppen/Novena_V2_e.pdf"&gt;recommendations&lt;/a&gt; recently emitted by the Swiss working group for IT government audit (Swiss chapter of &lt;a href="http://www.isaca.org/"&gt;ISACA&lt;/a&gt;, international Information Systems Audit and Control Association), every important IT project in Swiss government should have at least 10 documents ready for the auditor (among about a hundred kinds of documents defined by the &lt;a href="http://www.hermes.admin.ch/"&gt;Swiss project management method Hermes&lt;/a&gt; ) :&lt;br /&gt;&lt;br /&gt;1. Feasibility study&lt;br /&gt;2. Specifications&lt;br /&gt;3. Cost effectiveness analysis&lt;br /&gt;4. Integration into the IT environment&lt;br /&gt;5. Requirements&lt;br /&gt;6. Concept for an internal control system (ICS)&lt;br /&gt;7. System architecture&lt;br /&gt;8. Tests (test plan and documentation)&lt;br /&gt;9. Acceptance by the user&lt;br /&gt;10. Final assessment&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The recommendations explicitly insist that this list also applies to "new so-called 'agile' development methods".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For our &lt;a href="http://zarb.org/~dami/geneva_courts.html"&gt;Perl project at Geneva courts of law&lt;/a&gt;, this means that we must produce such documents to be ready for occasional auditors. The problem is, that the Hermes method was mainly inspired by good old waterfall development methods on mainframe computers, and some of the documents listed above just do not make much sense in our context; so instead of helping to better structure and organize the project, they just represent an additional burden.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example, some parts of the application start in an exploratory way, without formal specifications, and are progressively shaped into working functionalities;  tests are not planned in a document, but written in a galaxy of test files; etc.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I guess that the pressure for formal deliverables in project management is probably stronger in government than in private companies, but nevertheless people doing big Perl projects in any context probably also have at least some of such constraints. Any testimonies on that ?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-7775642434464287564?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/7775642434464287564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/10/how-to-reconcile-audits-and-agile.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7775642434464287564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7775642434464287564'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/10/how-to-reconcile-audits-and-agile.html' title='how to reconcile audits and agile development ?'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-573197371928690498</id><published>2009-10-06T21:11:00.007+02:00</published><updated>2009-10-07T23:39:55.295+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='session'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='stash'/><title type='text'>I don't hate the stash ... but I loathe the session.</title><content type='html'>A couple of days ago, John Napiorkowski asked : &lt;a href="http://jjnapiorkowski.vox.com/library/post/does-anyone-else-hate-the-stash.html"&gt;Does Anyone Else Hate the Stash&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;True enough, the stash in Perl Catalyst is a big bag in global memory. Any method along the chain can read or write into that bag. Then you pass the whole thing to the Template Toolkit (TT), that integrates the Catalyst stash into its own stash, and again any template fragment can read or write into the TT stash. So when studying one particular component along the chain, it is indeed sometimes hard to track what is in the stash at that point, and where the data came from. I frequently need to resort to the perl debugger to sort out such situations.&lt;br /&gt;&lt;br /&gt;Nevertheless, I don't hate the stash, because it is sooo convenient to let various software components collaborate at little cost. Setting up a more controlled way of passing information between components would be quite tedious and would imply more maintenance. It is like when having several humans in a team : if collaboration is harmonious, it leverages some multiplicative power; if not, people start treading on each other's toes, and the global result is unsatisfactory. A simple step for ensuring harmonious collaboration is to partition the stash namespace through additional levels of hashrefs (same principle we use on CPAN for avoiding collisions between module names).&lt;br /&gt;&lt;br /&gt;Furthermore, global memory in stash is not too risky because it is very limited in time : at the end of the request the whole stash is cleaned up. Unfortunately, there is something much worse than the stash : the &lt;strong&gt;session&lt;/strong&gt; !&lt;br /&gt;&lt;br /&gt;Some colleagues tend to like putting stuff into session storage, because it's easy to program sequences of requests without having to propagate state through URL parameters or JSON data. I try to avoid it as much as possible because :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;data in session storage is likely to produce unwanted "action at distance"&lt;/li&gt;&lt;li&gt;the URL API is no longer RESTful (calling the same URL with same parameters might yield different results)&lt;/li&gt;&lt;li&gt;there is a cost in serializing / deserializing the session data at each request&lt;/li&gt;&lt;li&gt;session data is limited in size&lt;/li&gt;&lt;li&gt;so session data is not appropriate for storing recursive datastructures of unknown sizes&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Programmers a tempted by the easy aspect of session data, but are not always conscious of the limitations above.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-573197371928690498?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/573197371928690498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/10/i-dont-hate-stash-but-i-loathe-session.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/573197371928690498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/573197371928690498'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/10/i-dont-hate-stash-but-i-loathe-session.html' title='I don&apos;t hate the stash ... but I loathe the session.'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-8644393551286068433</id><published>2009-10-03T19:00:00.000+02:00</published><updated>2009-10-03T19:26:07.513+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl community'/><category scheme='http://www.blogger.com/atom/ns#' term='conference'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation style'/><category scheme='http://www.blogger.com/atom/ns#' term='YAPC'/><title type='text'>YAPC presentation styles</title><content type='html'>One personal comment I got from the &lt;a href="http://yapc-surveys.org/html/ye2009-survey.html"&gt;YAPC::EU::09 Survey &lt;/a&gt;results was : "Split slides so they contain less text". Well, while attending several talks, I felt exactly the reverse : I wished the speaker had condensed slides so they contain more text !&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Finding the right balance is really a difficult question. It is true that I have a tendency to fill slides with a lot of material, in order to exploit complementary channels : while my voice gives the general idea, or emphasizes a particular point, the slide can convey more detailed information, and people in the audience can grab more content if they are especially interested in one particular aspect.&lt;/p&gt;&lt;p&gt;Probably I like this style because it corresponds to my own way of learning. When I was at school, at a time where beamers were rare and expensive, most teachers used physical transparencies. Some of them had the habit of putting the transparency and immediately hiding it with a piece of paper; then they would progressively uncover the slide, one point at a time. I hated that habit, because I was forced to think at the same speed as the teacher. If I see the global picture at once, I can immediately choose which points seem more important to me, and focus on them, maybe already preparing a question, or think back at what was said before, or anticipate what is probably going to be said next. But if the teacher dictates the rhythm, and decides to pause for 5 minutes on a point which is important to him, but not to me, or decides to quickly skip over a detail which I need to elaborate in my head, then I'm in trouble.&lt;/p&gt;&lt;p&gt;The modern way of uncovering slides one point at a time is the &lt;a href="http://www.presentationzen.com/presentationzen/2005/09/living_large_ta.html"&gt;Takahashi style&lt;/a&gt; (lots of slides, very few words, huge font), which seems much praised in the Perl community. I must admit that I was quite impressed the first time I saw a presentation in this style : it is quite efficient for a lightning talk, or to create some suspense at a particular point in a presentation. However, if many speakers adopt this style just out of fashion, without deliberate thinking about which effect they want to achieve, then at the end of the day it becomes quite boring, and I feel like having watched several hours of videoclips. After such a day I don't really remember what were the highlights.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-8644393551286068433?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/8644393551286068433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/09/yapc-presentation-styles.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/8644393551286068433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/8644393551286068433'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/09/yapc-presentation-styles.html' title='YAPC presentation styles'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-5789779809993560714</id><published>2009-09-24T21:17:00.005+02:00</published><updated>2009-09-24T21:35:41.939+02:00</updated><title type='text'>Design patterns, or why Java needs external crutches</title><content type='html'>&lt;p&gt;In my &lt;a href="http://ldami.blogspot.com/2009/09/learning-architecture-and-design.html"&gt;last blog about architecture and design &lt;/a&gt;I promised to come back on the topic of &lt;em&gt;design patterns&lt;/em&gt;. This term was coined in a &lt;a href="http://en.wikipedia.org/wiki/Design_Patterns:_Elements_of_Reusable_Object-Oriented_Software"&gt;famous book &lt;/a&gt;that proposed a catalogue of "Elements of Reusable Object-Oriented Software", and became a best-seller in the Java world (usually referred to as the "GoF" book, for "Gang of Four" authors). Feeling the golden ore, all editors quickly produced a whole line of similar books, where patterns were adapted to various domains and languages : for C##, for Ruby, ..., etc. I almost expected to see patterns books for assembly code and for &lt;a href="http://en.wikipedia.org/wiki/Befunge"&gt;Befunge&lt;/a&gt;, but these never came out !&lt;br /&gt;&lt;br /&gt;So what about patterns for Perl ? To my knowledge, no major editor published any book on that topic, which is kind of surprising because one would think that there is some money to make. However, Phil Crow privately published &lt;a href="http://www.perlishpatterns.com/"&gt;Perlish patterns&lt;/a&gt; (cheeply available as e-book), which is really worth reading; Phil proposes the following explanation in his introduction :&lt;br /&gt;&lt;br /&gt;&lt;quote&gt;&lt;em&gt;Eventually, I came to understand that there were several reasons why patterns were never as enthusiastically embraced in our community as they were in others. Some of the patterns just apply new names to common techniques. Some are represented in Perl's core, so we don't think much about using them, at least in their normal forms. Some apply better to languages which focus on object orientation.&lt;br /&gt;&lt;/em&gt;&lt;/quote&gt;&lt;br /&gt;I very much agree with this analysis. The original GoF book was refreshing to read, but when programming in Perl I never think in terms of those patterns, because the standard language features plus some common CPAN modules answer most of my needs for structuring my programs, even when assembling large bodies of functionality.&lt;br /&gt;&lt;br /&gt;The fact that Java is so verbose, and that everything has to be an object, results in code that is often spread among lots and lots of classes. So to condense that information, it is no surprise that Java programmers need other abstractions like "patterns", so that they can think in terms of larger units. For the same reason, they also need sophisticated tools like Eclipse for navigating through the class hierarchy, and they need costly tools like Rational Rose to see and design the big picture, and generate code skeletons. I'm always surprised to hear such tools presented as &lt;em&gt;strenghts&lt;/em&gt; of the Java world, while to me they are just &lt;em&gt;necessary consequences&lt;/em&gt; of the way Java code is layed out.&lt;br /&gt;&lt;br /&gt;In standard Perl, we have hashrefs and arrayrefs, we have closures, multiple inheritance, namespace manipulation primitives, dynamic classes and dynamic methods, functional &lt;tt&gt;grep&lt;/tt&gt;, &lt;tt&gt;map&lt;/tt&gt; and other &lt;a href="http://search.cpan.org/dist/List-MoreUtils"&gt;List::MoreUtils&lt;/a&gt; goodness; we can assemble those into dispatch tables, delegation structures, function and method templates and factories ... enough patterns to fill a whole life !&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-5789779809993560714?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/5789779809993560714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/09/design-patterns-or-why-java-needs.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/5789779809993560714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/5789779809993560714'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/09/design-patterns-or-why-java-needs.html' title='Design patterns, or why Java needs external crutches'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-4913825683264757020</id><published>2009-09-21T20:48:00.010+02:00</published><updated>2009-09-22T20:43:57.123+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operator precedence'/><category scheme='http://www.blogger.com/atom/ns#' term='lvalue'/><category scheme='http://www.blogger.com/atom/ns#' term='syntax'/><title type='text'>hit by operator precedence and right associativity</title><content type='html'>While studying a bug, I wrote the following test program :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;use Data::Dumper;&lt;br /&gt;my $bool = 1;&lt;br /&gt;my %h;&lt;br /&gt;$bool ? $h{true} = 't' : $h{false} = 'f';&lt;br /&gt;print Dumper(\%h);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The ternary expression starting with $bool was supposed to be a concise way to write a conditional, but the result was a disaster. Can you guess the output ?&lt;br /&gt;&lt;br /&gt;Here it is : &lt;tt&gt;$VAR1 = { 'true' =&gt; &lt;span style="color:#ff0000;"&gt;'f'&lt;/span&gt; };&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;This really seems totally insane : something is assigned to the &lt;span style="font-family:courier new;"&gt;'true'&lt;/span&gt; slot of the hash, but the value comes from what was supposed to be in the &lt;span style="font-family:courier new;"&gt;'false'&lt;/span&gt; slot !&lt;br /&gt;&lt;br /&gt;OK, the ternary expression above is wrong, because the '?:' operator has higher precedence than '=', so one should really write&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$bool ? ($h{true} = 't') : ($h{false} = 'f');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But how comes that perl issues no error, no warning, and happily produces a very strange result ? It seems that both sides of the conditional are executed simultaneously, and collapse in a mysterious way.&lt;br /&gt;&lt;br /&gt;I tried running the script through &lt;a href="http://search.cpan.org/dist/B-Deparse"&gt;B::Deparse &lt;/a&gt;to understand how it was parsed, but the output was exactly like the original source, so it really seems to be legal Perl !&lt;br /&gt;&lt;br /&gt;It really took me a while until the 'aha' moment that made me realize that because of right-associativity, and because conditional expressions can be lvalues, and because "Unlike in C, the scalar assignment operator produces a valid lvalue" (perlop dixit), this was parsed as&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;($bool ? ($h{true} = 't') : $h{false}) = 'f';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So the $bool test chooses an lvalue between &lt;tt&gt;$h{true}&lt;/tt&gt; and &lt;tt&gt;$h{false}&lt;/tt&gt;, and it doesn't matter that this lvalue is first assigned a &lt;span style="font-family:courier new;"&gt;'t'&lt;/span&gt;, because later the main assignment puts a &lt;span style="font-family:courier new;"&gt;'f'&lt;/span&gt; into it.&lt;br /&gt;&lt;br /&gt;Obvious, isn't it ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-4913825683264757020?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/4913825683264757020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/09/hit-by-operator-precedence-and-right.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/4913825683264757020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/4913825683264757020'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/09/hit-by-operator-precedence-and-right.html' title='hit by operator precedence and right associativity'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-7098680167250515614</id><published>2009-09-19T11:48:00.005+02:00</published><updated>2009-09-19T12:30:30.721+02:00</updated><title type='text'>Learning architecture and design</title><content type='html'>Matt Trout asks about &lt;a href="http://www.shadowcat.co.uk/blog/matt-s-trout/learning-to-design/"&gt;how people learned what they know about architecture and design&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As far as I am concerned, I've always been more or less interested in that subject, but only started to study it more seriously about ten years ago, when I left the academic research world and started writing real software instead of writing papers about software.&lt;br /&gt;&lt;br /&gt;So where to go when one is interested in design ? One source of information is books. My sources are quite similar to the ones cited in Matt's article. Currently I'm reading &lt;a href="http://my.safaribooksonline.com/9780596155780"&gt;Beautiful Architecture&lt;/a&gt; &lt;beautiful&gt;(actually I bought it at YAPC::EU::09), which I enjoy very much because the articles are of high quality and cover a vast territory. The previous book in that series &lt;a href="http://my.safaribooksonline.com/9780596510046"&gt;Beautiful Code&lt;/a&gt; &lt;beautiful&gt;is also worth reading, although a bit less interesting in my taste. Of course I also read a couple of books about design patterns ... but I'll blog another time about those.&lt;br /&gt;&lt;br /&gt;Despite the fact that they seem to sell well, books on design are are not numerous ... probably because they are so hard to write ! I mean, writing a regular technical book is hard; producing good designs is hard; so writing a good book that highlights the design process is necessarily even harder. Actually, books mentioned above are never an organized discourse starting at A and ending at Z; what they do is supply a catalog in which the reader can grab interesting ideas, and that's probably the best any book on design can do.&lt;br /&gt;&lt;br /&gt;Which brings us to the point : books on design are nice, they open your mind, but that's seldom the place where you really learn. Design is acquired by practice, using or reading other people's designs, and then doing your own through trial and error. It reminds me of my counterpoint courses : although there are a few recipes, it's only after having studied a dozen Bach fugues and having painfully written two or three in the same style that one really understands what it means to design a fugue.&lt;br /&gt;&lt;br /&gt;So I enjoy browsing through technical manuals and APIs of many components, even if I'll never use them. For example, it's quite instructive to study the difference between the object models of &lt;a href="http://msdn.microsoft.com/en-us/library/bb244515.aspx"&gt;Microsoft Word &lt;/a&gt;and &lt;a href="http://msdn.microsoft.com/en-us/library/bb149081.aspx"&gt;Microsoft Excel&lt;/a&gt;, two products in the same family, but with huge differences in design. Word is an infamous amalgamation of fuzzy concepts (anybody ever understood how automatic numbering works ?), while Excel is a beautiful join of many powerful features into a single orderly framework.&lt;br /&gt;&lt;br /&gt;Here is a list of some designs that I considered particularly inspiring:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the &lt;b&gt;NeXT&lt;/b&gt; operating system and programming environment had a nice language (Objective-C) and a beautiful OO architecture, with a generic notion of &lt;em&gt;object inspector&lt;/em&gt; for editing object properties ... really a joy to use and program. Too bad all of this disappeared for lack of market penetration.&lt;br /&gt;&lt;li&gt;when &lt;b&gt;Netscape&lt;/b&gt; first proposed to integrate &lt;b&gt;Javascript&lt;/b&gt; into Web pages so that they could become dynamic, I had a "wow" moment : this opened so many possibilities ! Besides, the documentation was extremely well-written (many years after, it's still a &lt;a href="http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.5/guide/"&gt;useful reference&lt;/a&gt;, especially the chapters on how to exploit prototype-based inheritance).&lt;br /&gt;&lt;li&gt;in the same vein, I had another "wow" moment one or two years later when Internet Explorer first came with the notion of &lt;b&gt;manipulating the DOM&lt;/b&gt; through scripting (initial versions of Javascript in Netscape could not do that). Again, this opened a whole new world, and the API was quite clean and very well documented (not respecting standards is another story). By the way, at that time the &lt;a href="http://msdn.microsoft.com/en-us/library/default.aspx"&gt;MSDN library site &lt;/a&gt;was really cool, with support for keyboard arrow command while navigating through the documentation tree --- later on they moved to .NET technology, and were no longer able to support keyboard navigation !&lt;br /&gt;&lt;li&gt;the &lt;b&gt;Apache&lt;/b&gt; architecture is amazingly well-thought for extensibility, with its clean separation of each phase in the request lifecycle, and the possibility to to insert hooks in each of those phases. Actually I didn't study Apache directly, but only through &lt;b&gt;&lt;a href="http://perl.apache.org/"&gt;mod_perl&lt;/a&gt;&lt;/b&gt;, which exposes almost everything of the Apache API to Perl programming, and is another piece of amazing design. I must say, however, that mod_perl has a peculiar way of doing OO, through a kind of home-made mixing of packages into common namespaces, which for the time was quite clever but took me some time to understand. I guess this would all be written with "roles" if redesigned in modern Perl.&lt;br /&gt;&lt;li&gt;several important CPAN modules would be worth discussing here, but that would bring us too far ... maybe later in another blog entry. Let me just state that every time I came to discover another module of &lt;a href="http://search.cpan.org/~abw/"&gt;Andy Wardley&lt;/a&gt;, I felt a sense of beauty : to me, &lt;a href="http://search.cpan.org/dist/Template-Toolkit"&gt;Template Toolkit&lt;/a&gt;, &lt;a href="http://search.cpan.org/dist/AppConfig"&gt;AppConfig&lt;/a&gt;, &lt;a href="http://search.cpan.org/dist/Pod-POM"&gt;Pod::POM&lt;/a&gt;&lt;template&gt;&lt;appconfig&gt; &lt;pod::pom&gt;stand as examples of excellent design, with a right balance between builtin features and extensibility mechanisms. &lt;/li&gt;&lt;/ul&gt;&lt;/pod::pom&gt;&lt;br /&gt;Thanks Matt for having asked this question about design, that was an opportunity to put some thoughts into shape, and I'm eager to read what other people will write on that topic.&lt;br /&gt;&lt;br /&gt;&lt;?xml:namespace prefix = pod /&gt;&lt;pod::pom&gt;&lt;/pod::pom&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-7098680167250515614?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/7098680167250515614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/09/learning-architecture-and-design.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7098680167250515614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7098680167250515614'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/09/learning-architecture-and-design.html' title='Learning architecture and design'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-163815574547915528</id><published>2009-09-13T08:18:00.001+02:00</published><updated>2009-09-13T08:20:41.777+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rt'/><category scheme='http://www.blogger.com/atom/ns#' term='collective knowledge'/><category scheme='http://www.blogger.com/atom/ns#' term='bug tracking'/><title type='text'>Centralized bug reporting is precious</title><content type='html'>I recently came across a module author who refuses bug reports submitted through rt.cpan.org, claiming that the system has many deficiencies, and increases the workload on module authors. The refusal is even automatic: you get an email explaining why the author dislikes RT, and the ticket is automaticallly canceled. For this person, bug reports are to be sent through regular email.&lt;br /&gt;&lt;br /&gt;So let's think about this position.&lt;br /&gt;&lt;br /&gt;True enough, RT has no opt-out possibility -- as soon as you have published something on CPAN, you are registered in the system, and can't decide to get out : the only options for an author are a) play the game; b) ignore tickets; c) explicitly refuse tickets as just described above. True enough, prolific authors are likely to receive many reports from RT. So for an author, it can indeed be felt as a burden.&lt;br /&gt;&lt;br /&gt;However, for module users, it is extremely useful to have all bug reporting on one centralized platform, because this leverages collective knowledge. Even when an author is not responding at all -- and there might be many good reasons for not responding --, the system is nevertheless interesting, because you can find out if a problem was already met by somebody else, if some workarounds have already been identified, etc. When the author &lt;em&gt;is&lt;/em&gt; responding, you can additionally know if the problem is currently taken into account or not, and sometimes there is already some patch or preliminary release to be tested.&lt;br /&gt;&lt;br /&gt;Communicating about bugs through point-to-point plain email will just satisfy the bug reporter and the module author. Communication through a centralized bug tracking system is useful to the whole community. So, authors, please don't dismiss RT ... and if you think RT has some problems, you can always open a ticket !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-163815574547915528?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/163815574547915528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/09/centralized-bug-reporting-is-precious.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/163815574547915528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/163815574547915528'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/09/centralized-bug-reporting-is-precious.html' title='Centralized bug reporting is precious'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-350667410043393452</id><published>2009-09-06T21:55:00.002+02:00</published><updated>2009-09-06T22:08:16.630+02:00</updated><title type='text'>Birth of DBIx::DataModel (or : Perl ORMs in 2005)</title><content type='html'>&lt;a href="http://search.cpan.org/dist/DBIx-DataModel"&gt;DBIx::DataModel&lt;/a&gt; is the &lt;a href="http://en.wikipedia.org/wiki/Object-relational_mapping"&gt;object-relational mapping&lt;/a&gt; (ORM) layer we use for our projects at &lt;a href="http://zarb.org/~dami/geneva_courts.html"&gt;Geneva's law courts&lt;/a&gt;. It is much less known that &lt;a href="http://search.cpan.org/dist/DBIx-Class"&gt;DBIx::Class&lt;/a&gt;, but nevertheless a few people have shown interest in it, so I thought it's worth blogging about some of its design aspects. Today's blog is about history : a couple of words about why and how DBIx::DataModel was born.&lt;br /&gt;&lt;br /&gt;Back in 2005, I had already written a number of Perl/DBI programs for Geneva's law courts, for data reporting or statistics purposes. Each of those programs was a separate entity; but the corpus kept growing, and some repetitive patterns started to appear, especially about expressing joins between the many tables that sit in our database. Then came the idea to also choose Perl, no longer just for reporting programs, but for rewriting our old Cobol business application. The application is mission-critical, and programming it in Perl seemed crazy to some people in house, so an initial design and proof of concept were of order to demonstrate feasibility. At this point, it was quite clear that some kind of ORM would be needed on top of DBI, to deal with SQL in a more abstract way.&lt;br /&gt;&lt;br /&gt;After a CPAN survey, I identified &lt;a href="http://search.cpan.org/dist/Class-DBI"&gt;Class::DBI&lt;/a&gt; as being the most likely ORM candidate module for our needs (other contenders at that time were &lt;a href="http://search.cpan.org/dist/Alzabo"&gt;Alzabo&lt;/a&gt;, &lt;a href="http://search.cpan.org/dist/Tangram"&gt;Tangram&lt;/a&gt;, &lt;a href="http://search.cpan.org/dist/DBIx-Recordset"&gt;DBIx::Recordset&lt;/a&gt;, among many others). However, there were a couple of annoying limitations :&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;columns retrieved from any given table were fixed at table declaration time; no possibility to later modulate the column list at the query level, resulting in unnecessary data transfers;&lt;br /&gt;&lt;li&gt;joins declared in Class::DBI could be used to issue successive queries for navigating between related records, but not for doing a database join in a single query;&lt;br /&gt;&lt;li&gt;conditions as specified in &lt;tt&gt;search&lt;/tt&gt; or &lt;tt&gt;search_like&lt;/tt&gt; were too limited in expressivity (no boolean combinators, no comparison operators, etc.). &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;In other words, if the goal was to produce &lt;tt&gt;SELECT [columns] FROM [tables] WHERE [conditions]&lt;/tt&gt;, there was not enough flexibility for the the &lt;em&gt;columns&lt;/em&gt; part, nor for the &lt;em&gt;tables&lt;/em&gt; part, nor for the &lt;em&gt;conditions&lt;/em&gt; part !&lt;br /&gt;&lt;br /&gt;Adapting Class::DBI to work around these limitations seemed quite difficult, and I didn't find any substitute in the other modules mentioned above. So I started designing my own ORM, trying to optimize for SQL flexibility. In particular, adopting the wonderful &lt;a href="http://search.cpan.org/dist/SQL-Abstract"&gt;SQL::Abstract&lt;/a&gt; from Nate Wiger was a good solution for expressing any kind of conditions in the WHERE clause as nested Perl datastructures. I also tried to apply the DRY (Don't Repeat Yourself) principle to relationships : if there is a 1-to-n relationship between two tables, better say it in one single place, rather than saying "has_one" on one side and "has_many" on the other. Finally, on the delicate problem of matching database joins to some kind of object-oriented entity, I came to the conclusion that the closest concept was the one of multiple inheritance : a record coming from a join between &lt;tt&gt;Artist&lt;/tt&gt; and &lt;tt&gt;CD&lt;/tt&gt; is an object that belongs to both the &lt;tt&gt;Artist&lt;/tt&gt; and &lt;tt&gt;CD&lt;/tt&gt; classes. This initial design evolved internally for a couple of months, until an initial CPAN release in September 2005.&lt;br /&gt;&lt;br /&gt;Meanwhile the outside world had been evolving. In May 2005 came an extension to Class::DBI called &lt;a href="http://search.cpan.org/dist/Class-DBI-Sweet"&gt;Class::DBI::Sweet&lt;/a&gt; that also relied on SQL::Abstract. One month later, Class::DBI::Sweet was extended with some features for doing joins (&lt;tt&gt;prefetch&lt;/tt&gt; feature and &lt;tt&gt;join&lt;/tt&gt; argument to &lt;tt&gt;search&lt;/tt&gt; method). Then in August came the first release of &lt;a href="http://search.cpan.org/dist/DBIx-Class"&gt;DBIx::Class&lt;/a&gt;, bringing a fresh design to work around Class::DBI limitations, but with an eye to backwards compatibility. That initial release had no support for database joins, but it was later extended in end September with &lt;tt&gt;prefetch&lt;/tt&gt;, in the same vein as Class::DBI::Sweet. DBIx::Class very quickly showed to have an active and growing community.&lt;br /&gt;&lt;br /&gt;At this point, the question was whether or not to adopt DBIx::Class. The advantage would have been to join a community and benefit from shared progress on common concerns. However, DBIx::DataModel had grown to something sufficiently mature and sufficiently different, so switching ORM implied some cost and mental shift. Furthermore, some original ideas of DBIx::DataModel seemed worth pursuing, and actually proved very useful in our projects. So finally the module is still alive, had a major refactoring in 2008 ...  and anybody who is interested in helping to improve it is cordially welcomed!&lt;br /&gt;&lt;br /&gt;Next blog entries will highlight some specific design features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-350667410043393452?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/350667410043393452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/09/birth-of-dbixdatamodel-or-perl-orms-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/350667410043393452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/350667410043393452'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/09/birth-of-dbixdatamodel-or-perl-orms-in.html' title='Birth of DBIx::DataModel (or : Perl ORMs in 2005)'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-677535758051737049</id><published>2009-08-27T04:47:00.003+02:00</published><updated>2009-08-27T05:37:23.558+02:00</updated><title type='text'>Emacs/Perl integration</title><content type='html'>In answer to &lt;a href="http://yapceurope2009.org/ye2009/"&gt;YAPC::EU::2009&lt;/a&gt; 's call for volunteers for the beginner's track, I offered a &lt;a href="http://yapceurope2009.org/ye2009/talk/2009"&gt;presentation on Perl development under Emacs&lt;/a&gt;. Part of the motivation for doing that talk was to force myself to have a look at various Emacs extensions (so far I'd been using just the standard cperl-mode coming with Emacs, which is already very rich in features). So here are the conclusions.&lt;br /&gt;&lt;br /&gt;[Disclaimer: this was a quick, informal survey; maybe I misunderstood some points, or maybe some of the difficulties encountered were bound to my specific environment (Emacs on Win32); so I hope I don't do any injustice to these modules]&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://search.cpan.org/dist/Emacs-EPL/"&gt;Emacs::EPL&lt;/a&gt; looks like it was a very nice integration work. For example it could redirect things like STDIN/STDOUT or %ENV variables for Perl scripts running under Emacs, so that user interaction would go through Emacs mechanisms (e.g. the minibuffer). It also allowed people to &lt;em&gt;write Emacs extensions in Perl instead of e-lisp&lt;/em&gt; ! This sounds really interesting, but unfortunately it hasn't been updated since 2001 and I couldn't get it to work. I really wish that somebody would resurrect that module.&lt;/li&gt;&lt;li&gt;&lt;a href="http://search.cpan.org/dist/Devel-PerlySense"&gt;Devel::PerlySense &lt;/a&gt;is an ambitious project with lots of features; it runs a Perl process in the background to run/debug code, perform static analysis, etc. However it was so CPU-intensive that I found it hardly usable for daily work. &lt;/li&gt;&lt;li&gt;&lt;a href="http://search.cpan.org/dist/Sepia"&gt;Sepia &lt;/a&gt;is an active project (latest release July 09), also running an inferior Perl process, also quite rich in features (it goes as far as analyzing Perl opcodes to deduce information about packages/methods/etc.). Here I had another problem : it would only recognize core modules and functions. I didn't find how to make it understand that there was also some code under perl/site/lib !&lt;/li&gt;&lt;li&gt;&lt;a href="http://search.cpan.org/dist/Emacs-PDE"&gt;Emacs::PDE&lt;/a&gt; installed smoothly and provides a number of nice features, like perldoc/perltidy/perlcritic integration, tree views of sources/documentation, interactive perl shell, etc.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So in the coming weeks I plan to learn more about Emacs::PDE and maybe add it to my collection of tools for daily work.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-677535758051737049?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/677535758051737049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/08/emacsperl-integration.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/677535758051737049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/677535758051737049'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/08/emacsperl-integration.html' title='Emacs/Perl integration'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-8293919362633039969</id><published>2009-08-23T12:03:00.002+02:00</published><updated>2009-08-23T12:20:43.070+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Be fair to ActiveState</title><content type='html'>Recently I heard several people emitting strong comments against ActiveState,&lt;br /&gt;the company who first published a &lt;a href="http://www.activestate.com/activeperl"&gt;Perl distribution for Windows&lt;/a&gt;. The tone of those comments was about the same as people crusading against Microsoft.&lt;br /&gt;&lt;br /&gt;I feel this is not fair.&lt;br /&gt;&lt;br /&gt;True enough, Windows users now have an alternative solution with &lt;a href="http://strawberryperl.com/"&gt;Strawberry Perl&lt;/a&gt;, which is more similar to Perl environments on Unix boxes. Strawberry Perl is progressing very well, which is rejoicing, and is likely to have a positive impact on the number of Perl installations in Windows world. Personally I haven't switched to Strawberry yet, but it's likely to happen in a near future, especially becausee I'm interested in the combination with &lt;a href="http://search.cpan.org/dist/Perl-Dist"&gt;Perl::Dist&lt;/a&gt;. Together these look like it will be possible to package a customized distribution for our organization, that would install everything we need in a single click ... but I still need a little bit of time to experiment with all that.&lt;br /&gt;&lt;br /&gt;However, this is not a reason for despising ActivePerl, which continues to work well, and for quite a number of years has already been able to collaborate with the &lt;a href="http://www.mingw.org/"&gt;mingw&lt;/a&gt; gcc compiler for installing CPAN modules with C extensions. Personally I owe quite a lot to ActivePerl, which&lt;br /&gt;almost 10 years ago provided me with an initial Perl environment to get some work done on our win32 workstations; without that, our &lt;a href="http://www.zarb.org/~dami/geneva_courts.html"&gt;projects at Geneva's law courts&lt;/a&gt; would probably never have started.&lt;br /&gt;&lt;br /&gt;ActivePerl also did quite a lot to integrate Perl with various Windows components (PerlScript, OLE, etc.). This provides a very interesting environment for Win32 automation and has been tremendously useful for some migration tasks in our organization. Unfortunately, this usage of Perl is not widespread enough; it seems that only few people realized the power of Perl for Win32 administration, probably because many Windows sysadmins are so used to point-and-click that they just don't have the culture of automating common repetitive tasks.&lt;br /&gt;&lt;br /&gt;Finally, ActivePerl's presentation of documentation in HTML with tree navigation was a real blessing for getting acquainted with the vast body of Perl and CPAN literature. I liked it so much that it became a major source of inspiration for developing the &lt;a href="http://search.cpan.org/dist/Pod-POM-Web"&gt;Pod::POM::Web&lt;/a&gt; HTTP documentation server.&lt;br /&gt;&lt;br /&gt;As a whole, the Perl community greatly benefited from ActiveState's work, so it seems to me that people disregarding that company are just caught in &lt;a href="http://en.wikipedia.org/wiki/Vritti"&gt;vrittis&lt;/a&gt; (patterns of mind) that let them disregard any company whatsoever.&lt;br /&gt;&lt;br /&gt;Thanks, ActiveState, and all the best for your future business plans.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-8293919362633039969?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/8293919362633039969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/08/be-fair-to-activestate.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/8293919362633039969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/8293919362633039969'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/08/be-fair-to-activestate.html' title='Be fair to ActiveState'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-7514919066763380118</id><published>2009-08-14T17:47:00.005+02:00</published><updated>2009-08-14T18:11:06.665+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='object-oriented'/><category scheme='http://www.blogger.com/atom/ns#' term='mutators'/><category scheme='http://www.blogger.com/atom/ns#' term='accessors'/><category scheme='http://www.blogger.com/atom/ns#' term='encapsulation'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Object-oriented accessors considered (sometimes) harmful</title><content type='html'>One of the big principles of object-oriented (OO) programming is &lt;em&gt;encapsulation&lt;/em&gt;, which says that data inside an object should be hidden from the outside world, and all accesses to the data should go through methods. That's where OO accessor/mutator methods come from.&lt;br /&gt;&lt;br /&gt;Encapsulation brings a number of advantages, like being able to change the internal representation of an object, validating any attempt to change state, &lt;a href="http://en.wikipedia.org/wiki/Uniform_access_principle"&gt;blurring the difference between stored values and computed values&lt;/a&gt;, avoiding using object storage for action at distance, etc. All of this has been discussed for many years in numerous books and papers, and is wonderfully implemented in Moose (see its &lt;a href="http://search.cpan.org/dist/Moose/lib/Moose/Manual/Attributes.pod"&gt;Attributes manpage&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;However, encapsulation also brings a number of &lt;b&gt;disadvantages&lt;/b&gt;, especially in Perl which, contrary to Java or Eiffel, is a multi-paradigm language. Below I'm discussing those disadvantages, not with the intention of throwing away encapsulation, but rather to issue a warning : &lt;em&gt;don't blindly adopt encapsulation everywhere; think and weight where it is a gain and where it is a hindrance&lt;/em&gt;.&lt;br /&gt;&lt;h3&gt;Good Perl idioms are no longer available&lt;/h3&gt;&lt;br /&gt;The canonical example in OO literature is the "point object" (even in the &lt;a href="http://search.cpan.org/dist/Moose/lib/Moose.pm#SYNOPSIS"&gt;Moose synopsis&lt;/a&gt;). Now, in contrary to objects like a device driver or database handle, that would have lots of internal data to hide, a point object contains nothing but public information (its &lt;tt&gt;x&lt;/tt&gt; and &lt;tt&gt;y&lt;/tt&gt; coordinates). If we have direct access to the stored values, we can use a number of convenient Perl idioms, while doing the same using getter/setter methods is much more cumbersome. Consider the following examples:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  # string interpolation&lt;br /&gt;  print "point is at coordinates $point-&gt;{x} / $point-&gt;{y}\n";&lt;br /&gt;&lt;br /&gt;  # symmetry transform&lt;br /&gt;  ($point-&gt;{x}, $point-&gt;{y}) = ($point-&gt;{y}, $point-&gt;{x});&lt;br /&gt;&lt;br /&gt;  # zoom&lt;br /&gt;  $point-&gt;{$_} *= $zoom_factor for qw/x y/;&lt;br /&gt;&lt;br /&gt;  # temporary push aside&lt;br /&gt;  { local $point-&gt;{x} += $far_away;&lt;br /&gt;    do_something_without_that_point_in_the_way();&lt;br /&gt;   } # point automatically comes back to its previous location&lt;br /&gt;&lt;br /&gt;  # nested datastructures and possibly auto-vivification&lt;br /&gt;  push @{$point-&gt;{styles}}, qw/square big/;&lt;br /&gt;  $point-&gt;{menu}{options}{color} = 'green';&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Translating such idioms to getter/setter methods is left as an exercise to the reader...&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;No obvious distinction between "setter" methods and other methods&lt;/h3&gt;When I read some unknown code and find something like&lt;br /&gt;&lt;pre&gt;  $obj-&gt;{foo} = $x;&lt;br /&gt;  $obj-&gt;bar($y);&lt;br /&gt;&lt;/pre&gt;I immediately know that the state of the object changes at line 1, while I have no clue at line 2 : I must go to the doc of method &lt;tt&gt;bar&lt;/tt&gt; (or even worse, at the source code), to know if this is printing something out, modifying a database record, or just setting a &lt;tt&gt;bar&lt;/tt&gt; attribute in memory inside object &lt;tt&gt;$obj&lt;/tt&gt;.&lt;br /&gt;&lt;h3&gt;Hard to debug&lt;/h3&gt;Sometimes the best way to find a bug is to go step by step in the debugger and examine which values sit in memory. However, if we use chained accessors to traverse a datastructure, the number of steps to go through becomes a nightmare. For example consider the following hypothetical line in a Catalyst controller :&lt;br /&gt;&lt;pre&gt;  if ($c-&gt;request-&gt;body-&gt;length &lt; $self-&gt;min_body) {&lt;/pre&gt;If I come across that line while debugging, I know that there are chances that the bug might sit in the &lt;tt&gt;min_body&lt;/tt&gt; method, so I want to step into that method; but before getting there I'll have to step through all accessor methods for &lt;tt&gt;request&lt;/tt&gt;, &lt;tt&gt;body&lt;/tt&gt; and &lt;tt&gt;length&lt;/tt&gt;, which is totally uninteresting for my debugging purpose.&lt;br /&gt;&lt;h3&gt;Non-scalar attributes must either copy or reinvent an API&lt;/h3&gt;If an object contains an arrayref attribute, directly accessible and publicly documented as such, then every client can happily push, shift, reverse, grep, etc. into the arrayref using common Perl syntax.&lt;br /&gt;&lt;br /&gt;If on the contrary, that arrayref is considered private, and clients must use getter/setter methods to access it, then clients have no choice but copying the entire array back and forth between the remote object and the local handling code. Needless to say, this has an impact on performance. In order to avoid it, the object could also implement additional methods to insert an item into the array, remove the last, etc. ... but this is reinventing a list API, and it will never be as rich and flexible as the collection of builtin Perl constructs for dealing with lists!&lt;br /&gt;&lt;br /&gt;The same reasoning goes of course for hashref attributes.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;No generic data traversal modules&lt;/h3&gt;Data traversal modules like &lt;a href="http://search.cpan.org/dist/Data-Visitor"&gt;Data::Visitor&lt;/a&gt;, or import/export modules like &lt;a href="http://search.cpan.org/dist/JSON"&gt;JSON&lt;/a&gt; or &lt;a href="http://search.cpan.org/dist/YAML"&gt;YAML&lt;/a&gt;, cannot take any decisions when they come to an opaque object that one is not supposed to peek into. This means that generic traversal tools are just inapplicable, or that every object has to implement some support for traversal (like a &lt;tt&gt;visit_value&lt;/tt&gt; method); but writing such methods for every new class is kind of tedious.&lt;br /&gt;&lt;br /&gt;It may be the case that meta-information as managed by &lt;tt&gt;Moose&lt;/tt&gt; could perhaps help in traversal algorithms (ask the metaclass about which methods link to "subobjects" of the current one), but I'm not aware if somebody has already worked on that.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Methods are slower than direct access to attributes&lt;/h3&gt;No much to expand here: obviously method calls have a cost, especially in Perl which is more dynamic than other OO languages, so the compiler has less information to possibly optimize the method calls. So when traversing deep datastructures through nested accessor calls, there is a definite impact on performances.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;In Perl, fully encapsulated objects are sometimes the best solution, sometimes not; weight these considerations before taking strong design decisions.&lt;br /&gt;&lt;br /&gt;An interesting design is the one of &lt;a href="http://search.cpan.org/dist/DBI"&gt;DBI&lt;/a&gt; : objects (handles) are totally encapsulated, yet they exploit the power of &lt;tt&gt;tie&lt;/tt&gt; to expose their attributes through a conventional hashref API, instead of OO getter and setter methods. This is a very clever compromise. &lt;br /&gt;&lt;br /&gt;As far as I am concerned, I purposedly designed &lt;a href="http://search.cpan.org/dist/DBIx-DataModel"&gt;DBIx::DataModel&lt;/a&gt; to fully exploit the dual nature of Perl objects, having both the OO API for executing methods, and the hashref API for accessing column values. I wouldn't necessarily do that everywhere, but for row objects in a database, which are very open in nature, this just seemed an appropriate solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-7514919066763380118?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/7514919066763380118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/08/object-oriented-accessors-considered.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7514919066763380118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/7514919066763380118'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/08/object-oriented-accessors-considered.html' title='Object-oriented accessors considered (sometimes) harmful'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-6056915321372321268</id><published>2009-08-13T21:33:00.003+02:00</published><updated>2009-08-13T21:46:02.925+02:00</updated><title type='text'>extending DBD::SQLite functionalities</title><content type='html'>About one year ago I started my first project involving XS programming : this was because I needed specific collation sequences in SQLite databases. The basic SQLite implementation in C had support for user-defined collations, but at that time the Perl API in &lt;a href="http://search.cpan.org/dist/DBD-SQLite"&gt;DBD::SQLite&lt;/a&gt; did not give access to it ... so I had to write the glue myself.&lt;br /&gt;&lt;br /&gt;Learning XS was kind of fun : the C structures, the dozens of macros, the stack manipulation functions and the "mortalization" concept, all of this is pretty well documented, so once you have a real project to get motivated, you can enter that field without too much trouble.&lt;br /&gt;&lt;br /&gt;Once done, I sent the patch to the DBD::Sqlite author, and got no answer, which was less fun. Fortunately; &lt;a href="http://en.wikipedia.org/wiki/Audrey_Tang"&gt;Audrey Tang&lt;/a&gt; incorporated the patch in her &lt;a href="http://search.cpan.org/dist/DBD-SQLite-Amalgamation"&gt;DBD::SQLite::Amalgamation&lt;/a&gt; version of the driver.&lt;br /&gt;&lt;br /&gt;Nowadays the situation is very different, because &lt;a href="http://www.ali.as/"&gt;Adam Kennedy&lt;/a&gt; has taken over maintenance of &lt;a href="http://search.cpan.org/dist/DBD-SQLite"&gt;DBD::SQLite&lt;/a&gt;, and there are both an &lt;a href="http://fisheye2.atlassian.com/browse/cpan/trunk/DBD-SQLite"&gt;open source repository&lt;/a&gt; and a &lt;a href="http://lists.scsys.co.uk/pipermail/dbd-sqlite/"&gt;mailing list&lt;/a&gt;, and a reactive &lt;a href="http://search.cpan.org/~ishigaki/"&gt;Kenichi Ishigaki&lt;/a&gt; who cares about release management, so it's much more pleasant to participate.&lt;br /&gt;&lt;br /&gt;What I did recently was to study the &lt;a href="http://www.sqlite.org/c3ref/intro.html"&gt;SQLite API&lt;/a&gt; and add support for all other native functions that so far were not exposed to the Perl DBD::Sqlite driver --- not that I really need that at the moment, but just for completeness's sake. Such functions are, for example, hooks to be run whenever a &lt;code&gt;commit&lt;/code&gt;, &lt;code&gt;rollback&lt;/code&gt; or &lt;code&gt;update&lt;/code&gt; occurs; this means for example that if your transaction does some stuff outside of the database -- like creating files or directories --, you can program a rollback hook that will 'undo' these changes in case of failure.&lt;br /&gt;&lt;br /&gt;Another interesting functionality is another hook called &lt;code&gt;set_authorizer&lt;/code&gt;, that can decide whether a given SQL statement is authorized or not on that database handle. This could be used for example to specify that only administrators are allowed to update or insert data, while any user can read.&lt;br /&gt;&lt;br /&gt;If anybody is interested, that stuff is already available on CPAN in the current developer release of &lt;code&gt;DBD::SQLite&lt;/code&gt; ... enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-6056915321372321268?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/6056915321372321268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/08/extending-dbdsqlite-functionalities.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/6056915321372321268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/6056915321372321268'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/08/extending-dbdsqlite-functionalities.html' title='extending DBD::SQLite functionalities'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-8603978191809711320</id><published>2009-08-12T04:07:00.002+02:00</published><updated>2009-08-12T04:11:49.542+02:00</updated><title type='text'>YAPC::EU::09 paper on managing Geneva's law courts</title><content type='html'>This year's &lt;a href="http://yapceurope2009.org/ye2009/"&gt;YAPC::EU::2009&lt;/a&gt; conference had printed proceedings.&lt;br /&gt;&lt;br /&gt;For this occasion I wrote a paper about my &lt;a href="http://yapceurope2009.org/ye2009/talk/1897"&gt;talk&lt;/a&gt; &lt;em&gt;Managing Geneva's law courts, from Cobol to Perl&lt;/em&gt;. An html copy of the paper is &lt;a href="http://zarb.org/~dami/geneva_courts.html"&gt;now online&lt;/a&gt;. The slides are available at &lt;a href="http://www.slideshare.net/ldami/managing-genevas-law-courts-from-cobol-to-perl"&gt;slideshare&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-8603978191809711320?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/8603978191809711320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/08/yapceu09-paper-on-managing-genevas-law.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/8603978191809711320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/8603978191809711320'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/08/yapceu09-paper-on-managing-genevas-law.html' title='YAPC::EU::09 paper on managing Geneva&apos;s law courts'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-6030083081105581185</id><published>2009-08-11T08:42:00.002+02:00</published><updated>2009-08-11T08:49:44.659+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl community'/><category scheme='http://www.blogger.com/atom/ns#' term='YAPC'/><title type='text'>The Perl community is exceptional</title><content type='html'>This year I went to the &lt;a href="http://yapceurope2009.org/ye2009/"&gt;YAPC::EU::2009&lt;/a&gt; conference in Lisbon. I missed the one from last year, so being a little less accustomed to those gatherings, I recovered the same feeling that I got at&lt;br /&gt;my first YAPC conference in &lt;a href="http://www.yapceurope.org/2006/"&gt;Birmingham in 2006&lt;/a&gt; : this community is like nothing else I've seen before.&lt;br /&gt;&lt;br /&gt;I had been to quite a lot of computer science conferences in my previous life, where the climate was very different. In the academic world, people mostly think about the papers: if your paper is accepted, you go to the conference to add one more line on your publication list; if it is not accepted, maybe you go nevertheless to see what are the ideas in fashion, and to do a bit of networking that may help you getting accepted on the following year, or build an international circle that will give more credibility to your next research proposal. In that world, it's nice to see the community again, but meanwhile there is always a feeling of competition, because the person sitting next to you might well be that anonymous expert that turned down your last paper submission. Question sessions may be quite harsh, too, because people in the audience sometimes are more interested in showing off their own knowledge, rather than genuinely trying to clarify what the speaker was talking about.&lt;br /&gt;&lt;br /&gt;YAPC conferences are very different. People come because they love it, and some of them even come on their own time and money. They love the fun, of course, the special dresses, the jokes, the culture; but they also love to join for shaping new ideas, new tools, new constructs that will be helpful to the whole community. They don't come for marking their territory; they come for passion, and they know that by working together, everybody can help Perl to improve and expand.&lt;br /&gt;&lt;br /&gt;I think I've never heard any aggressive question at a YAPC: rather, the audience sometimes helpfully points to some resources that the speaker might have overlooked.&lt;br /&gt;&lt;br /&gt;All of this makes YAPC very much enjoyable, so I'll definitely try to attend next year in Pisa.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-6030083081105581185?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/6030083081105581185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/08/perl-community-is-exceptional.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/6030083081105581185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/6030083081105581185'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/08/perl-community-is-exceptional.html' title='The Perl community is exceptional'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4836027257696992542.post-3095183025151747802</id><published>2009-08-08T14:04:00.003+02:00</published><updated>2009-08-08T14:16:06.200+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogging'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='ironman'/><title type='text'>Hello, world</title><content type='html'>OK, time to go blogging.&lt;br /&gt;&lt;br /&gt;For a couple of months, it had been one of these things I knew I wanted to do sooner or later ... but preferred to leave until later. Somehow there was always something more urgent, a bug to fix, a release to prepare, a doc to write, an analysis to rediscuss, a new musical piece to rehearse, so I never got into really doing it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.trout.me.uk/"&gt;Matt Trout&lt;/a&gt; already tickled me a couple of weeks ago in his &lt;a href="http://blog.afoolishmanifesto.com/archives/822"&gt;commentary&lt;/a&gt; about &lt;a href="http://search.cpan.org/dist/DBIx-DataModel/lib/DBIx/DataModel.pm"&gt;DBIx::DataModel&lt;/a&gt;&lt;dbix::datamodel&gt;, but his vehement exhortations at &lt;a href="http://yapceurope2009.org/ye2009/"&gt;YAPC::EU::2009&lt;/a&gt; &lt;yapc::eu::2009&gt;finally convinced me that there is no excuse to delay it any further : I have to join that &lt;a href="http://www.shadowcat.co.uk/blog/matt-s-trout/iron-man/"&gt;Ironman competition&lt;/a&gt;&lt;ironman&gt;, a grand idea for getting people to write and propagate thoughts and facts about Perl development.&lt;br /&gt;&lt;br /&gt;Perl blogging had been around for a while, in particular in &lt;a href="http://use.perl.org/"&gt;use.perl&lt;/a&gt; &lt;use.perl.org&gt;journals, but the Ironman competion really gave a new thrust to it; and the information that circulates through that new means is really valuable, because people share thoughts, considerations, design issues as soon as they emerge, even partially shaped, and that's good enough to get readers to also start thinking about those issues. Blogging is less intrusive than mailing lists: you don't throw something out saying "hey, folks, this is for you", you rather leave some dangling thought somewhere, and whoever comes across it can grab it if interested; so even if your idea is vague or controversial, it doesn't matter.&lt;br /&gt;&lt;br /&gt;Once the decision to blog was taken, I had to decide about the how and where. I already had a L&lt;use.perl&gt;, no very much used so far, but good enough. Many people complain about the use.perl site, and true enough, it has a number of inconveniences, and didn't evolve since it was launched a couple of years ago; but it has the merit to exist and still is a valuable resource for the Perl community.&lt;br /&gt;However, I felt that blogging in use.perl would somehow miss the point of Ironman, which is to get the world to hear about perl &lt;em&gt;outside&lt;/em&gt; of the Perl echo chamber.&lt;br /&gt;&lt;br /&gt;The other solution would be to go like real geeks, who have their own internet domains, running software they have chosen or written themselves, caring about configuration and maintenance issues ... however I haven't found the time to do it for the last 6 months. So finally there I am, hosted by blogger.com, and I know that everything written here will definitely be indexed, so the goal of propagating Perl culture should be attained...&lt;br /&gt;&lt;br /&gt;Hello, world, please come back and stay in tune !&lt;br /&gt;&lt;br /&gt;&lt;/yapc::eu::2009&gt;&lt;/dbix::datamodel&gt;&lt;?XML:NAMESPACE PREFIX = DBIx /&gt;&lt;dbix::datamodel&gt;&lt;?XML:NAMESPACE PREFIX = YAPC /&gt;&lt;yapc::eu::2009&gt;&lt;/yapc::eu::2009&gt;&lt;/dbix::datamodel&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4836027257696992542-3095183025151747802?l=ldami.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ldami.blogspot.com/feeds/3095183025151747802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ldami.blogspot.com/2009/08/hello-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/3095183025151747802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4836027257696992542/posts/default/3095183025151747802'/><link rel='alternate' type='text/html' href='http://ldami.blogspot.com/2009/08/hello-world.html' title='Hello, world'/><author><name>dami</name><uri>http://www.blogger.com/profile/05175840149225722194</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_W7uA3aEvb_A/SnwtAkuIhvI/AAAAAAAAAAM/Ge4S98xFCLs/S220/ld_germagny.jpg'/></author><thr:total>0</thr:total></entry></feed>
