Per Ola Kristensson | Blog

Blog
Publications
Software
Other Stuff
Log in

Firefox 4 and the disappearing status bar: on forcing interface redesigns upon users

May 30th, 2011

Update (June 24, 2011):

Firefox 5 brought back the status bar, at least for Windows.

So Firefox prompted me to update to the new version, which I did. And the first thing I noticed was that the menu bar was gone. However, an option enabled me to get it back relatively quickly.

The second thing I noticed was that the status bar was gone. As it turns out, there is no option to get it back, and this is by design.

This puzzles me because there are at least three pieces of information I am relying on the status bar for:

  1. Which URL I will load if I click on a link.
  2. Whether or not I am on a secure link (the padlock icon).
  3. Status of long downloads.

Now these pieces of information are not visible, save for item 1 above. The way Firefox 4 solves item 1 without a status bar is to implement a “temporary status bar” which is only visible when you hover over a link, or when a page loads. Given how many links there are on websites nowadays this results in a lot of flicker in the bottom-left corner of my browsing window when my cursor inadvertently hovers over some of the links.

With the new design I lose information (padlock icon and download progress) and I have to endure distracting flicker in the bottom-left corner. Further, the fact that the status bar is not really gone shows how a mantra (I would guess minimalism) has taken precedence over function.

This makes me think about the philosophy of user interface redesigns and software updates. Do we really want to design software that forces new interface redesigns upon users? Shouldn’t we convince users of the benefits of a new user interface design rather than force it upon users? Unlike software bug fixes, user interface updates always come with retraining costs. Habitual patterns break and users must invest time and effort in figuring out how to achieve the same tasks—assuming those tasks are even possible to achieve with the new design! In the case of Firefox 4, wouldn’t a more democratic and user-friendly approach had been to keep the status bar as it was and gently ask users upon installation whether or not they would want to try the new interface redesign with a flickering status bar?

Economists say it is (in some instances) challenging to convince users to give up suboptimal technologies because of path dependence. Under this interpretation, forcing interface redesigns upon users opens up a way to escape a local optimum in which users refuse to upgrade poor technology they consider “good-enough” . However, interfaces redesigns always come at a cost for users, no matter if those interface redesigns prove to be better later on. Therefore, the expected gains of an interface redesign must always be weighted against the non-negligible adaptation and retraining costs that are imposed on users. And sometimes an interface redesign is just a step backwards. Such as the removal of the status bar in Firefox 4.

On Nokia and Microsoft

February 12th, 2011

By now it seems everyone has some form of opinion on the announced Nokia and Microsoft collaboration. Most of the opinions I’ve read or heard essentially state that Nokia risks becoming a low-margin hardware manufacturer while Microsoft may benefit hugely from using Nokia’s market share to spearhead their reattempt to enter the mobile operating system (OS) war.

So what’s in it for Nokia? I think it depends hugely on the unannounced details in the deal. If Nokia gets some form exclusivity on the Microsoft Windows Phone OS and accompanying app store that they can leverage then I think Nokia’s CEO may have made a very smart move. Nokia wants to avoid Google’s Android OS, which is rapidly becoming a lowest common denominator OS for a variety of manufacturers (for example, Samung, HTC and Sony Ericsson). The best situation for Nokia would probably be if they had their own version of Apple’s iOS. However, for various reasons Nokia failed to execute on this very sensible strategy (the OSs Symbian, Maemo, Meego are seen as non-viable today). Hence the conclusion is that Nokia has now realized their engineering divisions are simply incapable of creating a competitive OS and ecosystem that can rival Apple’s iOS. However, Microsoft can, indeed they have already done this with the Windows Phone OS. Contrary to popular opinion it is a very well-designed system. If you haven’t tried it, you may think Windows Phone is the Windows Mobile disaster all over again. It is not. Try it! Thus Microsoft provides Nokia with their very much wanted exclusive OS and ecosystem that Nokia can use to avoid being diluted to just another hardware manufacturer for Google’s Android OS. However, it really depends on the details in the deal with Microsoft. There is a long list of companies that tried to collaborate with Microsoft and failed miserably. Perhaps this is the first move before a full-scale Nokia takeover by Microsoft? It may not necessarily be a bad move for either company.

Shumin Zhai named ACM Fellow

December 14th, 2010

Fantastic news!

