Saturday, October 01, 2005

The Universe Is Huge. What We Are ... Isn't

If you’ve ever wanted to know how big/old/whatever the universe is … now we know.  So, the answers to questions that have been plaguing scientists (and the occasional quiz show) are as follows:

Now we know.  Man … we (i.e. that which you and I actually see in this universe) are only 4% of what’s there … ponder that the next time you encounter some self-important person who thinks the world of themselves, their beliefs, or their causes …

… it’ll help you put them in perspective.

del.icio.us:

When mixing JavaScript and XML ...

… somethings things act … strangely. I was tweaking a script I use to manage podcasts (bridging the gap between iPodder and WinAmp), I needed a date formatting function. No problem, the DateFormatter from Gazingus.org is an excellent module (if you need date formatting in JavaScript, get it, it rocks).

Problem is, I’m writing Windows Scripting Host format scripts (using their XML schema and generating .wsf files) and I came across some interesting behavior in the cscript engine. If the engine incounters a ‘<’ (“less than”) symbol in a JScript block, it bombs with the following error:

Windows Script Host: Expecting a valid name

Even more irritating, you’ll get the error even if you comment out the offending line (doesn’t matter which way you do it, line comments (//) or comment block (/* … */) … which tells me that it’s the XML parser part of the engine that’s barfing (it doesn’t get to the JScript engine). This took a little while to figure out … and if you think like an XML parser, it (sort of) makes sense: it hits the ‘<’, thinks a new XML element is being started, and doesn’t like what it sees next (in the case of the date formatter, it usually was a number).

Ok, fine. Now what? Well, the solution (at least, my solution … I’m sure there are others out there that are more elegant) was to rewrite the logic converting all less-than comparisons to an equivalent greater-than comparison. For example:

formats['DD'] = ( date < 10 ) ? '0' + date : date;

becomes

formats['DD'] = ( 10 > date ) ? '0' + date : date;

and so forth. The logic still holds … it lets you plug it into a WSH file without generating a parser error … and it’s still a cool chunk of code.

Save yourself the trouble of rewriting Gazingus’ script, here’s a copy with the “patches”. I’ll post my iPodder script after I add some comments.

del.icio.us:

Monday, September 26, 2005

I wonder if they take walk-ins?

If you’re a restaurant fancier, you simply must read this bit of humor.  It was fantastic!

Sunday, September 18, 2005

Sit Yer Fat Butt Down ... and Eat!

Catching up on my SciFi Channel watching tonight, I’ve seen (more than once … but that’s a different rant) Burger King’s latest ad campaign, featuring the return of Dr. Angus (Harry Enfield).  You know the character:

  • (too) perfect teeth
  • “sloppy” speech (much like Patrick over at Nobody Likes Onions)
  • Hair only Wink Martindale’s mother could love
  • bit of a paunch

Yep … that’s the guy (I’ve gotta give Enfield credit, he does a great job with this character).  And the focus of this latest campaign, the crux of Dr. Angus’ latest “empower yourself through beef” movement?  Power Sitting:  the power of the Angus to enable you to sit … and enjoy things … like hamburgers that require two hands and a forklift to maneuver.

Now, on one hand, I find the concept cute … on the other hand, I’ve gotta ask myself one question:

“With all the concern with obesity in America, doesn’t an obviously overweight man encouraging people to partake of inactivity while they eat hamburgers the size of their own heads … seem contradictory … or maybe just plain wrong?”

Thursday, September 01, 2005

Now That's What I'm Talkin' About

Remember those cool communicators in Earth: Final Conflict? Or, perhaps, the ones from TekWar (ok, ok, yeah it’s a Shatner thing, but the technology was cool)?

We’re getting close … check out this little ditty from over at GadgetFlash. Phillips has it goin’ on.