Archive for August, 2007

Comments on OPML 2 expanded Attribute

31 August 2007

In response to Dave's proposal to add an expanded attribute to the OPML 2.0 spec, I have the following thoughts.

  1. Typo: "Its optional" should be "It's optional"
  2. As a general matter, I'm not convinced that this belongs in the spec. It seems to me that display properties are the application's problem, not the file format's. Others have complained about the expansionState element for the same reason -- of course, that's a spec legacy and eliminating it would cause breakage so I'm not suggesting eliminating expansionState. But why further muddle the OPML spec? If a particular application needs to store the expansion state on a per node level, then why not create a new namespace attribute (or use an existing one)?
  3. If the expanded attribute is added to the OPML spec, I suppose there will be a forumlaic relationship between it and the expansionState element. In other words, given a certain expansionState state, I will be able to calculate the expanded attribute for each node, and vice versa. Query:
    • If expansionState is given, may a processor ignore the expanded attributes?
    • If expanded attributes are given, may (or must) expansionState be given?
    • Is it a validation error if both expansionState and expanded attributes are given, but they are inconsistent with one another?

My 2 cents.

Podcast recommendation

28 August 2007

Just finished listening to the The Traneumentary podcast. Fantastic! 33 episodes in all. Subscribe

PHP command line mode detection

23 August 2007

Use a block like this in PHP code to detect whether or not it's running in command line mode as opposed to web server script mode.

// if $_ENV['SHELL'] exists, we're probably in command line mode
if (array_key_exists('SHELL', $_ENV)) {
$this->setOutputMode(MYSQLICIOUS_OUTPUT_CMD);
} else {
$this->setOutputMode(MYSQLICIOUS_OUTPUT_HTML);
}

iPhone, Apple Store thoughts

6 August 2007

I spent some time in the Apple Store at the Pentagon City mall in Virginia yesterday, and I played with the iPhone for about 20 minutes before I became absolutely sick of it. So it didn't surprise me to read iPhone sucks buy Blackberry stock (via Scoble). I found the touch screen keyboard on the iPhone unusable. And I play piano and guitar -- I know how to control my fingers! Ironically, I think the touchscreen on my old Palm Zire was more accurate. I use my Blackberry way too often to even consider the productivity crippling interface of the iPhone. So, after having tried the iPhone, I'm amazed at the mostly rave reviews it's gotten.

But what really shocked me was that this particular Apple Store has no checkout registers.

I originally went into the store to buy a new protective sleeve for my iPod. It took me about five minutes to look through the different sleeves and choose one that looked about right. But then I wandered the small store for a few minutes before I assured myself that I was not daft, there really were no registers.

So, I flagged down the only employee in the store who was not attending to a customer, and he told me any employee in a green shirt could ring up my purchase -- except, apparently him, because he immediately turned his back on me and took off in the opposite direction.

After about five minutes of trying to get a Green Shirt's attention, I was ready to walk out. But finally, one Green Shirt (who evidently was too busy shooting this shit with his friend) directed another Green Shirt to ring me up. Here's what that consisted of:

  1. Green shirt scans my item with a Symbol handheld register
  2. Register crashes because it can't get a wireless signal
  3. Green shirt disappears to get another register
  4. Green shirt reappears, rescans my item
  5. Green shirt swipes my credit card
  6. Green shirt swipes my credit card
  7. Green shirt swipes my credit card
  8. Green shirt rescans my item (I swear I am not making this up)
  9. Green shirt disappears to get a bag for my item
  10. Green shirt reappears with a bag
  11. Green shirt walks to the completely opposite side of the store to pick up my receipt
  12. Green shirt returns and finally I am free to go

Wow....

I'm #1 (too)

4 August 2007

Wow!
Yabfog #1
[via Dave]