3 Things Developers Always Miss... And Customers Get Annoyed With
Last week I had to deal with very interesting bug that reminded me of the common mistakes developers make. Here is the story. We use inclusion list (aka “white list”) for allowing access to users from specific domains. Everything worked fine with the initial list of domains we had, however after adding some more domains to the list users from those domains were not able to login. To amplify the problem the issue appeared to be present only in our production environment, and we were not able to reproduce it in any of our test environments.
As it turned out the problem was quite simple. Can you guess it? Yes - trimming white spaces. Something so simple is able to turn the live of developers and testers into a nightmare but not only that - it can annoy customers like hell. In each and every project I was part of, I have seen this one repeated again and again together with two other common mistakes: case insensitive comparison and sorting in the UI. Let me elaborate a bit on all of those.
Trimming Forwarding and Trailing White Spaces
Honestly, I can’t think of a scenario where one doesn’t want to trim forwarding and trailing white spaces when user input is involved. The chances that users will add additional space while typing or paste text with spaces at the front or the end are close to 100%. From other side we are so used to software that handles such simple transformation for us that we already take it as given. Hey, we are not in the 90s anymore (or at least most of us)!
For comma or semicolon separated lists trimming the white space is a must have. The simple reason for that is that people intentionally add spaces for readability, and not trimming those will result in such silly bugs.
Here is an interview tip for you! Next time you interview a developer, ask him to read the items from comma separated list and compare it to some user input. Depending on how he does on this simple assignment you can guess the quality of your future implementation. I am pretty sure you will get very interesting answers.
Case Insensitive Comparison
How often happens to you that type your credentials on some web site and you cannot login? Then you start wondering whether you forgot your password only to discover after 5 mins after that they forgot to mention on the login screen that your username is case sensitive. Smart, isn’t it? Not really! Shift and Caps Lock keys are so close to each other and the odds that one switches to caps lock while typing are quite high. My nickname is ToddySM doesn’t matter whether I type it “toddySM”, or “Toddysm”, or “ToDdYsM” - I still expect you to sign me in. If you don’t the chances are that I will use your product less or not at all.
One note here though - make sure you don’t do case insensitive comparison for passwords. People expect passwords to be case sensitive because this is part of the algorithm to create strong password. And to give you good example for usability, Windows warns you with yellow bang when you have caps lock on on the login screen - small hint that I bet lot of people appreciate (including myself).
To expand my interview tip from above - ask the developer to implement back end for login screen. Pay good attention how the comparison of the string is done - case insensitive for username but case sensitive for the password.
Sorting in the UI
Let me be clear here - it is not about sorting, it is about providing intuitive way to find the one thing one needs among tens or hundreds of others. Take for example the list of countries - if nobody bothered to show a sorted list of countries in the drop down lists every registration page on the Web would be nightmare to fill in. Unless you have special reason not to sort, and this reason is more than obvious for the average user, sorting is the your best bet to make your UI usable. Even if the default view you provide is not sorted you should give an option for the user to sort ascending or descending.
Here an example from TweetDeck where I have few lists created. Of course, the developers of TweetDeck forgot the sorting - it is manageable (but still annoying) at the moment but can you imagine if I have more than 20 lists created (and I do plan to have more than 20).
Different example I have is the way regions are presented in Windows Azure Portal. Here is the current list:
North Central US
South Central US
Of course the list is sorted, but is it usable? I don’t think so - If I am US customer I will expect to see all US regions to be together so that I don’t need to search for them. Here is a better choice (again sorted):
Asia - Anywhere
Asia - East
Asia - Southeast
Europe - Anywhere
Europe - North
Europe - West
US - Anywhere
US - North Central
US - South Central
(Don’t worry! We are fixing this soon ☺)
My last interview tip - use the first list above, and ask the developer to present it in the UI.
Development is not anymore about moving bits from one place to another - development nowadays is about the experience. I hope the tips above will help you develop better and more usable software in the future.