
Solving the Alt-Tab Problem - omergertel
http://www.azarask.in/blog/post/solving-the-alt-tab-problem/
======
cturner
This is a classic example of the design tradeoff that directly pits new users
against power users. MRU is a simple, solid solution. Like many powerful
tools, it takes some learning, and is then dependable. The alternative
suggested here is a very complicated solution that power users will hate
because it's unpredictable.

    
    
        You’ve been using alt-tab to bounce back-and-forth
        ...
        tab. What happens? Because of your habit, you expect it
        to go to your web browser, but because the last used
        application was your Twitter client, that’s where it
        switches.
    

Experienced users will handle this by repopulating the cycle when they switch.
In this case alt+tab, release, alt+tab, alt+tab, release, alt+tab.

~~~
sankara
W7 provides a rough equivalent of a static ordering by virtue of its taskbar.
My browser and IDE are pinned at positions 1 and 2 and I could typically reach
them "always" with Win+1 and Win+2.I'm yet to take full advantage of that
though. I use alt+tab, release, alt+tab, alt+tab, release, alt+tab most of the
times as well.

~~~
cturner
As far as I can tell, W7 doesn't have a learnable internal logic.

I've started a new job recently where I got W7 (having never used Vista) and
have played with it quite a bit. Just when I'd think I had it worked out, I'd
open up a larger volume of windows and it would change behaviour.

On top of that there are prominent applications which have never played nice -
outlook (and anything that minimises to the status bar - behaves
inconsistently), and excel (which has never played nice).

~~~
sankara
I disabled minimise to status bar in outlook as soon as I moved to W7. Trust
me you won't miss it. Win+<num> should work with Vista too (in quick access
bar) if I'm not wrong.

From what I learn from people at MS, Office team follow their own UI
conventions and they dictate Windows not the other way round. So it would
always be office does something and windows follows.

~~~
cturner

        I disabled minimise to status bar in outlook as soon
        as I moved to W7
    

I've had a google in search of this and not turned up anything. Playing with
the view of things in the systems tray doesn't fix the problem of it staying
near the top of your MRU list, against windows convention. How do you do it?

Win+num swaps by application, but not by windows.

Win+tab has a horrible transition effect that I don't seem to be able to turn
off without destroying the feature altogether.

~~~
sankara
Right click on Outlook status bar icon and uncheck "Hide When Minimized".

It's just that it provides a mix of MRU and static ordering. The goal for me
typically is to move to a frequently used app e.g., my IDE/Browser asap.
Win+<num> gets hardwired and I don't have to remember if my fav app is
third/fifth from my current window/app.

~~~
cturner

        Right click on Outlook status bar icon and uncheck "Hide When Minimized".
    

OK, now I see what you meant when you said, 'Trust me you won't miss it.'.
Yeah, I can see your point but I do miss it, but it's still an improvement :)

* What that in original state (i.e. Show when minimized) and I minimise, the app stays at the top of the MRU stack.

* When that is on, and I minimise, the app disappears out of my alt+tab order altogether.

