Errata for Programming Collective Intelligence

I'm making my way through Toby Segaran's excellent new book "Programming Collective Intelligence," and I'm posting here some of the errata I've found in the code thus far that hasn't been reported or published on the O'Reilly site yet. I'll report them but also want to explain them here. (I can't get the Python code to indent using the code markup plugin. Please let me know if you have suggestions.)

Chapter 3, Discovering Groups

generatefeedvector.py

The main body of this file bombs on

 
title,wc=getwordcounts(feedurl)

because the URL http://www.techeblog.com/index.php/feed/ toward the bottom of

http://kiwitobes.com/clusters/feedlist.txt

no long returns an RSS feed. We could remove that URL from feedlist.txt, find the working RSS URL for techeblog, or make our code more robust to deal with this problem in general. To enable the last option, encapsulate getwordcounts in Python's error apparatus:

 
try:
   title,wc=getwordcounts(feedurl)
except AttributeError:
   continue

The variable feedlist in the line

 
frac=float(bc)/feedlist

is referenced but not initialized or computed before that.

The fix is initialize feedlist and increment it as each feedurl is processed:

 
feedlist = 0
for feedurl in file('feedlist.txt'):
    try:
        title,wc=getwordcounts(feedurl)
    except AttributeError:
        continue
    feedlist += 1
    wordcounts[title]=wc
    for word,count in wc.items():
        apcount.setdefault(word,0)
        if count>1:
            apcount[word]+=1

Lastly for Chapter 3, the string handling chokes on a character from one of the feeds that doesn't bridge the ascii and unicode worlds. I googled for a solution and came up with this one simple fix:

 
out = open('blogdata.txt','w')
out.write('Blog')

to

 
out = codecs.open('blogdata.txt','wb','utf-8')
out.write('Blog')

You must

 
import codecs

I'm not up to speed on unicode so don't ask me how it works; it works.

That's it for Chapter 3. More later as I make my way through the book. Btw, I just checked Toby's blog and found that you can download the source code.

Share and Enjoy:
  • del.icio.us
  • digg
  • NewsVine
  • Reddit
  • TailRank

Yelp Battles Supporters of the Meier Family

The listing for Lori Drew's marketing business on Yelp has been ravaged by negative reviews posted by Yelpers, including yours truly. The number of reviews numbered six or seven dozen. Wednesday, the day before Thanksgiving, I received the following email from Yelp HQ:

Hi,

I'm writing to let you know about our decision to remove your review of Drew Advantage in O'Fallon, MO. Your review was flagged by the Yelp community, and our Customer Service team has determined that it falls outside our review guidelines: http://www.yelp.com/faq#great_review.

We review every situation with detail and care and take the removal of reviews very seriously. If you have additional questions about this policy, please contact us at http://www.yelp.com/contact.

Regards,
Kris
Yelp User Support

I checked -- not only did Yelp delete my review, they deleted every single one. I just checked again -- two fresh negative reviews have been posted since the deletions.

I can't blame Yelp for asserting themselves as alpha dog on their boards, but the truly fair solution is to remove the listing for Drew Advantage altogether because is it really a business anymore? With the notoriety of the Drew family in their community and the negative goodwill from being associated with them, what business in their right mind would today or ever? Can Yelp name a standing client of Drew Advantage?

Just in case it is not clear, Drew Advantage is a marketing company for small local businesses. They most likely send out those advertiser packs you get in the mail with coupons for pizza, dry cleaning, car washing, etc. What does this business have to do with the Yelp demographic anyway? My coupons were late in the mail? They don't come anymore? By implicitly coming down on the side of a now defunct B2B business, Yelp is risking a PR blunder for naught.

Meanwhile, I am the boss of me and I'm abstaining from posting reviews of DC area businesses on Yelp for six months.

Share and Enjoy:
  • del.icio.us
  • digg
  • NewsVine
  • Reddit
  • TailRank

Pictures of Lori Drew

Reader "Haywood" dug up these pictures of Lori Drew. Curt's was easier to find. Lori's just took longer. The most popular person in the blogosphere couldn't hide her image forever. The picture portfolio of the June 15th, 2006 meeting of St Peters Chamber of Commerce is the source 1, 2.

lori drew 1

lori drew 2

Share and Enjoy:
  • del.icio.us
  • digg
  • NewsVine
  • Reddit
  • TailRank

Picture of Curt Drew

[thanks to "Haywood" we now also have pictures of Lori Drew.  and Yelp has been pulling reviews of Drew Advantage.]

Someone in a Facebook Group dedicated to the memory of Megan Meier found this picture of Curt Drew on his Coldwell Banker real estate agent profile:

Also, Yelpers have dug up information on Curt Drew's local business, Drew Advantage, including a list of businesses that advertise through it.

Share and Enjoy:
  • del.icio.us
  • digg
  • NewsVine
  • Reddit
  • TailRank
Pages (22): [1] 2 3 4 » ... Last »

Fatal error: Call to undefined function ssi_default_options() in /var/www/html/minger.net/wp-content/plugins/snap-shots/snap-shots.php on line 48