Friday, April 13, 2007

The Statue of Safety


This post reminded me of an incident on our vacation to New York a couple weeks ago. There were only a few items on my list of things to do while visiting NYC that I felt were "must-do" items and one was to visit the Statue of Liberty. To me it is the very symbol of what makes this country great, Freedom.

Access to go inside the base of the Statue are by reservation so I got reservations for my wife and me and was excited to see the inside of the statue. To get into the statue you first have to go through an airport-style security system (they have a sniffer that blows air on you but at least you can keep your shoes on). As it turns out you can only climb the stairs (or take a small elevator) up to the base of the statue but you can't go any further than that.

Upon reaching the top of the stairs below the statue, there was a ranger who would turn on lights so you could look up inside of the statue. I knew they had stopped allowing people to go all the way up to the crown but didn't know when that had happened so I asked the ranger. He said it had closed on 9/11. I thought that was odd and questioned him "so we lost the liberty to go into the Statue of Liberty on 9/11?". He took slight offense at the question and told me that it was for safety reasons to be able to evacuate the public in case of an emergency. I wish I had thought of it at the time but recalled later this quote attributed to Benjamin Franklin:

Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety.

Shouldn't we have the choice to sacrifice our safety for a chance to climb to the top of the Statue of Liberty?

Friday, October 27, 2006

Toddlers Have No Exit Strategy

What is the world coming to? For some strange reason there has been a spate of boys getting stuck in vending machines recently. Can't a boy covet something soft and cuddly without having to be trapped by its allure?

First there was the boy in Sheboygan, Wisconsin who was just killing time while waiting for his dad to get off the phone.


Then, in Elkart, Indiana, 3-year-old James Magnes took matters into his own hands when his mother said he couldn't have a toy.


In Austin, Minnesota, another 3-year-old boy decided to escape the real world and spend time with his plush friends.



And who could blame the lovable toddler, Joshua Walk from Abilene, Texas who just wanted freedom for his favorite toys.



Just when you thought it couldn't happen again, another Texas toddler found himself in a similar predicament.

Monday, October 23, 2006

Google's Hidden Query

I am using Google's Adsense for Search feature on a website and I wanted to restrict the search to just a subset of the site. Unfortunately, you can't just set the search domain (via 'sitesearch') to something like "example.com/foobar" to restrict it to the 'foobar' area of the site.

Knowing that Google searches could be modified with query modifiers, I figured that I could just add "inurl:foobar" to the query. You can achieve this using javascript on the search form by inserting this javascript in the google search's <form> element:
onsubmit="this.q.value += ' inurl:foobar"

This does work but it's a little ugly because the search results page exposes this hack by showing this added bit on the search results page.

Likewise, when you backup to the page where you did the search from, now it will contain both the user-typed search text and the appended ' inurl:foobar' text which isn't pretty.

Fortunately, and quite by accident, I stumbled on a better way to do this. Google has an undocumented way of adding hidden query elements to the search with a field named "hq". With this field you can add any type of query modifier and it will be executed as before but it won't show up on the query results. Just add the following to your google search form:

<input type="hidden" name="hq" value="inurl:foobar"></input>

The resulting search query will be restricted however you want without the ugliness of showing the restriction on the results page. And you don't have to use any javascript tricks to get what you want. It's a geek win-win.