------
scott_s
The problem with using a learning model in an interface is making it smart
enough to do its job, but dumb enough that the user can easily have a mental
job of how it will act. (See the excellent article "Wolfram Alpha and
Hubristic Interfaces" and HN discussion:
<http://news.ycombinator.com/item?id=695582>)

The more knobs and heuristics used in the interface, the harder its going to
be for me to both guess what's going to happen, and know how to "fix" it when
it guesses wrong. I think this is an interesting UI problem, because I
encounter it frequently. But I also know how to remedy it easily.

~~~
abstractbill
_The problem with using a learning model in an interface is making it smart
enough to do its job, but dumb enough that the user can easily have a mental
job of how it will act._

Yes, exactly. At the same time as the switcher program is trying to learn the
user's common patterns, the user is also trying to learn how the switcher
works. I can see that not ending very well!

It would be particularly frustrating during the learning phase, when the
switcher doesn't know the user's habits and so switches poorly, and at the
same time the user is struggling to figure out what order the switcher will
put things in.

------
chaosmachine
I use Spaces (OSX's virtual desktops) and have them on hotkeys. Command+1 gets
my editor, Command+2 is browser, Command+3 is terminal, Command+4 is
Photoshop.

This setup eliminates the need for alt-tabbing. I just go directly to what I
want.

~~~
jf
With Quicksilver, you can assign hotkeys to the applications themselves. Once
I got this set up, I stopped using Alt+Tab.

~~~
gmurphy
Though it seems few people here are Windows users, Windows 7 lets you directly
switch to/launch apps by using WinKey + [Num], where [Num] corresponds to the
app's position in the dock.

Chrome lets you do the same with tabs using Ctrl + Num.

~~~
nnutter
This behavior is also true on Chrome/Firefox for Mac (s/ctrl/cmd/). Safari
differs in that they correspond to bookmarks on the bookmark bar; I actually
find this to be my preference.

~~~
Groxx
Once I learned that it works for the bookmarks, I prefer it that way too.
Especially for the bookmarklets for delicious, yc (thread-collapser), and
instapaper: just mash the key, and I never need to touch the track pad.

On Safari+OSX, cmd-{ / cmd-} switch tabs. I'd still like a to-beginning / to-
end key pair (maybe cmd-[], and reversed?), but that's pretty minor compared
to not needing to navigate with a cursor.

------
twopoint718
The solution that (mostly) works for me is a combination of multiple virtual
desktops (I use 9), and a tiling window manager (dwm). I usually don't exceed
2 or 3 windows per virtual desktop and the number of desktops is fixed. I have
it wired into my fingers that Super+<n> takes me to desktop 'n', and then,
typically I'm on the window I want. If not, it is a constant number of
"Super+n" to get me to the window (because I don't exceed 3 windows per
desktop).

This works for me because I can remember the "place" where windows are, and it
is usually one or two chords away.

~~~
cool-RR
I do that too, it's pretty great. I'm on Windows so I use Dexpot, which is
pretty okay.

~~~
dkersten
I hadn't heard of Dexpot - thanks for mentioning it. I've been looking for
some decent tools for Windows and have been unsatisfied with others so far.
I'll try Despot for a while and see how I like it.

First impressions are good, though (at least out of the box) the fullscreen
preview doesn't play nicely with multiple monitors :-(

------
tel
It saddens me to see Aza proud of dropping out of "3/4 of the schools he
attended" as his title bar proclaims. It's one thing to note that a lot of
people drop out of schools to seek their passions, but I never think of the
dropping out as being the moment of pride.

~~~
zackattack
Your loyalty should be to yourself, and your sadness comes from within.
"Finishing what you start" is not virtuous. Mining what you need and then
redirecting your attention is a smarter approach.

~~~
tel
Questions of loyalty aside, you're trying too hard to be profound. I'm using
sympathy, an interesting human emotion, to make commentary, not dredging up
personal strife or attempting directly to change Aza's life and purpose.

Also, I still have to disagree with marketing dropping out 3 times so
blithely. Opinions may differ, but as it stands I could interpret that to mean
he's had 3 semesters at different colleges and the a degree from a community
college. Without even critiquing that course of action, it certainly doesn't
seem to convey the same message Aza undoubtedly wants to share.

"I've attended four colleges to learn what I use today" is closer to useful,
though still weak when you're talking about such easily misunderstood life
choices. It invites questioning, discusses the positive mentality that might
lead to those decisions, and doesn't sound like a Business Week fluff piece.

 _98% of people who've had a successful life have dropped out of college;
isn't that surprising and almost certainly causal?_

------
Mongoose
Pretty cool to see a design lead with knowledge of Markov models. Granted,
someone on his team may have filled him in.

~~~
uggedal
Aza Raskin is also a developer: <http://code.google.com/p/pythonicjavascript/>

~~~
zackattack
And he majored in math and physics at University of Chicago. lol

------
BoppreH
Well, in Firefox I just move together the tabs I'm likely to switch between.
This way I can use Ctrl + Tab and Ctrl + Shift + Tab to navigate between all
tabs with a very specific and simple behavior.

Yes, it takes a little time to move the tabs next to each other, but I think
it's still better than breaking the "suspension of disbelief" when things go
wrong.

So, I think the solution for the Alt + Tab problem would be use MRU, but with
a movable, always visible order: basically, let me drag the apps in the task
bar.

~~~
metachris
I always felt that left hand ctrl+tab is an awkward position for the fingers.
I prefer Ctrl + PageUp/PageDown to switch, and like Chromes Shift + Ctrl +
PageUp/Down to move tabs.

~~~
yummyfajitas
It's not awkward if you remap caps lock to control.

~~~
RK
Or have a keyboard that places them "correctly".

------
ohwaitnvm
I can understand the issue the author discusses with making tabbing MRU, but I
think preference for this behavior differ between users. I have no trouble
internalizing the order of the last few applications (or browser windows),
thus MRU is the best for me. I'm likely to have several windows open, and it's
fastest for me to be able to quickly bounce between a constantly-updating MRU
list.

Let's take the "Order of Application Opening" model: If, say, I had opened
iTunes between a messenger program and a browser, and I were flipping between
browsing and chatting, I would think that iTunes, being a background sort of
application, would require me to remember to double-tab every time I wanted to
bounce, requiring an extra button press and an internalization of that data
instead. (As well, wouldn't the static list then require me to Alt-shift-tab
every time I want to bounce backwards? I certainly could tab forward and wrap
around if I had only those two applications open, but that's rarely the case,
so it seems that a static ordering would only ever hinder me. Keep the static
order to the taskbar/dock where it belongs!)

Somewhat related: Something I've always wanted is the ability to navigate tabs
in Firefox with CTRL+Left/Right-arrow, similar to the CTRL+# to get to a
certain tab number. I looked around once, perhaps a year ago, to no avail, and
haven't searched since. Anybody know of an add-on that adds this
functionality?

edit: BoppreH, in another post, mentions CTRL+[Shift]+Tab. I'm basically
asking for this functionality, remapped to CTRL+Arrows (It's more comfortable
this way, rather than isolating the button presses to one hand)

~~~
rjprins
I would simply use autohotkey:

    
    
        ^{Right}::Send ^{Tab}
        ^{Left}::Send ^+{Tab}
    

But then, that changes behavior for all applications, not just Firefox.

There is a keyconfig extension for Firefox:
<http://kb.mozillazine.org/Keyconfig_extension> you could try that.

In Opera it is easy. Personally, I have this functionality under 'j' and 'k'.

------
nickpp
And how do you break such a "habit", once formed?

Sorry, MRU is still the best. Pisses me off to no end that Firefox and Chrome,
by default, do not use it anymore for their tabs...

~~~
mattw
For me, the most desirable method changes based on the context. In the context
of Alt+Tab between applications, I agree that MRU works best. (Even though I
get annoyed when I get a third application in the loop and accidentally tab to
the wrong one, it seems like the "habit" business would just make the order of
switching unpredictable, which would be even more annoying.)

However, in applications like Firefox/Chrome, where the tabs are always
visible, I'm the opposite from you: MRU behavior drives me absolutely bonkers.
This is because the actual order of tab switching no longer matches the order
implied by the visual position of the tabs. To my disgust, Visual Studio
changed to this MRU behavior in (I think) 2005, and ever since then the
Ctrl+Tab behavior has been useless to me, because even though the tab I want
is right next to the active one, it might take six or seven switches to reach
it. My memory of the order of the most recently used tabs while I'm coding is
poor enough that the ordering might as well be random.

If you wanted to keep the MRU method in this type of application, I think a
solution is to automatically reorder the tabs. But VS at least doesn't do
this...not sure about Firefox (it didn't originally, and I turned off the
feature ASAP).

~~~
gmurphy
FWIW, your post (even including the VS behavior hate) is an accurate
description why we don't do MRU tab switching in Chrome. It's a very common
feature request[1], but we think we can do better and don't want to ship a
middling stopgap.

[1] Few people that request it continue to request it after trying it in a
browser that supports it. Certainly the number is significantly below those
that prefer tab-order switching.

~~~
nickpp
And the fact that you don't allow changing this behavior (not even with
extensions, as Firefox does) is what keeps me away from Chrome...

------
trickjarrett
I don't see how this will apply to browser tabs reliably. Are you doing it
based on page url or domain?

Page url has the obvious shortfall of being so rarely used for a long amount
of time. It might be used for an hour, or perhaps a day, or in some rare cases
where you do interact with a single url for a long period of time, but those
cases will be few and far between.

Domain seems too generic. If I'm on HN then I may flip to gmail frequently as
I work through the day, but that doesn't mean that when I'm in Gmail I want to
always tab to HN, perhaps it's to my blog, or work's admin section.

I guess actually my issue is that he uses a single pair example.

If I'm on HN, then gmail would probably be a likely tab target, but on Gmail,
the options of targets greatly expands. HN would be at top because of recent
use, but the other sites mentioned would also be likely targets.

So then we suffer from the frequent order changing that was cited as a
downfall of the MRU method.

Am I wrong here?

------
vog
What about simply using two commands? As the article says, there are two use
cases which are hard to combine, so why not separating them?

For instance, use Alt+Tab to jump to you latest used application, and use
Ctrl+Rightarrow to go to the next app in order. Plus, you get an obvious way
to go to the previous app in order: Ctrl+Leftarrow.

------
jsulak
I'm on Windows, and I've rolled my own solution that uses incremental search,
sort of like Emacs ido-mode buffer switching.
<http://bitbucket.org/jasulak/switcheroo/wiki/Home>

Not for everyone, but I like it.

~~~
hugothefrog
Thanks for the pointer. I was looking for something just like this.

It seems to install and work just fine on Win Server 2008 64bit, for reference
:)

