Saturday, October 25, 2008

Fixing JSONP with CSS

I investigated several weeks ago to see if we can solve JSONP's flaw: Lack of error detection when the request does not arrive.

One possible new approach would use CSS as a carrier. There are two ways to import external CSS which a "csshttprequest" could exploit: <style/> (with @import rule) and <link/> to the URL. So far neither method works any better than JSONP.

The <link/> element does not provide an onerror event in DOM so it's impossible to detect loading errors.

The <style/> element DOES provide an onerror event but I can't for the life of me figure out a way to trigger that event! Does anyone know how/if it can be done?

If anyone figures out how to trigger an onerror event on a <style/> element they will essentially make cross site XHR exactly as powerful easy as traditional JSON.

Tuesday, October 21, 2008

Recruiting Good Programmers, in India

For a Javascript deveveloper position on my team I thought of hiring fresh grads with minimal experience but strong passion to learn, and open mind to technologies not commonly used in the industry. The reasoning: finding and hiring hard core Javascript programmers would be more expensive in time and money than finding passionate newbies and training them.

Our recruitment team contacted the Centre for Development of Advanced Computing (C-DAC). Fancy title. They provide intense six month 24/7 training in various programming concepts, languages, and platforms to gradates from an engineering background.

We supplied the Tic Tac Toe programming challenge to their students. Within a week the Centre had “short”listed about 65-70 candidates who returned Tic Tac Toe implementations.

Quickly I rejected 85% of the submissions because they were copies of each other or copy pasted from online resources with little to no modification or explanation. So those were a waste of time as they don’t show me anything about the candidate’s skill. Doing this initial culling took about two days of mind crushingly repetitive labour. The thought of writing an automated script to search for plagiarism crossed our minds and might be implemented still.

Then a round of telephonic interviews followed. Out of the eleven candidates I called over the span of three days, only one was selected for a personal interview. All the others did poorly on some or all of the following:
  • Tic Tac Toe implementation was extremely poor. Further discussion with the candidate did not reveal any understanding of fundamental concepts like OOP or patterns.
  • No background knowledge: never heard of open source, Javascript, TCP/IP, HTTP headers, BitTorrent (?!), Perl/PHP/Python/Ruby. I could only get textbook answers from these candidates on “What is polymorphism?” type of questions.
  • Zero track record of self-improvement and independent learning. They don’t read books, magazines, websites, blogs, or attend local tech conferences.
  • Absolutely no personal interest. Programming is seen purely as work and not something to enjoy as a hobby at home. None of the candidates had programming pet projects.
The last remaining candidate is due to be interviewed in the coming days. Let’s hope this goes well.