iPhone App 001 is in the final testing phase!

I am pleased to announce that the first Application to roll off the assembly line, is in the final testing phase.

Soon to be released iPhone 'App 001'

The first in a series of utility applications is soon to be released to the Apple iTunes Application Store, and made available for public consumption.

App 01 is primarily designed for Systems Administrators. Providing a pair of commonly used tools, that come in handy more every day, but are most useful when you find yourself off-site, troubleshooting a networking issues, or in need of providing access credentials to other members of your organization. Having this handy pair of tools, will make your day just that much easier.

More information about this exciting development will be made available on my new Applications Site, located here: Apps by David. Right now, this is the only screen shot available for public distribution.

When testing has completed there will be a lot more information about this nifty little app to go around.

Next step completed, Apple Developer Program signup.

Well, after reading the 37-page EULA, which, for a 37 page EULA was not that tough to stomach, I completed the registration request, sent off my annual fees and now I await to here the disposition of my request for acceptance into the Apple iPod/iPad/iPhone Application Development family.

In the mean time, I continue to narrow in on the first of what I hope to be a few lucrative and useful Apps, and begin physical device testing next week.

It’s almost 4:00PM now, maybe I should go and get some lunch…


UPDATE:

Developer License delivered! It takes a while to get the CSR generated, sent to Apple the the completed Certificate returned. Then it has to be installed and integrated into the IDE/SDK. But once that’s done, I’m deploying apps for test to my iPhone.

The stakes (and motivation) just got a lot higher!

First image manipulation App – DONE

Shot of image manip app, here with the image shunk to a fractional size.

I have been writing code like a mad-man. 8-10 hours per day for the company I work for, then another 6-8 for my own education. Well beyond the ‘Hello World’ apps of just a week or so ago.

Of the apps I’ve worked on in the last few days, this one involved the most code writing. Well mostly copying from examples in the books. Some examples were downright scary! Like one that executed a division of two calculated numbers without doing a check to see if the divisor was zero! Want to crash a program? Divide some number by zero. I’ve not yet any language that takes too kindly to such shenanigans!

So.. back on topic. The App. It’s pretty simple and uses and embedded image (you can’t just pick one and mess it up), but it leverages a bunch of the built in functions in the SDK that are just fantastic.

It’s pretty easy to handle event driving multi-touch gestures in the code. The design of the iPhone itself was groundbreaking.. but now seeing he amazing work Apple developers did in the SDK.. it’s.. jaw dropping. They really designed a full system, not some bolted together pile of .DLLs and crap that competitors doe (ever written an app in the old MFC? NIGHTMARE!).

So.. the education continues. I’m at little bit closer to getting the match functions of my first *real to be published* app spec’d out. I don’t think I’ll need tangent and radian calculations, or need to use the Pythagorean Theorem to solve for the distance between two points in Cartesian space…. but if I do, I now have it well embedded in my brain how to do it.

Upward and onward…. just another day in the life of a professional computer geek working hard to comfortably retire before he dies.

iPhone Apping – 5 more Apps (3 completed, 2 underway)

A little peek at the apps I've been working on.
It’s been a really good and really bad few days of writing iPhone Apps based on a couple of books I’ve been reading. About 8 hours were burned slamming my head on the table, because the tutorial was just not *quite* clear enough on the exact actions suggested to accomplish a task.

It was not until I decided to just S-can it (for the 3rd time) and move onto the next task, and finally another after that, when I realized just exactly what the author really meant to say when wiring up a bunch of Objective-C code. Then I also found that I’d checked a checkbox (I have a newer SDK version with an option not shows in the texts) that really hosed me up by creating a TABLE based window when I wanted a NORMAL window. Lesson learned.

No matter what, I have deleted all the old ‘Hello World’ apps and have constructed 3 complete functioning aps that display, overlay and swap images. I picked a few of my favorites from recent work. The results are pretty good! It’s not *easy* to write iPhone apps, but with some planning, and not Boat in the Water shot-gun hacky-do programming.. it can be a pretty quick development cycle.

So the two Apps I intend to release for public consumption are now underway. Once is about 50% complete (I need to port some PERL code I have to Objective-C) and the other is a just a bare-bones framework and a bunch of scribbled notes. No matter.. progress has been made!

CIDR Calculator Demo

For those that were breathlessly waiting for me to publish one of my Sys Admin tools.. here is a little one, that I discussed a couple of weeks back.

