Sunday, October 30, 2011

Books I've Read This Week

Whoops forgot to put this down as a schedule post.

Ghost in the Wires by Kevin Mitnick is his memoir of his time as the World's Most Wanted Hacker. While I must say that it is an entertaining book and I don't think there is any harm in Mr. Mitnick but I had a hard time feeling bad for some of the things he went through. Certainly when he started his hacking activities the actions he was taking were not illegal but they certainly were immoral. So while I feel he got a raw deal a lot of the time he brought it on himself.

The Map of Time by Felix J. Palma is a really inventive Victorian era time travel book. There are three intertwined stories all with some connection to Time Machine's author H.G. Wells

Fables Vol. 14: Witches to me is a return to form for Bill Willingham and the Fables universe. Volume 13 was the great Fables crossover with Jack of Fables. Now that, that debacle is behind us we once again get the story moving forward. The Fables have a new "adversary"in the form of Mr. Dark. In this volume we get to learn a lot more about Mr. Dark and the challenges that our favourite Fables are currently facing. All in all it's got me very excited about volume 15.

See you next Friday for real this time.

The Matrix Has Given Up

Today I have irrefutable proof that we are actually living in a giant computer simulation. I'm in Denver, Colorado to give a workshop at the Interlab conference on Monday. When I landed at the airport I was walking down the concourse where I noticed a gentleman ordering a sandwich. I was pretty sure that it was the author J.C. Hutchins. Since I have no problem chatting people up I decided to ask the guy, "Hey are you J.C. Hutchins?" and of course it was.

I spent about ten minutes chatting up the affable Mr. Hutchins before heading out to get my rental car. All the way to my hotel I was wondering what the odds of such a meeting would be. Since Dever is a city of approximately 2.5 million people I'll have to assume that it was a pretty slim chance.

Anyway, that's unlikely but it isn't really proof that we are all living in a simulation, that is until you factor in the next coincidence. I popped out of the hotel to grab a bite to eat and pick up a book for the plan rides home. Once I got to the counter I recognized the guy working the cash. I immediately said, "I know you!" to which started a bit of back and forth only to discover that he moved to Denver 7 years ago from Ottawa where he worked at the Pinecrest Chapters store. That's the book store of which I'm a life time member of their discount club since I shop their so damn much.

So one unlikely meeting is a co-incidence two means we are all figments of a computers imagination. An imagination which must be taxed as I keep meeting the same programs over and over again.

Friday, October 21, 2011

Books I've Read This Week

The Magic of Reality: How We Know What's Really True by Richard Dawkins is a very interesting book that does a great job explaining everyday phenomenon in a clear and concise manner. Learn the scientific magic behind rainbows, earthquakes, tsunamis , etc.

Goliath by Scott Westerfeld is the third book in this alternate history series set in World War 1. I don't want to give too many details away about this book since it is the third in the series so go read my review of the first book, Leviathan or the second book Behemoth

We Are All Weird by Seth Godin is a great book about niche marketing. With the advent of the internet there is no need to target the mean or the average consumer. It is now possible to find your target niche and sell directly to them.

See you next Friday.

Tuesday, October 18, 2011

Friday, October 14, 2011

Books I've Read This Week

Well this has been a very manga week as a glut of books showed up from my library pull list.

Fullmetal Alchemist, Vol. 8 This is an oddly compelling book for me. Sure this is a bunch of fun ninja fighting but there is something poignant about one brother searching for a way to get his younger brother his body back. Part of the mystery of this series is you are never quite sure if that suit of armour really is animated by the soul of Alphonse animating that hunk of metal or not.

B.P.R.D. Volume 3: Plague of Frogs okay I know it isn't manga and sadly my local library doesn't have volume 2 but that's okay, I guess. This is where B.P.R.D. really starts getting going as it evolves from a bunch of one or two issue hits into a full 5 to 6 issue storyline. There is some great callbacks for folks who are also fans of Hellboy and we finally get the secret origin of Abe Sapien.

One Piece, Vol. 24 marks the end of the Baroque Works saga and the beginning of Skypiea. It's and island in the sky! Good jumping on point for new readers.

Naruto, Vol. 49 We catch up with Naruto after his traumatic battle with Pain. There is some real character development in this volume as the normally hot headed Naruto is learning that you don't always need to fight.

See you next Friday for a decidedly less manga'ish week.

Tuesday, October 11, 2011

Ottawa Android PhoneGap Droidhack

On Saturday the Ottawa Android group was having our latest Droidhack. This months Droidhack was sponsored by the fine folks at Nitobi who may be better know to you as the guys who started the PhoneGap project. They sent out some nice swag in the form of shirts and stickers that were well received by the group. Since this was a themed event on PhoneGap Android Plugins I did a quick presentation to get everyone up to speed and then we got to hacking.

