Custom Search

Wednesday, November 23, 2011

Why the Mac UI sucks

The problem

One of my ex-bosses - a very sharp man whom I respect immensely - says that one of the problems with X is that there are too many choices for window managers. This causes people to waste time trying different window managers and playing with configurations rather than actually doing work.

The second part of that statement is certainly true - people do spend an inordinate amount of time essentially playing with window managers. I've certainly spent more than my share of time with them, starting with extremely configurable managers like gwm and sawfish, and then exporting a window managers internal objects via CORBA to make them available to other scripting languages.

I eventually realized that most of my work was trying to get the window manager to make efficient use of the available space with minimal effort on my part, so switched to working on managers that already did that, like ratpoison, and eventually writing an extension for plwm to provide a UI similar to ratpoison. Lately, I've started using dynamic window managers, like wmii and xmonad, which do all that for me, and also provide for windows that don't play well with their paradigm.

The reason people spend time configuring window managers - and even writing new ones - is because they are important! The window manager is something you have to deal with every time you use a computer, on an ongoing basis.

I even invented a benchmark for window manager quality based on this: the curses benchmark, which is how many times a day you curse because your window manager misbehaved. A good window manager will have a curses value well below one a day. The Mac doesn't makes that cut. About the only good thing that can be said about the Mac UI is that it's better than MS Windows.

Going back to the original statement, I agree with the first part. X has too many window managers. I suspect that's because the alternatives have too few. So people who can't stand the paradigm they provide wind up writing their own window managers to try and get a paradigm that they can stand.

Tiling managers

One of the things I observed - about myself and others - is that we tend to lay out collections of windows in a non-overlapping fashion using all available space. This is called a tiling. Much of my work with scripting managers was trying to get tilings built automatically. There are window managers that do this for you. They were popular in early windowing systems, but were quickly replaced by the overlapping model most often seen today. They didn't completely die out - at least not on X.

The tiling paradigm has three advantages over the overlapping windows paradigm. First is that they will use all the space available to them automatically, with no effort on your part. Second, since there is usually a visual order to the windows, there's an obvious paradigm for navigating between windows with the keyboard. For that reason, they appeal to people who don't like using pointing devices. Personally, I think window management is to important to be left to devices with the low bandwidth of pointing devices. Third, they actually manage your windows, rather than providing you with tools and making you do it yourself.

As I mentioned, lately I've started using dynamic managers. These will change the tiling automatically as windows are added and removed. In particular, I've recently switched to xmonad, which seems to fit my work flow really well. It has the notion of a master window, along with some secondary windows. One half the screen (normally left-right, but up-down is available for small screens) is reserved for the master window or windows (since you can ask for more than one). The other half is filled with secondary windows. When you open a window with the master window having the focus, the new window will replace the master, and the master will be added to the secondary windows. Opening a window with a secondary active causes the new window to be added to the secondary windows. No overlapping, no minization, no actions required by the user.

A task comparison

So lets compare xmonad to an overlapping window manager doing a typical work flow, like reading mail. For most messages - at least for me - the dynamic manager won't make a difference. I'll just delete and/or save most messages as I read them, and move on to the next. I may click a link or two in one, which will open in the browser that I've got in the secondary windows area.

But now I want to answer one. So I click reply, and a reply window opens up. While the pointy-clicky editor built into the mail reader is OK for short things, for a long message I'll want to use a real editor, so I choose mail readers that have an option to edit a draft message in an external editor. Choosing that option will open a third window for the editor.

With an overlapping window manager, I've now got two windows stacked on top of the mail reader, probably with no real relation to it. If I want to refer back to it - say to check that I didn't delete to much text in the editor, or look at the text of a different message I want to refer to while working on the draft, I usually have to bring one or more to the front and re-arrange things to get them where I can see one of the two older windows. This extra activity generally results in a curse or two, and happens more than once a day.

With xmonad, no such problem occurs. As each new window opened, the old one was moved to the secondary area, with no areas obscured. So they aren't in the way, but are accessable. It's probably also resized, so I may need to scroll a bit. Should I want better access to it, I can either swap it with a master window, or add it to the master area (where it would presumably have more space).

Bottom line

This actually matches my normal work mode almost exactly. I normally work with a single window - or maybe two - that I'm working with, and a few (between two and four) others that I refer to every once and a while. xmonad optimizes that behavior. I don't spend time worrying about window sizes and placement. I occaisionally swap a pair of windows, or maybe switch one to full screen mode (yes, xmonad supports that), but normally things are where I need them, with no time or effort on my part.

Isn't that kind of efficiency worth a little time spent configuring things?

1 comment:

  1. in case you have not yet configured the xmonad shortcuts, have a look at