<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:calvin42</id>
  <title>Calvin</title>
  <subtitle>Calvin</subtitle>
  <author>
    <name>Calvin</name>
  </author>
  <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom"/>
  <updated>2009-07-25T14:07:10Z</updated>
  <lj:journal userid="639559" username="calvin42" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://calvin42.livejournal.com/data/atom" title="Calvin"/>
  <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:243741</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/243741.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=243741"/>
    <title>Erin Andrews peep hole video</title>
    <published>2009-07-25T14:07:10Z</published>
    <updated>2009-07-25T14:07:10Z</updated>
    <content type="html">Find it here: &lt;a href="http://video.google.com/videosearch?q=erin andrews peep.hole video" title="Erin Andrews Peephole Video"&gt;google video search&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Invasion of privacy, yes.  Criminal, yes.  Incredibly hot, yes.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:243539</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/243539.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=243539"/>
    <title>Cheap Two-Bit Tramp</title>
    <published>2009-07-08T20:30:32Z</published>
    <updated>2009-07-08T20:30:32Z</updated>
    <content type="html">&lt;a href="http://pwfisher.com/img/lj/2009/07/cheap-two-bit-tramp.png" title="See the Invitation for the Doctor and the Cheap Two-Bit Tramp"&gt;&lt;img src="http://pwfisher.com/img/lj/2009/07/cheap-two-bit-tramp.png" style="width:100%" alt="Cheap Two Bit Tramp" /&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:243268</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/243268.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=243268"/>
    <title>calvin42 @ 2009-07-08T11:24:00</title>
    <published>2009-07-08T18:26:46Z</published>
    <updated>2009-07-08T18:26:46Z</updated>
    <content type="html">&lt;a href="http://www.amazon.com/gp/product/1430224150?ie=UTF8&amp;amp;tag=pwfishercom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1430224150"&gt;Dive Into Python 3&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=pwfishercom-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1430224150" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; by Mark Pilgrim&lt;br /&gt;&lt;br /&gt;Coming Sept. 28, this looks good.  Targeted at experienced programmers, the previous edition was popular.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:243165</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/243165.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=243165"/>
    <title>calvin42 @ 2009-07-07T23:00:00</title>
    <published>2009-07-08T06:00:58Z</published>
    <updated>2009-07-08T06:00:58Z</updated>
    <content type="html">&lt;a href="http://www.amazon.com/gp/product/0563494212?ie=UTF8&amp;amp;tag=pwfishercom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0563494212"&gt;The Complete Hitchhiker's Guide to the Galaxy: Radio Show&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=pwfishercom-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0563494212" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:242699</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/242699.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=242699"/>
    <title>Strip Tags in Javascript</title>
    <published>2009-06-30T19:45:04Z</published>
    <updated>2009-06-30T19:57:25Z</updated>
    <category term="javascript strings prototype regex"/>
    <content type="html">The example google found for me was a little ugly and slightly wrong, so here's my version:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;
/**
 * STRIP TAGS
 */