Most of the day I spent helping others setup their environments and getting them going with their first PhoneGap application. I was able to provide some helpful hints to Chris Saunders who works for Shopify and put together an Android Shopify plugin. I was able to spend sometime on working on my DropBox plugin for Android. So far I can login and logout of DropBox but there is still a bunch of stuff to do that I hope to get to in the next few weeks.

All in all it was a pretty good day of hacking and I think a bunch of people learned some new ways to think and got exposed to PhoneGap. Also, huge shout out to Macadamian for providing us with the office space, wifi and food for this event. I know that I and the other Ottawa Android organizers really appreciate it.

Friday, October 7, 2011

Books I've Read This Week

The Wise Man's Fear by Patrick Rothfuss is pretty great sequel to his debut novel, Name of the Wind. Usually, when someone works their entire life on their first book or album the sequel is a bit of a disappointment. Not so in this case. The second book is every bit as engaging and well written as the first. I highly recommend this series to any fantasy fans. As an added bonus Rothfuss is young enough to be able to finish this epic tale which is something I now look for in an author.

B.P.R.D. Volume 1: Hollow Earth and Other Stories is actually the first time I've read a B.P.R.D. collection. While a big fan of Hellboy I've never picked up B.P.R.D. before. This collection picks up shortly after Hellboy leaves B.P.R.D. and introduces a new character, Johann Krauss who is a dead medium in an ectoplasmic form. He gets to walk around in a containment suit which is just hilarious.

It is a collection of a few shorter stories and features the art of Ryan Sook. I really enjoyed the small taste of B.P.R.D. I got and can't wait to get some of the later trades where the entire volume focuses on one storyline.

One Piece, Vol. 23 the battle between Crocodile and Luffy comes to a conclusion. 

See you next Friday

Monday, October 3, 2011

Changes in PhoneGap Android 1.1.0

As of Friday PhoneGap 1.1.0 was released upon the world. I figured I would use this post to talk about some of the additions/changes to the API in our latest point release.

Chunked Streaming Mode

One of the biggest complaints about the FileTransfer code on Android is that it would throw an Out of Memory exception if the file you were trying to upload was too big. This happened because the HttpURLConnection class likes to buffer all the data to upload in memory before it even sends the first byte. You can see how that would be a problem when you are uploading a 10 mb file.

Now the default is to send the data in chunked streaming mode. Most web servers support chunked mode but if the one you are communicating with doesn't you'll end up getting a FileTransferError.CONNECTION_ERR (Error code 3). To make this error go away you just need to set the right option:

var options = new FileUploadOptions();
options.chunkedMode = false;

Clean Up the Content Store

Previously when you were using FileEntry.remove() to delete a file, like an image, that had a corresponding entry in the content store the file would be removed from the file system but the database entry remained. This would cause odd behaviour in the Gallery app where you would see a black image. Now when you delete a file we do a query to see if there is a corresponding entry in the content store and remove it.

Double Image Bug

On some phones, Samsung for instance, when you used Camera.getPicture() you would end up getting two pictures in the gallery. One would be the raw image the camera took and the second would be the image with the options you specified like quality, targetWidth and targetHeight. Now we are doing a check to see if two images have been created and we'll remove the raw image and only store the one with the options you've specified.

Use Camera.getPicture() to Retrieve a Video

Typically you can get an image out of the gallery by doing:

var options = {
    quality: 100,
}, fail, options);

but that only lists all the images in the gallery. What if you wanted the user to be able to select a Video? Well you couldn't until now. We've introduced a new mediaType option that will allow you to get an image, a video or both.

This will bring up the video gallery:

var options = {
    quality: 100,
}, fail, options);

This will bring up the gallery for both images and video:

var options = {
    quality: 100,
}, fail, options);

The default will continue to be to get a picture but if you want to explicitly state it do this:

var options = {
    quality: 100,
}, fail, options);

Compass Return Value Has Changed

Previously on Android the getHeading() and watchHeading() methods would call their success call backs with a heading parameter which was express in degrees. In 1.1 to line up with iOS the return value is now a CompassHeading object which has the following properties:

magneticHeading: The heading in degrees from 0 - 359.99 at a single moment in time.
trueHeading: It is supposed to be the heading relative to the geographic North Pole in degrees 0 - 359.99 at a single moment in time. Unfortunately, on Android this will have the same value as magneticHeading.
headingAccuracy: Is supposed to report the degrees difference between the magnetic and true heading but since they are the same on Android this will always be 0.
timestamp: The time at which this heading was determined.

Multi-Page Apps

Now when you are dealing with multiple page apps there is a change to This command now exits the app completely it does not return to the previous page. If you want to go back a page you should use