Friday, September 28, 2012

Books I've Read This Week

I really want to love Captain America: Truth by Robert Morales but it falls just a bit short for me. Sadly I think I need to pin the blame on Kyle Baker's art. Well that's not quite right perhaps I should blame the editor but let me explain. I usually love Baker's art. He's done some great stuff on Plastic Man and his Why I Hate Saturn graphic novel is great but in this case his art looks out of place when you consider the serious nature of the story.

Basically the current day Captain America, Steve Rodgers, has discovered that he was not the first soldier to undergo the super soldier treatment. Rather the first recipients were from an all African American squadron who really weren't offered a choice in taking the serum. It is a very poignant story of racism which is something you don't always see when you are reading comics.
Wait: The Art and Science of Delay by Frank Partnoy makes me feel better to be a procrastinator. In the book the author pulls together a number of studies from experts in the decision making field. The advice in the book can be boiled down to one simple tenant, "wait as long as possible to make a decision". Yes, vindicated!

Many other people feel that this book is a good counter point to Malcolm Gladwell's Blink: The Power of Thinking Without Thinking. So if you read one you owe it to yourself to read the other.

Thursday, September 27, 2012

Happy Customers

You should never under estimate the benefit of making your customers happy. There is a reason why Apple is able to convert so many people into fanboys and that reason is they go above and beyond in order to make their customers happy.

Just this morning I had to pop into the Apple store as my remote that we use for the Apple TV refused to go up. All of the other buttons on the remote worked fine and I had a feeling that it may be something to do with my daughter getting some gunk in the remote but I figured I'd have someone take a look at it before I forked over another $20 to get a new one.

My total time spent in the Apple store was less than 10 minutes. I was able to talk to a Genius about what the problem was and he asked me one question "how long ago did you buy the remote" to which I responded over a year ago. He said "okay" went and got me a new remote and sent me on my way. I didn't have to argue with him or fill out a ton of forms in order to get my new remote.

Think about that whenever you are interacting with your customers. What can you do to remove any impediments that are preventing them from enjoying or using your product. You may pass up a short term gain but you are building a long term relationship which will greatly benefit you.

Some ways that I can think to make your customers happy are:

  • Release quality
  • Don't break things that used to work
  • Take constructive criticism seriously and work to turn those folks into fans of your product
  • But don't feed the trolls. It is a waste of your time.
  • Be available to answer questions

Friday, September 21, 2012

Books I've Read This Week

After listening to Canadian comic book creator Faith Erin Hicks on the War Rocket Ajax podcast I requested all of her available work from my local library. Not only is she a Canadian comic creator she now lives in Halifax, NS which is my old stomping ground.

Friends With Boys A home schooled girl finally has to go to public school. Will she survive her first week of high school and what's up with that ghost?
Zombies Calling! Will these university students survive the oncoming zombie horde? Maybe if they follow the Rules of Zombie Movies.
Brain Camp What exactly are they doing at this summer camp to rehabilitate these trouble teens?
The War at Ellsmere A "charity case" arrives at a boarding school where there is something magical going on behind the scenes.

All of these graphic novels are worth the read. The common theme running through them is an anxiety over school that all kids share. They are some very enjoyable YA books.

Thursday, September 20, 2012

Declared Comment Bankruptcy

Okay, if you've been waiting for me to moderate one of your comments and answer it I'm sorry but I've just declared comment bankruptcy. That means all the comments that were waiting in the queue have now been deleted. Again, sorry.

The comment handling system for Blogger is pretty poor and some of you aren't helping. If you comment on the blog and don't see it show up right away that's normal. I'm moderating all the comments to make sure spammers don't get a foot hold. So when you are submitting a comment just click the "Publish your comment" button once. I'm having a hard time keeping things straight when you submit the same comment 3 or 4 times.



My PhoneGap Day 2012 Talk is Online

So at PhoneGap Day US 2012 I talked about a side project I was working on to help make Cordova better by adding some extra UI bits. Since then a number of the pieces I was working on have been nominated to go into core so I will be revisiting my side project soon to bring it up to date. In the meantime have a good chuckle and don't be afraid to get involved in PhoneGap/Cordova development.

Here are the slides that go along with my talk.

Monday, September 17, 2012

Introducing Anna!

So over the summer I was making the rounds doing a presentation on how to bring Speech Recognition to Android. As part of this work I put together a sample application that uses PhoneGap for the user interface and makes calls to plugins for speech recognition and text to speech functionality. The full source code has been available for quite awhile but I decided to publish the compiled .apk in the Play store as a free application.  Now, there is less of an impediment to folks checking it out.

Basically the application allows you to ask a question using natural language and get an answer. The internal workings of the application are pretty simple. First an intent is fired off to recognize speech. This brings up the Google Voice recognition dialog. Once the speech is completed it returns a text representation of what it thought it heard. I then turn around and ask Wolfram Alpha to answer the question. Once I get a result from Wolfram I display the result and have the app read the answer by using text to speech. Check out a couple examples on the right.
Since the Wolfram Alpha API is only free up 2000 requests per month I couldn't provide an API key with the application. If you want a result other than "I'm sorry I didn't understand" you'll need to register for an API key. The app will detect if you don't have an API key setup in the preferences and guide you in setting it up. I know it is an inconvenience but we'll have to live with it for now.

