Tuesday, January 27, 2009

udev fun!

That was a rough day! I spent most of it trying to get my Android Dev phone to be recognized by my CentOS box. It turns out the Google supplied udev rules don't work under Fedora or CentOS.

The output of udevinfo is different on the different OSes, hence the udev rule is different. This one works for Fedora 10:

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c01", SYMLINK+="android_adb"

and this one works on CentOS 5:

SYSFS{idVendor}=="0bb4", SYSFS{idProduct}=="0c02", SYMLINK+="android_adb"

Note that the spaces after the commas are important and they're both supposed to be on one line.

If you put these rules into 50-android.rules like it's suggested, you will get a device node called /dev/android_adb. With this setup you'll have to run adb as root. To fix that
problem, do these two things:
  1. put MODE="0666" (with a comma and a space!) in either of the above line, and
  2. change the name of the file to 51-android.rules.
You can restart udev with start_udev or udevcontrol reload_rules.

Wednesday, January 21, 2009

I'm really hating Apple...

...or at least the Macbook. Not only does it not have enough keys, the overall interface isn't as consistent as everyone maes (and the damn 'k' ey has been flaky since day one!) it out to be.

Here's what pissing me off tonight. I'm using Eclipse to write an Android application. I want to learn a few shortcuts like how to jump to a specific line (Ctrl-L), got to the last edited position (Ctrl-E), or jump to another class member (Ctrl-Q). Except on an Apples, the function of the Control ey (ARGH!) is usurped by the Command (Open- Apple, Flower thingie) key. So it's Command-L, Command-E and Command-Q, right? Amirite? WRONG! It's Ctrl-Q because Command-Q closes the program! So maybe Ctrl-E also goes to the last position? No, because that key combo does nothing!

Go head, fanboi! Argue all you want that Command-Q to close is consistent across applications. Can you Command-Q the Finder? Huh? Can you?

And I'm not going to blame this on the Eclipse people. I'm blaming Apple. Here's another one: the function keys are set, by default to be Special Features Keys (dim/brighten monitor, volume up/down, etc.). Fine. So if I want the function eys (oh, screw it!) to act like function keys, I need to push a modifier key. Fine again, except it's never the same frackin' modifier key! If I want to quit out of Midnight Commander, it's Command-F10, but to make a directory, it's Control-F7 and to move a file it's Fn-F6! WTF?

As soon as I can, I'm getting a Lenovo Thinkpad running Linux. The only thing this MB is good for is as an iPod updater. I was going to say "as a multimedia box" but I can't even watch The Daily Show on this thing.


Saturday, January 17, 2009

More Android Fun! (Yes, I really mean it this time!)

I just spent the past 12 hours working on my Android app. I think I made a fair amount of progress. For 12 hours, I better have!

Reverse geocoding (where you look up the address given the latlong) is working so I can now say "Save where I am right now!" and also say "Use this address for this new location". If you're paying attention, you can see how they both share a lot of code.

I got Preferences working too! That was pretty easy, I must say.

I still can't get my Linux boxen to recognize the Android, so I'm stuck doing hardware debugging on my @#$%^ Macbook. Although it was kinda neat to fire up the program in Eclipse and watch it run on the handheld.

I think I have only two major pieces left now; doing the proximity checking and drawing the proximity area. The first is mostly done by the Android framework, unfortunately I'm having difficulting finding code I can ste^H^H^H look at for inspiration. I still don't know how to do the proximity area drawing.

Tip of the day: how to properly transfer your app from one machine to another. Tar up the workspaces on one machine, transfer them to the new one, delete the old dir, untar and then....right-click, select Import -> From Existing Files. Things work much better that way.

Tomorrow it's the LocationManager coding! Wish me luck!

Friday, January 16, 2009

More Android fun (NOT!)

Man, today is not my day for doing Android work!

I've been trying for the whole morning and the past two hours to either a) get my Dev phone recognized by my Linux boxes (no luck so far) and b) get my app running on the Dev phone via my Macbook.

A major problem is moving an Eclipse/Android app from one machine to another. I can understand needing to do a Project -> Build All on the new machine but there were still weird problems. I ended up just rerunning the app several times until all the gremlins were shaken out.

For future reference, if you do move Android projects from one machine to another, remember to copy your ~/.android/debug.keystore from one machine to another. I don't know exactly what it does, but your maps won't work otherwise.

Now I have to prep for a phone conference about putting on a cloud computing conference on Wall Street and then take my second Google interview. Wish me luck!

Thursday, January 15, 2009

NYC Cloud Computing Meetup

Last night's NYC Cloud Computing Meetup was another successful event. I think there were twenty attendees, not including the two speakers, Geir Magnusson from 10Gen and Helena May of AppNexus.

Geir gave a good overview of the state of data persistence in the cloud, from Amazon's S3 to Google BigTable to his company's offering. It was quite informative. The tech guys got pretty into it.

Helena's pesentation on what her company offers really jazzed up the business types in the crowd. Succintly, AppNexus offers a production-grade alternative to Amazon's EC2 with 100% uptime, SLAs and the like.

If you're interested in cloud computing are are near NYC, you really should check us out. The crowd is pretty interactive and there are always good discussions going on.

Next month's meeting should be very interesting; the organizer, John D'Esposito, volunteered me to give a presentation on Google's AppEngine. I just have to figure out what I'm going to say! Stay tuned!