<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-72386855013225666</atom:id><lastBuildDate>Sun, 29 Jan 2012 04:03:50 +0000</lastBuildDate><category>mobile</category><category>resolutions</category><category>podcast</category><category>manga</category><category>debugging</category><category>movies</category><category>comedy</category><category>books</category><category>apple</category><category>free</category><category>comics</category><category>buy</category><category>environment</category><category>gadget</category><category>art</category><category>photos</category><category>sleep</category><category>olympics</category><category>terryfoxrun</category><category>caffeine</category><category>iphone</category><category>borrow</category><category>plugin</category><category>fantasy</category><category>charity</category><category>mystery</category><category>family</category><category>tv</category><category>webdev</category><category>kids</category><category>science</category><category>friends</category><category>baseball</category><category>hack</category><category>pants</category><category>wifigeek</category><category>business</category><category>mug</category><category>speaking</category><category>vacation</category><category>oscon</category><category>wifi</category><category>politics</category><category>programming</category><category>awesome</category><category>customer service</category><category>humour</category><category>sci-fi</category><category>parenting</category><category>games</category><category>music</category><category>cats</category><category>geek</category><category>infographic</category><category>scary</category><category>android</category><category>speech recognition</category><category>webcomics</category><category>12 days</category><category>phonegap</category><category>hockey</category><category>weird</category><category>coffee</category><category>fun</category><category>tea</category><category>health</category><category>fitness</category><category>ottawa</category><title>Simon Mac Donald</title><description>Software Developer, Voracious Reader and Caffeine Addict</description><link>http://simonmacdonald.blogspot.com/</link><managingEditor>noreply@blogger.com (Simon Mac Donald)</managingEditor><generator>Blogger</generator><openSearch:totalResults>518</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SimonMacDonald" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="simonmacdonald" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-7586551428787936228</guid><pubDate>Fri, 27 Jan 2012 14:49:00 +0000</pubDate><atom:updated>2012-01-27T13:45:50.446-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><title>Books I've Read This Week</title><description>&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781594202858/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/0143120611/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0143120611"&gt;Reality Is Broken&lt;/a&gt; by &lt;a href="http://janemcgonigal.com/"&gt;Jane McGonigal&lt;/a&gt; reminded me of an idea I was toying with implementing back when I was a software development manager. Back in those days no one liked doing their yearly review as it truly was a pain in the ass to keep track of your yearly achievements and it really didn't amount to anything as pay cuts and not raises were the order of the day. I wanted to implement an experience points system for my developers. For each bug they fixed, test case they wrote or document they reviewed they would get experience points. Then at the end of the year they would have a good record of what they had done and a quantitative number to compare against last years performance. Ideally the developers would get more points for the less&amp;nbsp;desirable&amp;nbsp;tasks. For instance fixing a bug would be worth less points than writing a test case. I hoped that it would incent people to pay more attention to some of the things we are no are important but are often ignored in software development. Alas, it was not to be.&lt;br /&gt;
&lt;br /&gt;
As a gamer and software developer I really identified with the tenants of this book. I'm supremely lucky to have a job in which the motivations for me to come to work every day are more &lt;a href="http://dictionary.reference.com/browse/intrinsic"&gt;intrinsic&lt;/a&gt; than &lt;a href="http://dictionary.reference.com/browse/extrinsic"&gt;extrinsic&lt;/a&gt;&amp;nbsp;and at this point I can't ever imagine going back. During the day I tend to answer a lot of questions about &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt; on the &lt;a href="http://groups.google.com/group/phonegap"&gt;Google Group&lt;/a&gt; or on &lt;a href="http://stackoverflow.com/"&gt;StackOverflow&lt;/a&gt;. I get more satisfaction from StackOverflow as it provides me feedback on my answers. They are&amp;nbsp;up voted&amp;nbsp;and&amp;nbsp;accepted by other users of StackOverflow. This feedback I get from other users gives me intrinsic motivation to keep going.&lt;br /&gt;
&lt;br /&gt;
The notion of using gaming to enhance and improve reality is fascinating one and very well articulated in this book. I will have to agree that&amp;nbsp;collaboration&amp;nbsp;is going to be one of&amp;nbsp;the&amp;nbsp;key skills of the 21st century. Without collaboration we will be unable to get past the challenges we currently face. &lt;br /&gt;
&lt;br /&gt;
Here is a great Ted talk by Jane McGonigal that may whet your&amp;nbsp;appetite&amp;nbsp;for this most&amp;nbsp;excellent&amp;nbsp;book:&lt;br /&gt;
&lt;br /&gt;
&lt;object height="374" width="526"&gt; &lt;param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;param name="bgColor" value="#ffffff"&gt;&lt;/param&gt;&lt;param name="flashvars" value="vu=http://video.ted.com/talk/stream/2010/Blank/JaneMcGonigal_2010-320k.mp4&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/JaneMcGonigal-2010.embed_thumbnail.jpg&amp;vw=512&amp;vh=288&amp;ap=0&amp;ti=799&amp;lang=&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=jane_mcgonigal_gaming_can_make_a_better_world;year=2010;theme=art_unusual;theme=design_like_you_give_a_damn;theme=the_rise_of_collaboration;theme=media_that_matters;theme=what_s_next_in_tech;event=TED2010;tag=computers;tag=design;tag=entertainment;tag=gaming;tag=global+issues;tag=play;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /&gt;&lt;embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="526" height="374" allowFullScreen="true" allowScriptAccess="always" flashvars="vu=http://video.ted.com/talk/stream/2010/Blank/JaneMcGonigal_2010-320k.mp4&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/JaneMcGonigal-2010.embed_thumbnail.jpg&amp;vw=512&amp;vh=288&amp;ap=0&amp;ti=799&amp;lang=&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=jane_mcgonigal_gaming_can_make_a_better_world;year=2010;theme=art_unusual;theme=design_like_you_give_a_damn;theme=the_rise_of_collaboration;theme=media_that_matters;theme=what_s_next_in_tech;event=TED2010;tag=computers;tag=design;tag=entertainment;tag=gaming;tag=global+issues;tag=play;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781595827401/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1595827404/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1595827404"&gt;Hellboy Volume 11: The Bride of Hell and Others&lt;/a&gt;&amp;nbsp;is another good volume from &lt;a href="http://www.artofmikemignola.com/"&gt;Mike Mignola&lt;/a&gt; in the Hellboy ouvre. While it does not exactly move the story forward that we've seen back in Hellboy volume 9 it is a good collection of Hellboy stories and is worth reading for Hellboy and the Luchador's!&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div&gt;See you next Friday.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-7586551428787936228?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/books-ive-read-this-week_27.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-7098050997858345988</guid><pubDate>Tue, 24 Jan 2012 18:44:00 +0000</pubDate><atom:updated>2012-01-24T13:44:27.089-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><title>There's Nothing Like a Real Book</title><description>&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/SKVcQnyEIT8" width="560"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-7098050997858345988?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/theres-nothing-like-real-book.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/SKVcQnyEIT8/default.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-2135934016319009733</guid><pubDate>Fri, 20 Jan 2012 15:30:00 +0000</pubDate><atom:updated>2012-01-20T10:30:00.454-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><title>Books I've Read This Week</title><description>&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781451648539/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1451648537/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1451648537"&gt;Steve Jobs&lt;/a&gt; by &lt;a href="http://authors.simonandschuster.com/Walter-Isaacson/697650"&gt;Walter Isaacson&lt;/a&gt; in a word is &lt;b&gt;mesmerizing&lt;/b&gt;. This is a great no holds barred biography of a complicated man. Jobs was such a polarizing figure as many folks loved him while other absolutely detested him. Although the one thing you can't argue with is that he had a huge impact on technology. Jobs was the driving force behind Apple who've given us the Macintosh, iMac, iPod, iPhone, iPad which revolutionized the computer, music and phone industries. As well he was deeply involved in Pixar which has brought us some of the best movies of the past 20 years. That's not to say that he hadn't made a number of mis-steps along&amp;nbsp;the way, NeXT for instance.&lt;br /&gt;
&lt;br /&gt;
To Jobs things we either insanely great or shit. There was no in between for him as his&amp;nbsp;opinions&amp;nbsp;were of a binary nature. He was extremely hard to deal with and the book gives us an unvarnished view of his relationships with friends, family and business partners.&lt;br /&gt;
&lt;br /&gt;
This is one of those books released in 2011 that is a must read.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div&gt;See you next Friday.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-2135934016319009733?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/books-ive-read-this-week_20.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-5394960391398350389</guid><pubDate>Fri, 13 Jan 2012 19:27:00 +0000</pubDate><atom:updated>2012-01-13T14:27:03.656-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><title>Books I've Read This Week</title><description>Keeping in line with my new years resolutions my books have taken a turn towards non-fiction&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781594488016/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1594488010/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1594488010"&gt;Psychopath Test&lt;/a&gt;&amp;nbsp;by &lt;a href="http://www.jonronson.com/"&gt;Jon Ronson&lt;/a&gt;&amp;nbsp;is a very interesting book the details how to detect psychopath's by answering a &lt;a href="http://www.arkancide.com/psychopathy.htm"&gt;20 question test&lt;/a&gt;. As&amp;nbsp;the author mentions in&amp;nbsp;the book once you start detecting psychopaths you'll start seeing them everywhere which is a bit of a problems. However, it is a great insight into how some folks brains are wired incredibly different than the average.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=0062120999/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/0062120999/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0062120999"&gt;Great By Choice: Uncertainty, Chaos, and Luck--Why Some Thrive Despite Them All&lt;/a&gt;&amp;nbsp;is the latest in a series of books by &lt;a href="http://www.jimcollins.com/"&gt;Jim Collins&lt;/a&gt;. In it Collins examines a number of companies to determine what specific choices they've made in order to become great. Some of the qualities that emerged were the great companies didn't take crazy risks, first they tested their assumptions a little at a time before deciding to jump in with both feet and when things are going well that is the time where the great companies get extremely paranoid about how it could all go wrong.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div&gt;See you next Friday.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-5394960391398350389?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/books-ive-read-this-week_13.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-8877933332903988261</guid><pubDate>Wed, 11 Jan 2012 20:59:00 +0000</pubDate><atom:updated>2012-01-11T15:59:57.262-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><category domain="http://www.blogger.com/atom/ns#">phonegap</category><title>Book Review: PhoneGap Beginner's Guide</title><description>&lt;a href="http://www.amazon.ca/gp/product/1849515360/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1849515360"&gt;&lt;img align="left" border="0" src="http://ecx.images-amazon.com/images/I/515tDGl7TAL._AA115_.jpg" /&gt;&lt;/a&gt;&lt;a href="http://www.amazon.ca/gp/product/1849515360/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1849515360"&gt;Phonegap Beginner's Guide&lt;/a&gt; by &lt;a href="https://twitter.com/#!/alunny"&gt;Andrew Lunny&lt;/a&gt;&amp;nbsp;delivers exactly what the title promises as it is a good guide to developers just getting started with &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt;. The book walks you through the installation of the PhoneGap framework, shows you how to develop and debug your&amp;nbsp;application&amp;nbsp;in a web browser before bringing it over to&amp;nbsp;the device and describes a number of HTML5/CSS3 features you can take advantage of without even needing PhoneGap.&amp;nbsp;Then the book walks you through a number of areas of device functionality that the PhoneGap API like&amp;nbsp;the accelerometer, camera and contacts. Plus there is a chapter devoted to extending PhoneGap functionality using the Plugin API.&lt;br /&gt;
&lt;br /&gt;
The only con that I can point out is that the book does not completely describe the available PhoneGap API, nor should it really as it is targeted at&amp;nbsp;beginners. I can't fault Andrew at all as a lot of the currently functionality was delivered after the books was sent to be published. One thing you should be aware of is that chapter 9 describes the navigator.service.contacts interface which is now navigator.contacts.&lt;br /&gt;
&lt;br /&gt;
I do recommend this book for PhoneGap and fledgling hybrid mobile application developers. Probably the easiest way to get it is as an &lt;a href="http://www.packtpub.com/phonegap-beginners-guide/book"&gt;ebook from Packt&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-8877933332903988261?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/book-review-phonegap-beginners-guide.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-5906704831034274061</guid><pubDate>Fri, 06 Jan 2012 17:33:00 +0000</pubDate><atom:updated>2012-01-06T12:33:00.133-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><title>Books I've Read This Week</title><description>I had to return &lt;a href="http://www.amazon.ca/gp/product/0312875622/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0312875622"&gt;The Children of the Sky&lt;/a&gt; back to the library but here are some other books I read.&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781439108277/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1439108277/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1439108277"&gt;For the Love of Physics&lt;/a&gt;&amp;nbsp;is a great read that explains physics in laymen's terms by Professor &lt;a href="http://en.wikipedia.org/wiki/Walter_Lewin"&gt;Walter Lewin&lt;/a&gt;. It is well worth the read if only for the chapter in which he explains rainbows and how to spot the easier. As an added bonus you can get all of Professor Lewin's &lt;a href="http://en.wikipedia.org/wiki/Walter_Lewin_Lectures_on_Physics"&gt;entertaining lectures on physics&lt;/a&gt; courtesy of MIT's open course ware.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/7Zc9Nuoe2Ow" width="420"&gt;&lt;/iframe&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781401213176/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1401213170/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1401213170"&gt;Scalped Vol.  1: Indian Country&lt;/a&gt; by Jason Aaron is a series I've been meaning to check out for awhile. Set in a fictional Indian reservation undercover FBI agent Bad Horse returns home to take on a corrupt reservation chief and casino owner while dealing with his activist Mom and ex-girlfriend. It sounds very soap operaish but this was a great crime comic.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://ecx.images-amazon.com/images/I/518XSEJOV3L._AA115_.jpg" /&gt;&lt;a href="http://www.amazon.ca/gp/product/0857688332/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0857688332"&gt;Kamandi Last Boy on Earth Omnibus Vol 1&lt;/a&gt;&amp;nbsp;by &lt;a href="http://en.wikipedia.org/wiki/Jack_Kirby"&gt;Jack "The King" Kirby&lt;/a&gt;&amp;nbsp;is pretty amazing. Published during a time where the Planet of the Apes movies were hot properties the&amp;nbsp;similarities&amp;nbsp;are obvious. Kamandi is the last reasoning member of the human race. After his grandfather dies his leaves the bunker he's lived his whole life to explorer the world where he encounters Lions, Tigers, Apes, etc. that have evolved to become the dominant species on earth while humans have regressed to near unthinking animals.&lt;br /&gt;
&lt;br /&gt;
Each and every one of the 20 issues in this omnibus is just bursting with ideas. There is so much going on in these pages that it is too hard to get it all into one blog post. At the end of the first issue there is a map of North America so you can see Kirby had a plan for where he wanted to take this series. Also, while this comic was being published Jack Kirby was doing two other monthly books so he was producing upwards of 60 pencilled pages of art. These days, it's hard enough to get an artist to do 20 pages a month consistently. The pure draftmanship of this book is outstanding. &amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div&gt;See you next Friday.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-5906704831034274061?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/books-ive-read-this-week.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/7Zc9Nuoe2Ow/default.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-6259509264289733028</guid><pubDate>Fri, 06 Jan 2012 15:57:00 +0000</pubDate><atom:updated>2012-01-06T10:57:00.492-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">resolutions</category><title>My New Year's Resolutions</title><description>It's about a week after new years and I've been thinking a lot about this years resolutions as I'm going to take them seriously this year. Some of them might seem pretty odd if you just read the titles. Honestly, this isn't a post for you blog readers it's much more for myself. I figure if I put it out there people will call me on it and I'll be more likely to keep my resolutions.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Read Less&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Last year, according to my &lt;a href="http://www.shelfari.com/simonmacdonald"&gt;Shelfari&lt;/a&gt; account, I read 218 books. Breaking them down into genre looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-B1K58_DiE0I/TwXQTaWQdzI/AAAAAAAAB1k/bPIz9VbtROg/s1600/Screen+Shot+2012-01-05+at+11.30.48+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="230" src="http://4.bp.blogspot.com/-B1K58_DiE0I/TwXQTaWQdzI/AAAAAAAAB1k/bPIz9VbtROg/s320/Screen+Shot+2012-01-05+at+11.30.48+AM.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The pie is dominated 68.7% by Comics and Manga. Predominantly that was taken up by some epic runs of manga like Monster, 20th Century Boys, Naruto and One Piece and graphic novels like Preacher, B.P.R.D. and Fables.&lt;br /&gt;
&lt;br /&gt;
This upcoming year I'm going to read less books and change my focus to Technical and Non-Fiction books. I have a lot of eBooks I've bought from &lt;a href="http://feeds.feedburner.com/oreilly/ebookdealoftheday"&gt;O'Reilly's Deal of the Day&lt;/a&gt;&amp;nbsp;that are just begging to be read. I'm&amp;nbsp;targeting&amp;nbsp;that come the end of 2012 the technical and non-fiction portions of this pie will be about 50%.&lt;br /&gt;
&lt;br /&gt;
It's not that I don't enjoy comics/manga I just need to concentrate on some different things this year.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Exterminate, Exterminate, Exterminate&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
With &lt;a href="http://en.wikipedia.org/wiki/Dalek"&gt;Dalek&lt;/a&gt; like dispassion I'm going to remove a lot of stuff from my life. The first thing I'm going to do is look at the &lt;a href="http://lifehacker.com/5872436/how-to-start-your-information-diet"&gt;information overload&lt;/a&gt;. I currently subscribe to 106 RSS feeds in &lt;a href="http://reader.google.com/"&gt;Google Reader&lt;/a&gt;, follow 308 people on &lt;a href="http://twitter.com/"&gt;Twitter&lt;/a&gt;, subscribe to 38 podcasts and get an enumerable amount of emails a day. I'm going to be absolutely brutal about killing feeds, un-following, deleting podcasts and unsubscribing from email lists until I can reduce the&amp;nbsp;incoming&amp;nbsp;information by a minimum of 25%.&lt;br /&gt;
&lt;br /&gt;
At home I'm going to get rid of a number of books, DVD's and comics that are frankly just collecting dust. There is just too much of my junk cluttering up the house and especially my office. I'd love to hear what suggestions people have for old books and comics. Right now I'm thinking about making a rather sizeable donation of used books to&amp;nbsp;the amazing &lt;a href="http://biblioottawalibrary.ca/en/main/overview"&gt;Ottawa Public Library&lt;/a&gt; and a bunch of comics to &lt;a href="http://www.cheo.on.ca/"&gt;CHEO&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The extermination will not spill over into other time wasters in my life. I'm going to cut back on my TV viewing. It's not that I watch a lot of TV but I want to shift those hours spending more time reading or creating. I've already got a PVR I built myself using &lt;a href="http://www.snapstream.com/products/beyondtv/"&gt;BeyondTV&lt;/a&gt; at home to that saves from commercials and appointment viewing but a few shows may not make the cut in 2012. &lt;a href="http://www.nathanfillion.org/"&gt;Nathan Fillion&lt;/a&gt; I love you but &lt;a href="http://castletv.net/"&gt;Castle&lt;/a&gt; hasn't really been that good this season with the introduction of Captain Victoria Gates. That character has been poison to the show. Also, &lt;a href="http://www.cbs.com/shows/how_i_met_your_mother/"&gt;How I Met Your Mother&lt;/a&gt; would benefit a lot by phasing out Ted as a character. Maybe he can architect a building in Dubai or something.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;The&amp;nbsp;Obligatory&amp;nbsp;"Get in Shape" Goal&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
It's not that I'm in bad shape. I play ice hockey twice a week and I'm pretty fit for a man of my advancing years. However, I could stand to lose a few pounds. I'm a bit scared that I'm developing that skinny fat guy disease. I don't think I'll ever get back to the days where I'm doing a couple of&amp;nbsp;triathlons&amp;nbsp;a year but I'm going to make the commitment to fitness this year one of my top priorities.&amp;nbsp;To that end, the opening of the new gym in my building can't come soon enough.&lt;br /&gt;
&lt;br /&gt;
One thing that I know will make a big dent is:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;NO. MORE. SODA.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
I've gotten back into the bad habit of drinking soda pop with meals. I blame Christmas and having the devils drink at home for people who were visiting. Unfortunately, I started drinking it again at home and then while out of the house but no more!&lt;br /&gt;
&lt;br /&gt;
Look&amp;nbsp;forty, I'm going to be ready for you. If you plan on hitting me hard in a couple of years I will be ready to hit back.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Publish or Perish&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Recently &lt;a href="http://www.deanhaspiel.com/"&gt;Dean Haspiel&lt;/a&gt;&amp;nbsp;published an article called &lt;a href="http://welcometotripcity.com/2012/01/publish-or-perish/"&gt;Publish or Perish&lt;/a&gt; that was inspired by a tweet from comic book writer &lt;a href="https://twitter.com/#!/JPALMIOTTI"&gt;Jimmy Palmiotti&lt;/a&gt;. Basically Dean posits that freelancers now have the all the tools they need to publish their own work or get run out of the business. The post deals with comic book professionals it is all very germain to software developers.&lt;br /&gt;
&lt;br /&gt;
While I'm not going to do anything to&amp;nbsp;jeopardize&amp;nbsp;my incredible day job that allows me to work on &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt;&amp;nbsp;on a daily basis I am going to do some things that stretch the bounds of my current role.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;I will publish&lt;/u&gt;&lt;/b&gt; my first application to the &lt;a href="https://market.android.com/?hl=en"&gt;Android Marketplace&lt;/a&gt;. It will be for free and it will be open source. Beyond that I have a few other ideas for applications but at a minimum I will get this first app out early in 2012. It may not help anyone else but it will fix a problem for me.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;I will write&lt;/u&gt;&lt;/b&gt; my first book. It may never get published but I will write it. Wait scratch that, it will get published as there are a couple of publishers who have expressed interest and if they don't want to release it I will self publish it. There I said it, I'm doing it.&lt;br /&gt;
&lt;br /&gt;
Obviously, it will be a technical book. I don't think the world is ready for my take on &lt;a href="http://en.wikipedia.org/wiki/Batman"&gt;Batman&lt;/a&gt;&amp;nbsp;but hey &lt;a href="http://www.dccomics.com/dccomics/"&gt;DC Comics&lt;/a&gt; if you want to hear my pitch just let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-6259509264289733028?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/my-new-years-resolutions.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-B1K58_DiE0I/TwXQTaWQdzI/AAAAAAAAB1k/bPIz9VbtROg/s72-c/Screen+Shot+2012-01-05+at+11.30.48+AM.png" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-892021582961740210</guid><pubDate>Thu, 05 Jan 2012 20:25:00 +0000</pubDate><atom:updated>2012-01-05T15:25:00.876-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Twelfth Day of PhoneGapping: User Contributions</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;Did you know if there is a missing bit of functionality in &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt;&amp;nbsp;you don't need to wait for the core development team to get around to it? You can take matters into your own hands since PhoneGap is an open source project.&lt;br /&gt;
&lt;br /&gt;
Let's say you have a bit of functionality that is only required on one platform, well the best thing to do in that case is to &lt;a href="http://wiki.phonegap.com/w/page/36752779/PhoneGap%20Plugins"&gt;write a plugin&lt;/a&gt;. If you want to share your plugin with&amp;nbsp;the world then let us know by submitting a pull request on the &lt;a href="https://github.com/phonegap/phonegap-plugins"&gt;PhoneGap Plugins repository&lt;/a&gt;. Submitting to this repository only requires for you to have a &lt;a href="http://www.github.com/"&gt;GitHub&lt;/a&gt; account. There is no need to sign any contributor license agreement. We love to get new plugins.&lt;br /&gt;
&lt;br /&gt;
However, let's say you've identified an area of the API that is lacking. Until PhoneGap 1.3.0 there was no download function for the &lt;a href="http://docs.phonegap.com/en/edge/phonegap_file_file.md.html#FileTransfer"&gt;FileTransfer&lt;/a&gt; class. Well developer &lt;a href="https://github.com/aflx"&gt;Alexander Heinrich&lt;/a&gt;&amp;nbsp;decided to fill that niche by submitting pull requests that added the functionality to iOS and Android. That was a huge help and the BB developers were able to step in an fill in the functionality in their repository. Up until that point Alexander was not a member of the core PhoneGap developers but after he signed the &lt;a href="http://www.apache.org/licenses/icla.pdf"&gt;Apache ICLA&lt;/a&gt;&amp;nbsp;and we reviewed his code he was in. It's as simple as that.&lt;br /&gt;
&lt;br /&gt;
So to all of you my challenge is for you to be the next Alexander Heinrich! Create a plugin, fix a bug add new functionality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-892021582961740210?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/on-twelfth-day-of-phonegapping-user.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-6548665106634032607</guid><pubDate>Wed, 04 Jan 2012 22:04:00 +0000</pubDate><atom:updated>2012-01-05T11:00:49.951-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Eleventh Day of PhoneGapping: Configuration Defaults</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;As much as we'd like to make PhoneGap 100% cross platform there are some differences between platforms that sometimes need to be smoothed over. Two items that I can think of off the top of my head are:&lt;br /&gt;
&lt;br /&gt;
1) Android's persistent file system defaults to the SD Card which everyone can read from while in iOS it defaults to a directory that only the app can read.&lt;br /&gt;
&lt;br /&gt;
2) In order to play a Media file the path to a file in the www directory is different for Android and iOS.&lt;br /&gt;
&lt;br /&gt;
So to smooth these difference over you can create a .json file that is included in your www directory which will hold platform specific configuration details and load it via XHR. Here's how to do it:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1562377.js?file=index.html"&gt;
&lt;/script&gt;&lt;br /&gt;
Your .json file on Android could look like:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="p1"&gt;&lt;span class="s1"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s2"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="s3"&gt;&lt;b&gt;"mediaPath"&lt;/b&gt;&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;"/android_asset/www/"&lt;/div&gt;&lt;div class="p3"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
and on iOS it would look like;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="p1"&gt;&lt;span class="s1"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s2"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="s3"&gt;&lt;b&gt;"mediaPath"&lt;/b&gt;&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;""&lt;/div&gt;&lt;div class="p3"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
So now you can replace clunky if statements like:&lt;br /&gt;
&lt;pre&gt;if (device.platform == "Android") {
    var my_media = new Media("/android_asset/www/test.mp3");
} else {
    var my_media = new Media("test.mp3");
}
&lt;/pre&gt;with:&lt;br /&gt;
&lt;pre&gt;var my_media = new Media(Config.mediaPath + "test.mp3");&lt;/pre&gt;and continue to access everything in a cross platform way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-6548665106634032607?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/on-eleventh-day-of-phonegapping.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-5043800108907274224</guid><pubDate>Tue, 03 Jan 2012 19:41:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.840-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Tenth Day of PhoneGapping: Searching Contacts</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;As I've mentioned before some of the W3C specifications that we base the &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt; API on are the difficult to understand. The Contacts API is definetly one of the hard to understand ones. Here is an example of searching the phones contacts and handling the gotchas that may arrise.&lt;br /&gt;
&lt;br /&gt;
First here is the method signature used when searching contacts:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;navigator.contacts.find(
    contactFields, 
    contactSuccess, 
    contactError, 
    contactFindOptions);
