Carl Sagan Ring Tone

I never thought Auto-Tune could ever be used to make something this awesome.  Carl Sagan’s Cosmos is one of my favorite shows of all time.  It has a permanent place reserved on my Tivo and I still watch it often.  (it’s also available on Hulu!)  I could seriously put this song on a loop and listen to it all day.  There’s something about Carl Sagan’s voice that I find incredibly calming and inspiring even when distorted and with a cheesy techno musak track playing in the background.

The person who made this video made a ring tone out of it, however I think he chose the wrong part.  The instant I heard the Ah Woop Woop Ah Ah loop I wanted it as my ringtone.  So I spent a few minutes figuring out garageband and voila: the Carl Sagan Ah Woop ringtone was born.

posted 4 months ago on October 3rd, 2009 at 18:04 /
tags: carl sagan stephen hawking science music awesome cosmos
Comments (View)

Gay Marriage is Socialism?

According to Republican Congressman Steve King, Gay Marriage is “a radical social idea, it is a purely socialist concept”.

Also: Springtime for Hitler from The Producers was a gay recruitment tool.

posted 4 months ago on September 24th, 2009 at 13:45 /
tags: socialism politics stupid musical gay rights equality
Comments (View)

Antique Kinoki Foot Pads?

Antique Kinoki Foot Pads?

Looks like snake oil salesmen have been trying to sell Kinoki footpads for over 100 years.

Found while browsing the excellent Popular Mechanics archive on Google Books from Jan 1905.

posted 4 months ago on September 24th, 2009 at 12:35 /
tags: antique ad popular mechanics google books
Comments (View)

More technical details about Google Chrome Frame

jimray:

I am completely smitten with Google Chrome Frame. I don’t think it’s an overstatement to call it one of the more interesting developments in the web landscape to come about in some time, because it finally provides a real solution to the horror that is Internet Explorer. It’s not perfect, of course, but it’s an audacious start. If nothing else, it should give Microsoft a rather swift kick in the ass.

As I’m in love, and a huge nerd, the first thing I did was start stalking my new affection. The first step was to test the installation process — if you’re reading this page on IE, you’ve experienced the browser detection already. Google makes a script available that handles detection and redirects the user accordingly — it’s fairly straightforward and configurable enough to meet most needs. The installation is painless, no more complicated than installing Flash or a PDF reader.

Next, I surfed around a bit, forcing “Chrome Frame” on certain sites — the best way to do this is by typing “cf:” before the full web address[1], including the “http:” e.g. “cf:http://google.com/”. I tested several sites that I visit regularly, just based on “feel”, and the anecdotal speed increase I noticed was incredible. Heavy sites, with lots of javascript, CSS, images and calls to third party sites, like ad servers, loaded in an order of magnitude faster. I didn’t run any hard and fast numbers, but this was the first time I’d ever say IE “felt” fast. It wasn’t flawless, crashing IE on me once, with an error that “Whoa! Google Chrome has crashed! Restart?” but this is a pre-beta developer preview, so I suppose that’s to be expected.

Something that surprised me is that Chrome Frame continues to use IE’s underlying architecture for non-rendering features, like cookies, history and remembering passwords. As a developer, I’d say that this is a nice to have, but as a user, this is essential — replacing the rendering component of the browser should be seamless and it shouldn’t require me to re-log into Hotmail. I’m surprised, though, because this is the sort of thing that I’d expect to be Hard and missing from a pre-beta preview yet it Just Works.

Another nifty bag of tricks that Chrome Frame brings along with it are the Webkit developer tools, as seen in Chrome (the browser) and Safari. Right click on a page being rendered in Chrome Frame mode, select “Inspect Element” and the inspector opens up. If you love Firebug or the Webkit web inspector, you’re going to love this. Of course, the DOM that you’re inspecting is the Chrome Frame rendered DOM, not the IE rendered DOM, so this doesn’t give you Firebug for IE, but it does provide a handy tool for debugging your code as Chrome Frame sees it.

I also got curious about the User Agent strings that Chrome Frame embedded inside of IE might return. If you’ve spent any time with User Agent strings, you might expect a certain amount of schizophrenia, depending on where you look for them, either on the server side or the client side. I wrote a quick PHP script to echo out the User Agent as PHP sees it and to echo out the User Agent as javascript sees it. The server-side detection sees the browser as IE, with one tiny exception: it adds a string “chromeframe” to the User Agent that you could easily look for and act on. The client-side detection sees the browser as Google Chrome — the exact same User Agent as when you visit the page using the Chrome browser.

