Friday, August 29, 2008

Pause this!

Try this: start watching video with the youtube video player (or other streaming video player) over a moderately slow internet connection—slow enough that the video playback goes faster than the download.

The video playback will of course catch up to the buffering every few seconds, so there's no more data and playback has to pause. There are at least a couple of reasonable options for the player UI now:
  1. Pause the video, just as if I'd hit the 'pause' button myself. Leave it paused until I hit play again.
  2. If you're not going to leave it paused, then don't change the damned play button to claim that you are. Leave the button alone, and leave it active so I can press it to pause the video for real.
But the youtube player doesn't go for either of those reasonable choices. Instead, it appears to pause the movie, changing the button to the 'paused' state, but doesn't really pause it; when more data comes in, playback resumes. Of course at this point, as a user, what I inevitably want to do is pause it and go do something else until the whole movie comes in so I can just watch it without interruption. But this is now impossible, because the button claims to be paused, so I can't pause it; but it's waiting for data, so I can't unpause it; all I can do is wait until it starts on its own, and then use my ninja-like reflexes to try to pause it myself before it runs out of data and fake-pauses again. This game is not fun.

The pause issue would at least be ameliorated if I could just drag the scrubber back a few seconds, to get a bit of playback time with which to battle the UI. But that's broken too: if I try that, odds are excellent that the playback will freeze for some mysterious network hijinx and I'll have to start all over. Why? The data should already be there. Just play it. Why on earth should that have any effect on the download process?

And finally: why is it that sometimes when the scrubber shows that the movie is buffered ahead of the current play position, it won't play until it buffers even farther? The whole point of the buffer indicator is to show me how many seconds of playback have been downloaded. If they aren't available, then don't show them.

These are rhetorical questions, by the way. There is no good reason for any of these behaviors.

(I pick on youtube only because they're popular. Most, though not quite all, other video players have the same problems.)

Wednesday, June 11, 2008

I've finally started working on some web games. The first thing I did was spend a bit of time investigating what platforms are available. And it really was a bit of time, because it looks like Flash is still the beginning and then end of choices if you want a reasonable fraction of people to be able to actually play your game. So I downloaded the Flex demo and started playing around.

Actionscript 3 is a hybrid language, trying to mix mediocre static typing (like C# or Java before generics) with the dynamic typing of previous versions. It seems to me like it really tries to push you toward the static side, though. For example, in the default configuration, Flex requires type declarations on everything, so if you want a plain old dynamic object, you have to write

var x:Object = {...}

where it used to be just

var x = {...}

On the whole this is more annoying than useful. I'd rather have it do type deduction, so that

var x = {...} // same as x:Object = {...}
var s = "..." // same as s:String = "..."


Other languages (C# 3.0, C++, VB, etc.) are going this way, and it really works much better. Maybe ActionScript couldn't do this for backwards compatibility, but it would have been nice.

Ok, so this wasn't insightful. At least I got another post up.

Sunday, April 6, 2008

Sludge for teh win

Over a month since my last (and first) post. This is not going well.

Here's the problem. My intention was to fill this blog with clear and insightful analysis of all sorts of programming-related topics. I have a long list of topics to rant about, so there's no shortage of material. But when I sit down to write about one of them--let's say some low-hanging fruit like how much iostreams sucks--I get worried about the accuracy of the things I'm saying. I mean, this is the internet. You can't just say things that might be wrong. So I start double checking my facts and three hours later I realize I've wasted my entire allotted time reloading reddit and rotting my brain with fluff.

So then I figure, all right, the blog is also a way to practice my writing. So I'll just write about how I don't have anything to write about, and at least that will develop the habit and hopefully over time I'll manage to shift over to meatier stuff.

But I don't want to have a blog like that, a miserable swamp of unreadable wannabe writer sludge. So I don't write that either. And then it's over a month since I posted and the thing is looking dead. I don't want a left-for-dead-after-one-post blog either!

So for now I guess "miserable swamp of unreadable wannabe writer sludge" is the winner. Hooray?

Next time: what I found when I looked under my toenails!

Friday, February 29, 2008

Illumination

Oh dear. Another blog has been inflicted on the world.

But I have no doubt that someday it will be read by uncountably many people—that's eleven according to my fingers—and of course they will search back through the archives to find this first posting that explains the purpose and motivation of the whole thing. So explain I shall.

First, the name. I wanted a domain name where I could publish some web games, so I went looking for one that wasn't taken. I don't remember what my top choice was, or my second, or my third; I do remember that after a couple hours of looking for any halfway decent name that wasn't already taken, my standards were getting pretty low. So that's how I ended up with bogweasel.com. It's what was left.

So when I needed a blog name I thought I'd save myself some time and just stick with the whole weasel theme.

I only got around to making one web game, the result of one weekend spent learning flash. Behold.

Where was I... oh, me. The author. I'm a programmer with a tendency to go off on rants about all sorts of topics, mostly but not exclusively related to programming. Somewhere around 1994 or 1995, I had a brilliant idea: I should write these rants down as essays and post them on the internet for people to read! Then I could enlighten the masses while saving my coworkers the pain of having to listen to all my crap. Plus I needed the writing practice.

Unfortunately, I'm a bit of a procrastinator, so it took me thirteen years to get around to starting, and now everyone is doing it. Oh well, better late than never, and I still need the writing practice.