A tip concerning Model-Glue and Google AdSense

Here is something I've run into with Model-Glue and AdSense. I'd bet it would also apply to other frameworks and similar advertising engines.

Friday Puzzler (a bit early...)

After a bit of a public call out, I realized it was time to start thinking of the Friday Puzzler again. I came up with what I thought was a fun one, but it ended up being something I thought would be a bit more than 5 minutes. So this Puzzler will be for the entire week, and to sweeten the pot a bit, Ben Forta will be sharing a copy of CFWACK (3rd book) with the winner. This isn't a real 'contest' per se, but just a slightly more intense Friday Puzzler. Ready?

jQuery API Browser - Another cool AIR Example

Remy Sharp has posted a nice AIR jQuery API browser. You can find it here:

http://remysharp.com/2008/07/04/jquery-api-update-offline-and-anywhere/

This is great if you need offline access to jQuery docs. The only thing missing is a generic browser for the API for those of us (like me!) who don't even know what to look for. Remy mentioned though that a browser will be in a future version.

Railo 3 and the Cluster Scope

This is just a quick note to point out the example on the Railo Blog on their cluster scope:

Railo Blog: Cluster Scope

Read the blog entry for details, but basically it boils down to server A registering server B and vice versa. After which you can then use Cluster as a scope on either machine. Set cluster.x to 1 on machine A and machine B can read it. What's impressive is that you can also use the admin to determine if the updates have failed.

Review: World War Z

One of the books that came up at the SciFi BOF back at CFUNITED was World War Z. The book is written as if it were non-fiction. It is a collection of numerous interviews from folks who have survived a zombie war. It's ten years past the end of the major fighting (although a few pockets of zombies still exist) but in general the view point is of a world that has survived the worst of it.

Consider a normal zombie film. The hero wakes up, sees that something is seriously wrong, runs to some safe haven (like a mall), meets a few other survivors, one of which who will do something dumb and force them to flee, and that's it.

When I watch a film like this (or really, any 'end of the world' type film), I know the geek in me starts going crazy. If the film centers in on one city, I wonder what's going on in some other city. If the film takes place over a few days, I wonder what the world likes 5, 10, etc years from then. Obviously most films and books will focus on one sort of characters, but what makes WWZ so amazing is that you get an incredible range of view points.

The book is roughly separated into stories from various parts of the war. From when things begin to go crazy, to the panic, the fighting, and the aftermath. You get views from everyone, and I mean everyone. From Asia to Russia to England to America (and they even mention Lafayette, LA!).

The book begins by saying it is an emotional view of the history, but really, for a geek, it's has an amazing amount of resources about what was going on. Some of the cooler aspects include a detailed look into how the military dealt, and adapted, to the zombie threat as well as how the government helped rebuild the country with a dramatically reduced work force.

So while I'm focusing on the geek aspect of the book - the emotional part works well. There is one interview - it involves a girl who lost her parents - and I don't want to say much more as it will ruin it - but it is easily one of the most creepy things I've read in my life. What happens at sea is also pretty darn scary as well. I know there are plans to turn this into a movie - and if they do - I hope they focus on the people and not some giant CGI-fest. If they could pull off the horror of the stories with good actors it could be a heck of a lot more creepy than Dawn of the Dead. I should say though - as I've gotten older I've really begun to get turned off by gore. Frankly I appreciate a movie that can do more with less. I know Blair Witch Project was way over-hyped, but it scared the you know what out of me without ever showing the big bad monster.

Anyway, I enjoyed this book so much I put down my current novel and finished the whole thing in about 2 days. Because of the nature of the book, a collection of interviews, it reads very fast and makes a great bathroom book. I'd definitely recommend it!

Ask a Jedi: Sorting a 2D Array

Pat asks:

Is there an easy way to 'sort' a two dimensional array ? I know you can use ArraySort() on a single dimensional array.

For example: I have a two dimensional array that has a reference number in element 1 (which refers to a supplier in a database), in element 2 is a calculated distance from a supplied postcode. The array is produced in the order that suppliers are retrieved from the database. However, it would be better to sort the array by distance before outputting the data.

Happy July 4th!

For those who are celebrating it, have a happy 4th of July. I'll be out of the office today braving my first set of ribs on the grill. How hard can it be? (Especially with a few beers in me!)

Got cookies? (in your logs)

I recently noticed a large of odd messages in my coldfusion-event.log. They all looked something like so:

06/26 14:47:27 error Cannot create cookie: domain = .riaforge.org

This error was not on the RIAForge box but my own personal server (this machine). I asked about this on a listserv and got a lot of good responses, but it seems like the final answer is this:

Reserved Names for Cookies

I'm sharing this in case others run into it as well. When I say "large", I mean quite a bit. In fact it seemed to be the primary content of the entire log.

Please post comments on Jochem's blog though. I've already posted a followup question there myself.

Ask a Jedi: Trouble with ColdFusion.Ajax.SubmitForm

Andy asks:

This is probably a stupid question but I can't seem to get this to work. I'm using a ColdFusion.Ajax.submitForm and I thought that I would be able to return something from the form's submit handler page using my callback function. I can't seem to get this to work. I tried to a variable on the submit handler page to give it back to the caller page where the form lives but I just get a giant javascript dialog when I try to test this out using an alert in the callback function to display my callbackMsg. Should I be taking a different approach? I really need to get the primary key of the newly inserted record back and can't seem to return it to the calling page.

Now now, Andy, as we all know, there are no stupid questions, just stupid programming languages. That being said, I have a good idea of what you are running into.

Overriding returnFormat at runtime

Ok, so this falls in the "Not so sure this is a good idea" department. Stefan Vesterlund posted a comment on my last blog entry concerning returnformat. He asked if it was possible to change the returnFormat at runtime. I said that I didn't think it was possible, but that you could simply use returnFormat="plain" and return JSON or WDDX manually. He played around with it and discovered you could override the default behavior. Consider the following code sample.

More Entries