It’s the CIDR Block Notation Converter. I use it quite frequently in my line of work. Now, I could of course used many of the other online CIDR translates available. Simply using a tool (like a car, or a computer) often requires little or no knowledge of how it, or one of it’s sub-systems works. But, to fully utilize a tool, you should understand it’s origin, it’s function and often you will find other, unrealized purposes for the tool.

Such as the car. You get your driver’s license (people should also need a computer license, they can also be dangerous to one’s self), plob behind the seat and go to the store. But, if you understand some of the mechanics, you might realize it’s useful for more than getting your latte at StarSucks, or a back of dog bones at the pet store. With a little tweaking, you could use it to cross deserts, mountains, even compete and MAKE MONEY with it.

A little knowledge is a powerful thing, so I embarked on reading the specifications for IPv4 (not ipv6… not going there.. yet, in fact I don’t believe CIDR notation has any meaning in IPv6.. digressing..) and CIDR notation so that I could not only understand it’s inner utility but how to write a converter of my own.

If you found utility in it.. awesome, I hope you post a comment (good or bad) to say thinks.

iPhone tutorial app #5 – images meet the road

Writing code for another iPhone App.

Finally, an app that has moving parts. Things are starting to get interesting.

This next app is again, a View Application (single view). The tutorial indicates that we’ll just have to play some tricks to give the illusion of the changes.. image overlays as you will.

Now.. finally, some code has to be written, so here is the first block that is from the controllers main header file:


hello005ViewController.h

//
//  hello005ViewController.h
//  hello005
//
//  Created by David DeMartini on 10/3/10.
//  Copyright 2010 David DeMartini. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface hello005ViewController : UIViewController {
 IBOutlet UILabel *label;
 IBOutlet UIImageView *uiImageView;
}

// Tell the compiler about these properties of our little object-method pointers
//   nonatomic - let the Apple core code handle the mutability (dynamics) of object
//   retain    - tell compiler that we reserve the right to fuck up our own meory management
@property (nonatomic, retain) IBOutlet UILabel *label;
@property (nonatomic, retain) IBOutlet UIImageView *UIImageView;

// Inform compiler that a Button Action (IB) will be part of this application
- (IBAction)buttonPressed:(id)sendr;

@end

Next, the Implementation file must be written.

hello005ViewController.m

//
//  hello005ViewController.m
//  hello005
//
//  Created by David DeMartini on 10/3/10.
//  Copyright 2010 David DeMartini. All rights reserved.
//

#import "hello005ViewController.h"

@implementation hello005ViewController

// Command synthesis
@synthesize label, uiImageView;  // defined that which needs synthesis

- (IBAction)buttonPressed:(id)sendr {
 
//  This modifies the text in object pointed to by 'label' to this string
 label.text = @"The only thing better than a cute girl, is two!";

 // Defining a pointer to the physical Image file (UIImage)
 UIImage    *imageSource = [UIImage imageNamed: @"top.jpg"];
 // Setting the synthsized object image property to the pointer to image file
 uiImageView.image = imageSource;
}

- (void)didReceiveMemoryWarning {
 // Releases the view if it doesn't have a superview.
 [super didReceiveMemoryWarning];

 // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
 // Release any retained subviews of the main view.
 // e.g. self.myOutlet = nil;
}

- (void)dealloc {
 [super dealloc];
}

@end

Now that the primary parts of the code are in place, it’s time to assemble a UI. Adding the main text label (at the top – temporary text displayed for design purposes) and the big button that will cause stuff to execute.

Deep in the UI layout phase using the SDK User Interface Builder.

Shortly after this however, everything went sideways. It would appear there are more brain-dead errors in the book frustrating my progress. It is forcing me to read more and more of the Objective-C documentation than the book suggested I’d have to. But to fix the errors, I must first gain at least a minimum understanding of their nature.

About 5 hours of work. Most of it burned trying to get the last bit of it working… the image swap. Outside of that everything else worked great. With intent to use a fair bit of image swapping when I put the final first app out.. I’d better get a handle on this.


Update: 4-October-2010

After sleeping on it last night, I rebuilt the entire thing from the ground up again. This time going in phases from the initial background image to the label an the button, compiling and executing. That worked perfectly.

Next part I fired up the screen cast the Professor made of him stepping through the process. It then became quite clear (it was not in the book) that the overlay container does NOT reference the second (upper) image directly, but instead is used simply as it’s container. This (of course, being the smart guy I am) made sense the first time around, and I did (what I though) was exactly that. Created a view with not image. Regardless, I re-created my steps this morning, created the empty container, re-compiled and ran. WORKED! Except it looked like doo-doo because the upper level image was NOT properly sized, and the overlay effect did not work. The book (and the screen cast) made it seem like it would expand as required. IT DOES NOT.