Dr Shumin Zhai, my former PhD advisor, has been named an ACM Fellow “for contributions to human-computer interface research and innovation”!

Congratulations!

Connecting iPhone UI widgets designed in Interface Builder to Objective-C code in Xcode

December 6th, 2010

When I design an iPhone app I tend to use Interface Builder. However, I always forget how to actually connect the widgets (buttons, labels and so on) in Interface Builder to variables I can reference in my Objective-C code in Xcode. Hence this post. Note that this is one approach, there are several others. However, the procedure I describe below is beneficial as it is quite simple, yet usually all that is required.

Step 1. Design some widgets using Interface Builder

The way I usually do it is to simply start a new project, open the Resources tab in the Groups & Files sidebar, and then double-click on a pre-generated Interface Builder XIB file (for example, MainView.xib).

(Note: The screen captures and code fragments I will show below are from a simple project that was automatically generated from the Utility Application code template provided by Apple. A Utility Application project has two default views: a MainView and a FlipsideView. The procedure I describe works for any iPhone application, so if you don’t understand references to FlipsideView and other objects then just ignore them for now.)

Then I design some rudimentary user interface, like this one (click for a larger image):

Step 2. Create outlets in your code

OK. So we have designed a user interface using Interface Builder. Now, how do we access all these widgets in our code? Here I will describe how we are going to connect the button labeled Next in the above screen capture to a variable named nextBtn.

First, declare the instance variable nextBtn in your interface (for example, MainViewController.h):


@interface MainViewController : UIViewController <FlipsideViewControllerDelegate> {
    UIButton *nextBtn;
}

Below your interface declaration, introduce an outlet that references the instance variable you declared above:


@interface MainViewController : UIViewController <FlipsideViewControllerDelegate> {
    UIButton *nextBtn;
}
 
@property (nonatomic, retain) IBOutlet UIButton* nextBtn;

You have now declared that your class contains a UIButton instance, and this instance variable can be accessed via an IBOutlet. However, no code has been generated to set the value of this variable yet. To do so, open up the corresponding implementation file (for example, MainViewController.m) and introduce the following line somewhere below the @implementation declaration:


@synthesize nextBtn;

Step 3. Connect Interface Builder widgets to your outlets in Xcode

Now that we have created the necessary instance variables and outlets we can open up Interface Builder and connect the widgets to the corresponding variable declarations in the code. First, select File's Owner in Interface Builder’s Inspector window:

Then open the Connections Inspector (Command-2). In the Outlets section you will see a small connector (circle) to the right of a label named nextBtn. If you hover over the connector it will highlight and turn into a plus-sign. Click it and drag the blue thick line that appears to the button in the interface you wish to connect to nextBtn. See below for an illustration (click to enlarge):

Step 4. Create actions for your Interface Builder widgets

The next step is to implement a method that will be called when an action is triggered for the button. To do this we first add the following function prototype to the header file (for example, MainViewController.h):


- (IBAction)respondToButtonClick:(id)sender;

Thereafter we add a function body to the implementation file (for example, MainViewController.m):


- (IBAction)respondToButtonClick:(id)sender {
    NSLog(@"The user clicked on the nextBtn button!");
}

The code above prints out a message to the console whenever the button labeled Next is pressed by the user (to view the console press Shift-Command-R).

Step 5. Connect Interface Builder widget actions to your designated methods in Xcode

Now we need to tell Interface Builder which function it should call when nextBtn is pressed. Open up Interface Builder again and click on the button in the user interface which we previously connected to the nextBtn variable. The Connections Inspector will change and show you a list of possible actions this button can take. Now click on the connector (circle) for the action Touch Up Inside and drag it to File's Owner in the Inspector (click for a larger image):

A menu will pop up and propose possible methods in your code that could receive the action:

Choose respondToButtonClick:. Then save your interface design in Interface Builder.

All done!

Now we can run the program on an iPhone or via the emulator. Whenever you press the button labeled Next a message appears in the console (click to enlarge):

Voila! You can now access the button labeled Next using the nextBtn instance variable in your code. Further, whenever a user presses this button, your method respondToButtonClick: will be invoked and execute any custom code you insert here.

The above procedure used a single button for illustration purposes. However, this procedure generalizes to all widgets and actions supported by Interface Builder. Have fun!

For more information, check out Apple’s own documentation on integrating Interface Builder with Xcode.

How to transfer files from an iPhone app to the desktop