&lt;/pre&gt;&lt;b&gt;contactFields [&lt;i&gt;Required&lt;/i&gt;]&lt;/b&gt;: is an array of strings that represent the fields from the &lt;a href="http://docs.phonegap.com/en/edge/phonegap_contacts_contacts.md.html#Contact"&gt;Contact&lt;/a&gt; object you want returned as part of the search results. For example if you wanted to get&amp;nbsp;the contacts display name and email addresses you would specify:&lt;br /&gt;
&lt;pre&gt;["displayName", "emails"]&lt;/pre&gt;if you would like to get each an every field populated in the returned array of Contacts you would specify, what I call, the fire hose option.&lt;br /&gt;
&lt;pre&gt;["*"]&lt;/pre&gt;However,&amp;nbsp;be careful not to specify too many un-needed properties in the contactFields array. The array does double duty in the find command as the filter you specify in contactFindOptions is applied against each and every field in the contactFields&amp;nbsp;array&amp;nbsp;but we'll talk about that more later.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;contactSuccess [&lt;i&gt;Required&lt;/i&gt;]&lt;/b&gt;: is the success callback which is invoked with an array of contacts.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;contactError [&lt;i&gt;Optional&lt;/i&gt;]&lt;/b&gt;: an optional error callback which is invoked if something goes wrong with the find command. The only parameter to the function is a &lt;a href="http://docs.phonegap.com/en/edge/phonegap_contacts_contacts.md.html#ContactError"&gt;ContactError&lt;/a&gt; object.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;contactFindOptions [&lt;i&gt;Optional&lt;/i&gt;]&lt;/b&gt;:&amp;nbsp;is an optional &lt;a href="http://docs.phonegap.com/en/edge/phonegap_contacts_contacts.md.html#ContactFindOptions"&gt;ContactFindOptions&lt;/a&gt; object which controls a couple of options in the find command. The two parameters in&amp;nbsp;the contactFindOptions are&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;filter&lt;/i&gt;&lt;/b&gt;: specify what you want to match against.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;multiple&lt;/i&gt;&lt;/b&gt;: set to true if you want more than one contact returned in the success callback.&lt;br /&gt;
&lt;br /&gt;
by default filter is set to&amp;nbsp;the wildcard (match everything) and multiple is set to true.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Find Examples&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
1) Find all the names and email addresses of contacts with Ottawa area phone numbers.&lt;br /&gt;
&lt;pre&gt;navigator.contacts.find(
    ["displayName", "name", "emails", "phoneNumbers"], 
    contactSuccess, 
    contactError, 
    {filter: "613", multiple: true});
