Monday, March 16, 2009

I don't blog much about personal stuff. In part, it's because I don't do much I feel I should put on the internet outside of my work with MyCollection but I'll give the few friends I have an update:

The kids are fine. All three are doing well and I enjoy interacting with my older two quite a bit. They are unique individuals and it still floors me sometimes just how unique they are. I remember when they were 4 and 3 and my opinion was their opinion and their mom's opinion was their opinion. That little bit of growing up is long past and they each have their own plentiful set of opinions...

My youngest is a great joy as well. I'm a bit older then I was the last time I had one so young and I feel that I'm taking the time to appreciate it more now. It feels a little smoother this time around and I attribute that to my wife and the lessons learned the first time around. Another thing I can say is that having children at 18 is a LOT different then having children at 27 (how old I was when my third was born).

It still floors me how amazing my wife is and how close we are. I see marriage portrayed in so many negative connotations in television and other popular media. Marriage gets portrayed as the end of a man's freedom and the beginning of domestic slavery for the wife. Husbands and wives argue all the time and when they do make up, they set some of the most ridiculous terms for their "surrender." Physical intimacy gets used as a weapon and a means to control the husband in television. Every time a couple has an argument, the woman takes no responsibility for her part in the argument and the man has to crawl back on his hands and knees. It's so sad... I have never felt trapped in my current marriage and my wife and I do a reasonable job taking responsibility for our part in our disputes (the rare times they happen).

I have a friend at work getting married soon and I pray he will be as happily married as I am. Although it's funny to watch him make some of the same mistakes I did early on in my marriage, it's not my place to give advice and every relationship is different so I usually laugh to myself - well mostly to myself - and say a prayer for him and his bride.

Work is going well. My work load picked up and I am anjoying my new role. I switched managers as well and I'm still learning how to work with the new one. Not a bad manager by any means, there is just all those "Here is how I communicate" and "How much do you want me to keep you in the loop". For the most part, my company really tries to work with managers to set good objectives for their employees and I don't have any unrealistic or undefined expectations to work from. Feedback is consistent (although it's all good and that always makes me nervous) and I really can't ask for me.

My house is still a work in progress. There are so many things I want to do with it (one of them being to move out) but I'm trying to balance cost versus benefits. I really want to pave my driveway but I also have some fencing to replace and my carpet probably doesn't qualify as carpet. We had a new roof put on last year as well as new siding. I replaced the water-heater with a really nice unit after the POS Whirlpool unit broke 3 times in one month (came with the house). I had air-conditioning put in three years ago and new front and back doors (steel doors) along with nice fancy storm doors. I've wired the house with CAT5e and new RG6 COAX with a 2Ghz bi-directional powered ampliphier so Time-Warner or ATT Uverse work well here (I've had both). I also have a wi-fi bridge setup to the garage and I have my little geek cave out there.

I got a new geek toy for the car. I have a pioneer in-dash GPS unit with iPod integration and BlueTooth support. It's entirely hands free now and I do feel safer driving. My wife wants one now and the stereo in her van went bonk this year (it's only a 2004...) so that is a good as any.
All-in-all I feel very blessed. I have a great family, a good career, and a roof over my head.

I am also really enjoying learning COCOA and developing for the iPhone. It's fun to get back into C programming. I have always seen C programming as the epicenter of great programmers (leaving assembly programming and machine code programming for the true massicists). Being able to pick it back up so easily is a nice boost to my already inflated ego.

Sunday, March 15, 2009

Trouble in Germany

I'm hearing reports that "My Collection" doesn't work for German devices. I'm going to investigate and see what I find. My guess is it has to do with the Amazon sites I use to search. I'll see what I can find out and report back when I hear anything.

Friday, March 13, 2009

More iPhone Progress

I'm still working on the Android based My Collection application, but I've run into some roadblocks from a UI perspective and I have allowed myself to be pleasently distracted by the iPhone SDK.

I'll get back to "My Collection" as soon as I have an epiphany but for now, I've been able to make some progress with the iPhone SDK:

  1. I now have full Create, Read, Update, and Delte (CRUD) functionality against the "My Collection" database.
  2. I am able to use the UITableView control to display a list of all "items" in a collection (although without pictures for now) and navigate to a details page where a user can edit the items.
  3. The UITableView is updated without a need to re-query everything in the database (preserving your possition in the scroll list BTW).

There are a great many things I need to sort out yet and I'm waiting on an iPhone book I bought to walk me through some sample projects. The development environment is so different, just figuring out how to connect a button to an action is challanging. At least I have worked with the Model View Controller (MVC) paradigm enough now that I'm not confused by that.

Sofar, everything I have done has been an uphill struggle. I'll write individual apps to discover and demonstrate a particular bit of functionality. Once I understand how to do that functionality, I piece it together into a project I'm calling "iCollection" which will become my final Proof of Concept (POC) app to decide if I want to release "iCollection" in the Apple AppStore.

