Lost in Code

I try my best to keep the geeky parts of my existence out of this site, but sometimes, there’s a convergence that’s unavoidable.  Case in point: the end of Lost.  I’ve watched it faithfully since its second season, and I’m not sure if there’s ever been a TV show that has been both quarterback-cool and wedgie-worthy.  Like millions of others today, I’ll be glued to the television set, and here’s my silly contribution to the Lost universe.

The code below is written in ColdFusion, and it’s using component architecture, something I’ve recently really come to embrace.  It’s a slapdash concoction that I knocked together in about fifteen minutes, so take it for what it is, a goofy tribute to one hell of a show.  The resulting execution of these bits can be seen here:


The nice indents have been removed by the blog, so it’s not so easy to read the code below.   Not that you’d want to read this, anyway.  Perhaps Daniel Faraday would be interested…


<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>


<!— CFCs —>
<cfobject name=”IslandCFC” component=”lost.cfc.island”>
<cfobject name=”SurvivorsCFC” component=”lost.cfc.survivors”>

<h1>L O S T</h1>

<!— This scope is available as a variable —>
<p>Created by <cfoutput>#IslandCFC.creators#</cfoutput></p>

<!— crash Oceanic 815 —>
<cfset crashedPlane = IslandCFC.crashPlane(“Oceanic”,815)>

<!— get a list of the survivors —>
<cfset arraySurvivors = SurvivorsCFC.getSurvivors(“#crashedPlane.flightName#”,crashedPlane.flightNumber)>
<p><strong>List of survivors:</strong> <cfoutput>#ArrayToList(arraySurvivors)#</cfoutput></p>

<!— summon smokey, who’ll also kill the chosen survivor —>
<cfset structSurvivors = IslandCFC.summonSmokeMonster(“#ArrayToList(arraySurvivors, ‘|’)#”,”Mr. Eko”)>
<p><strong>Remaining survivors:</strong> <cfoutput>#ListChangeDelims(structSurvivors.newListOfSurvivors, “,”, “|”)#</cfoutput></p>

<!— summon bombOnSub, which will kill more survivors —>
<cfset structSurvivors = IslandCFC.bombOnSub(“#structSurvivors.newListOfSurvivors#”,”Jin,Sun,Sayid”)>
<p><strong>Remaining survivors:</strong> <cfoutput>#ListChangeDelims(structSurvivors.newListOfSurvivors, “,”, “|”)#</cfoutput></p>



Continue reading