&lt;/pre&gt;2) Get all&amp;nbsp;the contacts on&amp;nbsp;the device.&lt;br /&gt;
&lt;pre&gt;navigator.contacts.find(
    ["*"], 
    contactSuccess, 
    contactError);
&lt;/pre&gt;3) Find all contacts named "Bob" and where they work.&lt;br /&gt;
&lt;pre&gt;navigator.contacts.find(
    ["displayName", "name", "organizations"], 
    contactSuccess, 
    contactError, 
    {filter: "Bob", multiple: true});
&lt;/pre&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Gotcha's&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
1) Slow search results.&lt;br /&gt;
&lt;br /&gt;
As I mentioned earlier the more items you specify in contactFields the longer your search will take as the filter will have to be applied against it to see if the contact matches the filter. Please try and limit&amp;nbsp;the contactFields array to only the parameters that you absolutely need.&lt;br /&gt;
&lt;br /&gt;
2) Null values&lt;br /&gt;
&lt;br /&gt;
Frequently people end up running into errors in their success callbacks as they don't guard against null values properly. According to the W3C spec if there are no results for array values like emails, phoneNumbers, addresses, etc. the code should return a null for theses values and not an empty array. So when folks try to loop through all the returned emails it will error out as you can't access the fields of a null value. So when you try to access one of these values guard agains the null.&lt;br /&gt;
&lt;pre&gt;if (contacts[i].phoneNumbers != null) {
    for (j=0; j &amp;lt; contacts[i].phonenumbers.length; j++) {
        // Do stuff
    }
}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-5043800108907274224?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/on-tenth-day-of-phonegapping-searching.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-1340688317136322685</guid><pubDate>Tue, 03 Jan 2012 02:09:00 +0000</pubDate><atom:updated>2012-01-02T21:09:21.901-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">fitness</category><title>23 1/2 Hours a day</title><description>&lt;object height="360" width="640"&gt;&lt;param name="movie" value="http://www.youtube.com/v/aUaInS6HIGo&amp;hl=en_US&amp;feature=player_embedded&amp;version=3"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/aUaInS6HIGo&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="360"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-1340688317136322685?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/23-12-hours-day.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-8471182592944787911</guid><pubDate>Mon, 02 Jan 2012 20:37:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.843-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Ninth Day of PhoneGapping: Getting Help</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;Besides being an excellent JavaScript toolkit &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt; is also a kick ass community of developers. The best place I know of to get help, and where I hang out answering a buch of questions is the &lt;a href="http://groups.google.com/group/phonegap"&gt;PhoneGap Google Group&lt;/a&gt;. As well there is an IRC channel at irc.freenode.net, port 6667, with a room name of &lt;i&gt;phonegap&lt;/i&gt; obviously.&lt;br /&gt;
&lt;br /&gt;
In order to improve your chances of getting a quick and informative answer I'd suggest that you follow this process when asking a question on the Google group or on IRC.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;First search the archives&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Your question may have already been answered. Make sure you search at least PhoneGap Google group archives before you ask your question.  Go to the PhoneGap Google group and use the search field in the top right of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Provide details&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Give as many details as possible. Incomplete questions won't likely be answered.&lt;br /&gt;
&lt;br /&gt;
Include the following at a minimum:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;what version number of PhoneGap are you using?&lt;/li&gt;
&lt;li&gt;which platform and version you are testing on? iOS 4.0, Android 2.2, BlackBerry 6.0, etc.&lt;/li&gt;
&lt;li&gt;a detailed description of your problem.&lt;/li&gt;
&lt;li&gt;is this happening in the emulator only, phone only or both?&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Select a concise, informative subject for the post. For example, include:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Platform, if issue is specific to Android, iOS, etc&lt;/li&gt;
&lt;li&gt;Keyword examples: version, jar file, phonegap plugin, deviceready event, build&lt;/li&gt;
&lt;li&gt;Short phrase summarizing the problem&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
You may also want to include:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;some sample code that illustrates the problem.&lt;/li&gt;
&lt;li&gt;logs taken while the problem was reproduced.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
If the code or logs are huge, let's say over 20 lines please think about using a web service like &lt;a href="https://gist.github.com/"&gt;Gist&lt;/a&gt; or &lt;a href="http://pastebin.com/"&gt;Pastebin.com&lt;/a&gt;.  Alternatively if you have a Dropbox account put the file in your public folder.  Then share the link in the email rather than mailing around a bunch of large files.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;An example of question&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Wrong:&lt;/b&gt;&lt;br /&gt;
PhoneGap does not work for me!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Right:&lt;/b&gt;&lt;br /&gt;
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: &lt;a href="https://gist.github.com/937307"&gt;https://gist.github.com/937307&lt;/a&gt; and the logs I collected here: &lt;a href="https://gist.github.com/937315"&gt;https://gist.github.com/937315&lt;/a&gt;.  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?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;An example of subject&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Wrong:&lt;/b&gt;&lt;br /&gt;
Urgent. Need help with my problem.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Right:&lt;/b&gt;&lt;br /&gt;
Android / PhoneGap 1.2.0 : deviceready event not firing&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-8471182592944787911?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/on-ninth-day-of-phonegapping-getting.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-2441968696626399548</guid><pubDate>Sun, 01 Jan 2012 18:00:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.845-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Eight Day of PhoneGapping: Multiple Screen Sizes</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;This is another question that comes up on the mailing list frequently, how do you support multiple screen sizes (portrait, landscape, phone, tablet)? Luckily there is a pretty good technique in web development that can be used in your &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt; application. It is called responsive web design and there is a book by &lt;a href="http://ethanmarcotte.com/"&gt;Ethan Marcotte&lt;/a&gt;&amp;nbsp;coincidentally called &lt;a href="http://www.abookapart.com/products/responsive-web-design"&gt;Responsive Web Design&lt;/a&gt; that I've recommended so often that I feel like I should be getting a kick back from the author (Full disclosure, I don't get a kick back). The book is only $9 and after you are done reading this post you should just go buy it.&lt;br /&gt;
&lt;br /&gt;
In a nutshell, responsive web design uses CSS media queries to determine the width of your display and deliver different layouts based upon screen size. This would allow you to show a single column interface to portrait based phone users of your application but a multi-column approach to landscape table users. Let's run through a quick example.&lt;br /&gt;
&lt;br /&gt;
For our phone users we'll setup our CSS so that our navigation sidebar shows up at the top and the main area of our application is underneath it. That would require some CSS that looks like this:&lt;br /&gt;
&lt;pre&gt;#wrapper {
            width: 90%;
            min-width: 0;
          }
          #main {
            margin-left: 0;
          }
          #sidebar {
            width: auto;
            float: none;
          }
