March 26, 2009

YouTube API having issues with seekTo()

At around midnight last night, while working on code that uses embeded YouTube video with the YouTube API, my JavaScript that loads a video and seeks to a specific location started failing on the load (on one page) and failing on the seek (on another). I was working on an unrelated area and so took the opportunity to add more JavaScript logging via Log4JS (highly recommended). The problem persisted, code was moved around, and finally all logging was removed with the idea that watching the JavaScript somehow changed the event sequence. No luck. Eventually, I backed up the changed code and re-got the "working" versions from svn. Still broken. So I went to my reference app and received the sad news that the call is, in fact, no longer working as it had. Sometimes, it is that third party library that's causing problems!

The only reference I've found is a thread back in Feb 19th that actually duplicates my issues on the YouTube reference page: using the "Load video" with a non-zero "Start at" value fails to seek. The thread also contains a suggested workaround: wait until after the video is done buffering before performing the seekTo(). To be continued...

"seekTo fail in chromeless if video not already playing" in the YouTube APIs Developer Forum reports this in July of 2008. Suspicion is that it happens during queueing and with lower-quality videos.

[ updated 28 Mar 2009 ]

The solution is to call seekTo() after the playing event (1) has been received. So, the sequence is:

  1. onYouTubePlayerReady(playerId)
  2. onPlayerStateChange(newState == 1)
  3. player.seekTo(offset, true)

In my tests, I'd also seen error 100 (requested video not found) returned if I called seekTo() too quickly after onYouTubePlayerReady() fires. So, this is probably not a YouTube issue, more of a Programmer Is a Bonehead (PIB) issue.

posted by sstrader at 9:36 AM in Programming | permalink | comments (0)

March 23, 2009

The new public media

Performance Today had people begging to buy a recording of Ravi Shankar's new concerto after the premiere was broadcast on their March 6th show. Unfortunately, they didn't have permission to sell it. People want to throw money at a new music composer (albeit, a very tenured and wealthy one) and he didn't have the foresight to prepare an MP3 download of the premiere performance? Luckily, most new composers are wise to the internets and know their way around MP3s. Still, Shankar's actions feel almost dismissive of the audience.

In many instances, NPR is the model of new media provider. They've always had a very clean and comprehensive web site and are committed to working closely and in partnership with local stations. Well balanced national and local implementations are not what you expect from a not-for-profit.

posted by sstrader at 1:22 PM in Internet , Music | permalink | comments (0)

March 20, 2009

Space bat

The Space Bat will be fondly remembered. Where Dusty resonated with those who had been bullied, Space Bat is that same beaten individual unable to go on and finding a final rest. Gizmodo said it best:

Bereft of his ability to fly and with nowhere to go, a courageous bat climbed aboard our Discovery with stars in his weak little eyes. The launch commenced, and Spacebat trembled as his frail mammalian body was gently pushed skyward. For the last time, he felt the primal joy of flight; for the first, the indescribable feeling of ascending toward his dream--a place far away from piercing screeches and crowded caves, stretching forever into fathomless blackness.

Whether he was consumed in the exhaust flames or frozen solid in the stratosphere is of no concern. We know that Spacebat died, but his dream will live on in all of us.

I tweeted a eulogy, there have been humorous images, and lengthy dedications on /b/ (think "SPACEBAT!!!" repeated a brazillian times; sorry, no screencap...). I'm sure there'll be more to come. I'm waiting for the t-shirt!

posted by sstrader at 1:14 PM in Internet | permalink | comments (0)

Millenarianism

I was regaled recently about the plight of society and its economic turpitude. Because of factors that have never before occurred in the history of societies [emphasis definitely not mine], we're surely on the road to a pre-industrial primitivism. My insistence that such worries are unfounded in historical example was met with, simply, disbelief. There was no common ground. What arguments are there against such a card house of conditionals that find destruction in every flawed system of human society? The polysci maven's response to the--obvious--impending doom was to search for ways to distance themselves from dependencies on the specialization that results from community. Learn to live off the land and you won't have to put up with allowing your tax dollars to be used or misused by atheists and the lazy.

I had always blamed this worldview on too much Ayn Rand and too much being a male. More seriously, I felt that it went back to the noble savage ideal and the belief that, somehow, society has corrupted the individual by making them dependent on others. However, I'm beginning to think that it's as much influenced by millenarian tendencies. There's an aching desire, when presented with complex systems beyond your control, that there must be a simpler way and a teardown is in order. In programming land, this leads to the inescapable desire to rewrite everything. In life, you yearn for revolution.

[ updated 31 Oct 2009 ]

io9 has an article on trends in the last 200 years of post-apocalyptic fiction. The author provides a graph of the relative importance of religious eschatology or post-nuclear wastelands or zombies. One comment suggests an alternate explanation for the desire for an apocalyptic tabula rasa: Frank Kermode's The Sense of an Ending traces the apocalypse - or end of history - as a basic western need through the beginning of its literature. I'm not doing justice to his thesis. But basically, he says we fear becoming insignificant in the infinite, and need an end point.

posted by sstrader at 11:03 AM in Culture & Society | tagged io9 | permalink | comments (0)

March 17, 2009

All About Lily Chou Chou

[ 5/5 | IMDB | Rotten Tomatoes ]