function stripTags(str){
    return str.replace(/(&amp;lt;[^&amp;gt;]+&amp;gt;)/g,'');
}
&lt;/pre&gt;&lt;/code&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:242604</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/242604.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=242604"/>
    <title>calvin42 @ 2009-06-30T11:40:00</title>
    <published>2009-06-30T18:42:29Z</published>
    <updated>2009-06-30T18:42:29Z</updated>
    <content type="html">Google Chrome options dialog tabs: "Basics", "Minor Tweaks", "Under the Hood".  Smart.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:242220</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/242220.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=242220"/>
    <title>I coded myself out of a job once</title>
    <published>2009-06-27T22:20:20Z</published>
    <updated>2009-06-27T22:20:20Z</updated>
    <content type="html">No shit: I wrote a computer program to do the job that I was hired to do.&lt;br /&gt;&lt;br /&gt;I had several weeks, at least, remaining on my contract, but I got bored doing repetitive data entry shit that required no thought.  So I learned the scripting language for that particular environment (specific to the banking industry) and automated the work.&lt;br /&gt;&lt;br /&gt;In a few hours, I found myself without anything from my original contract remaining to be done.  It wasn't a great time to render myself redundant at that particular company.  The name was Countrywide.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:241512</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/241512.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=241512"/>
    <title>That's Why Mommy Left Us</title>
    <published>2009-06-14T22:43:07Z</published>
    <updated>2009-06-14T22:43:07Z</updated>
    <content type="html">&lt;lj-embed id="2" /&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:241379</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/241379.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=241379"/>
    <title>Not sure how to describe it, but I recommend it: michaelpyro radio</title>
    <published>2009-06-14T22:14:47Z</published>
    <updated>2009-06-15T05:17:37Z</updated>
    <content type="html">&lt;a href="http://www.youtube.com/watch?v=hBVJHdx9dnI"&gt;KZUU 90.7FM Pullman sex at the barbers mail order welfare moms.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;lj-embed id="1" /&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:240749</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/240749.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=240749"/>
    <title>It's not too late, Khamenei</title>
    <published>2009-06-13T18:16:07Z</published>
    <updated>2009-06-30T19:51:21Z</updated>
    <content type="html">Dear Ayatollah Khamenei,&lt;br /&gt;&lt;br /&gt;I am writing this open letter to urge you to consider the best interests of your people and the people of the whole world.  Please declare that the recent election results must be reexamined and the results may have to be restated.  Please uphold the principles of justice, equality and individual liberty.  Please listen to what your people are telling you.  These ideals are not un-Islamic, but suicide attacks are.&lt;br /&gt;&lt;br /&gt;Ahmadinejad may fervently believe, but so did George Bush.  Both Bush and Ahmadinejad were dogmatic, probably noble at heart, but stubbornly unable to adapt to the realities we face.  If you did hate Bush on the one hand, how can you support Ahmadinejad on the other?&lt;br /&gt;&lt;br /&gt;In our country, we have resoundingly called for change.  Despite an opponent that was legitimately progressive, dissident, and, for chrissake, a true blue war hero -- a Republican you'd vote for if there ever was one -- our people disapproved of Bush Jr. so greatly that we still went with the ultimate anti-establishment figure: a demagogic, socialist, moving and inspiring young black man. Our generation's Martin Luther King.&lt;br /&gt;&lt;br /&gt;Our price for this may be big government and crushing debt, but there is a price to pay for following your ideals.  I can't recall the last time I voted for a democrat, before Obama.  I am not 100% certain his economic policies are the best solution.  But I am certain that he is the man I want to represent me.&lt;br /&gt;&lt;br /&gt;For one thing, he does not believe so fervently that he is not open to change.  I also believe that he will feel the pressure I imagine George Washington must have felt -- the need to be an example, to set precedent, to be the best possible leader, even at great personal cost.  Obama must be powerfully motivated by his status as the first black president to give every ounce of effort he can, to never falter in will nor waver in courage.  I believe he has good judgment and a sound mind of unusual power.  I also suspect that much the same can be said of Mousavi.&lt;br /&gt;&lt;br /&gt;The rule of law and individual liberty will benefit us all.  That is the American interest here: we want to live in a peaceful and prosperous global society, especially in these &lt;a href="http://en.wikipedia.org/wiki/Damocles"&gt;Damoclean&lt;/a&gt; times.&lt;br /&gt;&lt;br /&gt;We feast at the table while our fields wither into dust.  The simultaneous and critical threats of climate change, exhaustion of natural resources and frightening demographic imbalances -- in short, everything detailed by &lt;a href="http://www.amazon.com/gp/product/0143114875?ie=UTF8&amp;amp;tag=pwfishercom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0143114875"&gt;Jeffrey Sachs&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=pwfishercom-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0143114875" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; -- present unprecedented threats.  We have enough natural threats without adding human threats.&lt;br /&gt;&lt;br /&gt;The coming century may be one of great death due to hunger, disease and natural disasters.  Let's not add the burden of religious hatred and violent conflict.  Let's get more butter and fewer guns, fund those worthy social programs that so desperately need it, and allow the people to elect their government.  Trust the wisdom of your people.  Iran has been a great nation and has a proud history of high civilization.  Why can it not be so again?&lt;br /&gt;&lt;br /&gt;Obama and Mousavi are each men of great intellect, noble purpose and true integrity.  Please simply call for a de novo review of the recent election results in a fair court of law with appropriate jurisdiction.  You can borrow one of ours in &lt;a href="http://en.wikipedia.org/wiki/The_Hague#International_organisations"&gt;The Hague&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Do you really think Mahmoud Ahmadinejad is the kind of guy who should be allowed to be above the law?  The American people didn't think George Bush was.  That's why we elected a -- get this -- a &lt;i&gt;constitutional law professor&lt;/i&gt; to the &lt;i&gt;Presidency&lt;/i&gt;. It was time to rein in the executive branch, which had grabbed too much power.  So we voted for a man who would truly uphold the Constitution.&lt;br /&gt;&lt;br /&gt;Please bring justice to Iran, Mr. Khamenei, and lead with us to a brighter future for the entire world.  Please call for a de novo review of the recent election results before a fair and independent tribunal.  I fear there may be bloodshed otherwise.&lt;br /&gt;&lt;br /&gt;I hope this letter finds you, and finds you well.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Calvin</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:240489</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/240489.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=240489"/>
    <title>Review: Paul Blart, mall cop</title>
    <published>2009-06-12T17:26:47Z</published>
    <updated>2009-06-12T17:26:47Z</updated>
    <content type="html">&lt;a href="http://www.amazon.com/gp/product/B001NPD9RM?ie=UTF8&amp;amp;tag=pwfishercom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B001NPD9RM"&gt;Paul Blart: Mall Cop&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=pwfishercom-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B001NPD9RM" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;br /&gt;I suppose it was fairly enjoyable.  The girl was cute enough, the acting was decent and the production values were good, but the writing was lackluster.&lt;br /&gt;&lt;br /&gt;What really bothered me was the fact that he never picked up a gun when he had the chance.  There was a sporting goods store, for chrissake.  He would probably have had an arsenal at his disposal.  Failing that (say, the bad guys had secured that store) there would surely have been any number of scissors and box cutters in offices and store rooms, not to mention the vast array of cutlery available in any food establishment.  Maybe even better would be an improvised club from a mannequin rack.  Hell, my local mall has a knife shop -- he could have had a fucking samurai sword (though I think I'd go for a combat knife, so I can catch the falling body after I stab him in the heart -- gotta be quiet when you're outnumbered and behind enemy lines).  I mean, come on.  If you're gonna be in a life and death struggle, get yourself a deadly weapon, dammit!  And a segway doesn't count.&lt;br /&gt;&lt;br /&gt;I guess you have to be a kid to enjoy this; I found it unbearably silly.  This is sad; I'm too young to be a curmudgeon already.  But I can't help it, this movie just wasn't quite good enough to take me along for the ride.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:240179</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/240179.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=240179"/>
    <title>Sleek Audio + Kleer wireless = a match made in heaven</title>
    <published>2009-06-12T03:07:23Z</published>
    <updated>2009-06-13T16:18:07Z</updated>
    <content type="html">I love &lt;a href="http://www.amazon.com/gp/product/B001UHS0JK?ie=UTF8&amp;amp;tag=pwfishercom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B001UHS0JK"&gt;my new wireless headphones&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=pwfishercom-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B001UHS0JK" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;. I have been through half a dozen pairs this year, and I LOVE these. I may even have audiophile standards, I'm not sure. Certified audiophiles agree, though, that these are top-notch. You can even physically adjust the bass and treble response of the earbuds; I did this, and really appreciate the benefit of this individual tuning.&lt;br /&gt;&lt;br /&gt;I was killing set after set of headphones because I sit in a rolling chair and can't sit still. The cord would get yanked apart again and again, until it couldn't take anymore.&lt;br /&gt;&lt;br /&gt;So I went wireless. Being an idiot, I tried a bluetooth headset first. The sound quality is absolutely atrocious. Only acceptable for phone calls. But the Kleer wireless technology changed all that. It's CD quality, you'll never know the difference. Until you start to walk around, of course, and you can listen in the next room to crystal clear sound.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/B001UHS0JK?ie=UTF8&amp;amp;tag=pwfishercom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B001UHS0JK"&gt;SA6 and the W-1 Wireless Bundle Kit&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=pwfishercom-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B001UHS0JK" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;br /&gt;The batteries last about 8 hours and recharge pretty fast. I often wear them 16 hours a day or more, and I find them very comfortable. Worth the money.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:240070</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/240070.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=240070"/>
    <title>The "Puss, Puff, Pass" Approach</title>
    <published>2009-06-12T02:17:11Z</published>
    <updated>2009-06-12T02:17:11Z</updated>
    <content type="html">Here's a snippet of javascript I wrote today.  This will help me to use a single form in a multiple step process (registration) and in a single step (editing an existing account). When I refactored it to eliminate code duplication, I came up with a neat little strategy which I call the "puff, puff, pass" approach.  See the middle part of Account_form.validateStep():&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;
