Friday, March 25, 2011

Nexus One Debugging

I was having trouble getting ADB from the Android SDK to recognize my phone under Windows 7, here's how I fixed it.

1. Start the Android SDK and AVD Manager.
2. Select "Available packages" on the left.
3. Navigate to: Third party Add-ons > Google Inc. > Google USB Driver package
4. Click "Install Selected" and proceed through the dialogs.
5. Connect your phone
6. Start the "Device Manager" management application, and locate your phone.
7. It should say it's not recognized, right click on your phone and click "Update Driver Software".
8. Click "Browse my computer for driver software"
9. Navigate to the android SDK directory ...\extras\google\usb_driver
10. Proceed through the dialogs.

For me, the driver is located in:
C:\Program Files (x86)\Android\android-sdk\extras\google\usb_driver

I then ran adb devices, and my phone was listed.

Tuesday, March 15, 2011

Netflix's Phone-only support

Until recently, I had the 6-at-a-time Netflix account. I've become rather busy and just don't have the time to watch those DVDs anymore; they just sit around my place collecting dust. I didn't even watch the last batch I had, which sat around for probably a month.

So I dropped my Netflix account down to the online-only service. Well, now you've gotta send those DVDs back with 7 days after your previous subscription expires. I've just been sitting on them anyway, so I opened and resealed the DVDs I had, and put them in the mailbox.

Netflix kindly sent me the next DVDs in my queue, since I still have time on the previous month's subscription. Since I don't have time to watch them anyway, I'll just send them right back without ever removing the DVDs from their envelope.

I don't have a huge complaint about that whole process. It would've been convenient if they had a way for me to say "don't ship me anymore DVDs". I'm not aware of a way to do so, but that's OK... minor annoyance.

One way for me to stop them from shipping me new DVDs is to clear out my queue. Now, I have a full DVD queue plus a handful of saved movies; nearly 500 in total. Problem: There is no "Delete All" button, you have to click 500 little delete buttons. (This also seems to cause the queue to throw JS errors occasionally.)

Now it won't help me right now, but maybe someone (me?) could benefit from a Delete All button in the future if it were implemented. So I hit the "contact us" button looking for a place to fire off a suggestion. That's when I found out there's no way to email Netflix, they only have phone support.

I don't actually want to talk to anyone. I want to send a suggestion. A quick missive "Can you please add a 'delete all' button to the queue?"

An email can get forwarded around; hopefully to a UI team that could implement the feature at some point in the future.

So, Netflix: Sometimes email is better. I'd rather have a choice.

In the meantime, I guess @netflixhelps will have to do. Just keep suggestions to less than 140 characters.

Sunday, March 13, 2011

SCP: I've been doing it wrong all along

It's not something I have to do a lot, so it's never occurred to me that it might be a problem. If you're transferring a lot of small files with SCP, you're doing it wrong too.

Here, I'm copying an old source code repository to my laptop from my desktop using SCP:

jrodriguez@laptop:~/foo$ time scp -Cqr desktop:/tank/Secure/vcs scp

real 1m49.188s
user 0m0.328s
sys 0m0.392s


Here I'm running the directory through tar and piping it's output through SSH, and back through tar on my side:

jrodriguez@laptop:~/foo$ time ssh desktop tar zcC /tank/Secure/vcs . | tar zxC tar

real 0m7.185s
user 0m0.200s
sys 0m0.144s


That's 789 files totaling 6.6 MB.

Lesson: If you're transferring a lot of small files, don't let SCP do it for you.