December 3rd, 2010

How do you transfer files from an iPhone app to a desktop machine? One would think this is easy. As it turns out, it is relatively easy but not very intuitive.

What you need to do is to locate the property list (.plist) file for your app in Xcode (it is typically found under Resources in the Groups & Files panel). The file is usually called Application-Info.plist (replace Application with whatever the name of your project is). Open the file in plain text mode and then append the following:


<key>UIFileSharingEnabled</key>
<true/>

Now run your app on the iPhone. Then do a sync. Thereafter open iTunes, select the Apps tab, and scroll down. You will see a new section named File Sharing. You can use this section to transfer files generated by an iPhone app to your desktop machine. It will look something like this (click the thumbnail for a larger image):

Problem with the web host

November 14th, 2010

I have noticed that my website, in particular the blog part, has been down a lot recently. Apologies for that. My web host, the Swedish company Binero, has had some trouble recently. Early last week their systems failed completely and even their own website went down. I thought they managed to fix the issues but apparently there were still some glitches because this weekend my blog went down again. I hope they have now fixed any outstanding problems. They have been good in the past so I am willing to give them the benefit of doubt this time.

Learning Haskell

November 8th, 2010

In a previous post I talked about Objective C, probably best known as the primary programming language for Apple’s laptops, desktops and iPhones.

Now I am teaching myself Haskell, a strongly typed functional programming language with type inference. I am reading the book Real World Haskell published by O ‘Reilly (full text also available for free online). I have only read about 50 pages but I am very satisfied with the book so far. It manages to balance the delicate trade-off between introducing concepts so fast that too many details are missing and being so meticulous that the reading becomes too boring. As the book is written now, it is actually quite addictive to read—I want to keep learning more! I love this style of writing a programming language book. However, as a consequence of this (conscious) choice of the authors, parts this book would be very hard to follow for someone who hasn’t taken at least an introductory compiler or functional programming class. However, I regard this as a strength as I wouldn’t want to read a book that assumed no programming experience.

Since I am still at an early learning state it remains to see what I think about Haskell itself. Stay tuned!

Bentham open access journal accepted nonsense manuscript

November 6th, 2010

The previous post described various commercial open access publishers spamming for book chapters and journal articles. Now I read that Phil Davis at the blog The Scholarly Kitchen sent a SCIgen-generated nonsense manuscript to “The Open Information Science Journal” published by Bentham. Four months later Bentham accepted the paper and offered to publish it for a $800 fee. No reviews were provided with the acceptance letter.

It looks like at least some of these commercial open access publishers are essentially vanity presses that will publish anything for a hefty fee. It is a shame they are doing this since they may drag down the reputation of reputable open access publishers, such as PLoS. Another danger is that we will see even more use of pseudo-scientific rankings and measures of the impact of journals based on citations just so that people can filter out all the meaningless junk. I suppose no one is any longer interested in reading the actual articles.

In defense of open access journals, a journal called “Applied Mathematics and Computation” which has been published by Elsevier since 1975 has apparently also accepted an automatically generated nonsense paper.

Academic spam and open access publishing

November 4th, 2010

Judging by how much spam I get nowadays it seems academic open access publishing is lucrative.

I keep getting targeted spam from Bentham, Hindawi, InTech, and others. The strategy seems to be to mine reputable conference and journal papers for email addresses and then use them for targeted spam.

I have now received five emails from open access publisher InTech about a book chapter based on a previously published paper. These guys never give up! This is an excerpt from the last one:

Dear Dr. Kristensson,

We apologize for contacting you again on the matter of your nomination to contribute to the book named in the title of this email, but since we haven’t received an answer from you, we are taking the liberty of contacting you again (you may have been busy or our previous emails may have ended up in your email filters). However, this is the last email you will receive from us. If you can find time, please reply to our previous email which is below:

My name is MSc Iva Lipovic and I am contacting you regarding a new InTech book project under the working title “Speech Technologies”, ISBN: 978-953-307-152-7.

This book will be published by InTech – an Open Access publisher covering the fields of Science, Technology and Medicine.

You are invited to participate in this book project based on your paper “Automatic Selection of Recognition Errors by Respeaking the Intended Text”, your publishing history and the quality of your research. However, we are not asking you to republish your work, but we would like you to prepare a new paper on one of the topics this book project covers.

