Wednesday, August 1, 2012

WTF Users?

So today I was again reminded that users will do things that I, as a developer, would never think of doing. And of course they either don't remember how they got into their predicament, or refuse to tell. Today's conversation went something like this:

User: It's broke.
Me: Which browser?
User: IE.
Me: (internally: Noooooooooooooooo!) Seems to work okay on my end, which version of IE?
... insert some back and forth while I guide the user into determining the version, and which browser mode and document mode is currently active...
Me: Still seems to work fine, see what happens in another browser.
User: How do I open the page in another browser?
Me: Open browser, copy address from IE into other browser.
User: When I copy the address, it looks like it has a lot of question marks in it.
Me: Interesting, IM that over to me.
User: "http://www.webaddress.com/folder??x=y?x=a?x=z"

So now I'm trying to figure out how the user made this happen, and between the server log and that IM I have determined that the user made a selection, hit back, selected the null item of "please select something" before making another selection. While I couldn't believe that someone would take these steps, it did teach me to take better care what I do with my Javascript. instead of writing:

window.location += "?x=y";


I changed it to more correctly be

window.location.search = "?x=y";


Arguably I should have done that in the first place, but it took a user doing something I would never expect any user to do in order to show me the error of my ways.

The moral of the story is get the worst possible users (I'm talking about the ones that need a new PC from IT every 3 months because they have 10 browser tool-bars and a bajillion viruses and other malware installed, or they somehow accidentally deleted windows.) testing your work at the earliest possible stage. It's really the only way to fool-proof your code.

No comments:

Post a Comment