Monday, February 21, 2011

Google Makes me feel like a Genius!

It's true, just about every time I work on my Android applications - I get that weird maniacal evil genius laugh... You know what I'm talking about - admit it.

If you use CBI you should know that there is a backup feature included that exports your collection as a CSV file [CSV is kind of like an open source spread sheet format].

I've been wanting to send the backup file to Google Docs for awhile now but haven't gotten around to it. Last week I downloaded the source to Google's Client API source code and have been tinkering around with it. And have it backing up my spreadsheet now.

I still have to get the restoration working but I think that will be even easier than the backup.... Maybe I'll post some code for posterity in a bit but right now I have to get back to my mad genius cackling....

Here is a link to my spreadsheet so you can check out the format: My Collection

Tell me what other Comic Book Application will let you do that!

-A


Tuesday, February 15, 2011

Objective C can really stink

Let me preface this by saying I am not a very good Objective C programmer. I come from a strong background in Java and enjoy Objective C becuase it's a new technology (for me) and it solves problems different from Java... well at least the API backed by Cocoa Touch solves them in a different way.

Coming from Java I will tell you this - Exception handling in Objective C is horrible! I've spent all morning dinking around trying to get a table view to display. I've been doing Objective C for 2 years now (not exclusively - but I'm not a complete newbie) so to be having problems with something this basic is pretty frustrating.

The problem really starts with me becoming more familiar with the language. As comfort levels increase I begin exploring how to solve things in slightly different ways... This is what happened today. I'm using a NavigationController to pop on a series of views (successfully until this morning).

I have this little block of boiler plate I toss around to pop a view on the NavController that looks like this:

NewViewController *vc = [[NewViewController alloc] initWithNibName:@"NewViewController" bundle:nil];
NSArray *items = [NSArray arrayWithObjects:@"Item 1", @"Item 2", @"Item 3", nil];
[vc setItems:items];
[vc setTitle:@"Items"];
[self.navigationController pushViewController:vc animated:YES];
[vc release];
[items release];

Here is the logic behind the code -

  1. Create a new view controller
  2. Create a new list to slam into the table view for the view controller and pop it in
  3. Set the items array into the view controller
  4. push the view controller into the navigation controller
  5. releace the memory for the view controller as it is now owned by the navigation controller
  6. and release the array since it is now owned by the view controller

Even now just looking at the code I just figured out what the problem is - I'm not actually creating a new instance of the items array. So by releasing it - my new view controller crashes because it's retain call got mistakenly released by someone else.

Simple problem - no big deal at all. My frustration really is that the app just crashes without any type of error at all... just a *blip* application died... Occasionally it would spit out this error:

Program received signal: “EXC_BAD_ACCESS”.

Which is not helpful at all - basically that means we accessed memory that we shouldn't have.

I agree whole heartedly that this is not a problem with Objective C - it all comes from my ignorance and lack of experience - however, it is still very frustrating.

-A

Thursday, February 10, 2011

Anxious, Silly things

I have a 1st grader at home. She goes through boughts of anxiety here and there - nothing major but enough to be mildly concerning... At night she often makes sure the windows and doors are locked. Of course there is the general fear of the dark - and as of late does not want to go to school - because she misses her family...

Nothing major or probably outside of normal behavior - but I find myself going through all kinds of things in the morning to get her mind off of the looming drive to school - that often ends in tears...

Today she was rather sad so I drew a picture of her face and hair, in an attempt to get her to smile (no luck) but she did end up drawing in the body and crown(?!) to go with it...


The morning drop off went decent this morning - I'm not sure the picture helped but it was silly drawing on a anxious morning...

-A

Sunday, February 06, 2011

Best Wallpaper

So, I have this little app called Comic Book Inventory or CBI for short. CBI (as the name might imply) lets you inventory your comic book collection, once you get your collection added you can look up issues by Title, Author, Penciler, Inker, Colorist etc.

You can also do some pretty fancy things like find missing issues, get the weekly release list of comics, create a "pull list" (and lots more). My favorite feature of CBI is that you can set your android wallpaper to a comic book cover; actually you can select up to 4 covers and CBI will mash them together.

So here is one of my favorite desktops I've created lately: It's the cover of "Lady Mechanika" #0




Here is another desktop showing a multi-cover desktop.


If you haven't read Lady Mechanika you should check it out. It is creator owned comic published by Aspen Comics and owned by Joe Benitez.

There are only 2 issues out (#0 and #1) but so far the story and art are fantastic!

-Aaron