Why on earth would I spend time and effort to write a book chapter for a random individual I have never heard of and who doesn’t seem to have any credentials whatsoever in the field? And who reads these book chapters? And what exactly is the point of an open access “book chapter”? Sounds like a web page to me. With the exception I have to pay InTech plenty of money to put it up. I might as well just make the text available on the web myself.

Another open access publisher that likes to send spam is Hindawi. However, news to me was that Hindawi now spams on behalf of EURASIP, an organization I thought was reputable (until now):

Dear Dr. Kristensson,

I am writing to invite you to submit an article to “EURASIP Journal on Audio, Speech, and Music Processing,” which provides a rapid forum for the dissemination of original research articles as well as review articles related to the theory and applications of audio, speech, and music processing.

EURASIP Journal on Audio, Speech, and Music Processing is published using an open access publication model, meaning that all interested readers are able to freely access the journal online at http://www.hindawi.com/journals/asmp/contents.html without the need for a subscription.

Another example is Bentham who wants me to write a review on random patents based on keyword searches (the weirdest concept I have heard of so far for a journal):

Dear Dr. Kristensson,

Bentham Science Publishers has launched a series of innovative
journals publishing review articles on recent patents in major
therapeutic areas of drug discovery as well as biotechnology,
nanotechnology, engineering, computer science and material science
disciplines. Please refer to Bentham Science’s website at
http://www.pat-comp-sci.org/AllTitles for further details.

An exciting journal entitled “Recent Patents on Computer Science
(CSENG)” was launched in January 2008. This journal publishes review
articles written by experts on recent patents in the field of Computer
Science. Please visit the journal‘s website at
http://www.compscieng.org for the Editorial Board, sample issue,
abstracts of recent issues and other details.

Recent Patents on Computer Science (CSENG) is indexed in Genamics
JournalSeek, Compendex,Scopus

If you would like to submit a review article to the journal on an
important patent area in Computer Science, then please provide us the
title of your proposed article and a tentative date of submission at
editorial@compscieng.org. Moreover in your reply, could you please
suggest some specific keywords, keyword phrases related to your topic,
so that detailed patents may be sent to you for the preparation of
your manuscript.

I keep wondering who is actually editing and reviewing all these journals and books. While they keep spamming me for paper submissions (and lucrative fees after they have accepted the papers), I haven’t received any invitations to do any reviews.

Using Objective-C to teach object-oriented programming?

September 6th, 2010

I am programming in Objective-C right now. It is an interesting programming language, essentially a smaller and simpler alternative to C++. However, unlike C++, Objective-C is a strict superset of ANSI C, which means any valid C code can be compiled by an Objective-C compiler, something that a C++ compiler cannot guarantee (for instance, the need to cast void-pointers is different in C and C++).

What Objective-C does is add additional well-needed abstractions to ANSI C, such as classes, interfaces and inheritance. I have to admit, coming from mostly C and Java programming, I was initially annoyed by the Smalltalk-inspired syntax (and I’m still not convinced it makes any sense).

However, I am starting to think that Objective-C might be a good teaching language for an ambitious programming class. Unlike Java and C++, Objective-C’s syntax clearly differentiates between standard function calls and instance method invocations (message expressions). The syntax also differentiates between method declarations and function declarations.

The theory is that by having distinct syntax for these and other aspects of the programming language the learner is forced to conceptualize the differences. Syntax is enforced by the compiler and conceptual misunderstandings will lead to compilation errors that the learner has to correct. In other words, conceptual misunderstandings are explicitly pointed out to the learner by the compiler. If the learner does not satisfy the compiler the program won’t compile, let alone run. For example, the Objective-C syntax makes it impossible to call an instance method and not realize that this is message passing and not a static function invocation.

Another potential advantage of using Objective-C as a teaching language is that it is somewhere in the middle between Java and C++. It is closer to the hardware than Java. For instance, when an object is created in Objective-C, the idiom is to first explicitly allocate memory for it and thereafter initialize it (e.g. the expression UIButton *button = [[UIButton alloc] init]; first allocates memory for a structure to represent the button, and then initializes it). This first step of allocation and memory management is hidden for Java programmers. However, computer science students obviously need to understand memory management. Yet Objective-C is not as convoluted as C++. For instance, it doesn’t have operator overloading, templates and multiple inheritance. Hence it is not too daunting for the beginning programmer.

This tutorial succinctly highlights the differences between Objective C and C.