From Xkcd.com:

It’s been over nine years for me.
I have been writing a lot of code lately for the new product I hope to share with you before the new year. The past two days I worked on a login/create account screen. Two days ago I wrote the shell, got the views created, did all the data entry and set up the basic structure of the controller. My designer set it up to be perfectly centered on the screen so I had to do little things like move it up when the keyboard appeared but only if the keyboard covered the form. Also, on the iPhone, once the keyboard comes up there is no button to make it go away. Touching outside the form hides the keyboard, thus uncovering the additional options. I hooked everything up and made sure it worked in the application the way I wanted. Then yesterday morning I handled all the error cases.
Error cases, for a log in screen? Yes. Login screens are funny little things. They look so simple yet if done right they are extremely complicated, from both a design and technical perspective.
Let’s start with technical. There are only two “good” outcomes in a log in screen. Option 1 is that the credentials entered matched an account and the user was logged in [1]. The second is that the credentials are a new account, an account was created and the user was logged in. But there are numerous “bad” outcomes, everything from the server being down to no Internet connection to bad passwords and email addresses, to incorrect passwords with matching emails [2]. In addition a good login screen must handle special cases like the user forgot his password or, for sites that make you verify an email address within a certain amount of time, verification failures [3].
And that leads me to the second thing: design. The app requires an account so the login view is the first thing the user sees. It not only needs to handle all these cases clearly and succinctly, helping the user when she runs into trouble, but I also needed to remember that this is the first experience she will have with our product. The login screen, albeit functional, also needs to represent the product once you get inside.
Our designer did a great job with the design. It is clean and simple. The interface is straight forward and offers features for those that aren’t certain they want to commit to an account yet but would prefer first to get a better perspective on the product. This is the era of app stores where people download apps, especially free ones, without even reading the description. We didn’t want to assume the user was familiar before installing.
I spent half the day yesterday getting all the error cases worked out, displaying each message with an alert and the alternatives for handling the case. For instance, a bad password (meaning an account was found but the password doesn’t match) could mean that it was just typed wrong or that the user forgot the password. We wanted to make sure both options were available.
The problem was, at about the five hour mark, I realized I hated the way it looked. The alert dialogs were unsightly popping over my form and slightly hard to read with the transparency. It was difficult, too, to relay the options in a straight-forward way. I also felt it needed an indicator so the user knew when it was working. I hate views that take a little time and give no clear indication that what I did had any effect.
So I went back to the drawing board. I stuck with the same login interface my designer designed, but instead of using alerts I created a second view that mimics the login view in appearance but first displays an activity indicator (spinner) before displaying a message, if there is one. The primary choice is highlighted cleanly, with secondary choice options below it. It took me seven additional hours to map all this out, set up a structure so all of this could be handled succinctly, and then make sure it all worked correctly.
I’ve designed a number of log in screens now and tried many different things with them. I never like the way they turn out. I know 95% of customers will spend five seconds on this screen, enter their credentials and move on, without realizing how much time and attention to little details went into it. I’m proud of the entire project and believe it will be a huge success. But when someone asks about the piece of code I am most proud when this project is completed, I may very well say it is this login screen.
—
[1] Technically not logged in. Instead the credentials are valid and they are stored in the app. Each time you access the site the credential, using SSL and other means of protecting your data, are passed to the server.
[2] The complete list of cases are: 1) an account is created and credentials stored; 2) the credentials are valid and stored; 3) user requested a new password; 4) no account exists with this email address; 5) the email is found but the password doesn’t match; 6) the server is down or there is no Internet connection; 7) the email verification was never completed and time has expired to use without verification; 8) invalid username (we handle this case but don’t use one as of this writing); 9) invalid email address; 10) invalid password; and 11) the account is suspended.
[3] Yes, I am using the word “user” (instead of “customer”) very deliberately.
Mark Suster wrote a great post last week on entrepreneurship:
Entrepreneurshit. It never ends. It’s not all glamor. It’s mostly not glamorous at all. It’s just something you have to do. Often because you’re unemployable. Your impertinence would get you fired in 2 days for telling your boss he’s a fuck wit.
It’s impossible to explain to those that don’t have the burning desire deep in their guts to make their own paths, even though Mark does about as good a job as anyone. The pain and suffering, the lack of sleep, the stress. Things don’t work out as expected, the wall in front grows bigger and wider, and yet here I go again, up and over, only to be confronted by another wall. It’s superhuman strength to do this day after day, week after week, and keep doing it. There’s no glamour in it. It’s just the way it is.
A year ago I joined a gym. I’ve joined gyms before and had sporadically gone but starting last year I was determined to not lose ground in the winter after a fruitful and fit-full summer. The problem is that going to the gym for an hour and working out was an hour I wasn’t working. Frankly, I can’t stand that. So I needed to “work” during my work out. That’s when I found Dan Benjamin’s 5by5 podcast network and Marco Arment’s Build and Analyze podcast, in particular.
Marco, if you are not aware, is formerly of Tumblr and currently of Instapaper and The Magazine fame. Marco did talk about development but mostly Marco talked about running a business in the iOS App Store ecosystem, the profits and costs, the decisions that affected his business everyday. Marco, as one would say, is opinionated. He cares deeply about his products and the people that use them. He also cares deeply about coffee and cars.
Deciding to listen to Build & Analyze each week was a no-brainer decision. Barely a week went by where some insight didn’t help my own business. Deep discussions about servers. Thoughts about using PayPal for subscriptions. In-depth discussions of design decisions. An on-going analysis of his own business and the choices he made. I’ve been doing this a long time now — 15 years plus — and I didn’t agree with everything Marco said and did, but much of it was so thoughtful, the decisions made so deliberately, that I always understood his logic and could decide whether that logic applied to my business or not.
I have listened to more than 50 episodes now, about half the shows run, and still feel like I am eavesdropping into an incredible conversation between two friends. Marco has a special talent for discussing his craft.
Marco is hanging up his Build & Analyze microphone on December 17. My workouts will never be the same again.
Once upon a time I listened to the radio. This was, in essence for a teenager without any money, the only way to listen to new music. The good part is that there was always something new to listen to. The bad part was the commercials, the DJs, the commercials, the constant talking… did I mention the commercials? Later I understood the trade-off. Without the commercials there was no radio and that that was the cost of listening to new music.
But that changed. Years later there were many more ways to listen to new music, most of which didn’t require paying a fee to do so. Even in the car, I now carry iPods and iPhones loaded with music and podcasts that don’t require me to listen to commercials at all. So now music is free. And when things go free there is no going back.
Apps, for all intensive purposes, have tipped. They are now free. And there’s no use trying to treat them as anything but.
I do indeed pay for some software but it is becoming more and more clear that the apps I rely on the most are, in essence, free. Evernote and DropBox, free. For all intensive purposes the operating systems I run are now free. Google apps, free. Email, free. Web browsers, free. Almost everything I use now is either so ridiculously cheap that it is practically free or is really free. If the app isn’t free now, it will be in the next few years. In certain niches this won’t be the case, but in mass market apps, products aimed at the masses of consumers, what we used to call horizontal software products, are or will shortly be free.
This trend is not worth fighting. It is what it is. As a software developer I have a choice: I can either focus on a very targeted niche application so I can continue to generate product sales, or I can come to terms with the fact that software will be free and consider new models to generate income. Check out this list of amazing revenue models, put together by Fred Wilson’s AVC community.