Thursday, April 7, 2011

Major Milestone Achieved!

Quick stats:
  • 377 lines of code
  • 15 KB
  • About 50 total programming hours spanned over three weeks
I am pleased to announce that the autopoke script has reached an important milestone: it has completed it's first set of pokes!  Until now, the majority of the programming concentrated on how to actually detect pokes without loading the entire page.  Then, work began on detecting pokes across all languages, which meant hacking the code of Facebook.  Finally, the poke functions were re-written from the ground-up.

Here are the technical changes made thus far:
  • Uses XMLHttpRequest instead of GM_XMLHttpRequest: Makes use of the fast Javascript engine instead of passing to Greasemonkey.  This change should make it easier for non-Firefox users to install the script.  But remember that it is not officially supported.
  • Makes asynchronous requests: Fixes a bug that users of slow computers from properly auto-poking.  A copy of the front page is used instead of the DOM itself.  It allows for faster processing and allows users to be poked even before the page finishes loading.
  • New status/error messages: These messages are far more informative and allows the user to see why a poke failed.  Debug variable can still be set to see the "console".
  • Makes use of XML 1.0 standards: Facebook is XML 1.0 compliant. The script makes use of this to retrieve important information to pass to the poke function.  (If you want to see this in action, set debug to 3 or higher.)
 And here are a list of features that will be added over the next couple of weeks:
  • Tracking number of pokes in current war: Obviously, this won't include pokes that have already occurred
  • Check Facebook for pokes automatically
  • Prettify error messages so that they can be copied and pasted into bug reports
  • Comments within the code
And finally, I am working with The Last Well, a 501(c)(3) non-profit organization that building wells in Liberia, to receive donations for it's mission.

2 comments:

  1. looking forward to see your result!

    ReplyDelete
  2. By the way, i'm writing a small script which might use the poke feature in facebook. And maybe you could provide a shortcut - what is the url for a poke? Could not get this to work:
    http://www.facebook.com/ajax/poke_dialog.php?uid=SOMEUSERID&pokeback=0

    Anyway, nice work and thanks for sharing!

    ReplyDelete