If you think about how Chrome Frame works — a meta tag in the head of the page tells the browser to use a different rendering engine if that rendering engine is installed — this makes sense. Of course the server-side detection sees it as IE because nothing is telling the browser to switch identities yet. But the client-side detection sees it as Chrome Frame because the page itself, including the javascript that performs the detection, is rendered by the Chrome engine. As a developer, this is exactly what I want — the ability to see the actual browser based on the headers sent to the server, to detect for Chrome Frame via the added keyword in the User Agent string if necessary, and for the client-side to behave as if it’s been rendered by a single engine, not some Frankenstein hybrid. Bravo Google for getting this right. (To be perfectly clear, I’m not advocating browser sniffing as a path for development. As Kurafire points out, sniffing causes vastly more problems than it solves).

Finally, I investigated just a little bit about how Chrome Frame is actually implemented. Google doesn’t seem to have made the source code available yet, but if you check out IE’s add-ons preference panel, you see that Chrome Frame is something called a “Browser Helper Object” or BHO. I’m not terribly familiar with the concept, so I spent a little time on the relevant Wikipedia page and Microsoft’s support sites.

It turns out there’s a sort of irony here — BHO’s were introduced in IE4 by Microsoft during the height of the browser wars with Netscape as a way of allowing developers to extend IE itself, so that the browser could become a development platform; sort of a precursor to Firefox’s Add-ons and XUL platform. Of course, with IE as your platform, you’d want to write your web pages so that they’d render in IE and use all of the proprietary IE extensions that Netscape didn’t implement, or so the conspiracy goes. It turns out that BHO’s were most popular as a way to add toolbars — like the ones from Alexa and Google’s own search toolbar — and as a vector for writing viruses. Microsoft tried to fix this in IE 6 SP2 by sandboxing BHO’s and including an Add-on Manager that would let users scope out and uninstall any BHO’s that had installed themselves with nefarious purposes. This is also why you need to have at least Windows XP SP2 to use Chrome Frame, to support Chrome’s own security sandbox.

The irony here, as I see it, is that an old, insecure feature Microsoft built to try to beat Netscape is now being used by Microsoft’s biggest current rival to patch IE. The upside for developers is that Microsoft is going to have a hard time killing Chrome Frame because it actually does the right thing — it’s not hacking IE via undocumented APIs or unscrupulous haxie-like code injection. They used Microsoft’s own well-documented and fully supported platform to do this. Bravo indeed, Google.

So, what’s a developer to do with all of this? Of course, we can’t scrap IE entirely just yet and your own development plans should be dictated by your site’s unique audience. However, I’d suggest that Chrome Frame potentially makes designing for progressive enhancement even more realistic. Imagine being able to design with all of the modern tools like HTML 5, CSS 3, SVG, and performant javascript and telling all of your users, even the ones using IE 6, that this can all be theirs if they’ll just install a quick plug-in. No need to migrate to a new browser, learn a new UI and port over all of your bookmarks if you’re so curmudgeonly that you haven’t abandoned IE by now — those features can come to you!

Maybe one day Microsoft will finally get with the program and embrace the future instead of dragging the weight of the past decade along with them. Until then, we devs have a new love.

[1] You can also hack the registry to force CF mode on particular sites but I’d be careful, thar be dragons.

posted 4 months ago on September 24th, 2009 at 00:01 via jimray /
tags: google ie chrome chrome frame hack
Comments (View)

I would never say that Republicans are all racist. That’s ridiculous and wrong. But if you’re a racist nowadays in America, you’re probably a Republican.

posted 4 months ago on September 17th, 2009 at 01:35 /
tags: politics racism obama
Comments (View)

Congress Needs a Version Control System

Schoolhouse Rocks Bill

Max Baucus’ “America’s Healthy Future Act” was released today as a PDF on the painfully technically antiquated Senate Finance Committee website. (Is that a Netscape NOW! button on the left??  Welcome to 1998)  The excellent OpenCongress has a discussion on how inaccessible Congressional data is.

OpenCongress has done a great job making bills accessible, searchable, linkable, and commentable.  However, there are a few things it’s still lacking.  For instance, there’s no easy way to get a handle on the differences between all the health care reform bills, what changes have been made by different committees, and by whom.