&lt;/pre&gt;We'll set our wrapper div to have a width of 90% because we don't want any text going right up against the screen as it make it hard to read. We'll give our main content a left margin of 0px so it is left justified against the wrapper div. For our sidebar we'll make the width auto so all the text will fit. So you app will look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-4nk2nLITmks/TwCZvIib2GI/AAAAAAAAB1M/gG2hrKmz0UU/s1600/Screen%2BShot%2B2012-01-01%2Bat%2B12.36.08%2BPM.png" imageanchor="1"&gt;&lt;img border="0" height="111" src="http://2.bp.blogspot.com/-4nk2nLITmks/TwCZvIib2GI/AAAAAAAAB1M/gG2hrKmz0UU/s400/Screen%2BShot%2B2012-01-01%2Bat%2B12.36.08%2BPM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now for the tablet version of the app you have a lot more screen real estate to work with so you want to have two columns. The left column will be&amp;nbsp;the sidebar for navigation and the right column will be the main content area. Your CSS will look like:&lt;br /&gt;
&lt;pre&gt;#wrapper {
              width: 80%;
              margin: auto;
            }
            #main {
              margin-left: 40%;
            }
            #sidebar {
              width: 40%;
              float: left;
            }
&lt;/pre&gt;The first thing you will notice in the CSS is that the wrapper div width is now 80% as we have more screen to work with so we can pad the sides a bit more. The main div is going to float over to 40% of the width of the wrapper div and the sidebar will be 40% of the wrapper div floating to the left side. And your app would look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-UfEDvUWL-so/TwCZvbLXg2I/AAAAAAAAB1U/8W9Y5VHauZs/s1600/Screen%2BShot%2B2012-01-01%2Bat%2B12.26.45%2BPM.png" imageanchor="1"&gt;&lt;img border="0" height="45" src="http://3.bp.blogspot.com/-UfEDvUWL-so/TwCZvbLXg2I/AAAAAAAAB1U/8W9Y5VHauZs/s400/Screen%2BShot%2B2012-01-01%2Bat%2B12.26.45%2BPM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
So that is all well and good but how does our app choose which version of the CSS to use depending on if it is running on a phone or tablet. Well that is the magic of CSS media queries. We'll wrap up our CSS with:&lt;br /&gt;
&lt;pre&gt;@media all and (max-width: 800px) { ... }&lt;/pre&gt;for the phone version of the CSS and:&lt;br /&gt;
&lt;pre&gt;@media all and (min-width: 801px) { ... }&lt;/pre&gt;for the tablet version. Simply screens up to 800px will get the phone version of the CSS and any screen over 800px wide will get the tablet version.&lt;br /&gt;
&lt;br /&gt;
Here is a full HTML file for you to test out.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1547814.js?file=rwd.html"&gt;
&lt;/script&gt;&lt;br /&gt;
Interestingly enough for Android 3.2 and greater they've adopted a similar technique to responsive web design to &lt;a href="http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts"&gt;handle multiple screen sizes on Android&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-2441968696626399548?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2012/01/on-eight-day-of-phonegapping-multiple.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-4773254535754375203</guid><pubDate>Sat, 31 Dec 2011 17:00:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.848-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">debugging</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Seventh Day of PhoneGapping: Debugging</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;One of the truly horrible things about doing web application development on mobile phones is the lack of web development tools that you'd see in modern desktop web browsers. Luckily for us a couple of folks have made it a lot easier to do web dev with tools like &lt;a href="http://callback.github.com/callback-weinre/"&gt;weinre&lt;/a&gt; by &lt;a href="http://muellerware.org/"&gt;Patrick Mueller&lt;/a&gt; and &lt;a href="http://www.iwebinspector.com/"&gt;iWebInspector&lt;/a&gt; by &lt;a href="http://firt.mobi/"&gt;Maximiliano Firtman&lt;/a&gt;. I'm going to spend my time talking about weinre not because iWebInspector isn't as good but because I spend most of my time in Android land so I'm much more familiar with weinre.&lt;br /&gt;
&lt;br /&gt;
The description from&amp;nbsp;the home page:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-size: 19px;"&gt;&lt;span class="weinre" style="color: #008888; font-family: Menlo, Monaco, Consolas, 'Lucida Console', 'dejavu sans mono', monospace; font-style: italic; font-weight: bold;"&gt;"weinre&lt;/span&gt;&amp;nbsp;is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it's designed to work&amp;nbsp;&lt;b&gt;remotely&lt;/b&gt;, and in particular, to&amp;nbsp;&lt;b&gt;allow you debug web pages on a mobile device such as a phone&lt;/b&gt;."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Isn't that great? You can have&amp;nbsp;the developer tools you are used to back in your greedy little hands again.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The weinre home page has detailed instructions on how to setup your own server, which is not that difficult, but if you are like me (i.e. lazy) there is already a server setup for you at &lt;a href="http://debug.phonegap.com/"&gt;debug.phonegap.com&lt;/a&gt;&amp;nbsp;where getting started is only three steps away.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-4773254535754375203?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/on-seventh-day-of-phonegapping.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-3747725245398003287</guid><pubDate>Fri, 30 Dec 2011 16:59:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.850-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Sixth Day of PhoneGapping: Downloading a File</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;Did you know that the &lt;a href="http://docs.phonegap.com/en/1.3.0/phonegap_file_file.md.html#FileTransfer"&gt;FileTransfer&lt;/a&gt; object got a new download method in &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt; 1.3.0? You didn't, well thanks to &lt;a href="https://github.com/aflx"&gt;Alexander Heinrich&lt;/a&gt; for spurring it's &amp;nbsp;development and getting it checked in for Android and iOS (download is also available to you BlackBerry users). Finally PhoneGap developers have a&amp;nbsp;convenient&amp;nbsp;way to download binary files.&lt;br /&gt;
&lt;br /&gt;
The method signature is:&lt;br /&gt;
&lt;pre&gt;download(source, destination, successCallback, errorCallback);
&lt;/pre&gt;Where the parameters are:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;source&lt;/b&gt;: The URL you want to download&lt;br /&gt;
&lt;b&gt;destination&lt;/b&gt;: The full file path you want the file stored at&lt;br /&gt;
&lt;b&gt;successCallback&lt;/b&gt;: called with a &lt;a href="http://docs.phonegap.com/en/edge/phonegap_file_file.md.html#FileEntry"&gt;FileEntry&lt;/a&gt; object that represents the new file&lt;br /&gt;
&lt;b&gt;errorCallback&lt;/b&gt;: called when something goes wrong&lt;br /&gt;
&lt;br /&gt;
So say we want to download a PNG image and store it on the SD card. Well you'd write some code that looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1511318.js?file=fileTransferDownload.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-3747725245398003287?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/on-sixth-day-of-phonegapping.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>7</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-1331112508134982726</guid><pubDate>Thu, 29 Dec 2011 17:00:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.852-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">android</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Fifth Day of PhoneGapping: Five Two Minute Tutorials</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;Another re-blog but there are some gems here as the folks at &lt;a href="http://www.mobiledevelopersolutions.com/"&gt;Mobile Development Solutions&lt;/a&gt; have put together &lt;a href="http://www.mobiledevelopersolutions.com/home/start/twominutetutorials"&gt;5 two minute tutorials&lt;/a&gt; using PhoneGap Android.&lt;br /&gt;
&lt;br /&gt;
They've put together tutorials on:&lt;br /&gt;
&lt;br /&gt;
1) &lt;a href="http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt1part1"&gt;Media Player&lt;/a&gt;&lt;br /&gt;
2) &lt;a href="http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt2"&gt;Getting your app market ready&lt;/a&gt;&lt;br /&gt;
3) &lt;a href="http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt3"&gt;Barcode Scanning&lt;/a&gt;&lt;br /&gt;
4) &lt;a href="http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt4p1"&gt;Google Maps&lt;/a&gt;&lt;br /&gt;
5) &lt;a href="http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt5p1"&gt;Twitter and OAuth&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;Thanks to Libby and Paul for everything they do to support&amp;nbsp;the PhoneGap community.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-1331112508134982726?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/on-fifth-day-of-phonegapping-five-two.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-7581045531742680847</guid><pubDate>Wed, 28 Dec 2011 17:00:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.855-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Fourth Day of PhoneGapping: Creating a Database from a SQL Dump</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;On a slightly different track than Day 2 we are going to create a SQLiteDB from scratch using only JavaScript on startup of our application. In order to do this we are going to use the handy JavaScript library &lt;a href="http://html5sql.com/index.html"&gt;HTML5SQL.js&lt;/a&gt; by &lt;a href="https://twitter.com/#!/kencorbettjr"&gt;Ken Corbett Jr&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
First we'll do a check to see if we've already created our database. If we haven't we'll do a XHR to get&amp;nbsp;the SQL dump file containing all&amp;nbsp;the statements we need to create and populate our tables. Finally, upon success we'll set a flag so this doesn't run every time we start our application.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1507843.js?file=sqltest.js"&gt;
&lt;/script&gt; and here is our sql file:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1507891.js?file=create.sql"&gt;
&lt;/script&gt;&lt;br /&gt;
The html5sql.js lib makes working with the Web SQL specification much easier than hard coding it yourself. You owe it to yourself to look into this library as it will save you some time and hair.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-7581045531742680847?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/on-fourth-day-of-phonegapping-creating.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-7816998342727511142</guid><pubDate>Tue, 27 Dec 2011 17:00:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.857-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Third Day of PhoneGapping: Getting Data from a Server</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;Well your application would be pretty useless if you couldn't get data from a remote server now wouldn't it? Luckily since your &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt; application is running off of the &lt;b&gt;file://&lt;/b&gt; protocol it isn't limited by&amp;nbsp;the &lt;a href="http://en.wikipedia.org/wiki/Same_origin_policy"&gt;same origin policy&lt;/a&gt;. This means we can request data using XmlHttpRequest from any domain.&lt;br /&gt;
&lt;br /&gt;
I'm going to give you an example of searching for all tweets that mention PhoneGap that demonstrates this ability without the use of any extra JavaScript library like jQuery or Dojo.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1507404.js?file=tweets.js"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
So that is the example in a nutshell. It isn't very different from your normal XHR call except for one line that I need to bring to your attention:&lt;br /&gt;
&lt;pre&gt;if (request.status == 200 || request.status == 0) {
&lt;/pre&gt;Most of the time you are just looking for the 200 status code you also need to accept the status code of 0 as also OK. Sometimes when you are requesting data via XHR from the file:// protocol you will get a 0 status code. As I said that is perfectly normal and you should treat it as a 200 and move on with your application.&lt;br /&gt;
&lt;br /&gt;
Much of the rest of this code is just building up a HTML string I can do an insert into a div I've set aside for displaying the tweets. Just wanted to show everyone how easy it is to communicate with a remote server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-7816998342727511142?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/on-third-day-of-phonegapping-getting.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-6005719931086367160</guid><pubDate>Mon, 26 Dec 2011 17:00:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.859-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the Second Day of PhoneGapping: Copying a native database</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;The topic of creating a large SQLiteDB to persist data on the device comes up a lot on the Google Group. Sadly, most of the modern web browsers limit you to a maximum database size of 5 megabytes. If you really need a database bigger than that you'll need to jump through a few hoops. &lt;br /&gt;
&lt;br /&gt;
Luckily a developer by the name of &lt;a href="http://gauravstomar.blogspot.com/"&gt;Gaurav S Tomar&lt;/a&gt; has already gone through the process of explaining how to do this in his excellent blog post: &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://gauravstomar.blogspot.com/2011/08/prepopulate-sqlite-in-phonegap.html?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+GauravSTomarBootstrappingIntelligence+%28Gaurav+S+Tomar+%3A+Bootstrapping+Intelligence%29"&gt;Prepopulate SQLite DataBase in PhoneGap Application&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So go check it out!&lt;br /&gt;
&lt;br /&gt;
What you say? Here we are on the second day and he's already pointing us to other people's blog posts. Well I never said I was going to write the all just want to make you aware of some tricks you can use in your PhoneGap applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-6005719931086367160?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/on-second-day-of-phonegapping-copying.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-633887846315286517</guid><pubDate>Sun, 25 Dec 2011 17:00:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.862-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">android</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>On the First Day of PhoneGapping: Get to deviceready faster on Android</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;This tip is courtesy of a question that &lt;a href="http://www.pamelafox.org/"&gt;Pamela Fox&lt;/a&gt; posted up over on the &lt;a href="http://groups.google.com/group/phonegap"&gt;PhoneGap Google Group&lt;/a&gt;&amp;nbsp;as she was wondering why it sometimes takes longer for the PhoneGap &lt;a href="http://docs.phonegap.com/en/edge/phonegap_events_events.md.html#deviceready"&gt;deviceready&lt;/a&gt; event to fire.&lt;br /&gt;
&lt;br /&gt;
As all good PhoneGappers know you need to wait until you receive&amp;nbsp;the &lt;i&gt;deviceready&lt;/i&gt; event before you can call any of the PhoneGap API's. But, what has to happen before the &lt;i&gt;deviceready&lt;/i&gt; event fires?&amp;nbsp;Well here is breakdown of events that fire before &lt;i&gt;deviceready&lt;/i&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;b&gt;onDOMContentLoaded&lt;/b&gt; Internal event that is received when the web page is loaded and parsed.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;window.onload&lt;/b&gt; Body onload event.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;onNativeReady&lt;/b&gt; Internal event that indicates the PhoneGap native side is ready.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;onPhoneGapInit&lt;/b&gt; Internal event that kicks off creation of all PhoneGap JavaScript objects (runs constructors).&lt;/li&gt;
&lt;li&gt;&lt;b&gt;onPhoneGapReady&lt;/b&gt; Internal event fired when all PhoneGap JavaScript objects have been created&lt;/li&gt;
&lt;li&gt;&lt;b&gt;onPhoneGapInfoReady&lt;/b&gt; Internal event fired when device properties are available&lt;/li&gt;
&lt;li&gt;&lt;b&gt;onPhoneGapConnectionReady&lt;/b&gt; Internal event fired when the connection property has been set.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;onDeviceReady&lt;/b&gt; User event fired to indicate that PhoneGap is ready&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;That may seem like a lot but you don't have to worry about it as you can't speed up the process any. That is, except in one area. The &lt;i&gt;onNativeReady&lt;/i&gt; event does not fire until the the &lt;i&gt;onPageFinished&lt;/i&gt; method gets called on the Android WebViewClient.&lt;br /&gt;
&lt;br /&gt;
So anything you do that increases the amount of time before the web view understands the page is completely loaded will keep you from getting to &lt;i&gt;deviceready&lt;/i&gt;. For instance if you are doing a lot of things &amp;nbsp;in the &lt;i&gt;window.onload&lt;/i&gt; method it will delay &lt;i&gt;deviceready&lt;/i&gt;. In Pamela's particular instance she was doing an XmlHttpRequest in the &lt;i&gt;onload&lt;/i&gt; method which delayed things.&lt;br /&gt;
&lt;br /&gt;
The fix and the tip in this case is to move as many things from your &lt;i&gt;onload&lt;/i&gt; event handler to your &lt;i&gt;deviceready&lt;/i&gt; event handler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-633887846315286517?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/on-first-day-of-phonegapping-get-to.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-5901195309991010507</guid><pubDate>Fri, 23 Dec 2011 19:08:00 +0000</pubDate><atom:updated>2011-12-23T14:08:20.789-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><title>Books I've Read This Week</title><description>I still haven't finished&amp;nbsp;&lt;a href="http://www.amazon.ca/gp/product/0312875622/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0312875622"&gt;The Children of the Sky&lt;/a&gt;&amp;nbsp;but here are some awfully short reviews to tie you over.&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781595823045/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1595823042/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1595823042"&gt;B.P.R.D. Volume 10: The Warning&lt;/a&gt;&amp;nbsp;Liz is kidnapped and it is up to the team to track down the creepy guy who took her. In the background the teams main enemies get together and get organized.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781595824110/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1595824111/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1595824111"&gt;B.P.R.D. Volume 11: The Black Goddess&lt;/a&gt;&amp;nbsp;the team successfully tracks down Liz but will they be able to save her against the Frogs, the Black Flame and the remnants of Hyperborea. Plus, I'm really really beginning to hate Johann.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9780785123514/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/0785118179/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0785118179"&gt;X-Factor, Vol. 1: The Longest Night&lt;/a&gt;&amp;nbsp;by Peter David is a book I've been&amp;nbsp;meaning&amp;nbsp;to read for awhile now. I like this hard boiled detective story set in&amp;nbsp;the Marvel Universe where the detectives are all mutants with super powers. I really enjoyed&amp;nbsp;the first volume and I'm looking forward to the second.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div&gt;See you next Friday.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-5901195309991010507?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/books-ive-read-this-week_23.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-3660842958001439700</guid><pubDate>Fri, 23 Dec 2011 17:20:00 +0000</pubDate><atom:updated>2012-01-05T11:01:08.864-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">12 days</category><title>Twelve Days of PhoneGapping!</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;Starting on Christmas Day, December 25th, I'll be posting one &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt; tip per day for 12 days in what I'm grandiosely calling &lt;i&gt;The Twelve Days of PhoneGap&lt;/i&gt;. Some of these tips you'll already know and some you won't but hopefully we'll all learn something.&lt;br /&gt;
&lt;br /&gt;
For most of those days I'll actually be on vacation so it may take a bit for me to respond to any comments left on the post. Here's hoping everyone has a great holiday season!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-3660842958001439700?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/twelve-days-of-phonegapping.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-8865026070990819283</guid><pubDate>Fri, 16 Dec 2011 21:11:00 +0000</pubDate><atom:updated>2011-12-16T16:11:36.346-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><title>Books I've Read This Week</title><description>I know I hinted at a review for &lt;a href="http://www.amazon.ca/gp/product/0312875622/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0312875622"&gt;The Children of the Sky&lt;/a&gt; but I haven't finished with it yet so you'll have to be happy with:&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781421539577/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1421539578/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1421539578"&gt;Naruto, Vol. 52&lt;/a&gt;&amp;nbsp;is the last volume I'll be reading for awhile as I've&amp;nbsp;completely&amp;nbsp;caught up on the series with volume 53 just being released on Dec 6th and my local library does not have it yet. We get the beginnings of a battle between Naruto and Sasuke who were once best of friends but now are mortal enemies as Sasuke has been led down a dark path. Stop me if you've heard this one before.&amp;nbsp;Anyway, I don't want to be flippant but you can see how Naruto is maturing so much so I'm beginning to like him more. Funny that the title's main character was not always your favourite character.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img align="left" boder="0" src="http://www.syndetics.com/index.aspx?isbn=9781607064077/SC.GIF&amp;amp;client=ottap&amp;amp;type=xw12&amp;amp;oclc=" /&gt;&lt;a href="http://www.amazon.ca/gp/product/1607064073/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=1607064073"&gt;Morning Glories, Vol. 2&lt;/a&gt;&amp;nbsp;by &lt;a href="http://en.wikipedia.org/wiki/Nick_Spencer"&gt;Nick Spencer&lt;/a&gt; is like the movie &lt;a href="http://www.imdb.com/title/tt0088847/"&gt;The Breakfast Club&lt;/a&gt; mixed with a horror movie that's on crack. In the first volume we are introduced the&amp;nbsp;the school, Morning Glory Academy but we don't really get to know a lot about the 6 kids that are the main characters as they are struggling to fit in and well not be killed by the school and the creepy faculty. Now in volume 2 we are treated to 6 individual stories each one focusing on a main character. We get to see there is more depth behind, the rich kid, the jock, the smart one, the geek, the cheerleader and the goth in a number of surprising ways. All the while Spencer is able to move&amp;nbsp;the story forward while giving valuable background information.&lt;br /&gt;
&lt;br /&gt;
Also, the series artist &lt;a href="http://www.supajoe.com/"&gt;Joe Eisma&lt;/a&gt; is absolutely killing it and you should check this &lt;a href="http://www.comicsbulletin.com/main/columns/breakdowns-joe-eisma"&gt;recent breakdown&lt;/a&gt; of his art on the series.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div&gt;See you next Friday.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-8865026070990819283?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/books-ive-read-this-week_16.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-6973472386861579909</guid><pubDate>Fri, 09 Dec 2011 16:29:00 +0000</pubDate><atom:updated>2011-12-09T11:29:00.044-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><title>Books I've Read This Week</title><description>Nothing to report this week. My daughter was sick for about five days with a fever/flu which cut into my reading time. I'm just cracking open &lt;a href="http://www.amazon.ca/gp/product/0312875622/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=simmacsblo-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0312875622"&gt;The Children of the Sky&lt;/a&gt; by &lt;a href="http://mindstalk.net/vinge/"&gt;Vernor Vinge&lt;/a&gt; which promisses to be a great read.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;See you next Friday.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-6973472386861579909?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/books-ive-read-this-week_09.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-72386855013225666.post-8322049554391620699</guid><pubDate>Fri, 02 Dec 2011 21:00:00 +0000</pubDate><atom:updated>2011-12-02T16:00:57.893-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">phonegap</category><category domain="http://www.blogger.com/atom/ns#">android</category><title>Installing the Barcode Plugin for PhoneGap Android</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s1600/pg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s200/pg.png" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;Some folks are having problems getting the &lt;a href="https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner"&gt;Barcode Scanner&lt;/a&gt; plugin up and running for &lt;a href="http://www.phonegap.com/"&gt;PhoneGap&lt;/a&gt; Android so I figured I'd write a more detailed&amp;nbsp;explanation&amp;nbsp;on how to get it up and running.&lt;br /&gt;
&lt;br /&gt;
First you'll want to go download the &lt;a href="https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner/LibraryProject"&gt;Library Project&lt;/a&gt; part from &lt;a href="http://github.com/"&gt;GitHub&lt;/a&gt;. You'll want to use the code from github as I've modified it slightly so that it is responds to the correct intent.&lt;br /&gt;
&lt;br /&gt;
Once downloaded you'll want to create a new Android project from existing source in Eclipse. The project name shows up as &lt;b&gt;CaptureActivity&lt;/b&gt; but I'm going to change it to &lt;b&gt;BarcodeLibrary&lt;/b&gt; which is more descriptive.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-lDeU1R8tNC8/TtkQ_khMajI/AAAAAAAAB0c/Ko4_vCCAkZE/s1600/Screen+Shot+2011-12-02+at+12.50.03+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-lDeU1R8tNC8/TtkQ_khMajI/AAAAAAAAB0c/Ko4_vCCAkZE/s1600/Screen+Shot+2011-12-02+at+12.50.03+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
but don't click on &lt;b&gt;Finish&lt;/b&gt; yet. Click the &lt;b&gt;Next&lt;/b&gt; button...&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-KbnIWM4WTJg/TtkRB3ldQxI/AAAAAAAAB0k/x5XVBDstqbw/s1600/Screen+Shot+2011-12-02+at+12.54.16+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-KbnIWM4WTJg/TtkRB3ldQxI/AAAAAAAAB0k/x5XVBDstqbw/s1600/Screen+Shot+2011-12-02+at+12.54.16+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
and select the highest level of Android SDK you have installed before clicking &lt;b&gt;Finish&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Now that you've created the library project which contains the barcode scanning code you'll want to right mouse click on the &lt;b&gt;BarcodeLibrary&lt;/b&gt; project and select &lt;b&gt;Properties&lt;/b&gt;. In the &lt;b&gt;Properties&lt;/b&gt; dialog, select the Android tab and ensure the &lt;b&gt;Is Library&lt;/b&gt; checkbox is click. The benefit of doing things this way is you can link this library into multiple Android projects without needing to copy a bunch of source around.&lt;br /&gt;
&lt;br /&gt;
Now that we've got our library setup let's add it to our project. Right click on your PhoneGap project, in my case it is called BarTest, and select Properties.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-TPzXu6ZPPhc/Ttk1IW9012I/AAAAAAAAB0s/6nQGadpsnWM/s1600/Screen+Shot+2011-12-02+at+3.28.40+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-TPzXu6ZPPhc/Ttk1IW9012I/AAAAAAAAB0s/6nQGadpsnWM/s1600/Screen+Shot+2011-12-02+at+3.28.40+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In the Android tab under the library section click the Add button.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-__97xWYfwFo/Ttk1dqQaPSI/AAAAAAAAB00/PU8Z4psVvoQ/s1600/Screen+Shot+2011-12-02+at+3.30.19+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-__97xWYfwFo/Ttk1dqQaPSI/AAAAAAAAB00/PU8Z4psVvoQ/s1600/Screen+Shot+2011-12-02+at+3.30.19+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In the &lt;b&gt;Project Selection&lt;/b&gt; dialog select &lt;b&gt;BarcodeLibrary&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-v9ldC2D45vs/Ttk1hbv73FI/AAAAAAAAB08/Fy6CsAHsaUs/s1600/Screen+Shot+2011-12-02+at+3.27.25+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-v9ldC2D45vs/Ttk1hbv73FI/AAAAAAAAB08/Fy6CsAHsaUs/s1600/Screen+Shot+2011-12-02+at+3.27.25+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now our application can use the &lt;b&gt;BarcodeLibrary&lt;/b&gt; project so we can click &lt;b&gt;OK&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Let's now add in the BarcodeScanning plugin code. Under the &lt;b&gt;assets/www&lt;/b&gt; directory copy in&amp;nbsp;the &lt;a href="https://github.com/phonegap/phonegap-plugins/blob/master/Android/BarcodeScanner/assets/www/barcodescanner.js"&gt;barcodescanner.js&lt;/a&gt; file from github. Under &lt;b&gt;src&lt;/b&gt;, right click and create a new package &lt;b&gt;com.phonegap.plugins.barcodescanner&lt;/b&gt;&amp;nbsp;then copy in the &lt;a href="https://github.com/phonegap/phonegap-plugins/blob/master/Android/BarcodeScanner/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java"&gt;BarcodeScanner.java&lt;/a&gt; file from github.&lt;br /&gt;
&lt;br /&gt;
So were all set now right? Well know we forgot one thing. We need to add a line for our plugin under the &lt;b&gt;res/xml/plugins.xml&lt;/b&gt; file so let's open that up now and add this line after the last &lt;b&gt;&amp;lt;plugin/&amp;gt;&lt;/b&gt; tag but before the &lt;b&gt;&amp;lt;/plugins&amp;gt;&lt;/b&gt; line.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;lt;plugin name="BarcodeScanner" value="com.phonegap.plugins.barcodescanner.BarcodeScanner"/&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Okay, so were good now. Well no, there is one more bit to take care of. Open up your &lt;b&gt;AndroidManifest.xml&lt;/b&gt; file so we can add some new activities that will take care of the scanning and encoding. You'll need to paste these activity lines inside the &lt;b&gt;&amp;lt;application/&amp;gt;&lt;/b&gt; tag.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;div class="p1"&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s2"&gt;&amp;lt;&lt;/span&gt;&lt;span class="s3"&gt;activity&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="s4"&gt;android:name&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"com.google.zxing.client.android.CaptureActivity"&lt;/i&gt;&lt;/div&gt;&lt;div class="p3"&gt;&amp;nbsp; &amp;nbsp; android:screenOrientation&lt;span class="s1"&gt;=&lt;/span&gt;&lt;span class="s5"&gt;&lt;i&gt;"landscape"&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s4"&gt;&amp;nbsp; &amp;nbsp; android:configChanges&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"orientation|keyboardHidden"&lt;/i&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s4"&gt;&amp;nbsp; &amp;nbsp; android:theme&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"@android:style/Theme.NoTitleBar.Fullscreen"&lt;/i&gt;&lt;/div&gt;&lt;div class="p3"&gt;&amp;nbsp; &amp;nbsp; android:windowSoftInputMode&lt;span class="s1"&gt;=&lt;/span&gt;&lt;span class="s5"&gt;&lt;i&gt;"stateAlwaysHidden"&lt;/i&gt;&lt;/span&gt;&lt;span class="s2"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="s2"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;intent-filter&lt;span class="s2"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s2"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span class="s3"&gt;action&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="s4"&gt;android:name&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"com.phonegap.plugins.barcodescanner.SCAN"&lt;/i&gt;&lt;span class="s2"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s2"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span class="s3"&gt;category&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="s4"&gt;android:name&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"android.intent.category.DEFAULT"&lt;/i&gt;&lt;span class="s2"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s2"&gt;&amp;nbsp; intent-filter&lt;span class="s2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="s2"&gt;activity&lt;span class="s2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s2"&gt;&amp;lt;&lt;/span&gt;&lt;span class="s3"&gt;activity&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="s4"&gt;android:name&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"com.google.zxing.client.android.encode.EncodeActivity"&amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s4"&gt;&amp;nbsp; &amp;nbsp; android:label&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"&lt;/i&gt;&lt;span class="s6"&gt;&lt;i&gt;@string/share_name&lt;/i&gt;&lt;/span&gt;&lt;i&gt;"&lt;/i&gt;&lt;span class="s2"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="s2"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;intent-filter&lt;span class="s2"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s1"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;&lt;/span&gt;&lt;span class="s3"&gt;action&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="s4"&gt;android:name&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"com.phonegap.plugins.barcodescanner.ENCODE"&lt;/i&gt;&lt;span class="s2"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s1"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;&lt;/span&gt;&lt;span class="s3"&gt;category&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="s4"&gt;android:name&lt;/span&gt;&lt;span class="s1"&gt;=&lt;/span&gt;&lt;i&gt;"android.intent.category.DEFAULT"&lt;/i&gt;&lt;span class="s2"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="s1"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="s2"&gt;intent-filter&lt;span class="s2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="s2"&gt;activity&lt;span class="s2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;Alright, finally we are all setup. But how does one call the BarcodeScanner? Well we provide two main piece of functionality.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Scan&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;window.plugins.barcodeScanner.scan( function(result) {
        alert("We got a barcode\n" +
                  "Result: " + result.text + "\n" +
                  "Format: " + result.format + "\n" +
                  "Cancelled: " + result.cancelled);
    }, function(error) {
        alert("Scanning failed: " + error);
    }
);&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Encode&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;window.plugins.barcodeScanner.encode(BarcodeScanner.Encode.TEXT_TYPE, "http://www.nytimes.com", function(success) {
        alert("encode success: " + success);
      }, function(fail) {
        alert("encoding failed: " + fail);
      }
    );&lt;/pre&gt;&lt;br /&gt;
I've put together a small example &lt;a href="https://raw.github.com/gist/1424796/3bc3362224e307b25c310ed49d287be699ef2e14/index.html"&gt;html&lt;/a&gt; (and &lt;a href="https://raw.github.com/gist/1424801/4dbdefad1ae7e697d22705f75bb84bf8719c1b13/master.css"&gt;css&lt;/a&gt;) page which will be listed below that you can use to test the BarcodeScanner.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1424796.js?file=index.html"&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
If you have problems with the Barcode Scanner the best place to ask questions is over on the &lt;a href="http://groups.google.com/group/phonegap"&gt;PhoneGap Google Group&lt;/a&gt; where I check multiple times per day for questions I can answer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/72386855013225666-8322049554391620699?l=simonmacdonald.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://simonmacdonald.blogspot.com/2011/12/installing-barcode-plugin-for-phonegap.html</link><author>noreply@blogger.com (Simon Mac Donald)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cs_a2ro_P0Y/TkA8D-vPCVI/AAAAAAAABwE/gHJwh4m8Jkw/s72-c/pg.png" height="72" width="72" /><thr:total>5</thr:total></item></channel></rss>

