Archive for February 2009

Ground Zero

Published on February 27, 2009

Gizmodo pointed me this morning to an oh-so-wrong yet oh-so-fun Google Maps mashup, that allows you to nuke the city of your choice. Simply search for your favorite (or least-favorite) city, select your weapon, and nuke it! It was interesting to compare the blast radius of the Little Man and the more modern nuclear weapons. Suffice it to say that today’s weapons are awfully scary.

My favorite, however, is the asteroid impact. Most. Destruction. Ever.

If I Ran the Oscars

Published on February 22, 2009

If I ran the Academy Award ceremony:

  • The host would be a news reporter, chosen specifically for their inability to make lame jokes.
  • Said host would read the award category, the nominations, and the winner, without any pauses or cuts to montages of said nominations.
  • Award presentations that no one cares about (best sound editing, best art direction, best makeup, etc) wouldn’t be televised.
  • Award winners would receive their award on a side stage with no podium or microphone, thereby removing their ability to give an acceptance speech.
  • The entire award ceremony would be 30 minutes long.
  • Nielsen ratings for the event would be at an all time high.

Hold your applause, please.

A PHP Include Pitfall

Published on February 22, 2009

I ran into an interesting problem with the PHP include mechanism last night (specifically, with the require_once variant, but this discussion applies to all of the include-style functions). Suppose I have the following folder structure in my web application:

 |-- includes.php
 +-- admin/
      |-- admin_includes.php
      +-- ajax/
           +-- my_ajax.php

Let’s take a look at the individual PHP files in reverse order. These examples are bare bones, but will illustrate the problem. First, my_ajax.php:

// my_ajax.php


Here’s the code for admin_includes.php:

// admin_includes.php

And finally, includes.php:

// includes.php
function some_generic_function()
    // Do something here

When I go to access the my_ajax.php file, I’ll get a “no such file or directory” PHP error. This immediately doesn’t make much sense, but a quick glance at the PHP manual clears things up:

Files for including are first looked for in each include_path entry relative to the current working directory, and then in the directory of the current script. If the file name begins with ./ or ../, it is looked for only in the current working directory.

The important part is in that last sentence: if your include or require statement starts with a ./ or ../, PHP will only look in the current working directory. So, in our example above, our working directory when accessing the AJAX script is “/myapp/admin/ajax.” The require_once within the admin_functions.php file will therefore fail, since there’s no ‘../includes.php’ in the current working directory.

This is surprising behavior and should be kept in mind when chaining includes. A simple workaround is to use the following code in your include statements:

require_once(dirname(__FILE__) . "../../some/relative/path.php");

It’s not the most elegant solution in the world, but it gets around this PHP annoyance.

TF2 Scout Update

Published on February 21, 2009

It looks like I’ll have a reason to get back into Team Fortress 2 next week: the official Scout update is nearly here! So far, Valve has released information on the following:

There are still two days of updates left to be unveiled. One of them, if I recall correctly, is a new payload map, and the other is undoubtedly the new primary unlockable weapon (replacing the scatter gun). Very exciting!

Watchmen Review

Published on February 15, 2009

Reading Watchmen is, for me, akin to looking at the Mona Lisa. In my heart of hearts, I know it’s a masterpiece, but I just don’t like it. My main problem with Watchmen, and a problem I’m increasingly having with LOST (which I’m trying to catch up on), is that there’s no hope for the characters. I have absolutely no reason to root for the characters in Watchmen; they’re the saddest group of people in the world. The story is overly complex, the pacing erratic, and the tone is way too preachy for my liking.

I know lots of folks out there adore this story, but I say ‘skip it.’

The Psychology of Pledge Drives

Published on February 13, 2009
Female Operator

Before I get to the actual point of this post, allow me to rant just a little. What’s up with the increasing number, and more importantly the duration, of public radio/television pledge drives? Our local public television station, UNC-TV, will be starting their Festival drive in February, and it will last for more than a month (February 21 to March 29)! If this kind of thing happened just once a year, I wouldn’t care so much. However, two months ago, the station had its Winterfest drive (November 30 to December 14). Occasionally, they’ll even have a drive in August! Public television clearly needs commercials. I would suggest having commercials between the television shows they offer, so as to keep the ‘commercial-free’ feel of today. Just my 2 cents.

