Fix for Error Installing do_mysql Datamapper Adapter on Ubuntu

Installing Datamapper on Ubuntu 9.04, I got this mysterious error:

$ sudo gem install do_mysql
Building native extensions.  This could take a while...
ERROR:  Error installing do_mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb install do_mysql
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:3

After much googling and trying other solutions like installing libmysqlclient16-dev, I stumbled upon Al Hoang's related problem and solution:

$ sudo aptitude install ruby-dev

Then

$ sudo gem install do_mysql
Building native extensions.  This could take a while...
Successfully installed do_mysql-0.10.0
1 gem installed

Installing libmysqclient16-dev could have anticipated a problem that would have arisen later--it may or may not be necessary.

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

Amazon Packages and Ships OEM Hard Drives Loose in Box with Two Air Pillows and Bubble Wrap ONLY

Executive summary for those who don't want to plow through the whole spiel: Amazon shipped (standard via USPS) my OEM WD RE3 from Amazon with the packaging in the picture below. Promised securely packaged replacement from Amazon came packaged exactly the same way, except one of the two air pillows was totally deflated. DO NOT BUY ENTERPRISE QUALITY HARDWARE FROM AMAZON.

In need of extra storage capacity and after doing a bit of homework, I decided on the Western Digital RE3, specifically model WD1002FBYS, as the best choice.  At $159 for 1 TB, the WD RE3 is significantly more expensive than drives of similar capacity, many of them the "lesser" models made by WD such as the Green, Blue or Black Caviar lines.  Based on the voluminous ratings and reviews on these drives found online, it's evident that the cheaper drives have high failure rates, often out of box.  Not wanting to entrust my data to the lottery, I opted for reliability, at a premium.  The RE3 has a 5 year warranty and few complaints against it relative to the field.

The mass market prefers cheap, so unfortunately the WD RE3 is available only as OEM.  You won't find the RE3 at Best Buy, or even at places that do sell OEM parts, such as Microcenter.

That left me to buy online as the only option.

The first place that came to mind was NewEgg.  It was there that I shifted through the volume of reviews to pin down the RE3.  Unfortunately, what I also learned from the reviews is that NewEgg ships OEM drives with not much more than their plastic bag in the box.  The drives are free to bounce around inside the box and suffer falls from their journey from the warehouse to your door.  That was a non-starter for me and defeats the choice of a premium reliable hard drive in the first place.

Then I checked Amazon.  I was surprised to find this enterprise quality esoteric drive model in Amazon's inventory but there it was.

The buyers of this model on Amazon have been tight lipped with their reviews, so I checked out the reviews for other more popular, cheaper drives to see what I could learn about their shipping experience.  Some of the reviews suggested NewEgg quality or marginally better packaging.  The typical experience was OEM drive in plastic bag with two air pillows for loose protection.  Others described a snug sandwich of foam in addition.  The pattern, if any, wasn't clear from the reviews.  Did Amazon improve packaging quality over time, or the packaging also a lottery through all time, depending on the warehouse or packager?

I couldn't dither much longer, I needed this drive and I had no choice but to order online.  The reviews suggested that Amazon's foam packaging was the best available across online retailers.
Replacement drive with the same lousy packaging, on the right:
So I placed my order expecting snug foam.  What did I get?  First off, I requested standard shipping expecting UPS Ground.  The $160 drive was shipped via USPS.  Despite my misgivings, USPS delivered the parcel perfectly, but what was inside made me want to scream.  I had lost the packaging lottery with Amazon.  Inside was a drive in its plastic bag inside bubble wrap and two loose fitting air pillows.  The bubble wrap bubbles were TINY.  The drive could easily have jostled around and touched the edges of the box and not have survived any big fall.  I've purchased enough hard drives in my time to know how they should be packaged.

People will yell, I purchased an OEM drive, what should I expect?  I don't expect diagnostic CDs, cables or instruction sheets.  I do expect basic integrity of the drive on delivery.  Additionally, the WD RE3 is not available in retail form.

Air pillow in replacement shipment totally deflated:

Amazon obviously knows how to package OEM drives properly.  The reviews on Amazon report several such experiences.  Not only that, I suggested a 500 Gb WD RE3 to a friend a week earlier from Amazon.  HER DRIVE CAME PACKAGED WITH FOAM.  (I should to get her to take a picture of the packaging if she hasn't tossed it out yet.) Why?  Our drives came from the same Sterling, VA Amazon facility but she ordered next day shipping, $20 v $7 for standard.  My guess is that rather than packaging being haphazard for OEM drives, Amazon packages OEM drives properly only when you pay for premium shipping.

If this shipping price discrimination is in fact Amazon's implicit policy, I would have ordered with next day shipping, rather than now have a drive that has been subjected to physical forces I can only imagine, with detrimental effects I will only discover later.  I'm formatting the drive as I write this.  It may work perfectly fine but a drop in shipping could have jarred the drive and shortened its effective life.

To wrap up, Amazon should ship all OEM drives with the same foam sandwich packaging--or plastic or cardboard egg crate.  Do the right thing Amazon! Foam or plastic should only cost a few more cents. Amazon should ship me a new replacement properly packaged.  I will gladly send this air pillow lottery child back (at their cost).

Update:
After complaining to Amazon, they decided to ship me a replacement drive second day delivery. The customer representative promised that it would be securely packaged. The question still remained, how I do get Amazon on any future orders to ship OEM drives with secure packaging?

Hello,

I'm sorry to hear about the condition in which your Western Digital OEM Hard Drive arrived. We make every attempt to package items securely to protect them during shipping, but sometimes, due to an error, a few orders get shipped without proper packaging.

I see that you have already submitted the feedback about the packaging you received to our shipping department. That was the correct action to take. This will ensure our shipping department to take every possible action to ship these items with secured packaging.

I've placed a new order for you at no charge. I can assure you that you will receive this order with a secured packaging.

Speaking to customer service on the phone, I was told that in fact I could not get any such guarantee, that even the drive I am expecting for delivery cannot be guaranteed to have secure packaging. She said there is no way customer service or the order system can influence how a particular order is packaged. Shipping standard, next day, or second day should not be factor. The only levers a customer can pull is to give post-order packaging feedback and request a replacement when a bozo shipment is received.

What's interesting is that the box I received has a label with four bar codes, including one with the model number of the drive. Obviously this is the original box that carried the drive to Amazon in the first place. Did they gut the original protection and reuse the box for reshipment to me, or is this how the drive was secured in the first place? I'm appalled as how casually the industry -- Western Digital, the distributors, and end retailers like Amazon -- treat these delicate electronics. Just because a product is OEM doesn't mean it should be treated any less carefully, especially since they are targeted for server or other high reliability or demand applications. Again, there is no "retail" option for these expensive higher end drives. How ironic that cheaper shit model drives can be bought retail with perfect packaging.

I just got shipping notification that the drive is coming next day delivery. Though this extra premium shipping may be an act of atonement, it fuels my theory that premium shipping gets better packaging despite the assertions of the last rep on the phone.

Kudos the Amazon for great customer service. Too bad they can't get their warehouse shipping act together to obviate these heroic acts in the first place--and obviate wasting my time. Judging from the reviews for OEM drives on Amazon, packaging is a problem they continue to battle.

UPDATE UPDATE:
Replacement drive came today from UPS. The drive was packaged exactly the same way, except one of the two air pillows was totally deflated. Good job Amazon. I'm sending the replacement back. Keeping the first since it seems to have passed basic diagnostics. Amazon offered $20 to make up for their incompetence.

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

Devious New Targeted Financial Phishing Scam Strikes Your Cellphone

I got this cryptic SMS this afternoon on my phone:

Sender: type@arlingtonvafcu.org

Arlington Virginia F C U system notify-unhandled exception . TOLL FREE 877 858 9026

Arlington Virginia Federal Credit Union happens to be legit and so is the domain of the supposed sender.  But how did this get onto my cellphone--and why??  The toll free numbers on the FCU website do not match the one in the text message.  When you call the TOLL FREE number, a synthesized voice asks you to verify your account by entering card numbers, passwords, account numbers, etc.  (I didn't have the patience to listen for more than few seconds.)

Phishing scam!

This FCU happens to be near me.  My best guess is that they harnessed the power of simple marketing or geographical databases or directories and wrote a script that blasts a SMS gateway with locally customized phishing messages directing everyone to the same automated toll free number.

Devious and sophisticated!

Who do you report a disembodied crime like this to?

* * *

The Credit Union knows about the scam and has put up an alert on their website:

!FRAUD ALERT!

Several new "phishing" and "SMiShing" attempts using Arlington Virginia Federal Credit Union's name have been detected.  While they are in no way related to the Credit Union, we want our members to beware ANY email, phone call or text message asking you to give out, or validate, your account information.  To protect yourself from "phishing" and "SMiShing" and other types of identity theft scams, simply don't give out your personal, private information to anyone... ever... over the phone, the Internet, your cell phone, etc... AVFCU will never call, email, text or contact you in any other way and ask you to provide your personal, private information to us. DON'T FALL FOR THESE SCAMS! Click here to read more.

Vishing and SMishing are the new variants of phishing.

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

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
Pages (23): [1] 2 3 4 » ... Last »