I got this DVD not long after it came out (~2002) based on a recommendation from Salon when I was an actual subscriber and read O'Hehir's review of the movie. Teen life is alienating enough, but Japanese teens--at least to my outside eyes--must have a thoroughly unique pain to endure. British schools might be just as cruel. Lily is a bit of gritty and lush experimentalism that entices its audience at the same time that it pushes them away. For instance: an expressive scene of precise teen-clique aggression is well done but then its impact gets a bit lost with all of the time shifting in the edits. That said, this movie is definitely worth the effort. I can't believe that my second viewing was only two weekends ago.

The Wikipedia entry contains some interesting background: On April 1, 2000, [the author] Shunji Iwai went live with his internet novel, in the form of a website called Lilyholic, where he posted messages as several characters on the BBS. Readers of the novel were free to post alongside Iwai's characters and interact with each other, indeed this BBS is where some of the content from the movie comes from. Threaded in the movie's scenes are typed discussions from characters on a Lily discussion group. The storytelling style looks relevant even (especially) now in 2009, but as the older kids start digging this social web thing the impact of pairing images of teens suffering group exclusion with the promise of egalitarian freedom online is lessened. Although far from tame, the edge of online presence no longer has the feel of a wild new world. I'm looking at you, Facebook.

Maybe Lily is due for a revival.

posted by sstrader at 2:14 PM in Cinema | permalink | comments (0)

March 11, 2009

Where was I?

Trying to keep track.

10 yo Barolo for our 10th V Day. on TwitPic

Valentine's Day was dinner at home where we cooked mini-beef Wellingtons with mixed vegetables. Our first time using pastry dough, so it was wayyyy too much but still good. Paired with a 10-year old Barolo given by the mother-in-law originally intended for our 10 year anniversary but moved to two weeks later. A rare and perfect pairing. Plans were for homemade McFlurries after but as usually dinner was completed rather late and there was no need for dessert. Flick was The Rocker. Nice enough.

End of Feb was the loss of more friends from work. Claudia and Deepthi will be missed but I suspect will keep in touch. There was a flood of activity on LinkedIn during that period, but now we at least have a means to find each other.

tickets.mendelssohn-sibelius

The 21st was Nadja Salerno-Sonnenberg performing the Mendelssohn Violin Concerto at the ASO. She was bouncing and swaying all through the piece. The first time I've seen her in concert and very active. Audience responded well! Drinks before at Table 1280 (always recommended for hangin' out) and after was late dinner at Trois' bar--we had tried after the last concert but they were closed. Awesome bar food! I had some sort of beef tip+aus jus and thin fries. Forget what Lisa had :-/

[ updated 2 Feb 2010 ]

Was remembering another piece performed on the program: Xi Wang's "Above Light - a Conversation with Toru Takemitsu". Short and stunning piece; diverse orchestra and colorfully abstract. Her website has some clips, but unfortunately "Above Light" is not included.

Serpas was awesome. 5/5 on TwitPic

The 27th was a Friday dinner with friends at Serpas, new restaurant. The chef had done time at Mitra down the street from us and the menu was as expected: every dish had unique flavor. Definitely 5/5.

porter-coaster

Last Friday (May 6th) was a CD release party for Howlies at Star Bar. I had to miss it because of volunteer work (with which my last two months have been filled) but dinner at The Porter Beer Bar was delicious. Lisa and Shelby said the mussels were the best they'd ever had. Next day was Watchmen [ 4/5 | IMDB | Rotten Tomatoes ]. The wait was worth it! I hope to get the director's cut when it comes out to enjoy what I hope will be a 4 hour version. Well done, even with the garishness.

posted by sstrader at 9:31 PM in Concerts , Where was I? | permalink | comments (0)

Of note: RMI libraries

Article via Reddit comparing the Thrift RMI protocol developed by Facebook and open sourced to the Apache project, and Google's protocol buffers protocol released under BSD. The primary benefit of both is that they're much (much) leaner than XML and SOAP. The interesting point of the linked article was that (with the implementations used...) using compressed JSON was faster. Neat.

I've never been impressed by the incessant bitching from developers who decry the bloat of SOAP. I can understand the potential need, but I suspect that most of the time we're fighting server speed and not throughput. Slashdot discussed Thrift two years ago. There are a few gems in the comments--albeit buried under the usual jags about NIH syndrome. Meh. Many good libraries come out of NIH along with many bad ones. I know I've benefitted greatly from open source so, like the argument against "useless blogs," useless code is harmless when ignored.

posted by sstrader at 4:27 PM in Programming | permalink | comments (0)

March 2, 2009

Extended warranty

Looking at SquareTrade for an extended warranty for my new laptop. I tend to avoide these things, but since it's (1) a refurb, (2) only covered for 90 days, and (c) only cost me 600buck, a warranty seems more warranted. I received an email from them, so Buy.com must have a partnership with SquareTrade: $100 covering a year after the 90 days. They seem trustworthy enough. Woot uses them. The only questionable information I found was a complaint on eBay (and on the first page of Google search results, I might add) where the customer tried to have their phone repaired and SquareTrade said that the phone was not, in fact, eligable for warranty through them. They got their money back, but the smell of scam-or-scam-like-behavior was thick. If they'd never taken advantage of the warranty, SquareTrade would have kept the money and yet provided no protection. A minor complaint, but it speaks to the integrity of the company.

posted by sstrader at 1:13 PM in Home Network & Gadgets | permalink | comments (0)