It's very nice to get back into C programming and Objective-C is a nice distraction as well. Since I use the SQLite C API's, I have to work with native C as well; however, there is a wrapper called FMDB which I might use to make things like BLOB retrieval easier from the database.

Also, there are some other design considerations as well. The iPhone doesn't have an SD card slot and has enough internal memory for me to not have to write special code to find the best place to store the database. All memory is internal which is a delight to me personally because 90% of all reported issues with the Android app "My Collection" are releated to the SDCARD and not my actual code.

Also, I might not store the images in the SQLite database as well. I self-contained them in the SQLite database in Android because of issues I had with the SDCARD (no good way to know if it's there). In the iPhone, I can give them an ID and save them to the filesystem and it's SOOOOO much easier to read them in that way:

UIImageView imageView = [[UIImageView alloc] imageFromFile:@"pathToFile.png"];

I have to say the more I work with and get used to the iPhone SDK, the more I like it; however, I do find things that should be simple much harder and things that are usually hard about the same. Android is definately easier to program for but I'll reserve final judgement until I get "iCollection" finished.

Either way, I'm almost done with my lunch break and I have roadmaps to finish. THANK GOD we have a Subway in the building where I work!!!

Monday, March 9, 2009

iPhone Learnings

I've made some progress in my work with the iPhone SDK...

I've written a simple version of the My Collection app which reads data from the existing database I use for the Android version. I'd like to finish up the read functionality and implement adding and editing of items.

My hope is to get a working version and get the learnings I need to build the app on the platform.

The iPhone lets me do things Android doesn't from a user-interface perspective so I'm planning on using the databse from the Android version but the rest of the UI will be unique and totally "Apple".

I actually had an idea where I would allow the user to define their own types and they would create "Search" pages that would show items for their types (I would seed the app with some default search pages).

I can't yet figure out how I'll work in the needed code to perform the Amazon lookups, but that is only a minor hindrance in the grand scheme of things. If I can get the application to have stable CRUD support with a tweaked out UI, the other things should be simple.

Google also ported the zXing API (the barcode scanning engine I use) to the iPhone so that will be the same too.

I'm actually excited about that. I get to use SQLite on Android and iPhone and now zXing is supported on Android and iPhone.

It's a shame that all 7,000 lines of Java code I've put into the Android version are completely useless on the iPhone...

Sunday, March 8, 2009

Experimenting with iPhone development

I've begun experimenting with iPhone development. I have a MacBook Pro and I like the Cocoa development platform even though I'm less than trilled with the "Drink our koolaid or we'll send the zombies after you" attitude of the Mac community.

Honestly, Objective C isn't as big of a problem for me as I thought. Once I got the concept of sending messages to objects and the syncax, it's all good now.

Here is an example of an Alert dialog for agreeing to a license in Android and Cocoa:

Android:

new AlertDialog.Builder(AndroidExamples.this)
.setTitle("License Agreement")
.setMessage("EULA TEXT HERE")
.setNeutralButton("Accept", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
//Handle click here
}
})
.setCancelButton("Decline", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
//Handle click here
}
})
.show();

Cocoa:

UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"License Agreement"
message:@"EULA TEXT HERE"
delegate:self
cancelButtonTitle:@"Decline"
otherButtonTitles: @"Accept"
, nil];
[alert show];
[alert release];


There is a little more such as creating a handler to accept the button clicks. In COCOA, you create a delegate, and in Android you pass in a method (I usually do them dynamically).

I suppose you can argue either way, but I like that COCOA has a single event for the dialog and not for each button. You can do the same in Android by registering the same method for both or by putting the logic in a method and calling the method from the handler.

Either way, it's fun to learn a new language and platform so I'll continue to play around. My goal is to learn enough to port the My Collection application to the platform. I don't know if I'll sell it on the App Store but at least I'll learn something new.

Wednesday, March 4, 2009

Progress on new search methods

I know have all the code in place to allow users to search by fields other than UPC. The most obvious one is title which will be the first one I add. I'm putting together a new "Search" menu option which will bring up a new streen where you select which field you are searching on (Title, UPC, Actor, Author, Artist, etc...) and then enter text (or scan for the UPC) and off you go. Once the results come back, you can long-press them and they will add to your list but you stay on the saerch results - so you can add ALL the Shakira CD's you own :-)

Anyhow, that's where I'm at. It has taken a long time to get here because I have had to go back and re-factor a LOT of code. I didn't do anything to wrong in the first place, but I've pulled out all my Amazon and XML parsing code into a library. The last couple of Pro updates I've pushed had the code in it but not the new screen.

So I've been testing the new search codebase for a week now with no complaints. Now that this appears stable, I'll finish up the new search screen and off we go!