I was caught completely off guard by our plans to move and an job oppurtunities that came up in PDX. I've been working dozens of hours a week for four years, but hadn't thought to create a code sample page until the day I had my first interview.

    That being said I went into a mad scramble to give you something to look at, this is a bit trickier do than I expected: goDaddy, whom I use for hosting, disallows CFCs and java... and apparently has some buggy behaviour in directory creation as well.

    Please view this as a work in progress, and feel free to ask any questions you might have.

Christopher Travis TruLove
602.882.2184 - christopher@trulove.cc

2008-04-29 - Added the long imagined GEngHIS map demo .02. I have literally been considering this for years. I've worked on other things on and off, but this is the first time I've had functioning code to share (er, second time, a few months ago I had version .01 finished for about 2 minutes before I started gutting it. Foolishly, I failed to make a copy of the working code.)
- CTT
2007-09-17 - Updated site with my Cherry Blossoms Fall flash... I had long thought this was destroyed with no backup but I stumbled accross it last week.
...also (finally) added the particle system, currently in the form of the "Light Cursor On Fire" option.
- CTT
2007-08-21 - Interesting month, as code goes. I implemented the Dizzy code, and then decided I wanted to write a particle generator in JS... That actually parralleled (in a lot of unexpected ways) a system I needed to write for work to display tabular data.
Naturally I went a little mad with the code... which is fantastic, really, as I have been writing in really sincere OOP methodology, for perhaps the first time ever, and the code is pretty slick. Still... I haven't updated anything HERE because of it, hopefully I can get something new up here shortly.
- CTT

ColdFusion Applications

The Developer Challenge was a test I wrote to challenge new hires, to see where they hit walls and what they could manage to improve in a very damaged piece of code.
Its here if you want to take a look...

(The TOOL works [inasmuch that you can use it to create and edit a unique instance of our "problem" page] but the databases referenced by the tool are not available here [yet], try as you might, you can only fix a certain amount of the code.)

The relevent Dev Challenge code can be examine here:

  • Application.cfm - Commands the "security" and instance controls for the tool.
  • editChallenge.cfm - The page that allows web based editing of the instanced page.
  • editScratchPad.cfm - The page that allows web based editing of the scratch page. (No... I actually don't recall why I made these separate files... I'll likely merge them eventually).

I'm enjoying the "cfcontent/cfheader as a file proxy" concept... this page uses it copiously, as does the Developer Challenge page. In this case, all of the iframes load the code of the referenced page and output it as text.


This is an example of what I've been doing with the Google Maps API: Google State Outline creates an outline based on the USGS outline data file. These files are huge, having several thousand data points per state, so I use generateKML.cfm to create a Google Maps/Earth outline file that is small enough to display without devouring all of your systems ram.

Choose State To Display: (takes a moment to process and display)
generateKML.cfm - The page that converts the large data files to more manageable ones.

ColdFusion Components

Valid is probably my most used CFC by myself and other developers. Essentially its a set of parsing rules for text.

( I can't actually SHOW you this working because GoDaddy doesn't allow cfc registration... but I can show you how it would work [screen captured from the code rendered in a CFC capable server], and of course, the code )

valid.list( "alpha, beta, delta,epsilon, delta ,gamma, theta, gamma,delta" ) = alpha,beta,delta,epsilon,gamma,theta
valid.address( "619 East Jensen rd", "mesa", "az", "85203" ) = Unable to Perform Lookup Operations on Devserv
valid.case( "the trials of cHRIstopher o'trulove","title" ) = The Trials Of Christopher O'Trulove
valid.email( "'Christopher T. TruLove' <chris@cc.trulove>; trulove,christopher[christopher@trulove.cc]; c##t@cc.trulove" ) = christopher@cc.trulove,christopher@trulove.cc
valid.filename( "Chris's horrible filename! (2007)..avi" ) = Chris's_horrible_filename_(2007).avi

( I realized in the process of sharing this that some of these are not as finite as they should be for public consumption, but are tuned for specific applications and aren't as robust as they could be [and refining addict that I am, they are on now my list of things to mess with when I get a moment])

ColdFusion UDFs

A few simple UDFs I've put together to help out here and there:

ctEncrypt/ctDecrypt
Encrypt and Decrypt were inspired by author Neil Stephenson's book, Cryptonomicon. I got the idea stuck in my head while reading and had to flesh it out just to get it out of my head. Since then I've found it usefull enough to keep it in my library.

ctEncrypt( "String" ) = 3v433z494c3g
ctDecrypt( "3v433z494c3g" ) = String

listCompare
I just wrote an interesting one last week that I'll be using a bit I expect:

listCompare( "dog,cat,rooster,phesant,cow,horse,monkey", "elephant,dog,manbearpig,cat,rooster,phesant,pika" ) =
returned structure
.onBothdog,cat,rooster,phesant
.onFirstcow,horse,monkey
.onSecondelephant,manbearpig,pika
All the currently aforementioned UDFs (as well as struct, which isn't mine, but is certainly the most useful UDF I've ever pulled off the web)

CSS

I'm rather proud of A Piece of Penasco, a condo information site I built last year. It's ridiculously simple, a single page HTML/CSS/Javascript entity that serves its purpose. Most of why I love it comes from the care I took in it's creation. It works equally well in both browsers, minus one effect (translucent buttons don't work in IE6), no ajax, no flash, nothing but sweet css. I generally want more content control, but given that this is effectively a print ad on the web, I was satisfied with its static nature.

Javascript

Genghis 0.2
Genghis .02 Map Demo
Functioning again... with a substantially more complex terrain system... each tile is made up of a base tile image, a terrain tile image, and a text layer... to make it more reasonable to have layered terrain without individual images, it builds a composite (so for a broken path over dirt, and a broken path of grass, I only need 1 broken path image instead of a distinct one for each combination)
Because the coding of that would be a complicated, choosing each tile type, and which variant it uses, I taught the system to do it procedurally... so you just enter what the terrain type and base type is for each tile, it looks at the map and identifies which variant it should display...
Pretty buggy yet, and slow (going to move the procedure out of a repeatng loop, which should speed it up), and my tileset is not complete yet, so it has to choose the floating terrain tile more often than I would like... but it works!

Flash / Action Script

Cherry Blossoms Fall

This is the second version of CBF, being substantially more object oriented than the original which I used as my site banner in its infancy, but it is still not at the level of Object programming I would like. At some point or another I will probably convert my JS particle system to flash. Much as I PREFER JS for almost everything, flash can ROTATE images... which makes cbf impossible in JS (which, dignity demands I point out, usually means "At least three days of grumbling under my breath and arguing with the JS error handler before I solve it"). Also, much to my chagrin, you would need a alpha class server to render this in JS without driving your machine to its knees...
The CBF Flash File

PHP

I need to include the features I added to WordPress before I got ColdFusion added to the site (and subsequently stopped coding in PHP).

FLEX

I just installed this. Honestly I know very little about it. Its built on Java, which surprised me during the install. Thats about the long and short of it. Check back next week. I should have some example code up by then.