Thursday, February 28, 2008
UI Design in Sunshine
I just saw Sunshine, and while going through the extras I was pleasantly surprised by this short video about the design of the user interfaces on board the ship in the movie. The whole video is pretty interesting, but the part that made me literally laugh out loud starts just after 1:47.
Monday, January 21, 2008
Flickr Photo Page Bookmarklet
Occasionally I come across images that are hosted by Flickr, but which don't have a link back to the photo page on Flickr. This seems to be especially common on message boards and image bookmarking sites like FFFFound. Being able to get to the Flickr photo page is nice for a number of reasons: you can see other photos by the same author, see the metadata, notes, comments, others sizes, etc.
A Flickr photo URL looks something like this:
http://farm2.static.flickr.com/1407/1085850486_23589455e2.jpg
Flickr has some nice documentation for their URLs. The URL above is of the form http://farmfarm-id.static.flickr.com/server-id/id_secret.jpg, so the photo ID is 1085850486 and the "secret" is 23589455e2. It's possible to find the photo page by using Flicker's API call "flickr.photos.getInfo", which returns XML containing the photo ID. That's tedious, and won't work in a bookmarklet.
Some more searching turned up the http://flickr.com/photo.gne?id=id URL. I can't find any official documentation for this, only some posts in the Flick help forums. It appears to work though, and it wasn't too hard to turn it into a bookmarklet.
To install the bookmarklet, just drag the following link to your bookmarks or toolbar.
To use the bookmarklet, first make sure that the photo is the only thing open in the browser tab/window. In other words, the URL in the address bar should be for the .jpg hosted on flickr.com. If the photo is embedded in a page you'll generally need to select "View Image" (or equivalent) from the context menu. (FFFFound is an exception: it caches the images, so you'll instead need to click on the image to be taken to the original) One you're on the image, just click the bookmarklet to be sent to the Flickr photo page.
Wednesday, July 11, 2007
Rant: Bad Internationalization
A lot of websites don't seem to "get" the fact that the Internet is international. I'm not talking about things like being translated into multiple languages or outputting content in UTF-8 (in this post). What really annoys me are sites that seem to actually go out of their way to make life difficult for international users and/or customers.
Credit cards have the nice property that they work internationally. If someone accepts Visa or Mastercard they'll normally accept those cards no matter what country the cards originate in or what currency the account is in. Currency conversion is handled automatically by the credit card issuing bank. A number of websites seem to be incapable of dealing with this properly, however.
Air Canada
An example I recently encountered is Air Canada's website. I was going to purchase some plane tickets for some family in Canada. After going through the ordeal of finding flights that met the various constraints I got to the payment page. I then entered my credit card number and most of my billing address only to find that "United States" wasn't in the country selector. "Is it listed as America? USA?" I thought to myself. Nope. It just wasn't there.
After a few minutes of trying to figure out what was up I noticed a paragraph in the sidebar that helpfully pointed out that the United States, as well as a handful of other countries, had been intentionally left out of the available options based on the country selection I had (apparently) made when I first visited the site. The only rationale I can think of for this is that it's a way to charge customers in different countries different prices. Blech.
Dell
Another incident happened back around Christmas. I was going to order a present for my father, who lives in Canada, from Dell. I first tried using dell.com, but it wouldn't let me ship to Canada. I then tried dell.ca, but the billing page had the country field hard-coded to Canada. My US-based credit card wasn't going to work.
After failing with both websites, I decided to try and get in touch with a human. "I'll just call the number on dell.ca", I thought. The number is 1-800-WWW-DELL (phone over HTTP?), and it's the same number on dell.com. Calling the number from the US connected me to Dell US, not Dell Canada, and they wouldn't ship to Canada. I asked if they could connect me to Dell Canada, and the sales person suggested that I just have the present delivered to myself, in California, and then I could ship it to Canada myself.
This idea is all kinds of terrible because it would mean more work on my part, be more expensive, take longer for the gift to arrive, and it'll also mean that the recipient would have have to pay GST -- not a very nice Christmas present. (GST is a tax applied to items as they cross into Canada.) By ordering from Dell Canada I could pay the GST, rather than the recipient having to pay it, the shipping would be direct (and presumably from a warehouse in Canada), and would be included in the price.
Eventually I was able to convince the Dell US salesperson to give me a real phone number for Dell Canada sales, and I was able to order the gift. Still, this would've been far less painless if dell.ca just let me choose the billing country for my credit card. Better yet, dell.com should allow shipping to Canada by forwarding my order to Dell Canada for me.
With the Dell example I think the reason for this screwup was less malice, more oversight/ignorance/stupidity. However, in some ways it's even more sad that even Dell, a company known for being relatively 'net savvy, can't seem to get this right.
Sunday, June 03, 2007
Voodoo Electronics
I'm interested in robotics, but building robots requires three things: mechanics, electronics and software. (I'm intentionally ignoring BEAM here -- I'm not interested in building software-free robots.) I know software, and I feel like I have an okay grasp of mechanical systems. I don't know enough about electronics, though.
My understanding of electronics is that there are basically three types of electronics:
- AC electronics. Not especially relevant to building robots.
- DC digital electronics. This part I feel like I pretty much understand. It's based on boolean logic, and so a lot of my software knowledge is applicable. The only extra bits are pretty simple:
- you're dealing with high versus low rather than true/false, so you need to come up with a mapping convention for each circuit and stick with it.
- many components (like ICs) also need power. Just get a power source that's the right voltage and enough current, and this should be okay.
- there are a few different "families" of digital components. Stick with one for any one circuit.
- DC analog electronics. This has two main parts. The first part is the "simple bits": things like Ohm's law which every single electronics tutorial feels the need to tell you about. The second part is what I've come to call "voodoo electronics" -- the parts that every electronics tutorial I've ever seen simply hand-waves away.
A recent example of "voodoo electronics" that I encountered was in the most recent issue of Make. This issue had a number of electronics tutorials. Some of these were very helpful, like Your Electronics Workbench. The article on the 555 timer chip, however, The Biggest Little Chip, suffered from the voodoo electronic problem. The article contained the following schematic:

It then went on to explain the purpose of each of the various components one by one. The explanations were a bit terse, but reasonable. Eventually, the entire circuit had been explained except for R3 and C2. Here's how the article explained their purpose:
R3 protects the LED from excessive current, while C2 protects the 555 timer from random noise.
"Excessive current"? "Random electronic noise"? How am I supposed to design my own circuits without understanding how to both predict when these problems will exist and how to devise a defense against them? So far I have yet to see a single electronics tutorial that explains these things.
I ran into the same thing when I found some schematics for a stepper motor controller on the web. All of the schematics made sense to me, except a mysterious zener diode which was there (according to the documentation) "to absorb reverse EMF". No more explanation was given.
Are there any electronics tutorials out there that actually explain how to predict when part of a circuit will be susceptible to "random electronic noise", "excessive current", or "reverse EMF" and how to build protection against them, or is my only hope to take a full-fledged course in electrical engineering?
Update
After posting this I realized that I could just post a comment on Make's website. The author of the 555 article posted a very helpful response. Now I just need to figure out what that zener diode in that stepper motor controller was for.
Tuesday, May 01, 2007
Copyright Law and the King
From the U.S. Copyright Office's What Does Copyright Protect? page:
How do I protect my sighting of Elvis?
Copyright law does not protect sightings. However, copyright law will protect your photo (or other depiction) of your sighting of Elvis. Just send it to us with a Form VA application and the filing fee. No one can lawfully use your photo of your sighting, although someone else may file his own photo of his sighting. Copyright law protects the original photograph, not the subject of the photograph.
Saturday, March 10, 2007
Easier Links with Google AJAX Search API
Ever get annoyed by the complexity of adding links in blog or message board posts? Sure, it isn't rocket science, but between getting the angle brackets, quotes and start and end tags balanced correctly and getting the URL right, adding links is a pain.
This weekend I did some playing around with the Google AJAX Search API and made a nifty bookmarklet for creating links in textareas. I've only tested it with Firefox (various combinations of 1.5 and 2.0 on Linux, Windows and Mac), and it only works with plain old multi-line textareas (not 1-line text fields or rich/"wysiwyg" text controls). Aside from those caveats, it seems to work pretty well.
Installation is easy: just drag this link to your bookmark toolbar: [linkify] Note that if you're reading this in a feed reader you'll probably need to visit my site for this step, as feed readers usually strip out JavaScript. (Readlings: no smirking.)
Here's how to use it:
- Go to some page that has a textarea. The comments area on most blogs should work. The Blogger posting form in "Edit Html" mode also works.
- Type some text in the textarea.
- Select the part you'd like to turn into a link.
- Activate the bookmarklet. This will bring up a search pane on the right side of your browser window.
The search query defaults to the text you'd highlighted. You can edit the query if necessary.
- Click on "create link" next to the search result. The popup will disappear, and the text you selected earlier (in the textarea) will be replaced with a link. The link's text will be the original selected text, and its href will be the URL of the search result you picked.
Thanks to Chris Wetherell for telling me about inter-frame communication with URL fragments, which turned out to be handy.
Update
I've been told that the bookmarklet works in Opera, but not in Safari. I'll look into the Safari issue.
Wednesday, January 10, 2007
Intellectual Tug-O-War
Why is it that almost all of the online debate about intellectual property is between extremists? On the one hand we have Richard Stallman, Cory Doctorow and piracy apologists. On the other hand we have the RIAA, MPAA and Microsoft/Apple astroturfers. I tend to disagree with both of these groups because both of them go too far -- just in opposite directions.
The most recent example of this is the Analysis of Microsoft's Suicide Note page. It's on fsf.org, so of course it's no surprise that most of the comments are from free-software groupies. The only exceptions are a few posts from "sreiser". I actually agree with some of his points, but I strongly disagree with:7
by affording basic intellectual property protection within the operating system, they [Microsoft] are doing great service towards cultivating a more responsible public
The responses are, of course, equally extreme, but diametrically opposite. For example:
...private piracy, on the other hand, does not cause a real harm to the manufacturer, due to its nature. By private piracy I refer to those people who download a certain product from Internet or otherwise make unauthorized copies of it only for self use. This is, of course, still illegal (although there are legal holes in many countries than enable it), but even so it requires a closer look: most of 'private pirates' (most probably more that 99%) copy the product just because they cannot afford buying it. So, if you disable such user from doing that, this won't make him/her to buy that product, since cannot afford it. Instead that user won't use the product at all.
I don't agree with either of these quoted bits. On the one hand, if I'm buying an operating system, that operating system should serve me, not the content providers. If there was somehow some sort of DRM that didn't cause any harm, then I'd be okay with it, but not causing any harm means:
- It shouldn't make my machine slower.
- It shouldn't make my machine run hotter.
- It shouldn't increase the cost of the operating system or computer.
- It shouldn't increase the liklihood of bugs.
- It shouldn't make any legitimate tasks that I might want to perform more difficult. This includes fair-use tasks like backing up my media, moving it between my machines, burning it to a CD so I can listen to it in my car, etc.
On the other hand, the "private piracy doen't hurt anyone" argument simply doesn't hold water. There generally isn't a black and white distinction between what one can afford and what one cannot. Can the typical teenager afford to buy thousands of CDs? Probably not. Can they afford to buy tens or even hundreds of CDs? For most American teenagers the answer is probably yes. So is it okay for someone to buy as many CDs as they can afford, and then to pirate the rest of their music?
Even if you did consider such an absurd situation to be morally justified, I argue that it would rarely happen. Once someone accepts piracy as a legitimate option they'll pirate whenever the percieved benefit minus cost outweighs that of purchasing. Given that many people's wants expand to exceed their means, and that physical goods are notoriously hard to pirate, people who have taken this path will not purchase media even if they can afford it. Worse, this sort of behavior can spread to those well outside of the "can't afford it" group because it lowers the social stigma of pirating, while at the same time decreasing the percieved value of the purchased product.
One of the craziest things I've experienced when trying to talk with these extremeists is that they generally see me as being on the opposite side of the spectrum from them. The anti-copyright crowd, upon hearing that I think content creators should be able to use copyright in order to get compensation for their work will invariably accuse me of being against open source/"free" software. I actually like open source (I'm typing this on my Ubuntu box) and I've even contributed to some projects. I think of "open source" as a feature though, not a moral imperative. While I prefer my software to be open source, I don't consider the developers of non-open-source software to be infidels.
Likewise, members of the the pro-DRM camp, upon hearing that I dislike DRM, will generally accuse me of being a software pirate. I just don't want fair use to be harmed. The "don't even talk about circumvention" bits in the DMCA are also frighteningly similar to thoughtcrime.
Am I really the only one here in the middle? In the end, I'm inclined to side with the "information wants to be free" crowd, but mostly because they seem to be on the losing side of the tug-of-war.
