Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"09-22-12 - Input Streams and Focus Changes"

7 Comments -

1 – 7 of 7
Blogger Unknown said...

I hope you'll never use OS X... three-finger-sweeps to switch between fullscreen apps ignores all input until the slow animation finishes. Great fun for when you already know what you want to type into the terminal you sweep to.

September 22, 2012 at 2:53 PM

Blogger cbloom said...

I also hope I'll never use OS X.

September 22, 2012 at 3:38 PM

Blogger cbloom said...

So clearly to some extent the horrible modern GUI design (led by Apple primarily) is because they are emphasizing aesthetics and clarity for casual users over efficiency.

Okay, I don't agree with that, and I wish they provided power user modes, but at least it sort of makes sense.

But that's only part of it.

Some of the problem is that "designers" have been called in, and Designers (with a capital D) always ruin products. They're egotistical morons who don't actually learn the way the product is supposed to work before they "improve it". You can take almost any much-lauded product design that makes magazine covers and they are 99% terrible and worse than the product they supposedly improved.

Part of the problem with GUI designers is that they generally suck at using computers, so they design GUIs for people who don't actually use computers, people who are all thumbs and easily confused. Sure, if you don't know how to type and you don't know what a hard disk is, then you might think that the new GUIs are better.

September 22, 2012 at 3:45 PM

Blogger johnb said...

My ideal is:

There should be a single serial input stream, which is processed synchronously in the foreground. Any further input received during processing is queued.

Any action which often takes long enough for me to care about the pause gets done in the background, allowing the foreground to continue processing the serial input stream. No background action is allowed to steal focus: if it's finished it can sit there any wait for me to go look at it, or it can flash some indicator somewhere to notify me that it's done and prompt me to look. It *cannot* steal focus when it's done.

Actions that are "usually" fast, but *might* take a long time should be done in the foreground but with a time limit. If they hit the time limit and they're not done, they get pushed to the background and lose the ability to steal focus when they do complete. For example, if I open a program, it gets 100 milliseconds to get its shit sorted and present a window for me to use. If it's not ready in 100 millis then it gets pushed to the background and when its window is ready it *does not* steal focus, it sits there in the background with its taskbar icon flashing until I explicitly bring it to the foreground.

September 22, 2012 at 11:59 PM

Blogger johnb said...

Some further details:

If an action is on a time limit, input is queued while the action is going on in the foreground. If time limit is reached and the action gets pushed to the background, *that input is deliberately dropped*. The idea that input should never be dropped is wrong. If the system can't keep up with my input then I'd rather it *drops* some input than sending it to the wrong place.

This all requires UI design to accommodate it, of course, it's not just "do everything in background threads". The concepts of foreground vs. background actions here is part of the UI design, not implementation.

This is all a consequence of two rules: 1) never steal focus, ever; 2) keep the UI responsive.

September 23, 2012 at 12:30 AM

Blogger cbloom said...

@ johnb - I certainly agree that after a certain lapse of time, apps should never steal focus.

Like if I double-click an icon to open a program, and it takes over 2 seconds or so to open, then it must not take focus when it starts up.

Another clue would be if I do some user input which starts a delayed reaction (eg. open a new program), and if I then do *other* user input before that program starts - then don't steal focus.

It's terrible when you start a bunch of slow UI ops, and then you go and open your text editor and are typing some text, and then finally the slop ops catch up and they all start stealing focus from each other and you don't know where your key presses are going.

September 23, 2012 at 9:15 AM

Blogger Unknown said...

IIRC, BeOS was designed with this decoupling. Every app had at least a UI thread and a worker thread, and the kernel scheduler was designed to for responsive, interactive, near-realtime workloads.

Of course, you could also make the claim that it is a bad idea to frontload such concurrency issues in the main framework API. Clearly, this is an argument for layering -- there should both be the traditional synchronous message pump (that you can access without any sort of inversion of control) AND a standard decoupled programming interface (which is more like a framework that calls back into your code, asynchronously).

The problem is that you have the worst of both worlds. The standard API tends to be a synchronous framework.

September 24, 2012 at 9:02 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.