Amar Sagoo

24 February 2007

Scrolling and white lies

I recently had to implement an HTML table in a web application that would display and allow editing rows of data. However, the number of rows you’ll get in the data is very uncertain. To avoid a ridiculously long web page, the table should not grow beyond a certain height and should instead show a scrollbar when there are more rows than can fit.

One thing that I find can be quite annoying is if a table is just a little bit too short for its contents, so that you end up with a single row off the bottom, for example an eleventh row in a table that is only ten rows high.

As a little experiment, I decided to make use of the table’s flexible height to prevent this situation: we would display an extra row if the number of rows is only one more than our ideal maximum height. So if your ideal limit is ten rows, it would stretch to accommodate up to eleven rows. For twelve rows or more, only ten would be shown at a time. This way it always feels like the scrollbar is justified, because it’s never just to get to that one extra row. I think it’s unlikely that users would notice this behaviour.

However, I am not sure whether this is a valid design decision. One could argue that since your true maximum is eleven rows, not ten, you are making life a little bit harder than necessary for your users whenever they have to scroll. Also, I have no empirical information about whether and how much people actually get frustrated in cases where only one row is out of bounds. It almost becomes an ethical question: is it worth a white lie?

I think the approach may be valid in some cases, but it depends on several factors:

  • What is your maximum height? If your table can grow fairly high before showing its scrollbar, the cost of sacrificing a single row for this trick is less. However, if it can only be a few rows high, you are depriving users of a significant proportion of display area.
  • How likely will you exceed that maximum? If scrolling will be necessary in the majority of cases, it may be wiser to grant people the extra height to maximise how much they can see at a time.
  • How linear is the task? If people only need to read down the list of rows once, having to scroll a single row into view at the end is no big deal. But it might get frustrating when they have to repeatedly jump back and forth to compare or edit rows.

In my case, the table is fairly likely to contain tens or hundreds of data rows, and I only have space to show about a dozen at a time. So scrolling will often be necessary, and users will probably value every row they can fit on the screen. I’m not sure yet how likely people are to scroll back and forth, but the other two factors are probably enough to outweigh any gain in happiness that might result from not having a single row out of bounds.

13 January 2007

NSCompositingOperation visual quick reference

I have never been able to remember what the different compositing operations in Cocoa's NSImage class do. So whenever I need to use one, I find myself having to read the documentation, which is not particularly easy to understand, because it describes the operations in words rather than graphically.

M. Uli Kusterer has had the same thought. However, I wanted something that would work at a quick glance, at a small size, and that would print easily.

So I decided to fire up OmniGraffle and create this visual quick reference:

You can download it as a PDF here.

Let me know if you find this useful or if you can think of any improvements.

19 August 2006

19 July 2006

The Non-Wheel iPod

Whenever you see the rumoured next-generation video iPod mentioned, the expected features always include a huge screen covering the front of the device and a “virtual”, touch-screen-based click wheel.

I may be missing something here, but what exactly would be the point of that? The reason the iPod has a scroll wheel is to make scrolling easier on a device that doesn’t allow more direct manipulation of screen content. If you had a touch screen, the grounds for having a scroll wheel would disappear, and you could just use a scroll bar, right? A scroll bar would allow scrolling directly to any point in a list and would involve less (and less awkward) physical movement.

Also, if you had such a nonsensical, virtual scroll wheel, you’d be waving your thumb around over the contents of the screen all the time, which doesn’t sound like a clever idea. Of course, you could dedicate a section of the screen for this wheel, but wouldn’t you rather use that space to make the list taller?

So I think either the creative minds behind the rumour sites didn’t think this one through properly, or the creative minds at Apple are making some rather silly decisions. Let’s hope it’s the former.

13 July 2006

i use this

A few days ago, i use this, a nice alternative to MacUpdate and Versiontracker, was launched. It uses a model that’s quite different from, and arguably more useful than, traditional software databases. Instead of the number of downloads (which say more about marketing than about quality) and user ratings (which only a very small proportion of the user population provide), i use this simply lets registered users mark applications they use. The resulting numbers are what drives the rankings. One advantage is that since you can also unmark an application when you’ve stopped using it, the data stays representative over time, so that the Internet Explorers and StuffIts of this world don’t skew the results.

