monster’s new instant job search beta

Since I'm currently job hunting, a few times a week I bounce around between the different job sites out there to see if there are any decent opportunities close to where I live, or if I do actually have to commute to NYC to find good work. Today I was checking out monster after persuing a lead that made it's way to my Inbox early this morning to discover Monster's new Instant Job Search.

The Instant Job Search is a simple ajax app that lets job seekers do basic keyword searches of available jobs on the fly, without the use of a submit button. You specify your zip code, and search radius, and get results sort of quickly (avg. search time for me was between 2-5 seconds, not blazingly fast by any means, but quicker than a page refresh of course. I quickly typed in "Ajax" to get two listings of the same job for a .NET Developer in Connecticut. Well I'm not a .NET guy, so I expanded the radius from 35 to 70 miles (which includes NYC of course) and got 12 returned results, most of which I can work with.

Some interesting findings

This new little app works like an auto-complete and begins searching once you type in two characters in the Keywords field. As I said before there isn't a submit button, so it seems like every time you add a letter, it sends a request. And when you enter another character, it cancels that request and replaces it with a new one. So this is my quesiton. What's the point of this app? By sending requests with each keystroke and trying to return any data any chance it gets, theoretically if a user types slowly and is a hunt and peck type, they could actually using more bandwidth than if they had a page refresh since the server is returning more than the typical auto-complete string array.

Json meets AHAH

Ok, I'm sure you're saying "what's the big deal?" It's just lightweight data and folks who hunt and peck will never notice. And I'll agree with you. The WTF is what's returned by the server when you run your query, a line of JSON then some AHAH style HTML. Huh? Here's my query.

HTML:
  1. http://my.monster.com/JobSearch/InstantFeeder.aspx?_location=12528&_keywords=ajax&_radius=70&_sort=rank&_pagenum=1&_pagesize=1

And here's the JSON / AHAH hybrid that was returned

HTML:
  1. {"jobs":{"returned":12,"found":22,"pagenum":1}}
  2. <table class="ijsResult" id="ijsresult_1" xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3.   <tr>
  4.     <td style="vertical-align:top;">
  5.       <span style="display:none;" id="ijsmeta_1">{'jobid':46098442 , 'positionid':36388017, 'displayoptions':}</span>
  6.       <div class="colItemNumber">1.
  7.         <br /></div>
  8.     </td>
  9.     <td style="vertical-align:top;">
  10.       <div class="colDetailedDateActive">
  11.         <span style="display:none;" class="colApplied" id="ijsapplied_1">A</span>
  12.         <span style="display:none;" class="colFiled" id="ijsfiled_1" onclick="IjsEvent({etype:'delfromfile',value:1});return false;">F</span>7/25/2006</div>
  13.       <div class="colDetailedJobTitle">
  14.         <span style="display:none;" id="ijsstar_1">
  15.           <img src="http://media.monster.com/mm/usen/icons/10x10_arrow.gif" border="0" alt="" />
  16.         </span>
  17.         <a href="http://jobsearch.monster.com/getjob.asp?JobID=46098442&amp;WT.mns_pth=1001" target="_blank">Java Developer with XML and Web Services exp</a>
  18.       </div>
  19.       <div>
  20.         <span class="colDetailedCompanyName">CyberCoders</span>  <span class="colDetailedLocation">Harrison, New York</span></div>
  21.       <div class="colDetailedSummary">Java developer for exciting Software Company This position is open as of 7/26/2006. Not a fit for this position? Java Developer with XML and Web Services exp   Location    ...<a href="http://jobsearch.monster.com/getjob.asp?JobID=46098442&amp;WT.mns_pth=1001" target="_blank">[more]</a>  <span class="colSaveToFile" id="ijssavetofile_1"><a href="javascript:return false;" onclick="IjsEvent({etype:'savetofile',value:1});return false;">[save to file]</a></span></div>
  22.     </td>
  23.   </tr>
  24. </table>

Pretty weird eh? Every time results are returned there is a parsing error due to syntax issues with the JSON string. And then other errors related to various DOM issues ie. "uncaught exception: Permission denied to set property Window.status" and "Error in parsing value for property 'right'. Declaration dropped."

What I don't understand is why the use of a hybrid return data set in the first place? All of the XHTML is formatted in the same way so why bloat things up with the redundant code? That same data could be in XML or JSON and be totally trimmed down. Below is an example of a JSON version of the same data. The JSON string equates to 592 bytes as opposed to the HTML version that is a much heftier 1,749 bytes. You get the point.

JavaScript:
  1. {"jobs": {
  2.     "meta": {
  3.         "returned": 1,
  4.         "found": 22,
  5.         "pagenum": 1},
  6.     "result": [
  7.         {"jobid": 46098442,
  8.         "positionid": 36388017,
  9.         "displayoptions":,
  10.         "itemNumber":1,
  11.         "ijsapplied": "A",
  12.         "ijsfiled": "7/25/2006",
  13.         "detailedJobTitle": "Java Developer with XML and Web Services exp",
  14.         "detailedCompanyName": "CyberCoders",
  15.         "detailedLocation": "Harrison, New York",
  16.         "detailedSummary": "Java developer for exciting Software Company This position is open as of 7/26/2006. Not a fit for this position? Java Developer with XML and Web Services exp   Location    ..."}]}

How to make a beta annoying to debug

Three words, lousy code formatting. The javascript errors took me to this line

JavaScript:
  1. return"";},SafeEval:function(s){return eval("["+s+"]")[0];},CookieGet:function(ckey){var carr=document.cookie.split(/\s*;\s*/);for(var nvk in carr){var nvsplit=carr[nvk].split(/=/);if(nvsplit[0]==ckey){return nvsplit[1];}}

Coding grammar

I can't stress enough the importance of well formatted code. When you are writing in any language, english included, poor formatting equals improper grammar. Thissentence,isinenglishandcanberead!eventhoughitisnotnaturalYadig? If a highschool student wrote a paper that was difficult to read, they'd get a lousy grade even if it was the most most amazing piece of work in the entire history of literature. The same applies to coding. Yes, when I typed in my query the app returned the results I was expecting. But from such a large company as monster.com, I was hoping for more.

Viewing 2 Comments

    • ^
    • v
    I have to agree with you on mixing JSON with HTML in your response, that's just weird, but there are reasons for the other things.

    The difference between the HTML and JSON response are nominal compared to the rest of the page. You'll save more bandwidth by taking away a couple of colors from a single gif. No, the real advantage here is having a degradable interface in which you only have one place where you're managing the html display aspect. Don't get me wrong, I'm not negating trying to cut down the size of a response, I just don't think that's the reason behind this.

    Re: the code formatting, they're probably just stripping whitespaces to get rid of some of that bloat. Just look at Google, they're notorious for their "tiny" js.
    • ^
    • v
    Luke,
    Having one place to manage the display of injected HTML is one thing. Personally I'm a fan of using the AHAH approach when dealing with private non-distributable (for whatever reason) data. For example i use HTML injection for my portfolio since I have no desire to share the data associated with my portfolio outside of naterkane.com. But for a job posting service (that is often distributed via RSS) it just doesn't make sense.
    And I do agree with you that it could be an advantage to return HTML if in fact this app degrades, but It does not (that's why having submit buttons for queries are always a good idea). If you disable javascript in your browser, nothing happens.

Trackbacks

close Reblog this comment
blog comments powered by Disqus

Nater Kane naterkane personal http://www.naterkane.com LinkedIn Profile Web Technologist personal nater@naterkane.com 1978-09-12 voice 845.234.6698 | fax 707.922.0593
964 Flushing Ave. Brooklyn, NY 11206