There’s lots of talk about wanting to update congressional standards to use XML and API’s, etc.  It seems to me what they also need is a version control system.  Something like Git.  I’m thinking a git4gov or github.gov.  Imagine an obama/health-care-2009 and then each committee forks the project, makes changes, then sends a pull request upstream.  Every change to every line is attributable to a specific person/committee.  Each change has a commit message explaining the reasoning for it.  Built in commenting per line.  RSS commit logs.  Anyone could fork a bill and and make suggestions.  And of course git blame would quickly end many arguments.

Someone smarter than me, please make this happen.

posted 4 months ago on September 17th, 2009 at 01:01 /
tags: healthcare politics hcr09
Comments (View)

Importing Typo to Tumblr

I’ve decided to start blogging again and my old blog at http://juju.org was running an ancient version of Typo.  For various reasons, I’ve decided I don’t have the time to administer a whole web server just for my little blog.  So I decided to move to a hosted service and settled on Tumblr.  (I also decided to finally put away childish things and register http://tonybuser.com)  Unfortunately, there’s no way to import a Typo blog to Tumblr.  So this has given me a good excuse to finally play around with the HTTParty and Hpricot ruby gems.  During my adventures in trying out different blog services and importing all my old posts, I had already exported my Typo blog to Wordpress XML format.  Then to import a Wordpress file to Tumblr was simple.  Here’s the script:

#!/usr/bin/env ruby

require "rubygems"
require "hpricot"
require "httparty"

class Tumblr
  include HTTParty
  base_uri 'www.tumblr.com'
  
  EMAIL     = "[YOUR_EMAIL]"
  PASSWORD  = "[YOUR_PASSWORD]"
end

doc = open("wp.xml") { |f| Hpricot(f) }

(doc/"item").each do |item|
  params = {
    "email"     => Tumblr::EMAIL,
    "password"  => Tumblr::PASSWORD,
    "type"      => "regular",
    "format"    => "html",
    "generator" => "Ruby + HTTParty Import Script",
    "date"      => item.at('wp:post_date').innerHTML,
    "title"     => item.at('title').innerHTML,
    "body"      => item.at('content:encoded').innerHTML,
    "tags"      => (item/"category").collect{|category| category.innerHTML}.join(","),
    "group"     => "[YOUR_ACCOUNT].tumblr.com"
  }

  puts Tumblr.post("/api/write", :body => params).inspect
end

posted 4 months ago on September 14th, 2009 at 19:33 /
tags: ruby wordpress typo tumblr code
Comments (View)

DiggBar Bookmarklet

I’m really digging the new DiggBar. However, I found it odd that they didn’t give you a bookmarklet considering it would be a trivial thing to do. So, I made one. Drag this link to your bookmark toolbar:

Digg!

posted 10 months ago on April 3rd, 2009 at 09:51 /
tags: Code programming javascript
Comments (View)

Find Intersection of Two Date Ranges

Say you have a database of events that span multiple days and you want to filter all events between a certain date range. At first I had this giant mess of this AND that OR this AND that… until I found this:

NOT (range1_start > range2_end OR range1_end < range2_start)

That freakin’ rules.

posted 1 year ago on July 29th, 2008 at 12:23 /
tags: Code sql programming
Comments (View)

Receiving Faxes in OSX

Today I setup a shared Fax modem on our OSX Server. Attached a USB modem and it recognized it just fine. Sending faxes was working great, but I couldn’t get it to receive. No matter what I tried, it just wouldn’t recognize that the phone line was ringing. According to Google a few other people had the same problem, but there were no solutions. So I dug around and found the problem. My modem was showing up as /dev/tty.usbmodem246802461. However, OSX expects it to be at /dev/tty.usbmodem. I couldn’t find anywhere to configure it. I tried creating a symlink to it, but that didn’t work. So what I ended up doing was modifying /usr/bin/fax and changing lines 37-38 from:

DEV=cu.usbmodem
DEVANSWER=tty.usbmodem

To:

DEV=cu.usbmodem246802461
DEVANSWER=tty.usbmodem246802461

Then killed the efax process and now it works. WTF Apple?

posted 1 year ago on July 8th, 2008 at 13:27 /
tags: OSX osx apple fax wtf
Comments (View)