The uptake in the first few days seems to have been quite impressive. I think it’s the aspect of personal expression (”Look, here’s what I use!”) that makes this model so attractive and gets people to happily provide the data. It also has a social component by allowing networks of friends and by showing you “neighbours”, who use similar applications.

It’s also a very useful tool for developers. The data on my applications so far looks quite unexpected. I might do a little review in a few weeks time when the site has a larger set of data.

I hope that in the future they will provide some more interesting data mining results in addition to the list of top and hot applications (which, I’m guessing, take into account how many people “love” an app). For example, I’d quite like to see the fastest recent climbers. Also, an interactive graph of the total distribution might be interesting (which I imagine would be a Long Tail).

Oh, by the way, if you’re interested, i use this.

8 July 2006

Don’t let it control you

Since I got broadband Internet a few years ago, I’ve had my email client at home checking for new mail every 5 minutes. When I started using a dedicated RSS reader, I also set that to check feeds as frequently as possible (every 30 minutes in NetNewsWire).

Earlier this year, I had to spend a few weeks without an Internet connection at home. I was able to check my email only when I made the trip down to the university library, and I stopped following the news altogether. Although slightly inconvenient, this was not as bad a situation as I had expected, and I felt that I got lots more work done this way.

When I eventually got connected again, I really felt the contrast. The RSS reader in particular was very interruptive. Unlike email, which comes in intermittently, there were updates in my subscriptions virtually every time the program refreshed them, so an interruption was almost guaranteed to happen every 30 minutes, with the green badge on NetNewsWire’s icon tempting me to see what was new. I tried to compensate by setting it to check only every 2 hours. However, it turned out that I had got conditioned to expecting news on a regular basis, and found myself glancing at the Dock icon quite often. I actually lost patience and manually refreshed the subscriptions sometimes, which only resulted in me feeling disappointed with my willpower.

My solution to this unfeasible dependency has been to turn off automatic checking in NetNewsWire. As hoped, this seems to have undone the conditioned expectation of updates, and I now manually refresh my feeds when I’m having a break. I’m sure that’s still more often than truly necessary, but at least I can concentrate on my work when I want to.

I’ve also reconfigured my email client to update every 15 minutes. I don’t want to turn off automatic checking altogether here, because sometimes you do get emails that need immediate attention. It seems that since emails are more sporadic, there is no regular interval to get used to, so you don’t actually notice that the program is checking less frequently.

Another highly effective strategy I use is to minimise the number of RSS feeds I subscribe to by using good news “gatherers” such as John Gruber, and even to dump Flickr contacts (except friends, of course) whose photos I don’t end up liking as much as expected.

If you feel like you’re getting an information overload on your desktop, I recommend you take control and make some changes as well. You’ll be surprised how easy it is to get by without being constantly connected.

21 June 2006

Stoves revisited

A lot our interaction with technology is indirect, through controls, such as buttons and knobs, that affect the behaviour of some part of a system in some way. A common principle for making these controls easier to understand and remember is to make their physical functioning and arrangement analogous to the functions they control. For example, you move the mouse on your computer to the left to move the pointer left. This is called a natural mapping. An example of an “unnatural” mapping is the QWERTY keyboard. Some mappings can’t really be made natural, because they involve non-spatial concepts. For instance, there is no right answer as to whether the left or the right button on your mobile phone should pick up a call.

A popular example for illustrating mappings was given by Donald Norman in The Design of Everyday Things and involves kitchen stoves:

Although some stoves at least use the two knobs on one side to control the two burners on the same side, it is not clear, without reading the labels (usually at the front of the stove, out of a standing adult’s line of sight), how they map to the front and back. Personally, I've been close to destroying kitchen utensils and causing minor injuries more than once. Norman suggests the following as better alternatives:

An obvious reason I can see for not using these designs is the extra space they need. I don’t know about America (where everything is big) but here in Europe, stovetops are usually roughly square, and I can imagine that manufacturers of stoves and of kitchens would prefer to keep them that way. In any case, I’m sure most users wouldn’t be willing to sacrifice precious kitchen space for a more natural mapping of stove controls.

Instead of shuffling around burners, why not leave them where they are and just move the controls instead. A subtle shifting is all that’s needed (I included a version for controls on the stovetop as well):

It’s not a perfectly natural mapping, but the arrangement contains enough information to be unambiguous, and I imagine that you’d get used to it very quickly.