~~~
jsulak
Glad you like it. Thanks for the info.

------
resdirector
What a misleading title! I was all excited that he'd actually solved the
problem, and I could download something.

As Toby says to Will in an episode of the West Wing: "don't come to me with
half a thing and not be able to - you know, after you've walked me to the
brink..."

------
nkurz
Changing from a simple "most recently used" approach to a complex machine
learning approach doesn't seem like a a good idea. Perhaps there would be some
other small modifications that would keep the system simple and deterministic?

For example, he mentions the problem that one gets into once one switches
accidentally to the wrong app: once you've switched, it becomes the MRU when
you try to switch back. Perhaps a rule that an application isn't added
considered the MRU unless you interact with it in some way? So that if you
switch to it but immediately switch away it is no different than hovering?

------
gabrielroth
I'm surprised to see so much skepticism on this thread. When I read the
article, I was delighted to see my own experience described so accurately.
It's the second failure that's really galling.

It made me wonder what it would take to implement something like this on OS X
(in terms of hooking into the OS, rather than in terms of the heuristics).
Since the application Witch (<http://manytricks.com/witch/>) can be used as a
replacement for the built-in App Switcher, it must be possible ...

------
moe
In ion3 I have a fairly efficient set of keyboard shortcuts for tab
navigation:

Alt+Left jumps to left tab. Alt+Shift+Left moves the current tab to the left.
Same for all other directions. Oh and obviously tabs (windows) never change
position on their own.

This works much better than any other system I have used. Muscle memory is a
beautiful, magical thing.

It's a pity that all mainstream OS'es insist on deliberately making it
impossible to take any advantage of it. MRU in alt-tab is the most idiotic
idea since the modal dialog.

------
TomasSedovic
Windows 7 got pretty close to solving this problem.

Winkey+Num makes the n-th window on the taskbar active. Since you can modify
the order of the taskbar icons, this solves the spatial memory vs. fast
switching between two windows.

Winkey+1 for Firefox, Winkey+2 for Twitter, Winkey+3 for something else.

This combined with Alt+tab that cycles in the same taskbar order (as opposed
to MRU) seems like the holy grail to me.

The problem is that this would break the existing expectations of Alt+tab,
which is why I fear it won't happen.

------
DLWormwood
Stuff like this is why I never learned to use modifier-tab in the first place.
I've always been happy to use the slightly more expensive menu/palette
selection idiom, since I can reliably communicate intent to the device without
situational thinking. There really is a a degree of wasted effort in trying to
make computers "read our minds." Trying too hard to make the common case easy
can make even the 2nd common case too expensive to justify the savings.

------
rjprins
This problem has frustrated me so much, here are things I do currently:

\- Ctrl-<number> focus on or start my regular applications (with an autohotkey
script). That is 10 applications, more then enough.

\- Alt-Tab and Shift-Alt-Tab are replaced with Ctrl-; and Ctrl-h

I've also tried a script that matches Ctrl-<number> with the programs that are
in the taskbar. But found that as the order changes from time to time, I have
to recheck what number to use.

------
mike-cardwell
I'm not convinced by the proposed solution. You're changing an ordering method
that's predictable to one that is unpredictable, from a human perspective.

------
10ren
Why not have more than one row of alt-tabs; use the cursor keys to select
which one. But in fact I do this already, just without the visual
representation, and it's confusing too:

\- alt-tab between firefox and vim

\- ctrl-6 within vim

\- ctrl-tab within firefox.

BTW: you can rearrange tabs in firefox, and tab-mix (plugin) allows you to
expt with customizing it in every weird way you can imagine, and some other
ways too. A good test-bed for prototyping alt-tab solutions.

------
njharman
My solution is to use mostly non-overlapping windows and add more (and bigger)
monitors. Overlapping windows is a poor design forced on us back when we had
640x480 7" monitors. It's time to let it die.

My tab usage in FF is less switching tabs, and much more opening lots of tabs
and going through (and closing) them one by one. When I find my self switching
tabs in FF too much I drag one tab into a new window.

~~~
nick5768
This is my usage pattern as well, except I am using Chrome, It really
highlights (one of) the benefits of having each tab in a separate process: it
doesn't need to reload the page saving both time and the keeping the spot I
have scrolled to on the page.

------
Hexstream
I don't understand why you couldn't just let the user optionally specify such
pairings manually instead of trying to infer it in an unreliable way. It's not
like you regularly use dozens of different apps which would benefit from a
pairing like that. If the user frequently wants to switch between the text
editor and the browser, just let him specify so directly.

------
nevinera
In xmonad (and I'd assume most other tilers), there is not only a fixed
tabbing order, it is the visual order.

I am almost unable to use alt-tab on a more standard window manager now,
because it doesn't behave sensibly; it requires you to keep an in-memory
ordering on your applications to get to them quickly. A static order that
isn't obvious is just as bad as a dynamic one.

------
prone
(tabmix plus for FF(so that it remembers the order of my browsing)) +
(alt(pc)/command(mac)-tab for apps) + (alt-~ for windows within apps) = maybe
I'm missing something, but i have no problems. The solution proposed is too
complicated for me to want.

~~~
alanh
Missed the point. He’s talking about the order of apps (or tabs) when
switching and optimizing the common case. Listing keystrokes adds nothing…

------
sliverstorm
An idea just popped into my head- Tab+1, Tab+2... Allow manual ordering, or
perhaps order the same way as the task bar, so a visual guide is always
visible and the order does not change often.

------
avk
Was anyone else hoping for a discussion of how or why browsers almost
completely ignore MRU for alt-tab? Only Opera supports cycling through tabs in
both MRU and tab order (configurable).

~~~
ryne
If you enable browser.ctrlTab.previews in Firefox's about:config panel you can
get MRU tab-switching with thumbnail previews.

------
pavel_lishin
Anyone solve the "I have to scroll down to reach content" problem?

~~~
what
It's even worse now. I've noticed a trend of starting articles/blog posts with
giant, irrelevant/unnecessary pictures and the actual content ends up below
the fold. I want to read the article not look at a picture.

~~~
TheBranca18
Maybe you should try Readability:
<http://lab.arc90.com/experiments/readability/> . I do notice the trend as
well, and I think I have my resolution set pretty high compared to the average
user. I wonder what they think.

~~~
what
Yeah, readability is good. The pictures mostly bother me because I do most of
my browsing on an 11 inch monitor.

------
mattmaroon
Windows 7 solves this quite elegantly by just showing you small previews which
you tab through. It takes away the element of (unwanted) surprise.

~~~
RevRal
If anyone wants something like this in XP, there's Microsoft Powertoys Alt-Tab
Replacement.

------
davidw
Actually, as a holdout from my fvwm2 days, alt-tab raises a window, and alt-
shift-tab lowers it.

------
dennisgorelik
This change is almost impossible to predict and is breaking existing UI. Will
not fly.

------
wendroid
Keep the order fixed but let me shuffle it manually

~~~
greendestiny
For any common pairs of applications that means n/2 tabs on average to switch
back and forth.

~~~
abstractbill
No, because you would manually shuffle common pairs of applications to be next
to each other.

~~~
greendestiny
It would need to swap the common pairs on use. Which is basically this guys
scheme except you manually define the pairs.

Then again on windows you can alt-shift-tab, so that pretty much takes care of
that anyway, if could just have the programs in consistent order.

------
GrandMasterBirt
OMG YES YES YES! That is exactly perfectly described. When you are switching
tabs the 3rd application messes things up. And what is worse is that what if
the third application was an accident, now you have to re-alt-tab everything
to the proper order.

Its kind-of the same problem as when you send out emails. Why can't your email
client remember that while there are 5 harrys in your address book, only Harry
C is the one you send emails to and thus should be on the top of the auto
completion list (FF3 betas missed this feature, FF3 has this now).

The problem is:

1) If we do long-term computer learning, the person might judge that this
feature is useless. A second person sitting at the computer screws the whole
deal.

2) If we do a manual way with "rearrange" were still screwed. Too much work
for temporary windows.

