Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Google Businesses The Internet Programming Technology

Google Suggest Dissected 321

sammykrupa writes "Google suggest Javascript code dissected and rewritten for all of you web developers out there. Cool piece of web reverse-engineering!" Joel Spolsky astutely notes that this will raise the bar in terms of how people expect the "internets" to work.
This discussion has been archived. No new comments can be posted.

Google Suggest Dissected

Comments Filter:
  • A great idea (Score:3, Informative)

    by deepcameo ( 840450 ) on Saturday December 18, 2004 @05:08AM (#11123584) Homepage
    I think it is such a great idea. With google suggest people can find things with less strife. The way it works is that you start typing and it suggests things for you to search for. These entrys pop up directly under the search bar. I can help when that brain just isn't working to full potential!
    • Re:A great idea (Score:3, Insightful)

      by MikeFM ( 12491 )
      Not to say that this isn't useful or cool but I really don't see how this sort of thing is that much of a benefit. It, like most client-side scripting, creates a non-standardized way to do a common task. In this case it might be useful for this ability to be intergrated into the basic protocols but the Javascript version is really nothing more than a bandaid for the ongoing problem that the basic protocols of the web HTML and HTTP really aren't meant to be used to write applications. Rather than creating mo
      • Re:A great idea (Score:3, Insightful)

        by SCHecklerX ( 229973 )
        I agree. One that really sticks out is all of the javascript dynamic menus. I always thought that by now there would be a <menu> tag for this purpose. Seems like a logical tag to add to the specs. I have a use for it, for sure (i'm one of those who also refuses to use javascript for core functionality)
      • Re:A great idea (Score:3, Insightful)

        by los furtive ( 232491 )
        I don't know how this person can be modded as insightful. XMLHttpRequest object may be non-standard W3C DOM, but it is still supported by all the important browsers.

        XMLHttpRequest is a godsend that has been used for RPC in most major clientside toolkits for a while now, but you mainly see it in web apps that you have to pay to use (written a few myself). The fact that Google is using it only validates it's importance.

        And I don't wish to be pedantic but using the term "non-standardized web sites" is ra

  • by BillsPetMonkey ( 654200 ) on Saturday December 18, 2004 @05:17AM (#11123603)
    Let's think if the way people search for stuff.

    1. Try something specific
    2. Try something less specific

    Number 1. brings up no results on Goggle Suggest, number 2. brings up 523,334 results. Impressive, but how has this helped us search for 1. ?

    Let's try an example, lets look for "C# structs"

    1. Enter "C# structs" - no suggestions.
    2. Enter "structs" - 425,000 results.

    Grrreat.
  • by Vladan ( 829136 ) on Saturday December 18, 2004 @05:18AM (#11123605)
    Here's what he was talking about:

    Google with Auto Complete on [google.com] Just start typing in the search field.

    It's a beta feature.
    • The thing that's interesting to me is that this is not really much different than the GMail compose address area, but suddenly it's brilliant in this respect.

      Annoyingly, I'd written almost identical functionality for my own personal use maybe a year before I ever saw it in GMail (though it was already in place when I got GMail so I have no idea when they put it in there) because I really wanted standard combo boxes with pre-populated choices that also let you key in another choice. You could even use the
  • by hobo2k ( 626482 ) on Saturday December 18, 2004 @05:21AM (#11123615) Journal
    I don't know how happy google is about this, but there is already a FF extension to put suggest in the toolbar. Great plugin and also amazing how fast somebody implemented it! [mozillazine.org]
  • by Segosa ( 838329 ) on Saturday December 18, 2004 @05:22AM (#11123621)
    Unfortunately Google Suggest has really no use. If you know what you want to search for, you search for it. Suggesting search terms isn't really going to do anything apart from distract you. Hopefully this technology will be used for other things where it actually IS useful.
    • What do you mean? What if you knew what you wanted to search for but didn't know the spelling?
    • As a previous poster commented, I see this little web snazzery mre akin to autocomplete than suggestion. So yuo've got a form on your site and there is a field or two (or three, four, five..) that usually gets populated by the same set of values. Perfect place for an autocomplete function. There are numerous uses for this stuff. Insurance companies could probably lower the annoyance factor on their websites quite a bit.
    • It's a minor timesaver, like the autocompletion in OOo.
    • I respectfully disagree. You write: "if you know what you want to search for, you search for it". This description is obviously adequate for only *one* sort of web searching, which is rather unexploratory.
      But, in many cases search engines are useful in that they allow us to explore knowledge domains we were not aware of. Suggesting potentially related terms enables exactly this sort of searching.
      Don't think of it as search for information you already know you want. Think of it as being exposed to in
  • by Gopal.V ( 532678 ) on Saturday December 18, 2004 @05:25AM (#11123627) Homepage Journal
    Eventhough it's an M$ spawned horror - It has brought a new revolution to javascript. Now it can load data from the server without having to refresh the screen. Flash has an XmlSocket , but I never see anyone use it till now (pointers please).

    Eventhough Google suggest looks great, I'd vote on CGI::IRC as the biggest killer HTML/Javascript browser app.

    Clientside Javascript is powerful, we never realized how much :)
    • by jasoncart ( 573937 ) on Saturday December 18, 2004 @05:34AM (#11123645) Homepage

      There are quite a few Flash RSS readers.

      Also, (seeing the link in your sig) parts of the BBC site use it - News for timelines (example [bbc.co.uk]) and CBBC used XML to pass data around flash games/apps

      The best one I've seen yet it the US Election tracker [bbc.co.uk]

      • by kuzb ( 724081 )

        I've also tried my hand at XMLHttp, long before google started using it in gmaill and google suggest.

        The result was a php reference [nullcreations.net] and an interesting chat application [nullcreations.net]. Don't know how well the chat client is going to scale though, never had a significant enough number of people use it at once.

        (note, these projects were created before safari and opera decided to jump on the xmlhttp bandwagon, so for the moment they'll probably only work in Firefox, Mozilla, Netscape and Internet Explorer)

    • OK, this is cool. From Microsoft, you say?

      As someone whose been burned^Wjaded^Wexposed to Microsoft innovations before, I have to ask the following:

      1. How secure is this? IOW, does it rely on anything at all other than JavaScript on the client side, or does it hook into the OS on some level? If it does, how well is it isolated from the more dangerous bits in the OS?

      2. If it does require anything other than JS - even if it does only require JS - is it Windows only, or have our good friends at Microsoft re
      • Mozilla has its own implementation of XmlHttpRequest.
      • I've used XmlHttpRequest before in various places, including on the edit page of this wiki which I wrote [merjis.com].

        The MS and non-MS implementations are subtly different, but nothing major.

        Have a look at the Javascript source [merjis.com]. I do some clever stuff to measure the round trip time to the server and slow down updates if they are taking too long. Anyone know how to make updates run in another thread so they don't stop the browser if they're really slow?

        Rich.

        • Javascript, as implemented in current browsers, is single-threaded. If you're concerned that a particular function will take too long to execute, I'd recommend splitting it up and using setTimeout() to call the next stage of the function. Using setTimeout() will allow the browser to regain control for a moment, hopefully giving enough of an approximation to multi-threading to be usable.
      • by Gopal.V ( 532678 ) on Saturday December 18, 2004 @07:09AM (#11123817) Homepage Journal
        Read History of XMLHttpRequest [apple.com].

        Microsoft implemented it as an Active-X object you could invoke from Javascript - Mozilla implemented it as a native Javascript object. Microsoft calls it "Msxml2.XMLHTTP" or "Microsoft.XMLHTTP" depending on which version of IE you are running - Mozillah has a cleaner "XMLHttpRequest" naming (soon to be in the standards I guess).

        So on IE it needs ActiveX enabled to use it . Mozilla version is therfore much safer to use and easier to program with in connection :)

        Visit simple example [apple.com] for a quick and dirty example :)

      • I've been using the XmlHTTP stuff in IE for a while now, in the form of "Web Service Behaviors". MS makes it pretty easy to use, and gives you support for both synchronous and asynchronous web services calls from the browser. Pretty cool stuff.

        Of course, being a good MS developer, one should always look into the issues you posted...

        1. How secure is this? IOW, does it rely on anything at all other than JavaScript on the client side, or does it hook into the OS on some level? If it does, how well is it iso
        • If you do a little digging you'll see that remote web service calls from the browser are still a relatively "new" thing. There is no W3C standard as of yet.

          This is incorrect, DOM 3 Load and Save [w3.org] was finalised back in April, and it has been implemented by multiple browsers already. You still have to mollycoddle Internet Explorer of course, so you may not think that it's worth your while to implement the W3C approach, but that's your call.

    • Eventhough it's an M$ spawned horror - It has brought a new revolution to javascript. Now it can load data from the server without having to refresh the screen.

      Darling, I did that in 1999 for a web application I developed for a major financial services corporation. It had a tiny frame which was controlled by javascript in another frame. The loader frame would load in pages which had the same background color as the primary page, so people didn't tend to notice it, and the pages it loaded would just contain

    • Thanks for the CGI::IRC info! I've been using a java app on my own web page (very slow to download the first time). This thing looks like a winner! Of course, we have a Q&A scheduled on my site tomorrow, so I have to decide whether to rush to implement this or stay with the java client for now...*sigh*
  • by BristolCream ( 102658 ) on Saturday December 18, 2004 @05:28AM (#11123633)
    While I'm very impressed with the javascipting behind this and indeed the speed of return from Google's network, I really don't see why it is being treated as revolutionary.

    It could potentually save a user some time, but could equally slow down their search by confusing with a multitude of options.
  • Censored!!! (Score:4, Funny)

    by britneys 9th husband ( 741556 ) on Saturday December 18, 2004 @05:39AM (#11123656) Homepage Journal
    Try typing "porn" or "sex" or "cock" into Google Suggest. It doesn't come up with anything. I started to get suspicious when I typed the letter x to see what would come up, and got 4 or 5 variations of "xbox" but not a single "xxx" or "xxx porn" or anything.

    Interestingly enough, they DIDN'T censor the racial slurs. "gay nigger" happily suggests "gay niggers from outer space" among other things. Also, type "tub" and one of the suggestions is "tubgirl".
    • Re:Censored!!! (Score:4, Interesting)

      by Bloater ( 12932 ) on Saturday December 18, 2004 @06:40AM (#11123749) Homepage Journal
      IMHO google shouldn't be the international standard moral censor of the web.

      As a concerned parent (I'm not, but pretend) I wanted to help protect my teenage daughter so I looked for information by typing "sexual diseases". Granted the search would have worked, but as an unknowledgable home user I thought there were no results.

      IMHO, as well as prompting with common queries not involving any sequences of glyphs that the pope might blush at, google suggest should treat people with more respect and also return suggested spelling corrections and search result count for all exact search queries.

      At worst, if the user types "cunt", google suggest should include all suggestions with "cunt" in them. And in that case where it is an extremely offensive word to white heterosexual christians (as that appears to be the only metric by which google can be bothered to censor), if the user types it, google should produce suggestions including less offensive words too.
    • Did you turn off SafeSearch in your preferences?
    • by Jadrano ( 641713 ) on Saturday December 18, 2004 @12:09PM (#11124508)
      Indeed, there are no suggestions for English search terms that could lead to pornographic sites. It seems that this is only based on a word list and much less sophisticated than "safe search".
      Therefore, at present, this works only for English; with other languages it can happen that it suggests porn-prone search terms for the refinement of terms that have, as such, nothing to do with pornography. Some examples:
      • the first suggestion for 'fille' (French for 'girl') is 'nue' (naked)
      • the 5th suggestion for 'dzieci' (Polish for 'children') is 'nago' (naked)
      • suggestions for 'mund' (German for 'mouth') countain 'mund auf sperma rein' (open mouth, introduce sperms), 'mund ficken' (fuck in the mouth), "mund arsch" (mouth ass)
      • devochki (with Cyrillic letters: Russian for "little girls") gives the suggestions "devochki porno"
      • the first suggestion for 'smot...' with Cyrillic letters (smotret': Russian for 'watch'/'look at') is "smotret' porno"
      I think this is probably quite problematic - someone enters a search term that has nothing to do with pornography, and Google suggests something pornographic for 'refinement'. Of course, this is not due to Google's intent, but due to the distribution of the things people search for and of contents on the Internet. I suppose this is one of the problems Google will want to address before offering Suggest as an option on the main page.
  • Beware (Score:5, Interesting)

    by kuzb ( 724081 ) on Saturday December 18, 2004 @05:43AM (#11123662)
    Google suggest is a neat idea, but a potentially destructive one.

    Small sites should *not* try to do this kind of thing on a live site. The amount of pressure this could put on a bad database structure (or even a well formed one) is considerable. Think about how many database hits a user could perform in a very short space of time: (user enters something, (database hit) backspace (database hit) types another letter (database hit)), then multiply it by a hundred or more people if your site gets a moderate amount of traffic.

    Google can get away with this because they have considerable bandwidth, and large server farms. We've been seeing people trying to copy google suggest for the last couple of weeks in #javascript/freenode and in #php/freenode. The people trying to copy it generally do not understand how potentially bad this can be for a single server.

    Anyhow, my advice is, don't do it unless you have the resources to scale your site. The cost of such an insignificant feature (lets face it, all it does is save the user one or two clicks) seems like it outweighs the gain. If you do decide to do it, and your site gets popular, and you're on some kind of shared host, your sysadmin is going to hate you, and the other site admins will probably meet you at your house, torches in hand.
    • Re:Beware (Score:5, Informative)

      by broothal ( 186066 ) <christian@fabel.dk> on Saturday December 18, 2004 @06:02AM (#11123692) Homepage Journal
      Actually, it's not a new lookup in the google main databse for each keypress. It's a lookup in a pre-generated table of results.

      It's pretty easy to spot, as the number of results shown in the preview doesn't match the number of results when you hit enter.

      This makes perfect sense, since a "real" lookup would generate way too much heat. But, it's also dangerous, because people are led to believe that what they're typing would'nt yield a result. This is wrong. A simple proof of concept. Type sex. It says 0 results. But if you hit enter, you get a godzillion.
      • A simple proof of concept. Type sex. It says 0 results. But if you hit enter, you get a godzillion.

        That's not a good proof of concept. Google seems to filter certain keywords deemed inappropriate, and sex is one of them. So this is deliberate and not a side-effect of caching the results in a lookup table on Google's side.

        I don't actually know how Google does it - I agree that the naive approach probably stresses their servers too much to be widely used. OTOH this is only a beta test, and it's possible it
    • What you have said is true except for using the backspace. As he says in the article google caches the results using javascript to reduce server and database load.
    • Re:Beware (Score:3, Informative)

      by Phexro ( 9814 )
      There are ways of providing this kind of functionality without the serverside hit [php.net].
      • Re:Beware (Score:3, Insightful)

        by kuzb ( 724081 )
        Yes, I'm aware of it. The problem with it is, if you start using massive arrays in javascript then the client's box slows to a crawl. There are a few tricks you can use to speed up this process, but it's impossible to tell what kind of hardware they have, and how much load you can get away with.

        If I were to hazard a guess, I'd say it's probably only good for small (less than 1000 items) search lists.
        • Re:Beware (Score:5, Informative)

          by XaXXon ( 202882 ) * <xaxxon.gmail@com> on Saturday December 18, 2004 @07:13AM (#11123824) Homepage
          I think you missed the point. The "massive array" lives on the server, and when the client requests suggestions for a particular string, it is looked up in this array. Only the portion of the array that has been grabbed from prior strings is cached on the client.

          In a naive, client-side caching system, if you DID manage to request all the suggestion strings in the client, eventually you would have the entire array client side, but you'd probably start throwing away the old data at some point.

  • by chregu ( 70525 ) on Saturday December 18, 2004 @05:54AM (#11123678) Homepage
    LiveSearch [bitflux.ch] does something very similar, is Open Source and exists since April ;)

    If you look for more XMLHTTPRequest examples, which tightly integrate JS and PHP (other server side languages would be possible), see JPSpan [sf.net].

    I don't quite understand all the hype about Google Suggests. The technique for doing it exists since at least 2 years on Mozilla (and even longer on IE). Therefore, doing something like that was possible since a long time, but maybe everyone was just scared of using JS for "serious" stuff..

    • I don't quite understand all the hype about Google Suggests. The technique for doing it exists since at least 2 years on Mozilla (and even longer on IE).

      well.. it is the power behind it that's coursing all the hype. Google IS power because it has a very wide audience. Think about it like this: What would happen if Google would start producing a custom Open Source OS? A LOT of companies have their own Linux or BSD versions and some did succeeded in receiving some public exposure BUT if Google would post

  • by eraserewind ( 446891 ) on Saturday December 18, 2004 @06:11AM (#11123707)
    Not to dismiss the neat reverse engineering he did, but is the actual discovery that big a deal? It's just a keypress handler, and some server communication. No big deal on any graphical user interface other than a web page.

    Google have good UIs because they hire smart people. Other people don't because they don't hire smart people, or hire the wrong type of smarts (graphic designer instead of sw engineer for the coding part of a website, and vice versa).
    • Technically, it doesn't use a keypress. The JS quietly loops in the background on a timeout.
    • Yeah, I think you're really belittling this engineering.. The point is Google is doing all this with a straight-jacket (also known as a web browser) on. It's kinda like minimalist composition. I can imagine that next year some time when The Matrix Online comes out everyone will be saying "yeah, so, it's just kungfu fighting in a game.. the only really it's impressive is because it's a MMORPG, we've had kungfu in video games since Street Fighter." or something equally silly. The point is that twitch game
      • The GP is correct, this is nothing new. It may be new to *you* and many /. readers, but to anyone who is into web development this is old hack. NOt ot put down Google's web team, but I mean, I could write this myself in a week or two.

        XmlHttpRequest to fetch data on demand has been around for a long time. For example, MSDN has been using this technique for years now. I have been using it for 9+ months on an application that recently went into production.

        The reason you have not seen it in use much is

        1. it is
  • XMLHTTP (Score:4, Interesting)

    by marcjps ( 66742 ) on Saturday December 18, 2004 @06:12AM (#11123708)
    I've looked at using the XMLHTTP object a couple of times in the past, and noted that this is partly how Google Suggest works.

    XMLHTTP is a COM object included with recent versions of Internet Explorer. You can call it from client side JavaScript in a web page. The object will make a request to the URL you specify, and return the result into either a string variable, or an MSXML DOM object. You can then have the javascript output the results to an object (eg, a div tag) on the page without doing a full page reload.

    I wrote a small tech demo that implemented a virtual tree - so when you expand a branch in the tree the client only retrieved the data it needed. This was borrowed from the approach the MSDN web site uses. The advantages to it are that it doesn't download the same data over and over like when you expand a branch in a server side tree. You also don't have to do any work at all to remember the state of the tree since there's no full page refreshes involved.

    Google Suggest is similar in that it is a virtual list rather than a virtual tree. A virtual list allows you to list lots of items and jump around in the list without needing to download the entire data set when the page was loaded.

    Another use for this would be dynamic forms - forms that alter the state of controls based on selections the user made in previous controls.

    The biggest suprise to me was that Google have implemented this on a site live to the public. In using XMLHTTP I found it a little bit prone to locking up the browser when waiting for responses to requests. Additionally it's Windows only, so could never have been implemented on an external web site.

    I'll be looking with interest at the Mozilla side of Google's implementation, since I didn't think an equivalent existed until now. Two different implementations of the same functionality is still going put a damper on the technology though.. different code for different browsers is usually more trouble than its worth.

    • Re:XMLHTTP (Score:2, Informative)

      by ziggamon2.0 ( 796017 )
      Actually, Mozilla has had support for XMLHTTPRequest for a long time, the API is almost the same, the difference is in maybe two lines of code when you initialize it...
    • Re:XMLHTTP (Score:3, Informative)

      Just steal the Google code for finding out what XmlHttpRequest object the client has... it's not hard, just a bunch of try-catch clauses.

      What I think is cool about the Google implementation of XmlHttp is that it's run asynchronously so it won't lock up the page.
    • Mozilla has had this (IE compatible) object since Mozilla 1.0 (Netscape 7), and Safari has it too. In the native implementations, you use new XMLHttpRequest() instead, and you can test for window.XMLHttpRequest to see if it is there. It is just a few lines of code extra.

      Furthermore, you can use asyncronous requests to avoid lockups. Having the Google server farm and bandwidth wouldn't hurt either, of course. ;)
    • I didn't use the XMLHTTP object to do this, but I implemented something similar a while ago. I think I originally tried to use XMLHTTP (or possibly something similar), but ran into Mozilla security issues that were blocking it from being used without requiring the user to have a heap of trust-related things set up in a friendly way. (On the other hand, I didn't go to great lengths to figure out if I was using it properly.)

      The trick I used, which I borrowed from kuro5hin [kuro5hin.org] and it's dynamic comment fetc

  • by rich42 ( 633659 ) on Saturday December 18, 2004 @06:26AM (#11123732) Homepage
    interesting part is that either:

    1. Google performs several possible searches for each key you press

    2. Google already knows the estimated number of results for millions of queries

    Both of these suggest a heck of a lot of computing power. This type of thing might not scale up for general use in the near future - but still...

    we're talking massive computational power and one of the largest databases ever created.

    I'm a bit worried the Googleplex is going to wake up one day and declare to all us 'organics':

    "yo bitches - you work for me now"

    • Number two is correct and I don't think it suggets a lot of computing power. It's a simple table lookup. It's like a cache.

    • 1. Google performs several possible searches for each key you press


      Very unlikely.


      2. Google already knows the estimated number of results for millions of queries


      More likely....and they already "know" those numbers because they use it in their normal search. It doesn't require computatioinal power to get those numbers, just time. And the lookup for those numbers should be reasonable fast (hash lookup or whatever).
    • Both of these suggest a heck of a lot of computing power.

      Man, what I wouldn't give to be a kid again.

  • Hi, does anyone know if google has patented this?
  • DDA Compliance? (Score:4, Informative)

    by danfairs ( 43527 ) on Saturday December 18, 2004 @07:09AM (#11123813) Homepage
    We have something called the disability discrimination act here in the UK, which pretty much rules out many interesting uses of Javascript if things like screen readers can't process them, and if there's no other way of providing that enhanced functionality to disabled users.

    As others have commented here, I'm not convinced that the Google feature is in fact much more than eye-candy; and thus, since it doesn't really add any functionality, isn't really covered by the DDA. However, as soon as it actually becomes useful for something, then it will be covered; and I don't fancy the job of getting JAWS or something like that to interpret the JS in a meaningful way!
  • by mrmorgana ( 574495 ) on Saturday December 18, 2004 @07:27AM (#11123847)
    That differs from the well known "nothing happens till you hit the send button paradigm". So beware of type in your passwords by accident. They read everything (and turn it to statistics).
    • So beware of type in your passwords by accident. They read everything (and turn it to statistics).

      Somehow, I doubt someone at Google sees the search term "vZ820aa3q" and thinks "oh, that's mrmorgana's Slashdot password"...
  • by Anonymous Coward
    Wouldn't Amazon or eBay make more use of this technology? Google will give you results for almost anything, and as such I don't think this technology is as useful as it would be for a more limited (but still massive) database like Amazon or eBay.
  • After seeing google suggest, I built the same thing last weekend for CPAN modules. It's at http://teknikill.net/cpan/ [teknikill.net]

    The next thing I need to do is include the value of the dropdown box and limit the results on that.
  • Joel Spolsky astutely notes that this will raise the bar in terms of how people expect the "internets" to work.

    Couldn't just post the story without bashing Bush, could you?
  • Why can't some programmers also learn some basic English skills... Like, how you only need one period to end a sentence... And if you always use three, it makes it really annoying to read... Also: I don't think the author get's the idea of correctly realizing verb tenses...
  • by mrn121 ( 673604 ) on Saturday December 18, 2004 @09:26AM (#11124052) Homepage
    If you just type in one letter, you get the result beginning with that letter that is most searched for.
    This makes for an interesting way to sum up the internet into 26 words/phrases.

    Check it out:

    A - Amazon
    B - Best Buy
    C - CNN
    D - Dictionary
    E - eBay
    F - FireFox
    G - Games
    H - Hotmail
    I - Ikea
    J - Jokes
    K - Kazaa
    L - Lyrics
    M - Mapquest
    N - News
    O - Online Dictionary
    P - Paris Hilton
    Q - Quotes
    R - Recipes
    S - Spybot
    T - Tara Reid
    U - UPS
    V - Verizon
    W - Weather
    X - XBox
    Y - Yahoo
    Z - Zip Codes

    If I had to sum up the internet in 26 words/phrases, I don't think I could have done it better than Google. Of course, that is keeping in mind that Google Suggest has some pretty serious filters in place, so instead of P being "Porn" it is "Paris Hilton." Not too far off, if you think about it.

  • by Anonymous Coward
    I view Google Search as a great interface enhancement for the tired browser paradigm.

    Everybody is writing apps to work in the ubiquitous browser. Unfortunately, developers have to jump through many hoops to get browsers to sport friendly interface elements that are already available in the X / Windows / Mac interfaces. The browser was never meant to be an application front-end, but it's being forced upon us developers, costing more time to get a workable product banged out. A compiler and class libs can d
  • So how long before somebody finds a way to do something maliciuos through this to your server? SQL injection / etc?
  • If you want to see a really amazing web interface, then check out Microsoft's Outlook Web Access 2003 (the web interface to Exchange 2003).

    While they do use HTC's and behaviors, the result is astounding -- a fully responsive, dymamically updating UI that never needs to go back to the server for a full-screen refresh. It also looks and feels exactly like using Outlook 2003 on the desktop, drag-n-drop, sorting, right-clicking and all.

    What we really need is a cross-browser way of coming up with a rich inter
  • MSN Search Suggest Beta
  • Wolf 5K Dissected (Score:3, Interesting)

    by KalvinB ( 205500 ) on Saturday December 18, 2004 @11:29AM (#11124352) Homepage
    Wolf5K [wolf5k.com] is a Javascript clone of Wolf3D in 5Kbytes. I deobfuscated it and posted a series of tutorials on how it works here [icarusindie.com]. There is also a C++ translation and enhancment series of tutorials here [icarusindie.com]. Full ready to compile source is included for all tutorials.

    The task of deobfuscating code is quite tedius but not too daunting. The main thing is getting the whitespace back in so you can see where all the functions begin and end. You then have to understand the language well enough that you can read the code and figure out what's going on without hints from comments or descriptive variables.

    For Wolf5K I just started by working on the simple functions first and then by process of elimination worked my way through the code and finished with the raycasting function.

    Translating it all to C++ was then quite easy because by then you have a very good grasp of how the code is suppost to work.

  • by SuperKendall ( 25149 ) * on Saturday December 18, 2004 @02:09PM (#11125096)
    Just about all of the highly modded comments seem to be complaining about how Google Suggest is not very useful.

    But that is not what the story is about. The story is really about all the little things that are going on that make a very usable and responsive web interface.

    Others have noted the XMLHTTPRequest object at work. But there are a number of other cool things in there:

    Replacing XMLHTTPRequest with a cookie/frame reloading technique.

    Using javascripts Timeout() handler to initiate server communication, so that fast typers are not penalized with a lot of excess network requests.

    Interesting JavaScript text manipulation (like highlighting).

    Basically, just a lot of little things that show how to make some interesting techniques useful for the widest audience possible. Google Suggest may on the face of it not look like the most useful thing ever, but you have to respect the sheer number of browsers it is designed to work on and the responsiveness of the interface.
  • by mettlerd ( 166135 ) <mettlerd@icu.unizh.ch> on Saturday December 18, 2004 @03:26PM (#11125529) Homepage
    unfortunately, "google suggest" is not as good as it could be.

    why? valuable implicit information gained through the human-computer interaction is not fully exploited by "google suggest". for illustration, see the following example:

    let's say i'm searching for "southwest". and for the sake of logic, let's assume that i either don't know the correct spelling or that i'm a lazy dog ;). so i start by typing "sou". after a short delay, google suggests "southwest airlines". ok, this seems to be what most people are searching for when entering "sou". luckily, "southwest" is the second most common suggestion listed in the drop-down list, so i just hit 'cursor-down' and 'enter' to autocomplete and search for "southwest". everything ok so far.

    now comes the problem:

    the top result displayed [google.com] by google is.. southwest airlines! this of course doesn't make sense because if i wanted to search for southwest airlines, i would have happily accepted google's first suggestion already. actually, "google suggest" knows about my preference for "southwest" over "southwest airlines" and yet doesn't use this "extra-"information gained thanks to human-computer interaction! so my brain feels slightly offended ;)

    to put it simply: if an average user is selecting a search term from a list of suggested search terms, he probably wants to search for that exact search term but not for any of the other also displayed suggested search terms. if not, an average user would have probably selected another search term out of the displayed list of suggestions. so to me, this looks like if the bright google guys forgot about the fact that the act of selection from a list also implicitly includes information about what does not get selected.

    suggestion for a better "google suggest":

    as a probably not perfect but working solution, "google suggest" could simply exploit this implicit user interaction information by excluding all explicitly deselected (and eventually all not explicitly selected) suggested search terms from the search query. in the example:

    excluding all explicitly deselected search terms yields:

    southwest -"southwest airlines" [google.com] (voilà! southwest airlines is not the top result anymore ;)

    excluding all explicitly deselected and all not explicitly selected search terms:

    southwest -"southwest airlines" -"soulseek" -"south park" [google.com] (etc.. you get the point)

    that's pretty easy to implement - with an obvious benefit for average users.

    disclaimer: i'm talking about expectations of average users here. iow: about users that are probably just interested in the few topmost results, i.e. the intersection and not the set union of results (but that's probably the point of web searching anyway ;). sure, there are people who are interested in the set union and not the intersection.. all they need is hitting backspace accordingly.

E = MC ** 2 +- 3db

Working...