Saturday, August 29, 2009

Android Book Mobile

I entered my Android application into the Android Developer Challenge II. You can read more about what "Book Mobile" does and my thoughts behind the name over at the product website.
  • I've integrated the Google book api into Android.
  • I use the GoodReads api to get reviews for books.
  • I integrated with zxing for barcode scanning to read ISBNs.
  • Because of this missing feature in Android I had to draft my own login dialog for users to enter their google account credentials.
Now for the frustrating part. How they setup the registration/entry process to the ADC means if I want my application available on the market, I have to repackage. This means changing the AndroidManifest.xml and refactoring all the code to have a new package structure. That doesn't seem so bad, right?

Thursday, August 27, 2009

Launch Explorer.exe from Cygwin

Working in cygwin, I often need an explorer window to my current directory or a sub-directory there of. I called this script expl.sh.
#!/bin/bash
export p=`pwd`
export pc=`cygpath -w $p/$1`
explorer.exe /root,$pc &
Once you have this the directory on your path where you keep your scripts: perhaps ~/scripts:
expl.sh
expl.sh some/sub/directory

Monday, August 24, 2009

Google App Engine and GWT

Well, I started poking around with Goole app engine in Eclipse. By default they want to use GWT. fine. Someone once said, "when drinking the tainted cool-aid you might as well eat the cookie too." (if no one said it then I just did)

Well, I develop on Ubuntu and immediately ran into an UnsatisfiedLinkError.
** Unable to load Mozilla for hosted mode **
java.lang.UnsatisfiedLinkError: /home/user/projects/gwt-linux-1.5.3
/mozilla-1.7.12/libxpcom.so: libstdc++.so.5:
Thankfully, this was the first hit on by search. Thank you

Monday, August 3, 2009

When to Refactor

It's common knowledge that you don't write code in a software project to solve future problems. Don't implement code that is not needed.

It occurred to me that the inverse is true for refactoring. I will not delay a refactor because we expect to have a requirement that will make it obsolete. You never know which features/tasks will be canceled or delayed. You should ask yourself, "How long am I willing to support this ugly code?"