We live in an attention economy. Unfortunately this sometimes (or should I say often?) leads to poor programming practices. Not your or mine poor practices but from all the others ofcourse. Consider the following example as stated in the Wikipedia article Principle of least surprise:

“A user is about to enter his username and password for a program or website when he receives an instant message. Some instant messaging clients will immediately grab the keyboard focus and move it into their own response field, because they assume the user will want to respond to the new message immediately. In reality, the user may be astonished to find that they have just typed their password into their IM client and sent it to their friends. This conflict arises because the two programs are not aware of each other’s existence, and cannot easily determine when they might get in each other’s way.” 

So we see here that it’s the client that steals the focus. Look at the picture below to see how annoying it is if something gets focus without “approval”.  The client ‘grabs’ the focus (which can be considered an act of theft!) and moves the focus to it’s own response field (which can be considered an act of greed or egoism!). Who’s to blame for this? The O/S architect? The programmer? The developer? The programming schools or institutes or practices? Or the “end-user” that didn”t make clear to the programmer that he shouldn’t steal the focus? I don’t know. Maybe it’s because we think that writing poor software is normal and should therefore be accepted. It’s a culture thing. Leading to mediocre quality software products. It’s a pity. I wish all of us a culture where we consider quality important enough to invest in. So we get better products. 


Comments on: "About The Principle of Least Surprise And Why Some Clients Steal Focus" (3)

  1. I wandered on this blog a couple weeks back and I
    just cannot get enough! Please keep writing!


  2. First of all I want to say terrific blog! I had a quick question in which I’d like to ask if you do not mind. I was curious to find out how you center yourself and clear your head prior to writing. I have had trouble clearing my thoughts in getting my thoughts out there. I truly do take pleasure in writing however it just seems like the first 10 to 15 minutes are usually lost simply just trying to figure out how to begin. Any recommendations or hints? Many thanks!


    • Thx! To answer your question: I don’t center myself or clear my head. (it’s allways empty… ;). I usually have only one specific word in my head, for example related to the above post it was the word ‘focus’. The trigger was someone saying something to me about focus. When I heard it, I thought, that might be word a blog. So I remembered it. And then during the course of the day or days, I start seeing examples where (in this case) ‘focus’ can be combined with other words that seem to make a nice match. Then I start playing with these words in my head. It’s a creative process. In the end, I come up with most of the time 2 or 3 potential blog titles. Then I start looking these up in Google, and (believe it or not), most of my titles are unique because Google search doesn’t return any hits. In cases where the title is not yet fully unique, I tweak a few words until I find a truly unique title. I consider that the starting point for my blog. The rest then usually comes out automatically because the title already had a quite unique context so it’s easy to combine that with a unique story. Hope this helps you.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Tag Cloud

%d bloggers like this: