Web Developer Interview Questions

One of the pet peeves I have when interviewing a developer is realizing that the candidate is completely clueless about certain skills for which he or she has claimed expertise on their resume. There are just too many outright liars out there — so many desperate people pad their list of supposedly known technologies in order for them to get to the in-person interview that it becomes difficult to weed out the chaff simply by scanning their curriculum vitae online.

Unfortunately, the problem is now so prevalent that it is necessary to nip the bud early before wasting more colleagues’ time in interviewing. If any of the technologies below are listed, I start out asking easy soft-ball questions like those that follow.

XML

  • What does “well formed” mean?
  • Describe the difference between a DOM parser and a SAX parser.

WML

  • What is WML and what is it used for?
  • What are the two most common WML tags used to create hyperlinks?

Perl

  • How do you open a file for writing?
  • How would you replace the word “dog” with the word “cat”?
  • What is the difference between “&&” and “and” logical operators?

JavaScript

  • What does 2+5+”7″ evaluate to?
  • What does the “isNaN” function do?

Struts

  • Name and provide basic details of the Struts configuration files.
  • How do you display Struts validation errors on a JSP?

JSP

  • What is a page directive and what is it used for?
  • What is the difference between a client-side comment and a server-side comment?

If candidates can’t correctly answer these ultra-basic questions… well, there is really no hope!

I recently interviewed a “senior-level” candidate who claimed ten years of enterprise experience and “expert knowledge” of each of these technologies on his résumé — he completely failed all of the above WML, Perl, JavaScript, and JSP questions!



JavaScript: Slowly Fade Using Opacity

The JavaScript Fade Anything Technique is great for fading a specified background color of an element back to its native color, but I wanted to dissolve an entire div, including one with images, which the current version of the Fade Anything method doesn’t allow for. After an unsuccessful search for something to suit my needs, I built my own.

Include the reference to the JavaScript file in the header of your HTML. Surround whatever you want to fade with a div tag. Apply an onclick or onmouseover method to run "javascript:slowly.fade('whatever');", making sure to assign an id to the div tag to match (i.e. id="whatever").

var opacity = 96; // Avoid starting at 100% due to Mozilla bug
var slowly = {
  fade : function (id) {
    this.fadeLoop(id, opacity);
  },
  fadeLoop : function (id, opacity) {
    var o = document.getElementById(id);
    if (opacity >= 5) {
      slowly.setOpacity(o, opacity);
      opacity -= 4;
      window.setTimeout("slowly.fadeLoop('"+id+"', "+opacity+")", 50);
    } else {
      o.style.display = "none";
    }
  },
  setOpacity : function (o, opacity) {
    o.style.filter = "alpha(style=0,opacity:" + opacity + ")";  // IE
    o.style.KHTMLOpacity = opacity / 100;           // Konqueror
    o.style.MozOpacity = opacity / 100;	            // Mozilla (old)
    o.style.opacity = opacity / 100;                // Mozilla (new)
  }
}

Works in IE6+, Firefox 1.5+, Chrome.

Save your own copy of the SlowlyFade file — do not steal my bandwidth, please!

As always, this script is provided as-is, without any warranty of any kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose. In no event shall I be liable for any special, incidental, consequential or indirect damages of any kind, or any damages whatsoever resulting from loss of; use, data or profits, whether or not advised of the possibility of damage, and on any theory of liability, arising out of or in connection with the use or performance of this script.

Click anywhere in this box to get rid of this annoying status message. This is a working demonstration of how the SlowlyFade function works.


Want Steak? Speak English!

Six months ago, Joey Vento (the owner of Geno’s Steaks in Philadelphia) put up a sign in his restaurant that reads, “This is America — when ordering speak English.” He states that he added the sign to encourage immigrants to learn the language.

Of course, a bunch of whiny, immigrant activists have labeled his actions as racist. Roberto Santiago, executive director of Philadelphia’s Council of Spanish Speaking Organizations (the organization’s name conspicuously missing a hyphen, most likely due to someone’s poor knowledge of English punctuation), says that Joey is expressing the message that “I don’t like these brown faces in my community and I will do everything I can to get them out of there.”

What a load of crap! The sign doesn’t say anything about brown faces, Latinos, or even Spanish-speaking people. People like Roberto Santiago — who encourage immigrants, legal and otherwise, to snub US society and expect everything to be bilingual to serve their own selfish needs — are actually suppressing immigrants by encouraging them to be unfit for US jobs and more fit for welfare. Joey did not make the issue racist. It is Roberto and other like-minded, self-centered, myopic individuals who are playing the race card for their own personal gain.

I don’t care what color someone’s skin is or where they came from; in my position I work with a lot of immigrants. In fact no one on my development team is actually from the United States; instead they are from India, Australia, Iraq, Ukraine, and China. They are all educated, English-speaking, legal immigrants. I support them, and admire their integrity and determination. On the other hand, my less educated, Spanish-speaking, most likely illegal immigrant gardeners — who probably make about eight bucks an hour after their dual-language-speaking boss pays them under the table — do not deserve any sympathy or respect for refusing to learn English or for crossing the border illegally.

I understand that Joey is not necessarily making a stand about illegal immigrants, only that immigrants should merge into US society by learning the language. He’s right. And I have yet to find a legal immigrant who disagrees. If a Korean immigrant comes here and expects to speak only Korean, works only with Koreans, and celebrates only Korean culture that person is not contributing to US society and should just go back home. The same applies to Mexicans, Germans, Italians, Swedes, Japanese, and everyone else. Blend in! Contribute to US society! Communicate with others around you! Speak English!

But I have a stand on illegal immigrants, as well as a stand on non-English-speaking immigrants. They (the ubiquitous “they”) say that illegal immigrants do the jobs we Americans refuse to do. That’s what high school and college students are for; they will gladly mow the lawn, wash cars, and work in fast food restaurants. Prison workers can work the farm fields. California is supposedly one of the country’s largest producer of fruits and vegetables. If these illegal workers are so plentiful and cheap and “good for California”, why is it that most of the fruits and vegetables in my local supermarket come from south of the border? Mexico, Chile, Argentina, Brazil…

It is because of lazy, uneducated, illegal immigrants that I and other English-speaking individuals must endure product packaging in both English and Spanish. It is because of lazy, uneducated, illegal immigrants that buses drive around town advertising some unknown thing in Spanish that 75% of the people living here can’t read anyway. It is because of lazy, uneducated, illegal immigrants that the crime rate is higher than it should be because they can’t make a standard living. It is because of lazy, uneducated, illegal immigrants that insurance and health care are so expensive.

I sent Joey an email:

Yay! I support you in your lonesome effort to encourage immigrants to learn the language and assimilate into US society. As a child, I lived in Germany. Could I expect everyone to provide everything in English to me? No, I had to learn German. I find it quite appalling that many immigrants to the US expect the opposite. Thank you very much for making a stand!

This is America — speak English.