iPhone simulator with icon for my 'CuteGirl' app.

So, I referenced the the image view to the top image so I could size and position it to create just the desired effect, then I removed the image association and re-compiled again. This time.. PERFECTION

And the icing on the cake is that it now has a custom icon image for the application. That was pretty simple too. Once I checked online and found that despite what the book said (image size 320×480 which made ZERO sense..) the icon image size should be 57 x 57 pixels and of the format .png (at least the book had the latter part right).


Geek Links:

  • iPhone & iPad Application Custom Icon Design Guidelines
  • iPhone tutorial app 4

    Oh.. now I can press a button and make text appear over an image! WOO..

    It took about 1 hour to get this working. Actually, let me re-phrase that, it took me an an hour to build and ‘test’ a version of this that refused to run. No errors appeared, it just ran and then exited without so much as whimper. Pounded around in the code trying to find the cause.

    In the end, I deleted the entire thing and started over from scratch. Following (what I thought) were the same steps, I re-built the app in about 5 minutes, hit SAVE -> RUN and viola!



    What it does:

  • Upon start up, a photo (from about 15 years ago) for a beer can, yet to be opened appears.
  • At the top of the can is a button labeled ‘Press Here’.
  • Pressing the button makes the text “Beer is Good!” appear below the can.
  • Then, it sits there, tasks completed, waiting to be terminated.

    Pretty cool huh? At least I know the steps for including images as a background. And this is great, since I know how to place an image (required for my soon-to-be-coded real app), how to make text appear (but I don’t be using a button) and.. really.. that’s about it.

    I’m 77 pages into the 300 page book, 4 apps constructed and soon.. things might actually get interesting.

  • Requiem for a Radical – the Left Life of Fey Stender

    Sleep did not come easy last night, so I decided to crack open my new book “Destruction Generation – Second thoughts about the 60’s“.

    Having grown up in the Bay Area (California, for those few East coasters that think they matter) during the 60’s and 70’s the topic of the first books chapter was incredibly interesting.

    It talks about attorney Fey Stender, who infamously defended Huey Newton and George Jackson, members of the Oakland based Black Panthers. I remember those times well. When the Panthers were able to march the streets of Oakland, in roving bands of armed pseudo-militia. Monitoring the police. Since my grand parents lived just a little north of Oakland, I vividly recall my young imagination running a little wild with fear encountering them in our travels around some of the less desirable parts of the East Bay.

    The more I read, the more learned about how this woman even directly affected my life! She was responsible for the landmark decision during this time to abolish the California law banning husbands in the delivery room. Gee.. THANKS lady.

    The chapter was full of names I knew, like Betty Ann Bruno, and Angela Davis. Talk about taking me back to my childhood.

    It’s full of information from people there at that time, living, breathing, fighting and dying for the Revolution. She ran with some of the most radical communist groups and personalities of the times. What I didn’t know, was how many of these groups splintered and re-formed over and over again trying to attain some sort of relevance. Once such group was Revolutionary Union (now known as the Revolutionary Communist Party USA), which after a botched attempt by George Jackson’s son to hijack a plane to Cuba, which resulted in the death of a Judge, his son and two other prisoners, splintered part into the “Venceremos Brigade” which eventually splintered again and re-formed as the infamous Symbionese Liberation Army which kidnapped Patty Hurst.

    But there were other shocking revolutions in the book. An area just a few miles southwest of where I grew up was described this way:

    Agents had infiltrated the Panthers and Jackson’s “army”. As well as a training area, the Santa Cruz Mountains had become a killing ground, where the burned corpses of “soldiers” thought to have been informers were hastily buried, leaving shards of bone in full view.

    Even today, some areas in those mountains ARE NOT places to go wandering around. As recently as two years ago myself and 2 friends were nearly jumped by some ‘hillbillies’ (for lack of a better description) while riding motorcycles on a public road near their mountain homes. Strange things go on in those mountains.

    There were associations with other radical groups including the Weathermen (which, as it turns out is the next chapter in the book).

    In the end, for all the had work Fey Stender did to free Huey Newton and other Panthers, on May 28, 1979 the past caught up with her, and the very people she spent so much time fighting to help, put out a hit. At 1:20 AM and she was gunned down in her Berkley Home, the gunman asking her “Don’t you feel you betrayed George Jackson?”. She survived the shooting, becoming paralyzed from the waist down and in chronic pain from the 5 bullet wounds, finally taking her own life 6 months with sleeping pills, in Hong Kong.

    The chapter included many interviews with people who were there at the time, both prime agents in the cause and those moving around the peripheral. So far it’s been an interesting, informative and compelling read. So far, I’m glad I didn’t put too much stock in the New Republic’s review of this book.

    iPhone App2, App3 & App4 compiled – this time in pure Objective-C

    App 2


    Well, here it is in amazing glory. The 2nd version of that good old programming stallwort, the “Hello World!” example application.

    Now this one took me a bit longer to code and implement, HOWEVER, it’s pure Objective-C, not the hybrid app type that I used in Application #1. App1 was interesting, and fast to build, but it relies upon some pretty big external libraries. Not a big deal for a low-intensity application like I’m building right now, but the QuickConnect based hybrid app I first built comes with that (I think is) is a pretty high price to pay (with a couple of hefty line items)

    1. Every time you start the application, I get an unwanted QuickConnect Family Application splash screen. NO THANKS! I’m pretty sure I could hack around it, buy why bother, for now?
    2. It won’t run from XCode! I can get it to start, but it won’t actually Do anything.
    3. The hybrid HTML based application’s style sheets are partially ignored, things like the background and text colors are not honored, BUT the font family is. Very strange
    4. It’s a MAJOR pain in the ass to debug when you create it in DashCode… ‘deploy it’. Have to monkey around with several files to fill the XCode (Objective C based) language into using files it did not expect to need… it’s all very hacky and more kludgy than I like.

    Honestly, with XCode view based building, I don’t think I need to mess around with the hybrid application model at all, at least for now. So.. the application that I built purly in HTML, CSS and JavaScript will be shelved for now. Instead I’m going to re-open my Objective C tutorials and work my way into the project I was working on originally.

    It might be a pain in the butt to learn Objective-C, but in the end, I benefit. Question is, do I have the time and will to see it all the way through. I believe so. But until such time as I have the first application built and deployed on my phone.. it’s sort of.. moot. No?


    App 3

    App3

    This one is not a View Based Application like number one, but this is what is called a Navigation Based Application.

    Now, ever the hacker, I went beyond the code changes to RootViewController.m suggested in the book, and also had to fix some GLARING errors in the text (did they not have an editor look at this??). Anhow, this is the code that I wrote for the cell builder. The enhancements allow line wrap, and I changed the default font size from 17 to 13.


    // Customize the appearance of table view cells.
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
    cell.textLabel.numberOfLines = 0;
    cell.textLabel.font = [UIFont fontWithName:@"Helvetica" size:13.0];
    }

    cell.textLabel.text = @"This is my second Objective-C application.\nDespite the tutorial having MASSIVE bugs, I got it to run!"; // Configure the cell.

    return cell;

    }

    I’m trying to decide if a View Based (winning so far) or a Navigation Based application will be the way I go for the Real Application. The Navigation Based app is a lot easier to get started with, and does not require that rather odd method of linking elements with the fishing line drag and connect method in the View Application.

    Still a lot of code to write before I have enough experience to make a solid choice.


    App 4

    App4 is a derivative work of App3, but this time by simply enabling this little block of code, I get an Edit button and the ‘Delete’ context, if I need it, for the items. Pretty slick. Apple really went out and did a nice job on this SDK…

    - (void)viewDidLoad {
    [super viewDidLoad];

    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    self.navigationItem.rightBarButtonItem = self.editButtonItem;
    }

    Application 4 running in the iPhone simulator

    Fisherman’s Memorial Day in Seattle

    Hey all (this is going to several people, so please excuse the somewhat general greeting),

    Our director of sales at work called me Friday, and told me that him and his wife were going up to Seattle to do some things, and that I should tag along.  They we’re really specific, but I was free (no kids), and it was a nice sunny day.   Still recovering from being sick the last 3 weeks and not ready to get back on the bike, I took them up on their offer to pick me up at the ferry.  How much simpler could it be?

    The day started off with a bang.  A trip to the doctor’s office for them to get flu shots.  Nope, not kidding.  But it was an interesting visit to one of those ‘concierge doctors’.  Sort of a private insurance that the well heeled like to use.   For about $80 a month they get a doctor they can call 24×7 (not just a service, but their actual doctor..)  and get advice.  It’s in interesting health care delivery model.  The one I went to was called  Qliance.  http://www.qliance.com/ Anyhow, the view for the skyscaper was worth the elevator ride, and it only too 5 minutes.

    Back in the car, we fought our way (and I mean fight, this is Seattle I’m talking about) north to the Fisherman’s Terminal.  Which is where things go interesting.  Joel, the ever ‘working a deal’ sales guy worms his way into the parking lot where the crabers park their personal cars.  Which was very cool, because just a few feet away from us was this:  (were’ parked just off frame):

    The Wizard - parked at Seattle's Fisherman's Terminal

    Talk about timing.  They were 3 day late pulling out of port, and the entire crew was there working hard to get the boat ready to head up for King Crab fishing.  It was very cool.  The boat looks so much bigger, yet at the time, so much smaller, than it looks on TV.  One thing I’ll tell you that big ‘block’ they use to pull the crab pots up is ENORMOUS!  About twice the size it looks on video.  Now I really understand what a big deal it is for those guys to get clocked by it.
    Captain Keith signing stuff and talking to fans next to his boat.
    OK, so anyhow we managed to get a little bit of Keith’s time (he’s a *really* nice guy, not at all like he’s portrayed on TV, he hard a hard time excusing himself from us a few other people to get back to work.  Even after he finally went back on board, we talk him talking to other people from a port-hole on the stern of the boat.  They had a 9 day trip to Dutch Harbor a head of them.  Got to meet his brother Monty and a couple of the deck hands a well.  I’ve a lot more photos of the boat I’ll post up later.

    We also saw this, the memorial plaque and small memorial shrine setup for Phil Harris:
    Memoral brick for Captain Phil Harris

    The next coolist thing to happen, was a Coasti MH-65 heli blasted by low overhead, cranked itself into a tight turn and then came back right over the Wizard.  You can see one of the guys waving out the door here.

    USCG Helicopter fly-over
    USCG Helicopter fly-over

    Then we got a little demonstration of USCG at-sea heli rescue.  The pilot put the thing into a hover about 60′ feet off the water, and just off the edge of the dock.  Quite a crowd appeared!  Sorry the photo looks fuzzy, but we were being doused with water from the rotorwash.

    USCG Helicopter overing over dock.
    USCG Helicopter overing over dock.

    USCG rescure swimmer about to exit aircraft.

    It was really awesome to watch, close up, how the pilot kept the bird in such a tight hover.  It was a little windy yesterday.  Being that close to a heli in hover for 20 minutes was very cool.   Those MH-65 Dauphin helis are not that big!  You can see on the door that this one is stationed out at Port Angeles.

    USCG rescue swimmer in the water.

    While there, Rachael (Joel’s wife), tells us that Dan Akroyd is just a mile away at one of the stat liquor stores promoting his Crystal Head Vodka.  Into the car we hopped and blasted down to the Whole Foods store and there him and his entourage (and I mean entourage) were.   The line to get in the place wrapped around the building, but it seemed to go pretty quickly.

    Dan posing with his signature Vodka - Crystal Head

    That’s him posing for another person to take the picture.  After that he posed with my friend’s wife,  signed our bottles, stopped (no idea why) thanked me (for taking the picture?), shook my hand smiled and handed me my signed bottle.  He was taking the time to be friendly to everyone.  Some people we’re being real knucklheads making a lot of Ghost Busters jokes, getting him to sign Ghost Busters memorabilia, etc. etc. and he was cool to everyone.   That was a lot of fun.

    After we bailed out of there, we headed back to the Fisherman’s Terminall.  Lucky for us the crowd around the Wizard was gone, they’d finished loading the last of the pots on the boat and the crew was relaxing a bit, and got to talk to them for a bit again.    We didn’t stay to watch it pull out (it was going to be a couple more hours).  Stopped at the Anthony’s Fish Bar in Belltown,  watched the cruise ships sail out and then headed to Joels.

    At Joel’s, we smoked some cigars, make some cocktails with the Crystal Head (it’s goooooood!),  and capped the night off with a huge dinner at 13 Coins in SeaTac.   The ferry was going to be a really long wait so they just drove me the 70 miles home.   I got back just before midnight.

    It would have been a long day for the kids, but I’d wished I’d had the chance to take them there, meet  Keith and Dan, and watch the Coasties rescue demonstration.   Oh, and the fresh seafood at the terminal..  that was pretty good too!.  I think they would have had a lot of fun.

    I have 197 photos I took yesterday.  When I’ve culled the herd to a reasonable ‘best of breed’, I’ll be posting up higher-res versions.

    Racing, Photography, Software and Politics.