Archive for February, 2007

Videos on the Road

February 19, 2007

The VideoDownloader Firefox Extension is a godsend for anyone like me who has a long ride to work every morning, and doesn’t drive on his own.

Ever since I have a laptop, I can read on the way to and from work (about one hour drive in each direction) if I’m not too exhausted, even in dark winter days. In the past, I used to read books and articles, with a little lamp, but a laptop screen is much more convenient. The downside is, of course, that I get to read a lot more blog posts than literature I would like to read…

Since I found the VideoDownloader extension, I can also view videos on the way. One of the recent outcomes is that I used to see some chapters of Family Guy and fell for it.

Anyway, this laptop think now enables me to go over my del.icio.us ToRead list and ToHear list and catch up. This morning, I started watching this video about Human Computing which I bookmarked long ago, don’t know how I got there. This video talk (or at least its first 20 minutes which I already watched) is both hilarious and very interesting. Highly recommended.

Edit: I forgot to mention that the main drawback of the VideoDownloader extension and other similar tools is that they don’t support downloading from YUI Theater, and from Yahoo! Video in general. YUI Theater has some pretty good JavaScript talks. However, the YUI guys usually now put (or plan to put) a downloadable version for each of the interesting videos.

Dotted Lines in Tree

February 16, 2007

Our product is probably going towards using our company’s common UI. This will probably mean re-writing its GUI in a more Web 2.0 manner, which is nice.

The developer of the company’s common UI library is visiting us this week, so I had a first-time look into the library and trying to use it. BTW, the library is based on prototype and scriptaculous.

I noticed that in their sample page they use a tree that doesn’t display dotted lines that connect the dots. I asked the library developer if I can use our current tree implementation that does use dotted lines, and he said he doesn’t think that’s matter, but forwarded me to the usability guru of the company.

She said that from their experience, the dotted lines adds nothing to the tree usability and should be removed. I planned to say “do you know better than Microsoft” as I remembered Windows Explorer did display dotted lines, but when I took a look, I was amazed to find out that Windows Explorer in Windows XP no longer shows dotted lines in the folder tree (I’m pretty sure those lines were there in a previous version of Windows), and Outlook also displays a tree of folders without dotted lines. I guess this is the new convention of showing trees. There are some Microsoft exceptions for this rule, though. For example, the project explorer in Visual Studio has these dotted lines (from Visual Studio 6 until the recent Visual Studio 2005) as well as the advanced printer settings dialog.

Oddly enough, I can’t find any discussion about it on the web.

BISON Critique

February 14, 2007

Via Ajaxian I got to BISON by Kai Jäger. I’ll ignore the fact that it’s actually quite useless, and also contradicts with an existing GNU utility, and refer to some of the implementation details.

First of all, the writer complains that he was not able to send data with null characters, and also that the data was always converted to UTF-8, which is problematic for binary data. To solve the problem of the null character he uses yEnc, and as for the UTF-8 problem, he simply says it will probably make the BISON data longer (sometimes even longer then the JSON equivalent), which renders the entire effort only useful as a JavaScript exercise.

However, AJAX is certainly capable of sending binary data to the server. For example, Gmail does it when you add an attachment. The attachment is a binary data that can contain null characters. Of course, Gmail might also be using some encoding, but on the other hand, Gmail, being a web app, have no access to the file data until it is passed to the server. I guess Gmail (and everyone else that wants to upload binary data using AJAX) is simply setting the correct header:

xmlHttp.setRequestHeader(‘Content-Type’, ‘application/x-www-form-urlencoded’);

This should solve both problem, as the send data will be encoded in the correct encoding.

BTW, during the encoding discussion he mentions that he chose yEnc since base64 encoding “can sometimes be twice the size of the original unencoded message”. Anyone who knows how base64 encoding works knows that this is almost never true, and as Wikipedia says, “the actual length of MIME-compliant base64-encoded binary data is usually about 137% of the original data length, though for very short messages the overhead can be a lot higher.

I had a look in the JavaScript code itself, and the first thing that came to me was his extensions to the String.prototype object which are done in quite a clumsy way, and can be done a lot nicer (and I think more efficiently) using array trickery.

For example:

String.prototype.repeat = function(times) {
    var repeatedStr = “”
    for (var i = 0; i < times; i++) {
        repeatedStr += this;
    }
    return repeatedStr;
}

can be written as

String.prototype.repeat = function(times) {
    return new Array(times+1).join(this);
}

and this

String.prototype.reverse = function() {
    var reversedString = “”
    for (var i = this.length – 1; i >= 0; i–) {
        reversedString += this.charAt(i);
    }
    return reversedString;
}

can be written as

String.prototype.reverse = function() {
    return this.split(“”).reverse().join(“”)
}

 

That’s all for now. I still need to look at the rest of the code to see what it does. I also want to have a look at yEnc – it looks interesting.

The one application I miss

February 9, 2007

There is really one application I recently miss – a task bar fish-eye magnifier.

I tend to use the Quick Launch toolbar in the task bar a lot. I even set it in a top, separate line to start all sorts of macros and applications that do quick handy things for me. It turns out that although I know how to find my way in Windows using the keyboard, I’m not the kind of guy who would use Launchy for these kind of things.

The problem is, I always find myself looking for the icon I need. What I would like is that when I’m approaching the task bar area with the mouse, icons will start growing, with optionally displaying their description, so it is easier to choose. Something like what Alexei did, or what the dojo toolkit has.

I know that there is a Yahoo! Widget that does it, and also sTabLauncher, but they are both too large, and are placed it in a different location on the screen, which interferes with my day-to-day work. I want an application that acts directly on the Quick Launch toolbar and other toolbars in the task bar.

I might end up writing it someday…


Follow

Get every new post delivered to your Inbox.