SD West 2007 Developer Bowl

On Thursday, I had the unique opportunity to represent Yahoo, along with 3 of my colleagues at the “Developer Bowl” at the SD West 2007 conference in Santa Clara, California. Basically it was a developer trivia game, with 4 companies competing, and it was lots of fun.

I have to admit I was a little worried when the Google team arrived and I saw that it consisted of:

“If they don’t ask questions about Python, Java, UNIX, AI or Lisp, we should do just fine”, I told myself. I wondered if any of the Google team members would be answers to some of the questions.

We got off to a slow start. Not so much because we didn’t know the answers; more because we weren’t quick enough on the buzzer. Google picked up an early lead. As time went on, we took a few more chances and buzzed in more quickly and made up quite a bit of ground. At some point, we slammed the buzzer so hard that it seemed to be broken. I picked the buzzer up and played it like castanets. Nothing. Eventually it seemed to work again (reboot?) – I verified this by pressing it before host and Dr. Dobb’s Journal Editor-in-Chief Jon Erickson began his next question. People looked over to see why I was hitting the buzzer. “Unit testing”, I explained, which got a few laughs from the TDD-obsessed audience.

In the end, we made up some of the ground that we lost early on, but not quite enough to secure a win. Google got the win with a score of 110 to 90 and we shook hands and sat down to watch IBM face off vs. CodeGear. CodeGear beat IBM in round 2, only to lose 120 to 30 to Google in the third round. Congratulations to the Google team!

Here’s Jon Erickson’s account of the night.

And a pic:

SD West 2007 Developer Bowl

SD West

I went to SD West 2007 in Santa Clara today and it was pretty interesting. Most of the day was spent in two interesting half-day sessions on C++ design from Kevlin Henney:

And there was also an interesting keynote called “Craftsmanship and the Problem of Productivity: Secrets for Going Fast without Making a Mess” on TDD and Agile development from Robert Martin.

Eliminated Treo crash on SD card insert

For a while, I’ve had the rather annoying problem that my Treo 650 crashes 95% of the time when I insert an SD card or navigate to the card in the launcher.

After reading about it on a forum, I fired up FileZ and deleted the infamous .DS_Store and .Trashes junk that my Mac put on there once when I used it to read the card.

Amazingly, it doesn’t seem to crash anymore!

Palm, if you’re reading this, how about making your code robust enough to deal with this?

links for 2007-03-04

Common Lisp libraries for Yahoo! APIs

I was reading some essays about Common Lisp and came across a few interesting libraries for accessing some of Yahoo’s Web Services APIs:

In the case of cl-delicious, it was a little harder to install (into SBCL on my Ubuntu Edgy system), as the author’s site has a bzipped file instead of the gzipped file that ASDF-Install expects.

~/.sbcl/site$ wget http://jarrodkoehler.com/cl-delicious/cl-delicious-0.1.tar.bz2
~/.sbcl/site$ tar -xjf cl-delicious-0.1.tar.bz2
~/.sbcl/site$ cd ../systems
~/.sbcl/systems$ ln -s ~/.sbcl/site/cl-delicious/cl-delicious.asd .

Now, at this point, I was running the current SBCL version from the Ubuntu Edgy repository and this version of SBCL seems to have a slight problem with the cl-delicious.asd file so I had to do:

~/.sbcl/systems$ vim cl-delicious.asd .     # Remove the line with LICENSE

It seems that upgrading to the release version of SBCL from the SBCL web site (1.0.2 as of this writing) also solves the problem and is perhaps a preferable solution.

and then

~/.sbcl/systems$ sbcl

or if you prefer, fire up Emacs and SLIME.

and then

CL-USER> (asdf:operate 'asdf:load-op 'cl-delicious) 
...(a bazillion messages about loading and registering)...

and now you’re ready to do stuff, as shown in the cl-delicious page:

CL-USER> (in-package :cl-delicious)
#<PACKAGE "CL-DELICIOUS">
CL-USER> (defparameter *du*                                                                                                    
           (make-instance 'delicious-user                                                                                      
                          :username "user"                                                                                     
                          :password "password"))
*DU*
CL-DELICIOUS> (recent-posts *du* :count "2")
(#S(POST
    :HREF "http://www.cs.indiana.edu/dfried_celebration.html"
    :DESCRIPTION "Daniel P Friedman: A Celebration"
    :EXTENDED NIL
    :HASH "9821f03f10279cad407aa8b2e5c2bef1"
    :OTHERS NIL
    :TAG "programming video"
    :TIME "2007-02-22T23:06:22Z")
 #S(POST
    :HREF "http://www.math.gatech.edu/~cain/textbooks/onlinebooks.html"
    :DESCRIPTION "Online texts"
    :EXTENDED NIL
    :HASH "79b0c74c3d2941dbd57ac922b471e781"
    :OTHERS NIL
    :TAG "math books"
    :TIME "2007-02-22T20:50:26Z"))

It was easier to install cl-yahoo.

CL-USER> (asdf-install:install 'cl-yahoo) 

However, I ran into problems getting Web search to work:

CL-USER> (asdf:oos 'asdf:load-op :cl-yahoo)                                                                                    
NIL                                                                                                                            
CL-USER> (use-package :cl-yahoo)                                                                                               
T                                                                                                                              
CL-USER> (ysearch :web :query "lisp" :type 'any :results 2)
                                               
XML parser encountered eof before end of entity.                                                                               
   [Condition of type S-XML:XML-PARSER-ERROR]                                                                                  
                                                                                                                               
Restarts:                                                                                                                      
 0: [ABORT] Return to SLIME's top level.                                                                                       
 1: [TERMINATE-THREAD] Terminate this thread (#)                                               
                                                                                                                               
Backtrace:                                                                                                                     
  0: (S-XML::RESOLVE-ENTITY                                                                                                    
      #<SB-SYS:FD-STREAM for "a constant string" {B477469}> >                                                                  
      "invalid value: uri - http://api.search.yahoo.com/WebSearchService/V1/webSearch?"                                        
      #<HASH-TABLE :TEST EQUAL :COUNT 6 {B47C031}>                                                                             
      "appid=cl-yahoo&query=lisp&type=any&results=2&start=3&adult_ok=1</Message>^M                                             
     ^M                                                                                                                
     <!-- ws02.search.scd.yahoo.com uncompressed Sat Mar  3 16:16:03 PST 2007 -->                                         > 
     ")                                                                                                                        
  1: (S-XML::PARSE-TEXT                                                                                                        
      #<SB-SYS:FD-STREAM for "a constant string" {B477469}>
...

I guess I’ll email the author about that.