Is it a problem of objective, or shoud UX designer know how to code?

Communication, understanding, and right message are very important from the beginning.

What I learned: have a strong and clear objective. Deliver it to right people.

Preface: I applied for UX Designer position in a large company. Then was given a call from HR, and during the conversation I mentioned that, yes, I can write the code on JavaScript. Follow up was the scheduling of a phone interview.

Phone ring… I was asked to open a link with some code editor window in browser. And the first question on the interview, which apparently appeared to be a strictly technical and coding interview, was:

- Are you familiar with JavaScript? Ok, write the code to implement event handling in JavaScript as if no implementation of event handling existed in JavaScript.
- Uh, what? What exactly in your mind?
- I want these two functions:
function addEvent(element, eventType, callback)
function fireEvent(eventType)
- Ok, we can create our own object and make these two functions be a public methods. Something like this:
function eventReadyObj() {}
eventReadyObj.prototype = {
    addEvent: function(el, eventType, callback) { },
    fireEvent: function(eventType) { }
var ourObj = new eventReadyObj();
But what exactly do you want me to do?
- I want this two:
addEvent(document.getElementById("foo_obj"), "foo", myEventHandler);
- I don't understand.
- [short tempered] What were you thinking applying for this position? If you not comfortable to program it's a wrong position for you. Good bye.

End of the interview and the story.

UPDATE: Found it!
AddEvent() solution was posted by Dean Edwards in his blog in 2005.
This solution is the answer to the potential problems using addEventListener and attachEvent (in IE), including, among others, a potential memory leak, or unexpected results, due to their conceptual differences.
Dean Edwards is the guy who has created object oriented JavaScript framework, and made JavaScript his hobby and passion of his life.
But, seriously, why we have to understand how to invent a wheel? Today all major JavaScript frameworks, jQuery for instance, are resolving it very well.


Popular posts from this blog

Data visualization for Roadmap Microsite (Angular and D3.js)

Conceptual design

Four tools for prototyping: Sketch, Figma, Principle, and FramerX