Amar Sagoo

Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

1 May 2006

The Grand Unified Download Manager

Since the introduction of Mac OS X, Apple has been doing a great job of offering more and more functionality at the operating system level that application developers used to have to implement themselves. Spell checking, Address Book, Keychain, Dictionary, disk burning and PDF support are some good examples. Almost everyone wins when this happens: users get a consistent experience and are less dependent on particular applications, and developers have less work to do and can simplify their application code. The only ones who potentially lose out are developers who had seen the gap and were actually trying to offer such a service to other applications, like, for example, Nisus Thesaurus or Adobe Acrobat Distiller.

When I recently saw this post on the Omni Group forums by Jon Hicks, I saw another perfect candidate for Apple to assimilate: the download manager. As it stands, at least six applications on my machine implement their own download managers: OmniWeb, Safari, Firefox, Camino, NetNewsWire and Transmit. And, as Jon pointed out, they all have different UIs.

So what would such an Apple download manager have to offer? It would of course need to support the most common protocols, including HTTP and FTP. (Perhaps even BitTorrent and Gnutella? Maybe not, since Apple wouldn’t want to make life any easier for those not using the iTunes Music Store.) Pausing and resuming downloads would be a must, too. The interface would need to offer enough functionality to compete with most browsers, but be simple enough for the non-geek.

Out of the applications mentioned above, I personally like OmniWeb’s download manager best, because it has a toolbar that offers some useful commands with a single click, like “abandoning” (clearing and trashing) a download. Also, all its commands have text labels. It doesn’t present any puzzles and coordination exercises in the form of little grey circles and pop-up buttons. However, I do like how other apps have managed to be more horizontally compact by putting the progress bar on its own line below the file name.

Again, someone might lose out if Apple were to offer an OS-wide downloading framework. If it offered enough functionality, it could be developers of apps like Download Wizard, iGetter and Speed Download. But, speaking with my user-hat on, I’m afraid I wouldn’t care.

28 April 2005

You but me

It would be nice if English-like programming languages such as BASIC or AppleScript allowed using but in place of and.

Logically, and and but are the same; only but carries some additional semantics implying contradiction or contrast. (Note how I cleverly avoided using two successive buts there).

Why bother? Well, consider the following example:

If License.IsValid And License.IsBlackListed Then
    LectureUserAboutPiracy
End If

Now read this:

If License.IsValid But License.IsBlackListed Then
    LectureUserAboutPiracy
End If

Although interpreted the same by the computer, the second version makes the programmer's intention more obvious to a reader of the code.

This is similar in spirit to how you can use the in AppleScript and HyperTalk to make code more readable without affecting its behaviour. But this would be even more useful, because complex logical propositions can be quite a pain to decipher when you don't know the original intention. In fact, even constructing them can be difficult when you're having to translate from real-world terms into and and or-terms.