Purdy's Journal http://use.perl.org/~Purdy/journal/ Purdy's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:08:32+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 Purdy's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~Purdy/journal/ Wow - perlmonks hacked - passwords exposed! http://use.perl.org/~Purdy/journal/39376?from=rss If you haven't heard <a href="http://perlmonks.org/?node_id=784123">the news</a>, perlmonks was 0wn3d pretty majorly. The hackers were able to get access to the box and reap usernames and passwords (<b>which were stored in cleartext</b> -- <b>FAIL!</b>). <br> <br> It's also interesting to see that even elite Perl people aren't immune to insecure passwords, looking at <a href="http://seclists.org/dailydave/2009/q3/0047.html">the list</a> (scroll down to find 'perlmonks'). <br> <br> Oh well - time to pick a new password &amp; go around and update. This is when it's useful to have a Google Notebook of sites &amp; password hints (not the actual passwords themselves<nobr> <wbr></nobr>... that would be stupid, wouldn't it, perlmonks developers?) to know what sites you need to update. <br> <br> Peace, <br> <br> Jason Purdy 2009-07-30T12:40:02+00:00 journal Ouch http://use.perl.org/~Purdy/journal/38381?from=rss <p>I woke up this morning and wanted to find something that would change my Windows wallpaper automatically, randomly and at regular intervals from my Picasa photo library. So what to use<nobr> <wbr></nobr>... what to use<nobr> <wbr></nobr>... Google? But to my surprise, <a href="http://picasaweb.google.com/lh/photo/Pt8heHDaeNElpsZ_3Te9VQ?authkey=-4Iz9WryY_c&amp;feat=directlink">every site is flagged as malware</a><nobr> <wbr></nobr>... even Google.</p><p>Talk about serious egg-on-your-face. The only thing that could have been worse is that if it happened on a weekday.</p><p><a href="http://tech.slashdot.org/article.pl?sid=09%2F01%2F31%2F1457221">Looks like others have noticed this, too.</a></p><p>Peace,</p><p>Jason</p> Purdy 2009-01-31T16:23:21+00:00 journal A new way to test (to me?) http://use.perl.org/~Purdy/journal/38209?from=rss <p>It's a shame all of my code can't reside in the tidy confines of my Perl libraries - from time-to-time, I have to write JavaScript for a better browser experience. If you haven't heard, Yahoo's YUI has a testing framework (<a href="http://developer.yahoo.com/yui/yuitest/">YUITest</a>) that is pretty neat and I'm now using it (vs. Selenium).</p><p>Granted, I wasn't heavily invested w/ Selenium, so switching wasn't really that much of a hurdle. But YUITest is pretty cool stuff. I will tell you that it's no Test::More. It doesn't have cmp_ok, so you have to program around it a bit. And you have to program in JavaScript, itself.</p><p>What I found as a neat approach is to write the self-contained YUITest code in a separate file in a template directory (i.e. selectTest.yuit).</p><p>Then in my app code, I pass along a conditional template parameter that will include that<nobr> <wbr></nobr>.yuit template contents and then tie that to a query parameter<nobr> <wbr></nobr>... i.e.</p><p>http://www.example.com/myApp.cgi</p><p>And that'll run the app as usual. Then if I append ?t=1, then my app will suck in the<nobr> <wbr></nobr>.yuit file, which brings in the YUITest framework and runs it. You could get more advanced and automate it and use the framework's reporting functionality to make things even more robust.</p><p>Peace,</p><p>Jason</p> Purdy 2009-01-03T03:29:26+00:00 journal Robots.txt Tip + Webinale.de http://use.perl.org/~Purdy/journal/36000?from=rss <p>Knocking off some of the dust here... wanted to share two quickies:</p><p>I finally figured this out, and it may be beneath you, but let's say you have a web document root that's shared between ports 80 and 443 (iow, http and https go to the same place). Then your site gets spidered by the search engines and they put a bunch of your stuff in a supplemental index because it's redundant. Since there's only one robots.txt file, you can't easily say IF https, then go away w/o saying the same thing to the http version. So what do you do? Create a robots-ssl.txt file and then in your ssl apache configuration, use Alias:</p><p><code>Alias<nobr> <wbr></nobr>/robots.txt<nobr> <wbr></nobr>/path/to/robots-ssl.txt</code></p><p>Then http://www.example.com/robots.txt and https://www.example.com/robots.txt have two different contents, while sharing the same web root directory!</p><p>You probably already knew this, didn't you?</p><p>Ok, next up<nobr> <wbr></nobr>... in more exciting news, I'm speaking at <a href="http://webinale.de/">webinale.de</a>! I submitted 6 talks, 5 technical and 1 marketing<nobr> <wbr></nobr>... and wouldn't you know it? The marketing talk is approved. So I'll be speaking on SEO. I've been listening &amp; learning German via <a href="http://www.dw-world.de/dw/0,2142,2548,00.html">the Deutche Welle podcasts</a> and I'm lurking on #perlde to pick up reading &amp; writing German, too. Thankfully, I'll be able to do my presentation in English (I think it would be torture to listen to my German<nobr> <wbr></nobr>;)).</p><p>Peace,</p><p>Jason</p><p>PS: How ironic (ok, English nerds, coincidental<nobr> <wbr></nobr>;)) is it that I'm listening to Daft Punk atm?</p> Purdy 2008-03-28T21:00:16+00:00 journal The next thing CPAN needs... http://use.perl.org/~Purdy/journal/35007?from=rss <p>I had a recent experience that gave me pause (pun intended!) and inspiration for a helpful CPAN tool: a categorical tabulation of module popularity.</p><p>My example: about a year ago (maybe more), I first dabbled into AJAX and went looking for a module that would import/export native Perl objects in JSON format. So <a href="http://search.cpan.org/search?m=all&amp;q=JSON&amp;s=1&amp;n=100&amp;sourceid=Mozilla-search">a CPAN search</a> pointed me to the <a href="http://search.cpan.org/~makamaka/JSON-1.15/lib/JSON.pm">JSON module</a>.</p><p>Fast forward to yesterday, where I'm pointed to <a href="http://search.cpan.org/~audreyt/YAML-Syck-0.99/lib/JSON/Syck.pm">JSON::Syck</a>, which fits my simple needs, but more importantly (and objectively), is faster &amp; more memory efficient.</p><p>So I wish there was something where I could search for JSON, CSV, DBI, CGI, etc and then search.cpan.org would recognize that as a category and present objective data that would better direct me (and other developers) to the most popular (and often best) selection.</p><p>An initial objection would be flamewars, but if we kept it to pure numbers and tied it to BitCard logins, the numbers would be objective themselves. Of course, people will probably want to make comments and that's where it could get awkward.</p><p>Another objection might be something already exists, whether it be <a href="http://cpanratings.perl.org/">the rating system</a> or <a href="http://www.perlfoundation.org/perl5/index.cgi?recommended_cpan_modules">this wiki page</a>, but they both don't fit this need, IMO, basically because a sense of popularity isn't thrown behind the modules.</p><p>Another objection might be upstart modules would find it harder to be adopted, but if we allow people to change their "allegiance", upstart modules' new votes would become more substantial quickly.</p><p>Maybe even simpler would be a download tracker in CPAN to tell how many times a CPAN module has been downloaded/installed. Then put those #'s in the search results.</p><p>Now who's going to put the perspiration behind the inspiration?<nobr> <wbr></nobr>;)</p><p>Peace,</p><p>Jason</p><p>PS: I <b>highly</b> recommend <a href="http://www.amazon.com/Alive-2007/dp/B000YBH2UG">Daft Punk Alive 2007</a> - score it for $9 in MP3 format. It's awesome coding music!</p> Purdy 2007-11-29T14:39:14+00:00 journal Math is hard... http://use.perl.org/~Purdy/journal/34441?from=rss <p>especially when it involves dates &amp; times. This random musing comes from upgrading <a href="http://search.cpan.org/~ceeshek/CGI-Application-Plugin-Session-1.02/lib/CGI/Application/Plugin/Session.pm">CAP::Session</a> and remembering the pain of writing tests for session_delete.</p><p>At this point in our lives, time is intuitive. Computers don't come pre-installed with the human experience, much like children. With my oldest daughter (age 3), she's currently stuck on everything in the past happened "yesterday", regardless of if it actually was yesterday or last month or two minutes ago.</p><p>Major props to those CPAN modules that get it right (<a href="http://search.cpan.org/author/DROLSKY/DateTime-0.41/lib/DateTime.pm">DateTime</a> being my current favorite)<nobr> <wbr></nobr>... it's harder than you think.</p><p>I don't suggest those of you who are childless to rush out and get a child, but children do bring a real life analogy to what your computer is like. Now I just need to finish this Potty_Training 2.0 upgrade.</p><p>Peace,</p><p>Jason</p> Purdy 2007-09-13T14:11:49+00:00 journal This post brought to you by ... http://use.perl.org/~Purdy/journal/32246?from=rss <p><a href="http://www.activestate.com/">ActiveState</a> has released version 4.0 of their <a href="http://www.activestate.com/komodo_ide/new">Komodo IDE</a>, which supports multiple languages (Perl, PHP, etc), including TemplateToolkit. It has tons of other features, including vi key bindings and extensive configuration options to make it bend to your will. I've been playing around with the betas for the last few months and the new excitement for me is the capability to edit files remotely over SSH.</p><p>They also have XPI support, so we could develop add-ons much like those for Firefox &amp; Thunderbird.</p><p>I was surprised that my fellow folks on #cgiapp haven't heard about it, so I wanted to share its goodness here. They also have <a href="http://www.activestate.com/komodo_edit">a free version</a> with some functionality stripped out. If you're using some other editor (<a href="http://www.crimsoneditor.com/">Crimson Editor</a>, <a href="http://www.jedit.org/">jEdit</a>, etc), Komodo (Edit) is definitely worth your replacement consideration.</p><p>Also to share my latest webdev bounty, make sure you have <a href="http://www.getfirebug.com/">Firebug</a>. There was <a href="http://www.ddj.com/dept/debug/196802787">a great article in Dr. Dobbs</a> about how it can be used and I've found it priceless when trying to debug javascript &amp; css/layout stuff.</p><p>Anyway, enough shilling for now.<nobr> <wbr></nobr>;)</p><p>Peace,</p><p>Jason</p> Purdy 2007-01-24T18:37:30+00:00 journal Perl needs (more) evangelism http://use.perl.org/~Purdy/journal/31280?from=rss <p>I was having lunch with a programmer friend of mine, who does his work in<nobr> <wbr></nobr>.NET (C#, I believe) and we got into another 'Why Perl? Why<nobr> <wbr></nobr>.NET?' diatribe, which really went nowhere[1]. The sticking point to me was that while Perl is a great language/platform to immerse yourself in, the cool/new stuff leaves Perl behind.</p><p>This idea was enforced by a <a href="http://it.slashdot.org/article.pl?sid=06/10/10/031226">recent Slashdot story</a>, where <a href="http://sztywny.titaniumhosting.com/2006/07/23/stiff-asks-great-programmers-answers/">an aspiring student picked great programmers to ask questions</a>, but Larry Wall didn't make the cut. Not that Larry isn't great, but that Perl doesn't have the mindshare such that it made the student's list. Hopefully, Larry didn't get the email &amp; ignore it.<nobr> <wbr></nobr>;)</p><p><a href="http://www.topcoder.com/">Topcoder</a> is a neat site where programmers can compete, but they only support Java,<nobr> <wbr></nobr>.NET, C++, but not Perl.</p><p>Google has code competitions which include Python, but not Perl. They have <a href="http://code.google.com/apis/gadgets/">a neat Desktop system</a> you can develop on, but not in Perl.</p><p>You can develop extensions for Firefox/Thunderbird, but not in Perl.</p><p>I'm probably not saying anything that hasn't already been said, but I'm worried about being the guy scrounging for jobs when I'm 50 and too set in my ways to learn yet another language, when all these cool/new things are the now/then standard.</p><p>We need to get Perl embedded into these cool/new things so that we never have to leave the comfy confines of the language to not only get the job done, but do some cool stuff, too.</p><p>Peace,</p><p>Jason</p><p>[1]: This leads me to yet another lesson I've learned - you learn more from listening than talking. There is no real truth that can win an emotional/instinctual/behavioral/spiritual argument. Watching Pudge &amp; Ovid go at it enforces that lesson.<nobr> <wbr></nobr>;)</p> Purdy 2006-10-10T13:38:14+00:00 journal Free lesson for you... http://use.perl.org/~Purdy/journal/31150?from=rss <p>I have been working pretty hard on a work project for about a month now (off &amp; on and for the last week, mostly on) and I've come to a realization that perhaps most of you already have.</p><p>For the impatient, here's the lesson up-front:</p><blockquote><div><p> <i>When tasked with importing data from an external source, consider importing it into a separate db/table and then building/extending the necessary functionality on top of that (versus importing the data right into your existing data).</i></p></div> </blockquote><p>We run circulation data for two magazines, both on systems we built ourselves. It was decided to outsource circulation of one of these to another vendor. Several months later, I was asked to import their data for some functionality that the vendor doesn't provide. As it turns out, there are some similarities between the schemas of their data and ours, but mostly differences. A big one being when a user renews their subscription, I treat that as a separate subscription and they treat that as an extension of their existing subscription.</p><p>Anyway, like I said, I've been working hard and feel like I'm currently at 85 or 90% completion, but to nail the final non-conformities would require user-specific code, which makes my eyes bleed when I'm already facing some messed-up code (5 or 6 main IF branches and a few places that could be re-factored).</p><p>Perhaps this is when I should move to logic programming vs. functional programming, but I still don't have my head around that one.<nobr> <wbr></nobr>:(</p><p>Perhaps also, I'm just at a point that all programmers reach when they've invested too much time in a project and question <i>"WHY?"</i> and I should just buckle down and knock out the remaining 10-15% cases.</p><p>Cheers,</p><p>Jason</p> Purdy 2006-09-28T13:45:31+00:00 journal Codestorm http://use.perl.org/~Purdy/journal/30632?from=rss <p>I recently had a situation come up where I had to whip up some code to split up a huge (1 GB) mbox file. I <b>KNOW</b> I should be using mdir, but com'on, people<nobr> <wbr></nobr>... it's what Debian does by default and I don't spend my time sysadmin'ing stuff. In looking around, I couldn't believe others hadn't already done this (perhaps they have and my Google-fu just wasn't adequate). There was a promising <a href="http://www.kernel.org/pub/software/scm/git-core/docs/git-mailsplit.html">git-mailsplit program</a>, but I couldn't find it in Debian.</p><p>So I whipped this up - feel free to use/tweak this for your own use:</p><p><code><br>#!/usr/bin/perl -wT</code></p><p><code># Process:<br># 1) cp<nobr> <wbr></nobr>/var/mail/person<nobr> <wbr></nobr>/var/mail/person.bak<br># 2) Run this script<br># 3) chmod/chown the INBOX.GigSplitNN files<br># chown person:users<nobr> <wbr></nobr>/home/person/INBOX.GigSplit*<br># chmod 0600<nobr> <wbr></nobr>/home/person/INBOX.GigSplit*<br># 4) mv<nobr> <wbr></nobr>/var/mail/person<nobr> <wbr></nobr>/var/mail/person.prerm<br># 5) mail the person and see if the<nobr> <wbr></nobr>/var/mail/person gets setup right<br># 6) diff<nobr> <wbr></nobr>/var/mail/person.bak and<nobr> <wbr></nobr>/var/mail/person.prerm and put that in<nobr> <wbr></nobr>/var/mail/person<br># i ended up just tailing the file with the right number of differing lines<br># and &gt;&gt;'ing that into<nobr> <wbr></nobr>/var/mail/person<br># b/c diff'ing two 1GB files takes WAY too long!</code></p><p><code>use strict;</code></p><p><code>open( MBOX, '/var/mail/person.bak' ) || die "Cannot open person.bak: $!";</code></p><p><code># go through the mbox file<br>my $message = '';<br>my $line_count = 0;<br>my $message_count = 0;<br>my $file_base = '/home/person/INBOX.GigSplit';<br>my $file_i = 1;<br>my $line_count_limit = 580000; # this ends up with ~40MB files, which are more tolerable<br>my $need_to_write_init = 1;</code></p><p><code>while( &lt;MBOX&gt; ) {<br> &nbsp; &nbsp; &nbsp; &nbsp; $line_count++;<br> &nbsp; &nbsp; &nbsp; &nbsp; if (<nobr> <wbr></nobr>/^From / ) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( length( $message ) &gt; 0 ) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $message_count++;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; my $file = $file_base . sprintf( "%02d", $file_i );<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print "Got message # $message_count - appending to $file<nobr> <wbr></nobr>...\n";<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( $need_to_write_init ) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; write_initial_msg( $file );<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $need_to_write_init = 0;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; open( SPLIT, "&gt;&gt;$file" ) || die "Cannot append to $file: $!";<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print SPLIT $message;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; close( SPLIT );<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( $line_count &gt; $line_count_limit ) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print "Line Count exceeded $line_count_limit, so incrementing \$file_i...\n";<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $file_i++;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $line_count = 0;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $need_to_write_init = 1;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $message = $_;<br> &nbsp; &nbsp; &nbsp; &nbsp; } else {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $message<nobr> <wbr></nobr>.= $_;<br> &nbsp; &nbsp; &nbsp; &nbsp; }<br>}</code></p><p><code>close( MBOX );</code></p><p><code>print "All done!\n";</code></p><p><code>sub write_initial_msg {<br> &nbsp; &nbsp; &nbsp; &nbsp; my $file = shift;<br> &nbsp; &nbsp; &nbsp; &nbsp; open( FILE, "&gt;$file" ) || die "Cannot open $file to put in initial msg: $!";<br> &nbsp; &nbsp; &nbsp; &nbsp; print FILE &lt;&lt;"_EOF_";<br>From MAILER-DAEMON Mon Aug 14 13:00:31 2006<br>Date: 14 Aug 2006 13:00:31 -0400<br>From: Mail System Internal Data &lt;MAILER-DAEMON\@mail.example.com&gt;<br>Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA<br>Message-ID: &lt;1155574831\@mail.example.com&gt;<br>X-IMAP: 1134739889 0000025473<br>Status: RO</code></p><p><code>This text is part of the internal format of your mail folder, and is not<br>a real message. It is created automatically by the mail system software.<br>If deleted, important folder data will be lost, and it will be re-created<br>with the data reset to initial values.</code></p><p><code>_EOF_<br> &nbsp; &nbsp; &nbsp; &nbsp; close( FILE );<br>}<br></code></p><p>So that will create INBOX.GigSplit01<nobr> <wbr></nobr>... INBOX.GigSplitNN, which my user could manage with Squirrelmail (I had to hack<nobr> <wbr></nobr>/home/person/.mailboxlist to add those new folders). Since the problem stemmed from a checkbox in her email client keeping old messages on the server and not removing them, she could simply delete a lot of the stuff as redundant and just look at the more recent messages for stuff she missed. Remotely accessing a 1GB mbox file tends to timeout.<nobr> <wbr></nobr>;)</p><p>Yes, I <b>KNOW</b> that could be optimized and probably even one in one line (go for it, golfers!)<nobr> <wbr></nobr>... it was something I had to do and it wasn't too painful to run (6700 msgs in 2 minutes).</p><p><i>That's just the way I roll!</i>*<nobr> <wbr></nobr>;)</p><p>Speaking of coding, Google has their <a href="http://www.google.com/codejam/index.html">Code Jam going on</a>, but where's the love for Perl? You can <a href="http://www.topcoder.com/pl/?&amp;module=Static&amp;d1=google06&amp;d2=overview">program in C++, C#, Java, Python and VB.NET</a>, but not Perl. It probably has to do with what TopCoder supports, but something should really be done to get Perl in that list, for longevity sake.</p><p>Peace,</p><p>Jason</p><p>* = My new favorite saying</p> Purdy 2006-08-15T14:14:45+00:00 journal Competition &amp; AJAX http://use.perl.org/~Purdy/journal/29529?from=rss <p>So I was playing around with the <a href="/~pudge/journal/29518">Discussion2</a> stuff, which is pretty neat, but it got me thinking about the whole AJAX stuff and competition in general.</p><p><b>Competition</b></p><p>Slashdot (and Slashcode) seems to be really evolving lately, with tagging, CSS and improved commenting system. I don't know this for sure, but I gotta think that it's because Digg has put on some competitive pressure.</p><p>I always thought Slashdot was the 2-ton gorilla in the room that no one could mess with, but it goes to show that there's always a way to topple the giant.</p><p>I'm not saying that Slashdot is dead - there's a place for editorial control (save for April 1st), but they've certainly lost a lot of power to Digg, at least IMHO.</p><p><b>AJAX Thoughts</b></p><p>Some people refer to the onslaught of AJAX as AJAXturbation, which is crude, but seems to really get at the heart of current approaches.</p><p>Opening up your web application to AJAX techniques dramatically (and exponentially) increases the amount of traffic between the user and your server(s). So while we've saved bandwidth by converting from tables to CSS, we're going back with these little bursts of requests and responses as the user is on one page.</p><p>Another random thought is web analytics and statistics - do these AJAX requests/responses affect the stats<nobr> <wbr></nobr>... should they? i.e. Does Digg tell their advertisers that a person landing on their homepage and digging two stories is 1 page view or 3?</p><p>Also, while AJAX is way cool to work with and that alone is a factor for so much of it out there, how will this affect JavaScript's presence and dependence and are developers <b>really</b> thinking out the logic of using it?</p><p>For example (and this is probably not the best example), pudge mentioned you can click on the 'read further' link and viola! AJAX will bring the rest of the comment into view without the fuss of going through a page refresh. My point is that this will lead to a user playing around with it more and thinking less of the "cost" of clicking those links. So I (the user) play around with hiding/showing comments with less concern, devaluing the content and at the same time, hammering the server with these tiny requests.</p><p>Probably a better example would be the Wall St. Journal's recent <a href="http://online.wsj.com/article/SB114539470915529124.html?mod=Home_US_Highlights">right-click search</a>. That will add to a lot of playing around and at the same time, it's annoying to have two right-click context menus.</p><p>Let's hope with all these requests flying all over the place that the <a href="http://politics.slashdot.org/article.pl?sid=06/05/03/2313242">Net Neutrality Bill</a> passes (and that the DRM/Broadcast Flag people don't try to slip in some of their wishes).</p><p>But maybe that's the way the Web (2.0!) has to go, in order to become the next OS... what do you think?</p><p>Peace,</p><p>Jason</p> Purdy 2006-05-04T13:25:02+00:00 journal FF Extension &amp; V http://use.perl.org/~Purdy/journal/29138?from=rss <p>It's been quite a while since my last posting. Wanted to write about two different things and save catching up with the other stuff until later.</p><p> <b>Firefox Extension</b> </p><p>Back in January, I had an itch to scratch where I thought it would be cool to have some sort of statistical monitor of Firefox's cache in the statusbar. So I dived into extension development and with the help of docs &amp; the #extdev IRC channel, cranked out the <a href="https://addons.mozilla.org/addon.php?id=1881">Cache Status extension</a>. </p><p>Firefox extensions are merely XML and JavaScript (oh, and a manifest file). They could interface with webapps (written in Perl, of course) to pull down information from the Web somewhere.</p><p>I will tell you that writing an extension is not for the faint of heart. There are lots of little gotchas in the development cycle. You also get wrapped up into how cool it is and then come the negative people with their own baggage, dissing your work. This gives me insight into what it means to be an open source developer &#8211; it's not all roses; the heckles &amp; negativity can seem to outweigh any praise you may garner. Have you appreciated your open source developer today?</p><p>Perhaps we should establish a new (inter)national holiday: &#8220;Open Source Developer Appreciation Day.&#8221; I'm not saying this for me; before this experience and other maturation aspects, I, too, was guilty of heaping on the negativity. Either learn the lesson or walk a mile (1k lines of code should qualify) in OS shoes and you'll be appreciating OSD's out there everywhere, especially for those projects you use.</p><p>One neat aspect of doing this type of project is that your work is readily translated. I have 10 different languages already along with submitted work for a few more, when I get around to it. That's pretty cool!</p><p> <b>V for Vendetta</b> </p><p>We just came back from NYC and since we were sans-Meredith (staying with the grandparents), we opted to see &#8220;V for Vendetta&#8221; at a movie theater on opening day! I don't know when the last time we did something like that as parents, so temper my rating with the excitement of actually going to a movie. We both thought it was a great movie.</p><p>It also got me to thinking about our government in the US and how scary the current situation is. The movie paints a picture of where things lie at the end of the slippery slope that we seem to be on.</p><p>Where will the US be in 50 years? With the Patriot Act and current government infractions of civil liberties as well as other bills in the pipes that threaten other freedoms, it's too easy to glimpse reality from V's fictional future.</p><p>I don't have a solution &#8211; I know what would be ideal, but I believe we're just too fat &amp; lazy (figuratively) to get involved unless we face a major threat (and yeah, I include myself in that).</p><p>Peace,</p><p>Jason</p> Purdy 2006-03-28T20:29:58+00:00 journal Goal Update - New CPAN Module http://use.perl.org/~Purdy/journal/26901?from=rss <p>Got four more books down:</p><ul> <li> <a href="http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ean=9780671567828">Bookman's Wake</a> - Ok</li><li> <a href="http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ean=9780743476294">Bookman's Promise</a> - Getting repetitive now</li><li> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0425205088">Dark Justice</a> - Speaking of repetitive -- why did I bother?</li><li> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0399153152">Without Mercy</a> - Very weak/shallow literature. It's like those romance books for women, but spy/thriller/Bond-esque stuff.</li></ul><p> I'm in the middle of two more books (<a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0446610224">Big Bad Wolf</a> on audio CD for my daily commute and a signed first edition copy of the <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0670034371">Trudeau Vector</a>). I'm currently at 13 books (and I'll be at 15 prolly next week) and I will make my goal of 20. </p><p> Looking back at <a href="/~Purdy/journal/22519">those goals</a>, I've nailed the weight (still @ 202) and books. I've given up the MythTV boxen - just don't have that type of disposable income lying around. </p><p> I've also unveiled my most weighty CPAN module to date: <a href="http://cpan.uwinnipeg.ca/htdocs/CGI-Application-Plugin-MessageStack/CGI/Application/Plugin/MessageStack.html">CGI::Application::Plugin::MessageStack</a>. This module/plugin works with <a href="http://cgi-app.org/">cgiapp</a> and gives you a place to push error or informational messages, which will then be automatically inserted into your runmodes. </p><p>It has over 60 tests and I developed it using a test-driven methodology (I have a testplan.txt in my 't' dir). Wrote <a href="http://www.mail-archive.com/cgiapp@lists.erlbaum.net/msg04131.html">an RFC</a>, the <a href="http://cgiapp.erlbaum.net/cgi-bin/cgi-app/index.cgi?MessageStack">docs through a Wiki</a>, the tests and <b>then</b> the code. It was a really neat process. </p><p> I've also been polishing my other modules with a motivation towards improving <a href="http://cpants.dev.zsi.at/author/PURDY">my Kwalitee</a>. There's just that pesky CGI::MxScreen I adopted that would require a <b>lot</b> of work to improve and I'm not convinced it would be worth it. I guess it will always be my albatross. </p><p> I've also been working on a freelance project to address one of my other goals (publishing tools) - taking the code and making it work for other publishers. With this example, I took our <a href="http://www.qsrmagazine.com/onesource">OneSource application code</a> and extended it such that the <a href="http://www.duketipeog.com/">Duke TIP EOG</a> program can allow their listings to be collected online from their advertisers directly. It's coming along nicely and I've learned a few things along the way (CSS, client management, sans-serif vs. serif come to mind). Good lessons and formulative experience to apply when I strike out on my own. </p><p>Peace,</p><p>Jason</p> Purdy 2005-09-27T20:47:19+00:00 journal IRC Hacking http://use.perl.org/~Purdy/journal/26626?from=rss <p>So I was on #cgiapp (irc.perl.org) and Cees Hek taught me a few things, one involving lists, arrays and scalars.</p><p>Have you ever tried this?<code><br>@a=('one','two','three'); $b = @a; print $b;</code></p><p>So what's the output? '3'<nobr> <wbr></nobr>... I knew that and my world was safe &amp; sheltered. Then Cees threw this one at me:<code><br>$b = ('one','two','three');print $b;</code></p><p>What's that output? '3'?<nobr> <wbr></nobr>... Nope, it's 'three', the last element of the list.</p><p><i>insert sound of head exploding</i></p><p>Before moving on, I think this is a good example of how such a truth of life can really alter your worldview. Not just in Perl, but when you learn something new like that, it really breaks your grip on "reality" and takes a moment (or two) to readjust and get a new grip. I encourage a good shake-up every once in a while.</p><p>Ok, so then I was head-coding while playing with <a href="http://www.purdy.info/gallery/album46">Meredith (she's so cute)</a>, getting around a CSV file that I will need to import into a database and it has rows with ID #'s and then a column in a row for other ID #'s that are the same 'entity'. So I plan on consolidating them into my shiny new relational db. So I'll need something to determine if the ID # is the minimal # of the set - if so, it's a new 'entity' record. Otherwise, associate the new record w/ the minimal number.</p><p>So I'll have the ID # and a list of other ID #'s and I need to know if it's the smallest.</p><p>So then I said to myself<nobr> <wbr></nobr>... what if I used that concept that Cees taught me w/ a reverse sort? Like:<br><code>if ( $id_number == reverse sort @ids )</code></p><p>There are some context issues there that I couldn't (and still don't all that well) understand. Cees nailed it, though:<br><code>if ( $id_number == @{[reverse sort @ids]}[0..$#ids] )</code></p><p>Pretty cool, huh? I call it the Hek-Purdy min(). Or maybe "a Hek of a Purdy-good min() function" (helps if you say that in a Southern accent<nobr> <wbr></nobr>;)).</p><p>Now this is not very readable or maintainable, so I don't plan on world-wide deployment - just my import script<nobr> <wbr></nobr>... for now.<nobr> <wbr></nobr>;)</p><p>Peace,</p><p>Jason</p> Purdy 2005-09-07T13:24:16+00:00 journal Please donate http://use.perl.org/~Purdy/journal/26578?from=rss <p>When I first heard the news of Katrina, I really didn't appreciate the level of disaster. After all, I live in NC and have been through a few hurricanes and didn't really see what all the fuss was about.</p><p>But seeing the pictures, the news videos, the breakdown of society<nobr> <wbr></nobr>... we also asked our subscribers in those states how they were doing and <a href="http://www.qsrmagazine.com/shells/full.phtml?id=4656">the response</a> was very touching. Reading that really opened my eyes and called me into action.</p><p>My Uncle sent an email saying that for Christmas presents this year, he was making a donation to the relief efforts. This is a great idea and makes for a more meaningful and special family event.</p><p>So, however cynical you are<nobr> <wbr></nobr>... whatever you belief<nobr> <wbr></nobr>... whatever your political affiliation<nobr> <wbr></nobr>... people in those affected areas need your help!</p><p>Think about donating and asking your family and friends to see if they'd rather their present money be redirected to a donation in their honor.</p><p>Peace,</p><p>Jason</p> Purdy 2005-09-02T21:13:54+00:00 journal ApacheCon &amp; Books http://use.perl.org/~Purdy/journal/26471?from=rss <p><b>ApacheCon</b></p><p>Wow, I haven't posted in a while. I went to ApacheCon in Stuttgart, Germany - thanks to the conference for sponsoring me through my talks. The conference itself was ok... definitely not a Perl conference. My talks were the only Perl ones and they were not very well attended (10-15).</p><p>My flight over to Germany was one of my worst travel experiences. 24 hours of travelling and 4 legs of flights and no exit row/bulkhead seats (I'm 6'7" with long legs, so regular seating is crammed, to say the least). We were held up in JFK for 1.5 hours just taxi'ing, due to bad weather, and this made me miss the Stuttgart connection, so two more flights!</p><p>Another lovely encounter (this should have been quite a piece of foreshadowing): there was a fellow traveller who also missed the Stuttgart connection and he was wearing an Apache hat, so the guy I was sitting next to, that I told I was going to a software conference, said, "Hey, I bet he's going to the same conference." I shoulda said "No." Anyway, after some conversation, he asks what I'm going to be talking on and I say "Perl." He goes "Oh.<nobr> <wbr></nobr>... Well, I guess you could develop web applications with that."</p><p><i>resisting further comments here</i></p><p>I <a href="http://www.purdy.info/gallery/stuttgart">took over 200 pictures</a> while I was there - including my trip to Wilhelma (a pretty nice zoo) and the Mercedes-Benz museum.</p><p>Stuttgart itself was a pretty nice city, but not very English-friendly. My German lessons handled being able to talk and understand very basic things, but when people were talking to me<nobr> <wbr></nobr>... well, that was a whole other situation. So it was an ordeal to go out &amp; about.</p><p>Probably the best example was that my wife wanted to pick up some Birkenstocks. This involved several trips throughout the city. Also, the way that people shopped for these shoes was very different - they would go in and try a general shoe and then order their specific need and 4-5 days later, they'd pick it up. My wife had specific needs, which didn't lend itself to the general stock. It wasn't until my last store that I got lucky<nobr> <wbr></nobr>... well, sort of. No English, so shopping was fun<nobr> <wbr></nobr>... "Do you have Birkenstocks?" "Blue?" "Leather?" "38?" "Uh, I need to go get more cash." (that last one I said in English)</p><p>Bottom-line: I gained a new appreciation for foreigners who struggle with English when in America.</p><p>Bottom-line #2: I don't think I will go on those type of trips without my wife, anymore. It'd be nice to share these type of experiences (at least the good ones<nobr> <wbr></nobr>;)), plus she's a great supporter for the bad ones.</p><p><b>Books</b></p><p>Been reading up a storm:</p><ul> <li> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0312999526">The Bourne Legacy</a> - Bought this at YAPC::NA for my travels.</li><li> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0439784549">Harry Potter &amp; the Half-Blood Prince</a> - YAHPB. Wonder how #7 (the last one) will go. What will JKR do next (or does she need to do anything else)?</li><li> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=1594480001">The Kite Runner</a> - <b>BEST</b> Book I've read this year! <b>HIGHLY</b> recommend!</li><li> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0743410653">Booked to Die</a> - Good murder mystery, written about a cop who becomes a book dealer, written BY a book dealer. Good insight to book collecting, which helps with our <a href="http://www.finebooksmagazine.com/">book collecting magazine</a>.</li></ul><p>Peace,</p><p>Jason</p> Purdy 2005-08-26T13:45:47+00:00 journal YAPC::NA, BREAD and Books http://use.perl.org/~Purdy/journal/25613?from=rss <p><b>YAPC::NA</b></p><p>In my last journal entry, I mentioned how great YAPC::NA's Day 1 was. Well, Day 2 &amp; 3 were more of the same, if not better.</p><p>One of the great things I learned at the conference was testing in general as well as an awesome networking opportunity for the rest of the cgiapp gang.</p><p>I <a href="http://www.mail-archive.com/cgiapp@lists.erlbaum.net/msg03595.html">posted minutes</a> from our BOF session and <a href="http://www.mail-archive.com/cgiapp@lists.erlbaum.net/">the list</a> has been quite abuzz lately, including my next point...</p><p><b>CAP::BREAD</b></p><p>The BREAD project has reached an alpha milestone, <a href="http://search.cpan.org/~purdy/CGI-Application-Plugin-BREAD-0.12_1/">released on CPAN</a> early this morning and has already gone through two more revisions, thanks to Mark Stosberg (who is quite a machine).</p><p>Anyway, what's cool about this is that once you have all the modules in place, you can put together a simple CGI::Application like this:</p><blockquote><div><p> <tt>package MyBREADApp;<br> &nbsp; <br>use base 'CGI::Application';<br>use CGI::Application::Plugin::BREAD;<br> &nbsp; <br>sub setup<br>{<br>&nbsp; $self = shift;<br>&nbsp; my $loader = Class::DBI::Loader-&gt;new(<br>&nbsp; &nbsp; &nbsp; dsn&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; "dbi:mysql:mysql",<br>&nbsp; &nbsp; &nbsp; user&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; "webuser",<br>&nbsp; &nbsp; &nbsp; password&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; "webpass",<br>&nbsp; &nbsp; &nbsp; namespace&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; "WHATEVER",<br>&nbsp; &nbsp; &nbsp; relationships&nbsp; &nbsp; &nbsp; =&gt; 1,<br>&nbsp; &nbsp; &nbsp; additional_classes =&gt; [ 'Class::DBI::FormBuilder' ],<br>&nbsp; &nbsp; );<br>&nbsp; $self-&gt;bread_db( $loader );<br>}</tt></p></div> </blockquote><p>And then it will give you a complete db management application.</p><p>Give it a shot and let me know what you think. The best part of this project is that it has exposed me to better coding (again, thanks to Mark) and some really cool CPAN modules (FormBuilder is way cool).</p><p><b>Books</b></p><p>Well, I haven't been keeping up with the books I've gone through like I promised earlier. I've actually taken a hiatus, thanks to <a href="http://www.dailysudoku.co.uk/sudoku/">the Daily Sudoku site</a>. I've weaned myself off of those last month and have whirled through a few books:</p><ul><li> <tt> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=044653143X">Brimstone</a> </tt> - Another Child/Preston Pendergast[1] Book</li><li> <tt> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0393060349">The History of Love</a> </tt> - Very artsy, graphic and yes, moving.</li><li> <tt> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0060575840">The Executioner's Game</a> </tt> - Picked it up on a whim and it's pretty good - quite a conspiracy theory.</li><li> <tt> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0446576972">Dance of Death</a> </tt> - <b>BEST</b> of the Child/Preston Pendergast-line books</li></ul><p>I'm currently going through two more books on my nightstand table: <tt> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0743226712">1776</a> </tt> and <tt> <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0316011770">The Historian.</a> </tt> I also had to bail on another book - <a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=1582344167"> <tt>Jonathan Strange and Mr. Norrell</tt> </a> - I just didn't get hooked after 100-some odd pages and the book has WAY too many footnotes.<br>Peace,</p><p>Jason</p><p><small><br>[1]: Pendergast is an enigmatic character of Child/Preston that defies anything I could write here -- best to experience it yourself.<br></small></p> Purdy 2005-07-10T03:09:39+00:00 journal YAPC::NA - Day 1 http://use.perl.org/~Purdy/journal/25400?from=rss <p><strong>good talks</strong></p><p>Went to a lot of testing talks, so my head is spinning on that front. One neat concept I picked up from statico &amp; chromatic's talk is MockObject. With that, I could mock MIME::Lite and override the email sending to not send, but test the email body to see if it matches expected customization.</p><p><strong>great food</strong></p><p>Toronto has some of the greatest restaurants. I always find myself exploring the food options whenever I travel - I like to find places that are local-flavor.</p><p>Had a great Thai meal in some hole-in-the-wall place right around the corner from the conference. It was so good, I might have to go back again today for lunch...</p><p>I was overthrown for the dinner choice (Bow &amp; Arrow). It was said it would take too long to get there<nobr> <wbr></nobr>... took us two shots at a replacement (first restaurant was already full) along with a 20 minute walk. I'm not sure we saved time, but a good time was still had by all.</p><p><strong>awesome cgiapp meeting</strong></p><p>We had a CgiAppBOF later, which was awesome - it included a lot of the folks from the mailing list and some new folks as well. We talked about marketing efforts (always amusing to dabble in the dark side) to create more awareness of cgiapp's capabilities. We also talked about the CAF project, a BREAD project and cgi-session.</p><p>Sorry for the lapse of links -- rushing this out to go get ready for Day 2.</p><p>Peace,</p><p>Jason</p> Purdy 2005-06-28T11:54:57+00:00 journal Going to YAPC::NA http://use.perl.org/~Purdy/journal/25289?from=rss <p>Just got the approval to go and finished my reservations, so I'm heading to YAPC::NA this Sunday<nobr> <wbr></nobr>... I look forward to seeing most of you there and learning a lot!<nobr> <wbr></nobr>:)</p><p>Peace,</p><p>Jason</p> Purdy 2005-06-20T19:49:42+00:00 journal Two Projects Out... http://use.perl.org/~Purdy/journal/25214?from=rss <p>This may sound like a perlvertisement by the time I'm done<nobr> <wbr></nobr>... whatever.<nobr> <wbr></nobr>;)</p><p>Two Perl projects have been finally unveiled, after many months of work. The first one is really cool (well, they're both cool). If you go to <a href="http://www.qsrmagazine.com/">our site</a>, you'll see some text ads at the top. Those are <b>NOT</b> Google AdSense/AdWords ads. Those are homebrew ads... meaning, we developed our own system. We played around w/ the AdSense stuff and while we made some money off of it, we were annoyed about how little we actually made. So instead, we developed our own system and now we get to keep all of the money. And we don't have to worry too much about pesky things like fraudulent clicks, b/c we don't syndicate our system outside of our own site. 99.9% Perl, too (the home page was already in PHP, so I hacked the display of ads in that).</p><p>The next system isn't as cool - it's a refresher of <a href="http://www.qsrmagazine.com/onesource">our business directory</a> that we did last year. We did some integration w/ the previous project, such that advertisers there can at the same time, setup an account.</p><p>So, if you want to hear more about these type of projects, sign up for <a href="http://www.apachecon.com/2005/EU/html/sessions.html">my half-day tutorial</a> (T15) at <a href="http://www.apachecon.com/">ApacheCon</a>. Looks like it's in danger of being cancelled <a href="http://use.perl.org/~Purdy/journal/21298">again</a>.</p> Purdy 2005-06-15T15:05:44+00:00 journal Whew! http://use.perl.org/~Purdy/journal/24400?from=rss <p>So after a ton of work, learning ActionScript and Flash, I'm proud to announce the release of our first "Interactive Feature" (don't blame me for the name -- it's not really <i>interactive</i>, per se). Just go to <a href="http://www.qsrmagazine.com/">our homepage</a>[1] and click on the main story image to launch the presentation (after a while, it gets pretty boring, unless you're really into the fast food industry -- so I won't blame ya if you bail<nobr> <wbr></nobr>;)).</p><p>Anyway, what's cool about this is that the whole thing is driven by an XML file. The Flash file loads the XML, which specifies an MP3 file and a series of slides like so:</p><blockquote><div><p> <tt>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>&lt;presentation&gt;<br>&nbsp; &nbsp; &lt;title&gt;Simple&lt;/title&gt;<br>&nbsp; &nbsp; &lt;audio&gt;simple.mp3&lt;/audio&gt;<br>&nbsp; &nbsp; &lt;slides&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; &lt;slide photo="00.jpg"&nbsp; &nbsp;start_time="0"&nbsp; &nbsp; end_time="1"&nbsp; &nbsp;caption=''<nobr> <wbr></nobr>/&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; &lt;slide photo="01.jpg"&nbsp; &nbsp;start_time="1"&nbsp; &nbsp; end_time="5"&nbsp; &nbsp;caption=''<nobr> <wbr></nobr>/&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; &lt;slide photo="02.jpg"&nbsp; &nbsp;start_time="5"&nbsp; &nbsp; end_time="9"&nbsp; caption=""<nobr> <wbr></nobr>/&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; &lt;slide photo="03.jpg"&nbsp; &nbsp;start_time="9"&nbsp; &nbsp;end_time="14"&nbsp; caption='"Chick-fil-A announced its 37th year of consecutive sales gains."'<nobr> <wbr></nobr>/&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>...</tt></p></div> </blockquote><p>Then the Flash file will start the presentation and through an internal timer, fade the slides out at their end_time.</p><p>Neat, huh? Well, this non-Perl moment brought to you by Macro... uh, I mean, <a href="http://slashdot.org/article.pl?sid=05/04/18/1355233&amp;tid=98">Adobe</a>.</p><p>Peace,</p><p>Jason</p><p><small>[1]: That URL will change later, so I'll come back &amp; update this journal entry when it does.</small></p> Purdy 2005-04-27T14:56:27+00:00 journal $100 Mistake http://use.perl.org/~Purdy/journal/24298?from=rss <p>This is just blowing off some steam and perhaps a warning, too.</p><p>So I ordered a Mac Mini for my wife's birthday back in February (Feb. 16th). When I ordered it, the graphic on the main page was "Now Shipping", though that all depends on your interpretation of "Now", as after I ordered, it told me it would be 2-3 weeks. I suppose it told me while I was ordering, but I was in the shopping "zone." My local Apple store didn't have any in stock, so that's why I used the Web. I also used the Web to upgrade the RAM, which the local Apple store would charge extra for.</p><p>Anyway, during the purchase, they were giving a printer away for free (after rebate). So I tacked it onto the order, thinking, "Ok, cool -- a free printer." I also choose to pay for expedited shipping and to have the order items shipped as soon as possible (again, hoping to get things in place for Casey's birthday).</p><p>The next day, the printer, the AppleCare Protection Plan and Keyboard/Mouse arrive. That same day, the Apple store calls to tell me they have a Mac Mini in stock, if I want it. D'oh! Meanwhile, the Web store still tells me 2-3 weeks. So I resort to presenting Casey w/ the accessories and a mock-up of the computer (I made one out of cardboard, to spec).</p><p>Casey was disappointed that it wasn't all in place, but she was a good sport. Meanwhile, my frustration and disappointment is mounting. Finally, I can't stand it and I go to the local Apple store, buy a stock Mini, cancel the Web order and get Casey going.</p><p>So I prepare the rebate. Here's the pinch: in order to qualify for the rebate, the purchases must be done at the same time and appear on the same receipt. I figure how technical can that be? I mean, I feel like I've honored the agreement by buying the qualifying products. So I cut out the UPC codes from the packaging, fill out the form and include everything in an envelope.</p><p>A few weeks later, I get a letter from Apple (this Apple is from South Bend, Indiana<nobr> <wbr></nobr>;)) saying they couldn't verify my purchase. So I figure they're onto my game. So I resort to writing a letter explaining everything and hope for the best.</p><p>Nope.</p><p>I receive another letter that says that since I didn't buy them at the same time and they don't appear on the same receipt, they wouldn't honor the deal.</p><p>So I call them and talk to a very non-helpful person. I figure that's gotta be a tough job and I resolve myself not to express any anger or frustration on the phone (maybe that didn't help). Anyway, she sticks to the party line, offers no further explanation. I ask if I could return the printer and she says she doesn't deal w/ returns -- she's just a rebate person. I ask if I can get my UPC codes back (badge of honor!) and she says no, they become property of Apple upon submission. Note that it doesn't say that in the nitty-gritty details of the rebate and that's a weaker argument since they're not really using them in the first place. More like they tossed them.</p><p>Last night, we decided to end up keeping the printer. I made the comment that it was better to spend $100 on something than the $30[1] on nothing.</p><p>Several times during writing this post, I wanted to scrap the whole thing, it makes me pretty mad. But hopefully, this will be cathartic to my system, and I won't want to scream everytime I see the printer. Hopefully this could be an example or lesson for others, too -- though you probably wouldn't have done what I did.</p><p>It's also pretty interesting that Casey hated the transition initially, but I've heard her say several times now "I love my computer" -- music to my ears.<nobr> <wbr></nobr>:)</p><p>Peace,</p><p>Jason</p><p><small>[1]: I figure I could sell it on eBay to recoup some of the cost, but end up leaving about $30 (or so) difference.</small></p> Purdy 2005-04-20T16:33:43+00:00 journal Life as I know it... http://use.perl.org/~Purdy/journal/24012?from=rss <p>Just so folks don't think I'm dead or anything..<nobr> <wbr></nobr>;)</p><p>Work (&amp; life, too) has been keeping me <b>very</b> busy. I've been picking up Flash &amp; ActionScript lately, for a work project where we're making an "interactive media" piece (read: audio slideshow). What's cool about it is that I'm writing it to be dynamic such that the production department can roll out new slideshows by just putting together the mp3, jpegs and an XML file to tie it all together. I'll post a link once we go live, though most folks here may not find it that interesting (the subject matter -- well, perhaps the technology as well<nobr> <wbr></nobr>;)).</p><p>I recently went up to NYC for a seminar on Online Revenue Strategies (for B-to-B publishers). That's always a thought-provoking event and my head is still swimming from ideas. Next time I go, I need to ping the <a href="http://www.plusthree.com/">PlusThree</a> folks - it'd be neat to meet them.</p><p>My reading as a whole has scaled back a lot, because I've been picking up crossword puzzles. I'm starting to lay off those for a while and pick reading back up - just finished a bad airplane book (<a href="http://www.amazon.com/exec/obidos/ASIN/0446532967">Double Homicide</a>) and I have <a href="http://www.amazon.com/exec/obidos/ASIN/0156027321">Life of Pi</a> coming up next.</p><p>On a cool note, I've had 3 papers accepted by <a href="http://www.apachecon.com/">Apachecon Europe</a>, including the tutorial that was cancelled last year. So I'm looking forward to presenting those... should be fun. I'm also taking the opportunity to learn German, thanks to <a href="http://www.dw-world.de/dw/0,1595,2548,00.html">these free MP3's</a> from Deutsche Welle.</p><p>Peace,</p><p>Jason</p> Purdy 2005-04-04T21:22:19+00:00 journal These have to be fake... http://use.perl.org/~Purdy/journal/23439?from=rss <p><a href="http://www.bigdandbubba.com/nicknacks/color_photo_was_invented_in.htm">Right?</a></p><p>I'm just thinking that it's one of those groups that reenact history.</p> Purdy 2005-03-01T13:48:48+00:00 journal Unequal Justice http://use.perl.org/~Purdy/journal/22897?from=rss <p> <b> <a href="http://news.bbc.co.uk/2/hi/entertainment/4208033.stm">Stockard Channing arrested for DUI.</a> </b> </p><p>Seeing this kind of thing really ticks me off b/c it's just another slap in our face in terms of how justice in this country is dependent on the defendent. If I, an average Joe, were facing DUI charges, I guarantee I would be doing some jail time. But celebrities can just about get away with murder (OJ, anyone?).</p><p>So I have a few questions:</p><ul> <li>Why are we finding out this now?</li><li>What will Ms. Channing receive for her crime?</li></ul><p>It got me to thinking of two other cases that came to mind:</p><p> Nick Nolte - DUI - <a href="http://www.thesmokinggun.com/archive/nnolte1.html">Charged on Sept. 11th, 2002</a>. <a href="http://archives.cnn.com/2002/LAW/12/12/nick.nolte.plea/">Plead no contest on Dec. 12, 2002</a> and was sentenced to 3 years probation and a 90-day substance abuse program. If he was convicted, he would have faced up to 6 months in jail. </p><p>Rebecca Gayheart - Struck &amp; Killed a 9 year old boy with a borrowed Jeep in June 2001. <a href="http://www.rebecca-gayheart.com/new.shtml">Ended up</a> pleading no contest to a charge of vehicular manslaughter in November 2001 and had her licence suspended for a year, received a $2,800 fine and was ordered to do 750 hours of community service. Her attorney claimed she did not receive any special treatment due to her celebrity. Yeah, right... </p><p>It also brings up the death penalty. In my state, it is inconsistently sought by the prosecutors and seems to be based on whether the defendent can afford a good/competent defense attorney. There seems to be a correlation between death sentences and lower income areas in our state. </p><p> IMO, the point of justice is to make sure the offender (once proven guilty) cannot repeat the offense. I'm not necessarily pushing jail time, but in the case of these celebrities and their poor driving records, let's revoke their licenses altogether. It's not like they can't afford chauffeurs and it would help make sure there's not a repeat situation (well, not absolutely, but enough for my comfort). </p><p>Peace,</p><p>Jason</p> Purdy 2005-01-26T18:23:48+00:00 journal 3 More Books Down http://use.perl.org/~Purdy/journal/22889?from=rss <p>Polished off three more books so far this month:</p><ul> <li>"Snow Falling on Cedars", by by David Guterson</li><li>"Vertical Run", by Joseph Garber</li><li>"Reckless Abandon", by Stuart Woods</li></ul><p> "Reckless Abandon" was a wreck. Formulaic dialogue and plots<nobr> <wbr></nobr>... easy read<nobr> <wbr></nobr>... one of those plane ride books. </p><p> "Vertical Run" was a little stronger. Kinda reminded me of Die Hard. The book was published in 1995 and on the book jacket it said the movie rights were sold, but I don't think that ever came to fruition (at least a movie by the same title). </p><p> "Snow Falling on Cedars"<nobr> <wbr></nobr>... well, what can I say about this book? It took me a month to wade through it. It was a slow starter, but beautifully-written. The phrase "tendrils of snow" will remain etched in my head as a powerful example of imagery. </p><p>I'd say out of the four books I've read this month so far, that "Captain Saturday" remains the top one - a well-written book that makes you think on the priorities in your life. Also upon the way you've constructed things and how life can be fragile and challenging (would you have the guts to rebuild your life if it was taken away from you?). </p><p>Got two more books in my queue: "Code to Zero", by Ken Follett [NOT a coding book] and "Life of Pi", by Yann Martel.</p><p>Peace,</p><p>Jason</p> Purdy 2005-01-26T04:07:15+00:00 journal Firefox Rant http://use.perl.org/~Purdy/journal/22770?from=rss <p>Just one annoying feature -- when I right-click on the live bookmarks to force-refresh them, I'm only one slight-of-hand mistake away from the 'Sort By Name' function. Which means that I have to reorganize my bookmarks again (no quick undo).</p><p>Peace,</p><p>Jason</p> Purdy 2005-01-18T13:33:21+00:00 journal Book Review: "Captain Saturday", by Robert Inman http://use.perl.org/~Purdy/journal/22740?from=rss <p>Lately, I've been outsourcing my library book selection to my wife, mostly because I'm usually staying at home with Meredith at the time. This has had the additional benefit of reading books that I wouldn't necessarily look at to begin with. She has an uncanny knack of picking books that I enjoy (e.g. "Zenith Angle", by Bruce Sterling and some Brad Meltzer thrillers).</p><p>The latest book she picked was "Captain Saturday", which was written by a local author and set in my neck of the woods, both in terms of where I am now (Raleigh) and where I grew up (Pender County and the rest of southeast NC). So these "hooks" were appealing, but this is a great book for others, as well.</p><p>This book is very well-organized, flowing through the main character's (Will Baggett) life in a Pulp Fiction-esque style. As a matter of fact, this was one book that I could see made into a movie (and would love to see it done, too!). Robern Inman also develops the character into a very sympathic one &#8211; one that I could identify with.</p><p>The story is a great inspection of Will's life. Will has constructed a life as the most popular weathercaster in Raleigh and when life throws him some major curves and Will takes a few self-destructive steps, his life becomes derailed. His cousin Wingfoot (what a great name) arrives, plucks him from the mayhem and places him on a path of self-discovery and proper prioritization.</p><p>My only gripe about the book is that the ending could have been longer &#8211; I wanted to know more (What happened with his wife? What did he mean by resuming "Captain Saturday"?). A great book and recommended read. I'd love to see this in a movie, though I'd be scared of the typical treatment Hollywood gives us Southerners.</p><p>Peace,</p><p>Jason</p> Purdy 2005-01-17T00:06:02+00:00 journal 2004 In Review http://use.perl.org/~Purdy/journal/22519?from=rss <p> I liked <a href="/~spur/journal/22517">spur's year-end review</a> so much, I decided to do one, myself. An excellent way to reflect upon where you've been and also to keep yourself moving forward for next year. </p><p> <b>Programming/Professional</b> <br> I have continued to evolve my understanding and techniques of Web development, strengthening my usage of CGI::Application, picked up CGI::Session (instead of passing along tons of hidden variables) in the form of a CGI::Application plugin, and I've even made <a href="http://search.cpan.org/~purdy/">some contributions to CPAN</a> this year. I also attended the LPW and I've learned a lot from that experience. I have even dabbled in test-driven development, though I'm still uncertain how best to test web apps. </p><p> I also attended <a href="http://www.americanbusinessmedia.com/">ABM's</a> first annual "roundtable" on what other publishers are doing with the internet, which was very eye-opening. I hope to attend the next one and bring my boss with me for future inspirational ideas. </p><p> <b>Reading</b> <br> I should keep better notes on what I've read - I will do so in the future. So here's a loose collection of books that I have read, in no order and hopefully correct (I may have read a few of these in '03): </p><ol> <li>"Snow Crash", by Neal Stephenson</li><li>"Diamond Age", by Neal Stephenson</li><li>"Shutter Island", by Dennis Lehane</li><li>"dot.bomb", by J. David Kuo</li><li>"Relic", by Douglas Preston, Lincoln Child</li><li>"Brimstone", by Douglas Preston, Lincoln Child</li><li>"Prey", by Michael Crichton</li><li>"Magician: Apprentice", by Raymond Feist</li><li>"Magician: Master", by Raymond Feist</li><li>"Darkness at Sethanon", by Raymond Feist</li><li>"Silverthorn", by Raymond Feist</li><li>"Deception Point", by Dan Brown</li><li>"Digital Fortress", by Dan Brown</li><li>"Mount Dragon", by Douglas Preston, Lincoln Child</li><li>"Riptide", by Douglas Preston, Lincoln Child</li><li>"Thunderhead", by Douglas Preston, Lincoln Child</li><li>"The Ice Limit", by Douglas Preston, Lincoln Child</li><li>"The Cabinet of Curiosities", by Douglas Preston, Lincoln Child</li><li>"Still Life with Crows", by Douglas Preston, Lincoln Child</li><li>"Rule of Four", by Ian Caldwell, Dustin Thomason</li><li>"The Eternity Code (Artemis Fowl, Book 1)", by Eoin Colfer</li><li>"The Arctic Incident (Artemis Fowl, Book 2)", by Eoin Colfer</li><li>"The Zenith Angle", by Bruce Sterling</li><li>"The Power of Persuasion : How We're Bought and Sold", by Robert V. Levine</li></ol><p> <b>Personal</b> <br> 2004 has been a great year, personally. Meredith has been a great addition to our family. I also started the South Beach Diet back on Labor Day and to date, have lost 42 pounds. I also feel great and my physical health has been confirmed as much, too. </p><p> <b>Successes</b> <br> Well, again, Meredith and the diet have been great successes for 2004. Meredith is healthy and there's much to be grateful for - we are so blessed with her.<nobr> <wbr></nobr>:) I'm also proud that we have already accomplished her college fund, which is a nice preparation for what's to come, 18 years from now. I also received a great review from $WORK and so my professional life is looking good, too. </p><p> I've also been able to streamline/reduce our expenses, both by accommodating our new lifestyle w/ Meredith and also by tailoring our lifestyle to synchronize with right prioritizations. For example, I was able to reduce our Cable bill in half (from $80/m to $40/m) by reducing Standard Cable to Basic Cable (basically, broadcast channels and a few others). They also reduced my Cable Internet bill when I threatened to drop them for a cheaper DSL service (they matched the price!). I also eliminated our cell phone bills by switching both my wife &amp; I to prepaid cells, given that our usage is spare. So now instead of $70/m for cellphones, it's more like $10/m (and that's for both of us). So I'm really proud of trimming that fat from our monthly budget. I'm currently working on other fronts, too. </p><p> Another thing I'm proud of is that I've read more books than visits to the movie theater. I think I must have been to the movies five times or less - the Incredibles, the Harry Potter movie and Spiderman 2. I think that's it. </p><p> Also, I was able to get an article published (by O'Reilly, no less!), reviewing ActiveState's Komodo. </p><p> <b>Failures</b> <br> I'm not scared to admit my failures for 2004, either. I wasn't able to execute on two fronts - with the ApacheCon conference talk and a book-writing endeavour with Apress Books (on Perl/WebDev). I don't think that's really bad, mind you -- it kept me home from travels and sane from book-writing, but I do hate to disappoint others. Bill Cosby's quote comes to mind: <i>"I don't know what the secret to success is, but the secret to failure is trying to please everyone."</i> </p><p> So I guess they're not really failures, or at least I don't see them as such. Moreso that they are my true (and imo, right) prioritizations taking root. </p><p> Speaking of prioritizations, one true failure has also been involved with what should be a top priority, with my belief in God and slipping away from Him and His Church. It is much harder to deal with going to Church when you'd like to spend time at home with Meredith, sleep in or just not deal with the Nursery, etc. </p><p> <b>2005 Goals</b> <br> Here are my goals for 2005, in no particular order: </p><ul> <li>Maintain Weight (never go above 218)</li><li>Read (and keep track of) 20 (or more) books</li><li>Plan Out Publishing Tools Effort (Open Source vs. not, business plan, etc)</li><li>Reinvest more time with Church</li><li>Continue to streamline expenses</li><li>Build a MythTV Boxen</li><li>Keep evolving WebDev Expertise (including test-driven dev)</li></ul><p>Peace,</p><p>Jason</p><p> <small> <b>Note:</b> I may update this post later as other thoughts come to mind... </small> </p> Purdy 2004-12-31T16:14:33+00:00 journal DBD::mysql problems http://use.perl.org/~Purdy/journal/22469?from=rss <p>Anyone have DBI or DBD::mysql change on 'em? All of a sudden (and it may have something to do w/ upgrading mysql, etc), my fetchall_arrayref doesn't work... instead of this: </p><p> <code> $sth = $dbh-&gt;prepare( 'SELECT id,name FROM countries' );<br> $sth-&gt;execute();<br> # useful for: $template-&gt;param( 'countries' =&gt; $sth-&gt;fetchall_arrayref( {} ) );<br> $arrayref = $sth-&gt;fetchall_arrayref( {} ); </code> </p><p>Outputting this:</p><p> <code> $VAR1 = {<br> 'name' =&gt; 'US',<br> 'id' =&gt; '1'<br> };<br> $VAR2 = {<br> 'name' =&gt; 'CANADA',<br> 'id' =&gt; '2'<br> };<br> </code> </p><p>It outputs this:</p><p> <code> $VAR1 = {<br> '' =&gt; 'US',<br> '#B' =&gt; '1'<br> };<br> $VAR2 = {<br> '' =&gt; 'CANADA',<br> '#B' =&gt; '2'<br> };<br> </code> </p><p>ARG!!!!</p><p>Peace,</p><p>Jason</p><p>&nbsp;</p><p> <small> <b>Update:</b> Nevermind -- I hard-restarted the mysqld and apache and that seemed to fix the problem. Odd...</small></p> Purdy 2004-12-27T14:19:17+00:00 journal