Back to the real topic. Driving home yesterday, I listened to a little bit of our local public radio station. They are currently in the midst of their pledge drive, so programming is light and begging for pledges is heavy. In the midst of their asking for donations, you often hear the sound of telephones in the background. And I’m talking old school telephones. Let’s take a quick walk down memory lane and have a history lesson.

Back before the digital revolution, telephones had bells in them. Yes, physical bells. When someone called you, a small hammer oscillated between two of these bells, causing the telephone to ‘ring’ (hence the term ‘ringing’ someone). I haven’t seen one of these telephones in probably 20 years or more. Yet, during these public entertainment pledge drives, you hear them ringing constantly.

The funniest circumstance of this is found during the public television pledge drive. Volunteers can be seen in the background sitting at computers with their operator-style headsets. No telephones can be seen during this time. And, occasionally, none of the operators are talking. Yet the ringing goes on. So where are those ringing sounds coming from? Are the computers synthesizing the sound? Or is it a gimmick being pulled from the control booth?

I like to think it’s the latter. On my way home yesterday, while listening to the radio, I got thinking about this phenomenon. There must be a point at which this ringing trickery yields the greatest ROI, right? And someone must have figured this out. I’m no statistician, and I’m no psychologist, so the following logic is simply me thinking aloud. If the ‘phones’ were constantly ringing off the hook, with no breaks in between, it seems to me that listeners would be less likely to call in and pledge (why pledge, when everyone else is doing it for me?). Likewise, if the phones were too silent, listeners again might be less inclined to call (silence won’t prompt the listener into action). So the answer certainly lies somewhere in between. I’m guessing that, if the ringing is indeed a trick, the frequency of said ringing is somewhere on the lower end of the spectrum. As a radio station, you want to sound needy, but not too needy. Others are supporting us; why won’t you?

I’d love to know where the middle ground really is. Maybe an influential politician will happen upon this post and decide to funnel some of our country’s economic stimulus package into a research program on this topic. Our nation’s public media outlets might depend on it. 😉

Analyzing Bandwidth Usage

Published on February 8, 2009

Time Warner Cable recently announced that it will be bringing bandwidth caps to more cities, after apparent success in their trial area of Beaumont, Texas. The upper bound on the cap is 40 GB, considerably lower than the 250 GB cap used by Comcast. Go over that amount, and TWC will charge you extra overage fees. I’m completely against this. If caps come to our area, I will seriously consider ditching TWC for some other means of internet access (perhaps the recently mentioned WISP network). Note to Verizon: start rolling out your FiOS service to the Triangle area; I will happily subscribe!

Anyways, while chatting with my dad about these caps, we got wondering about what our bandwidth usage rates really are. I recalled that my router (the oh-so-wonderful Linksys WRT54GL), which I flashed with the open-source DD-WRT firmware, supports bandwidth monitoring (beginning in v24). Happily, I flashed v24-SP1 right before I moved into my new house, so the data has been collecting ever since that time. There are some very interesting trends in the graphs, so let’s take a look at them:

Read the rest of this entry »

Microsoft Ships Rogue FF Extension via Updates

Published on February 2, 2009

It appears that Microsoft is quietly slipping in a Firefox extension with updates to the .NET framework. The extension is named “Microsoft .NET Framework Assistant” and, based on the description, “Adds ClickOnce support and the ability to report installed .NET versions to the web server.” According to reports, this extension:

  • Cannot be uninstalled through Firefox
  • Changes the Firefox user-agent string
  • Does God knows what else

Happily, people have figured out how to uninstall the extension. This move seems pretty dirty to me, but Microsoft has been pointed in this direction for some time now. If you find yourself ‘infected’ with this piece of malware, do yourself a favor and remove it.

Eye on Springfield

Published on February 2, 2009

A week or two ago, I was introduced to the Eye On Springfield blog. For a Simpsons nut like myself, the site is pure enjoyment. According to the site’s official description:

Eye On Springfield is a retrospective of Simpsons hilarity spanning from seasons 1 to 9, when it was still funny.

I would disagree with the “still funny” bit; there are plenty of classic episodes in seasons 10 through about 18, though the most recent seasons have definitely fallen off. Site posts range from scenes in an episode, sometimes with an accompanying quote, to sound clips. It’s a great site, and I highly recommend it for a laugh.

I’m also glad to see that I’m not the only one who, in the words of Patrick Cassels, has:

that annoying habit of beginning half my sentences with, “Remember that Simpsons episode where…”

Copyright © 2004-2019 Jonah Bishop. Hosted by DreamHost.