I hit a minor roadblock trying to see how I could get an object reference from within an object. Tom Trenka whipped up a quick little function (which is so obvious after you see it 🙂

function getObjectString(obj, scope) {
  for (var p in scope) {
    if (scope[p] == obj) return p;
  }
  return null;
}

It’s messy and O(n), true, but unless you have a mess of variables, not too bad.

Jesse made a suggestion on how I could avoid needing the string completely by assigning an IFrame.onload, but there are race conditions (unless you use event attachment, see below), and also Mozilla was giving me crap (is it running the onload before the document is finished?)

It occurred to me that there are lots and lots of little JS snippets like Tom’s which are enormously useful helpers, but hard to keep track of. Perhaps they should all go in a little snippets library/repository or something…

I’ve finally finished upgrading my system (I dropped in an ATI 9800 Pro [which detects as an XT and clocks accordingly] and an Athlon XP 3000+, but needed a beefier heatsink), and although my CPU is underclocked a bit (my old motherboard only goes to 12.5x multiplier, not 13x). My Doom 3 timedemos have gone from a rather anemic 20fps at 800×600 Low Quality to a respectable 45fps at 1024×768 High Quality.

That being said, I think I’m pretty much over this “installing my own hardware thing.” I think I realized this after I managed to pry off the old heat sink and as I was removing glue residue from the new one.

  • Back to the Future – What Bush would do if he were president

    Recession. Unemployment. Corporate fraud. A war based on false premises that has cost us $200 billion and nearly a thousand American lives. They’re all hills we’ve “been given to climb.” It’s as though Bush wasn’t president. As though he didn’t get the tax cuts he wanted. As though he didn’t bring about postwar Iraq and authorize the planning for it. All this was “given,” and now Bush can show up, three and a half years into his term, and start solving the problems some other president left behind.

  • Bush by numbers: Four years of double standards – mostly sad, but also some scary statistics

    70m Estimated number of Americans who describe themselves as Evangelicals who accept Jesus Christ as their personal saviour and who interpret the Bible as the direct word of God.

    23m Number of Evangelicals who voted for Bush in 2000.

    50m Number of voters in total who voted for Bush in 2000.

    (nm, my reading comprehension is low) but see also: Frontline: The Jesus Factor)

  • The Words Speakers Use – great NYTimes infographic comparing words used in the RNC/DNC speeches
  • Movable Type 3.1 Still a Developer Edition? – Keith has a heck of a time installing 3.1
  • Stop Design: Liquid Bleach – Doug continues on his redesign journey