In addition if you don't want the answer to be read out to you in text to speech you can tell the app not to use TTS.

My next steps in this fun little side project is to start reading the device contacts to make it easier for folks to send emails or SMS via their own voice. Looking past that I'm going to make the application location aware. That's why those permissions are included in the app right now even though they are not used.

The app is intended to be a teaching tool and an example of how to do a host of things using the PhoneGap API. PhoneGap plugins that used in this application include:
The icons are courtesy of the Noun Project and the Speech Bubbles are from Nicolas Gallagher.

Also, if you want to add any features to this app yourself then fork my repo and start sending me pull requests. 

Friday, September 14, 2012

Books I've Read This Week

The Drowned Cities by Paolo Bacigalupi is apparently a young adult novel. Wow, I guess kids are a lot more mature than I was oh, let's say a few decades ago. Let me just get this out of the way up front. I think this is a fantastic novel but you probably don't want to give it to your 12 year old as they may not be mature enough for it.

The crux of the novel is that the United States has collapsed and is completely war torn with faux generals popping up all over the place. We pick up the story a few years after the Chinese have withdrawn from the USA after trying to save it from itself. The situation is evocative of the genocide in Darfur or the child soldiers of Sierra Leone.

In the book we follow a couple of young kids, Mahlia and Mouse, as they try to survive this dystopian future. Guerrilla forces are tracking Tool a "dog soldier"(human animal hybrid) and end up in the kids village immediately turning everyones lives upside down. In order to survive they are forced to befriend Tool and do things that many people may find objectionable just to stay alive.

This book is brutal, honest and amazing. I think that this book is well worth the read. For follow up reading about some real life events that may have had some influence on Bacigalupi try reading Romeo Dallarie's Shake Hands With the Devil and Ishmael Beah's A Long Way Gone
Robopocalypse by Daniel H Wilson is a pretty good robot uprising book. If you like the Terminator movies or iRobot you will find this book to be an enjoyable read. While reading this book it reminded me of World War Z in the style in which is was presented.

I wouldn't run out and buy this book but it is good library material and enjoyable in a popcorn movie kind of way.

Wednesday, September 12, 2012

How to Ask Me a Question

Hey all,

I love helping people out with their PhoneGap/Cordova issues but I do have a day job and sometimes even a home life. It would really help me out if you would provide me with enough information in order to answer your question. In fact I hate to be an ass about this but I'm letting you all know that I'm not going to answer any questions that are along the lines of "it doesn't work". That just isn't helpful. I can't read your mind I don't know how you are using the code.

Here is my advice to you on how to speed up getting a good answer to your query:

Search the PhoneGap mailing list archives

Your question may have already been answered. Make sure you search at least PhoneGap Google group archives before you ask question Go to the PhoneGap Google group and use the search field in the top right of the page.

Provide details

Give as many details as possible. Incomplete questions won't likely be answered.

Include the following at a minimum:
  • what version number of PhoneGap are you using? 
  • which platform and version you are testing on? iOS 4.0, Android 2,2, BlackBerry 6.0, etc. 
  • a detailed description of your problem.
  • is this happening in the emulator only, phone only or both? 

Select a concise, informative subject for the post. For example, include:
  • Platform, if issue is specific Android, iOS, etc.
  • Keyword examples: version, jar file, phonegap plugin, deviceready event, build
  • Short phrase summarizing the problem

You may also want to include:
  • some sample code that illustrates the problem.
  • logs taken while the problem was reproduced.

If the code or logs are huge, let's say over 20 lines please think about using  a web service like Gist or  Alternatively if you have a Dropbox account put the file in your public folder.  Then share the link in the question rather than posting a tone of text.

An example of question


PhoneGap does not work for me!


I get a security error on PhoneGap 0.9.4 when I try to open a database using the Android 3.0 emulator.  You can see the code I used here: and the logs I collected here:  I have looked at the archives and the commits but did not find any solution. Does anyone know what could be the issue and whether this has been fixed?

Also, for detailed back and forth the blogger comments are not the best place so I encourage you to ask me questions over at my Formspring account.



Friday, September 7, 2012

Books I've Read This Week

Drop Dead Healthy by A.J. Jacobs is about the third book I've ready by the professed self experimenter. The unfortunate part about reading so many of an author's books in a short period of time is that they don't seem to have the same impact anymore. Consequently this is the least enjoyable of the three books by Jacobs I've read.

In Drop Dead Health Jacobs attempts to put as much health advice as possible into practice. One of the things that's always occurred to me is that if you did all the things recommended to be "healthy" you wouldn't have time to do anything else in your day. Forget about eating everything they suggest you eat as well as you'd be consuming too many calories. It's fun to watch him stumble through the often conflicting healthy advice.

The book is certainly enjoyable and a somewhat informative read which can be boiled down to exercise more and eat less (except veggies).
Surface Detail by Ian M Banks is another in the long line of Culture novels and boy is it great. We follow a couple of inter-twined stories during the novel. First we have an escaped slave girl who is seeking revenge upon her former master. Secondly we have a "war" between two factions one which wants to do away with the virtual "hell" while the other wants to keep them around as a they are one of the only forms of deterrent in a society that is effectively immortal.

As always Banks does a great job of writing space opera with interesting characters while posing moral quandaries at the same time. If you haven't checked out any of Banks other culture novels I suggest The Player of Games and Use of Weapons.