3) If the computer guesses wrong, were also screwed because now were stuck
with an incorrect ordering.

Consider this one:

What if instead of trying to get alt-tab to work right, we try to get a
consistent (press alt-tab x number of times to get from application foo to
application bar) which will remain consistent no matter how many windows are
open. So if you go from Eclipse -> Firefox, Eclipse -> Firefox -> Twitter,
Firefox -> Eclipse, Firefox -> Eclipse -> Twitter, the user can now form a
great habbit: If you are in FF, alt-tab = Eclipse, if you are in FF 2xalt-tab
= twitter. Etc.

I think a simple formula of Frequency of Use will help. If a habbit is
frequent (person switches from application foo -> bar, even using non-alt-tab
ways) we can use frequency of use to determine the ordering. Otherwise fall
back to LRU (we can always ignore some random tabbing cases). Since a person
will keep the recent "places" they been to in their head, it will feel
intuitive for them.

~~~
bluishgreen
"Why can't your email client remember that" - Gmail can figure this out, its a
lab feature. Enable it. (See how I assumed you use gmail :), its probabilistic
reasoning in action!)

~~~
steadicat
What's the lab extension called? I can't find it. The closest I could find was
"Got the wrong Bob?", but that only warns you _after_ you pick an unusual Bob.
Sounds like a dirty hack which wants to parade as a clever feature. They
should instead just fix the ordering of the auto-suggest dropdown.

------
TotlolRon
Imagine it is not the tabs of the browser, but rather the knifes of a surgeon
or the controls of an passenger airplane. Would adapting the machine to the
human still be that desirable?

Humans (still) learn faster and adapt better than machines. Over simplifying
stuff for them may actually make things more complex.

------
aneth
I agree with the problem description, but the solution is terrible. It adds
unpredictability to the interface, which is worse than simple badness. I'd
suggest having new alternative to Alt-Tab that has static positions
(reorderable for the power user.)