var Account_form = function(){
    return {

        /**
         * VALIDATE FORM
         */
        validateForm : function(){

            Account_form.validateStep('all');
        },

        /**
         * VALIDATE STEP
         *
         * @param mixed i Which step to validate, or all of them. Valid inputs: { 1, 2, 3, 4, 'all'}.
         */
        validateStep : function(i){

            var errorMessages                = new Array();
            response.showProcessingMessage('Validating form');

            // "puff, puff, pass" (when i = 'all')
            if (i == 1 || i == 'all'){
                errorMessages.concat(Account_form.validateStepOne(errorMessages));
            }
            if (i == 2 || i == 'all'){
                errorMessages.concat(Account_form.validateStepTwo(errorMessages));
            }
            if (i == 3 || i == 'all'){
                errorMessages.concat(Account_form.validateStepThree(errorMessages));
            }
            if (i == 4 || i == 'all'){
                errorMessages.concat(Account_form.validateStepFour(errorMessages));
            }

            if (errorMessages.length &amp;gt; 0){
                Notice_overlay.clear();
                Notice_overlay.title        = "There were some problems submitting your form";
                Notice_overlay.subtitle     = "The following errors were encountered:";
                Notice_overlay.details      = errorMessages;
                Notice_overlay.error();
                return false;
            } else {
                return true;
            }
        },


        /**
         * VALIDATE STEP ONE
         *
         * Step one: username, password, retyped password, email
         */
        validateStepOne : function(errorMessages){

            // Validate username
            field                           = $('input[name="Account|username"]').get(0);
            state                           = Account_form.validateUsername(field);
            if (state == 'required'){
                errorMessages.push('Username is empty');
            } else if (state == 'error'){
                errorMessages.push('Username is invalid');
            }

            // Validate password
            state = Account_form.validatePassword();
            if (state != 'ok'){
                errorMessages.push('Password is invalid');
            }

            // Validate email
            field                           = $('input[name="ContactInfo|email1"]').get(0);
            isRequired                      = true;
            state                           = Account_form.validateEmail(field,isRequired);
            if (state == 'required'){
                errorMessages.push('Email address is required');
            } else if (state == 'error'){
                errorMessages.push('Email address is invalid');
            }

            return errorMessages;
        },

         *** (other class code omitted) ***
}();
$(document).ready(Account_form.init);

&lt;/pre&gt;&lt;/code&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:239375</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/239375.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=239375"/>
    <title>glad to be an American, where at least I know I'm free</title>
    <published>2009-06-07T18:40:36Z</published>
    <updated>2009-06-07T18:40:36Z</updated>
    <content type="html">Some days you just wake up proud and grateful to be an American.  Our government is far from perfect (it can't quite stop itself from using the blank check on China's account) but I know we run a true meritocracy (or just about as close as society has ever gotten).  Witness Barack Obama.  A black man who is truly competent and lives up to his potential can actually grow up to be the President of the United States.  We mean what we say about equality, diversity, justice and opportunity.&lt;br /&gt;&lt;br /&gt;Every day -- or, more precisely, every time I hear him speak -- I'm loving Obama more and more.  I almost always vote Republican but I voted for Barack this time and I don't regret it.  I'm not 100% sure the current economic policies will save us, but I am grateful for his strong leadership and ability to legitimately restore the self respect and moral leadership of our nation and for ourselves and for the world.&lt;br /&gt;&lt;br /&gt;The challenges that face us in the coming century are up as serious as another world war, cold war, or great depression.  (In fact, if you consider Islam, we *do* have a world war going on -- a culture war that regularly leads to violent conflict, just like Fascism and Communism.)  I'm reading Jeffrey D. Sachs' &lt;a href="http://www.amazon.com/gp/product/0143114875?ie=UTF8&amp;amp;tag=pwfishercom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0143114875"&gt;Common Wealth: Economics for a Crowded Planet&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=pwfishercom-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0143114875" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;.  I picked it up at the UN bookstore.  Some seriously scary shit.  Makes me want to buy a Prius and survival gear and head for the hills.  And a gun.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:239110</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/239110.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=239110"/>
    <title>Air France Flight 447</title>
    <published>2009-06-06T17:14:54Z</published>
    <updated>2009-06-06T17:27:41Z</updated>
    <content type="html">Nobody knows how it went down.  More and more, the wild-eyed ideas seem plausible -- it was hijacked by terrorists and the first thing they did was cut the communications link; they just had to pull the right plug or snip the right wire, right?  They were in unmonitored (by radar) intercontinental airspace the last we saw them.  Well, where could they have gotten to with the amount of fuel on that plane?  Are U.S. spy satellites checking likely destinations for a wayward Air France jet?  Hell, it could be in Liberia.  Anybody look there yet?  Maybe it's already stopped in Colombia for a load of cocaine, and it's headed for Topeka with a new paint job.  The sky's the limit for the possibilities here.  So to speak.&lt;br /&gt;&lt;br /&gt;Maybe it's in Libya in a jumbo chop shop, yielding its technological secrets under the dissecting knife.  Secrets soon to be shared with other rogue states.  Just the sort of working example you'd want to provide some guidance for your own teams trying to perfect the art of intercontinental ballistic missiles.  *cough*North Korea*cough*.  It probably used some ship as an impromptu runway (a long container ship or oil tanker? are they long enough?) and sailed to Pyongyang in the cargo hold.  There have got to be shipping lanes within range, with large ships, accessible while remaining in international, unmonitored airspace.  So we have no idea where they took it, and we won't know it's gone for sure until we search the ocean floor thoroughly.  So, never.&lt;br /&gt;&lt;br /&gt;Truth?  Perhaps.  Stranger than fiction?  Definitely.&lt;br /&gt;&lt;br /&gt;I applaud the planners' cleverness in timing the assault to coincide with turbulence and a thunderstorm.  Definitely throws the dogs off the scent.  Or, maybe lightning fried something and it crashed.  No guarantee it would happen immediately, and their communications were out, so they could be pretty far from their last known location.  Like Amelia Earhart, they could stay lost for a long time.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:239056</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/239056.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=239056"/>
    <title>A rather suggestive code snippet</title>
    <published>2009-06-03T20:08:43Z</published>
    <updated>2009-06-03T20:12:22Z</updated>
    <content type="html">This is an actual bit of code from my recent work:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;    // Paid, naked and related: just how we like 'em!&lt;br /&gt;    const XTYPE_PAID                    = 1;&lt;br /&gt;    const XTYPE_NAKED                   = 3;&lt;br /&gt;    const XTYPE_RELATED                 = 4; // unused by us at this time&lt;br /&gt;&lt;br /&gt;    public $willGetPaid;&lt;br /&gt;    public $willGetNaked;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;(FYI, I'm talking about search feeds -- organic results, paid placement results, and related search terms.)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:238767</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/238767.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=238767"/>
    <title>yeehaw</title>
    <published>2009-06-01T08:24:41Z</published>
    <updated>2009-06-01T08:24:41Z</updated>
    <content type="html">My mother thinks I may need to get an x-ray. I may have broken my finger riding the mechanical bull. I think it's just a nasty-looking sprain. Just another weekend in Vegas. The wedding was a blast, a real rockabilly hoedown.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:238510</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/238510.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=238510"/>
    <title>calvin42 @ 2009-05-25T20:05:00</title>
    <published>2009-05-26T03:06:17Z</published>
    <updated>2009-05-26T03:06:17Z</updated>
    <content type="html">"There's just no sugarcoating it, the man's testicles were bleeding."  Oh, thank you, Joel McHale of The Soup, for watching that crap so I don't have to.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:238334</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/238334.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=238334"/>
    <title>Highlight keyword search terms in html output</title>
    <published>2009-05-08T06:23:13Z</published>
    <updated>2009-05-08T06:29:39Z</updated>
    <content type="html">Here is a nice little function which uses regular expressions to easily add highlighting to search terms in html output.  Useful for your own site's search feature, of course.  But you could also do things like parse the HTTP_REFERER for a search query string and highlight those terms in your page, or offer related content in a sidebar module.&lt;br /&gt;&lt;br /&gt;Using regular expressions effectively is some relatively heavy juju, I'm happy about the elegance of this solution.  I think it could be "improved" with a lookahead assertion and a lookbehind assertion.  This may perform better, though, and it's definitely simpler.  And simpler is simply better.   It's basically a one line function.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;
&amp;lt;?php
/**
 *  ... comment your code!  it makes baby jesus gurgle happylike
 */
class SearchView extends View {

    /**
     * ... yadda yadda domain specific logic ... render me a view for this model
     */

    /**
     * HIGHLIGHT SEARCH TERMS
     *
     * Highlights matches outside of HTML tags only. Preserves the case of the original text.
     *
     * @param Array $terms Search keywords to highlight.
     * @param string $body The text to parse.
     * @param string $class CSS class to apply.
     * @return string HTML with keywords highlighted
     */
    public static function highlightSearchTerms($terms, $body, $class = "highlight"){

        $body                                   = '&amp;gt;'.$body.'&amp;lt;';
        foreach($terms as $term){
            $body = preg_replace("/(&amp;gt;[^&amp;lt;]*)($term)([^&amp;lt;]*&amp;lt;)/i",
                    '$1&amp;lt;em class="'.$class.'"&amp;gt;$2&amp;lt;/em&amp;gt;$3', $body);
        }
        $body                                   = substr($body,1,strlen($body)-2);
        return $body;
    }
}
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The real key to its brevity is its use of backreferences.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:237901</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/237901.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=237901"/>
    <title>15,000 spam comments</title>
    <published>2009-05-05T08:55:36Z</published>
    <updated>2009-05-05T08:55:36Z</updated>
    <content type="html">So I left a random blog basically empty but unsecured and with comments enabled.  For two and a half years.  I finally got around to disabling comments and found that I had 15,000.  Gmail had been bundling them so it hadn't flooded me so much that I could be bothered to fix it.  100 at a time, that's only one slot in my inbox, which I check notoriously irregularly.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:237563</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/237563.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=237563"/>
    <title>Mac Mini alive again!</title>
    <published>2009-04-30T21:24:41Z</published>
    <updated>2009-04-30T21:24:41Z</updated>
    <content type="html">I had a real bad time when I killed my Mac Mini.  It was so beautiful, it had a life of such promise ahead of it.&lt;br /&gt;&lt;br /&gt;I tried to install Windows using Boot Camp and mistakenly erased and recreated the partition using the Windows install CD.  That installation failed, and I had the CD stuck in the drive and could not boot into Mac OS X.  No keystroke combination during startup worked.  I had to disassemble the damn thing to switch the CD in the drive.  Ended up doing that 3 times in my troubleshooting.  Turns out, it has to be a Mac keyboard.  I bought a Mac keyboard, but haven't opened it -- my new KVM switch can emulate a Mac keyboard, and that worked!  Hallelujah!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:237175</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/237175.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=237175"/>
    <title>calvin42 @ 2009-03-04T10:45:00</title>
    <published>2009-03-04T18:45:46Z</published>
    <updated>2009-03-04T18:45:46Z</updated>
    <content type="html">the tip of my left big toe has a persistent itch</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:236811</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/236811.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=236811"/>
    <title>Mad libs</title>
    <published>2009-02-05T02:47:41Z</published>
    <updated>2009-02-05T02:47:41Z</updated>
    <content type="html">&lt;p&gt;Actually from Mad magazine.  I wrote a little php to generate a "Dear John" letter per Mad magazine's specs.  See the result &lt;a href="http://pwfisher.com/etc/dear-john.php"&gt;here&lt;/a&gt;.  It's mildly amusing.&lt;/p&gt;

&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;code&gt;&lt;pre&gt;&amp;lt;?php
// Credit -- Mad magazine (writer: Frank Jacobs)
$libs = array();
$libs[1] = array('our romance is over','our affair is dead',&amp;quot;I'm entering a convent&amp;quot;,'I loathe you','our horoscopes clash',&amp;quot;you're a sickie&amp;quot;,'you need to bathe more',&amp;quot;I'm a streetwalker&amp;quot;,'your nostrils offend me',&amp;quot;there's a contract out for you&amp;quot;,&amp;quot;you're a schmuck&amp;quot;,&amp;quot;I'm in love with your sister&amp;quot;);
$libs[2] = array('that night','last year','skinny-dipping','tripping on tangerine seeds','last Arbor day','when you shackled me','when I saw that shrunken head','when your dwarf bit me','reciting &amp;quot;Gunga Din&amp;quot;','swapping tennis shoes','when your sheepdog went berserk');
$libs[3] = array('in your pad','in your camper','outside Poughkeepsie','under the bus','in your closet','while eating enchiladas','with Reverend Moon','in drag','at the Hare Krishna prom','on the funny farm','in a trance','with the Mondales');
$libs[4] = array('make a pass at','insult','ignore','punch out','pour syrup over','carve your initials on','tear the clothes off','apply leeches to','render impotent','yank the toupee off','sit on','exorcise');
$libs[5] = array('my best friend','my father','E.F. Hutton','my whoopee cushion','my spinach souffl&amp;amp;eacute;','Bert and Ernie','my avocado plant','my penpal in Ghana','my Franklin Mint collection','the Oakland front four','my Billy Carter statue','that crazed monk');
$libs[6] = array('man','sensitive','open-minded','ashamed','stoned','gutless','scarred','Mongol','masochistic','senile','Republican','frostbitten');
$libs[7] = array(&amp;quot;how miserable I've been&amp;quot;,'what a bore you are','your Datsun sucks','your acne is terminal',&amp;quot;I've had a sex change&amp;quot;,'there is no Mid-East solution',&amp;quot;we're first cousins&amp;quot;,'there is no Santa Claus',&amp;quot;I'm allergic to your hamster&amp;quot;,'I dig sanitation men',&amp;quot;that I'm bionic&amp;quot;,'that &amp;quot;the Gong Show&amp;quot; stinks');
$libs[8] = array('your ring','your love-letters','your Darth Vader poster','your pet rock','to the commune','those slides of Altoona','your dentures','to sleeping around','our matching Snoopy bibs','your Bicentennial truss','to Saturn','your bag of immies');
$libs[9] = array('your photo','those oil stocks','my virginity','your neighbor Ralph','the results of the blood-test','your left ear','your suicide note','your mother','my sanity','your ant colony','your police record',&amp;quot;Murray's leotards&amp;quot;);
$libs[10]= array('always treasure','never forget','try to blot out','inform the I.R.S. about','always feel unclean about','never scoff openly at','make a movie based on','tell the &amp;quot;Enquirer&amp;quot; about','inform the asylum about','get nauseous thinking of','tell my priest about','be a lot better off without');
$libs[11]= array('friendship','senility','new life as a clone','Eskimo incarnation','capo Angelo','cocaine habit','passion for fieldmice','Jackie Mason imitations','embarassing rash','eggplant fetish','screwing up World War II','hatred of Tampa');
$libs[12]= array('Fondly','Sincerely','Painfully','Eat your heart out','With disgust','With great relief','Up yours','Your undying enemy','Best to your frog Leonard','Now bug off','Good luck on your parole','Regards to your creepy family');
$lib = array(); for ($i=1;$i&amp;lt;=12;$i++){ $lib[$i] = $libs[$i][array_rand($libs[$i])]; }
echo '&amp;lt;p&amp;gt;Dear John:&amp;lt;/p&amp;gt;',PHP_EOL,PHP_EOL,&amp;quot;&amp;lt;p&amp;gt;I don't know quite how to tell you this, but &amp;quot;,$lib[1],&amp;quot;.  I think I first knew it &amp;quot;,$lib[2],&amp;quot; &amp;quot;,$lib[3],&amp;quot;, and I saw you &amp;quot;,$lib[4],&amp;quot; &amp;quot;,$lib[5],&amp;quot;.  I'm sure you're &amp;quot;,$lib[6],&amp;quot; enough to see &amp;quot;,$lib[7],&amp;quot;.&amp;lt;/p&amp;gt;&amp;quot;,PHP_EOL;
echo &amp;quot;&amp;lt;p&amp;gt;I'm returning &amp;quot;,$lib[8],&amp;quot;, but I'm holding on to &amp;quot;,$lib[9],&amp;quot; as a keepsake.  I want you to know that I'll &amp;quot;,$lib[10],&amp;quot; your &amp;quot;,$lib[11],&amp;quot;.&amp;lt;/p&amp;gt;&amp;quot;,PHP_EOL,PHP_EOL,'&amp;lt;p&amp;gt;',$lib[12],&amp;quot;.&amp;lt;/p&amp;gt;&amp;quot;,PHP_EOL,'&amp;lt;p&amp;gt;Wilma&amp;lt;/p&amp;gt;';
?&amp;gt;&lt;/pre&gt;&lt;/code&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:236557</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/236557.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=236557"/>
    <title>80% spider solitaire rate</title>
    <published>2009-02-01T20:06:41Z</published>
    <updated>2009-02-01T20:06:41Z</updated>
    <content type="html">Yay, I'm back in form.  Just hit 300 wins and 99 losses.  Given that I started with 100-50, that means I've been winning 80% for the last 250 games.  I'd call that statistically significant.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:calvin42:236367</id>
    <link rel="alternate" type="text/html" href="http://calvin42.livejournal.com/236367.html"/>
    <link rel="self" type="text/xml" href="http://calvin42.livejournal.com/data/atom/?itemid=236367"/>
    <title>Damn I love this song.</title>
    <published>2009-01-08T06:18:13Z</published>
    <updated>2009-05-12T18:23:24Z</updated>
    <lj:music>Squirrel Nut Zippers -- Ghost of Stephen Foster</lj:music>
    <content type="html">&lt;a href="http://www.spike.com/video/ghost-of-stephen/939998"&gt;&lt;i&gt;Ghost of Stephen Foster&lt;/i&gt; by the Squirrel Nut Zippers&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm horribly sick.  So's my whole family.  It was funny, everybody talking in whispers.  When something's funny, we all laugh, then we all cough.  Bad, wracking coughs.  Still haven't been back to work.  Haven't been in the office for a month now.&lt;br /&gt;&lt;br /&gt;I'm on a serious spider solitaire kick.  Sadly, I'm only 70-35 so far, with my best win streak only 9 games.  Some awful deals.&lt;br /&gt;&lt;br /&gt;Had a work phone call today last an hour and forty eight minutes.  It was excellent, we decided to branch the code and merge our separate codebases under our new home-grown framework.  It should go well, since we were always using an MVC model, it just becomes more explicit in the latest incarnation.  It's very differently structured, but I'm hopeful that the mappings will be clear and the adjustments relatively minor.&lt;br /&gt;&lt;br /&gt;Other songs I've lately been crazy about: &lt;a href="http://www.youtube.com/watch?v=NeM2Xw7ZP5Y"&gt;Santogold - L.E.S. Artistes&lt;/a&gt; and &lt;a href="http://www.youtube.com/watch?v=OmJ5MLhGxoI"&gt;Thievery Corporation - The Forgotten People&lt;/a&gt;.</content>
  </entry>
</feed>
