Sunday, July 12, 2009

Now Presenting... Me

Awesome Inc is hosting what they are calling Mobile Mini-Conference at their facility in Lexington, KY on Saturday, July 18th. This is ostensibly a generic mobile device conference, but as the schedule demonstrates there will be a particular focus on the iPhone. Here is a fancy badge:

Awesome Inc. Mobile Conference

I have been invited to speak, and will be giving two presentations. They are:
  • UITableView Overview

  • iPhone Development Resources, Tips, and Tricks


I hadn't even started SlickShopper 6 months ago, so if you had told me then that I'd be giving iPhone presentations now, I'd have thought and said you were crazy. But here we go. It's tough to do much justice to any development topic in 30 minutes, but I think my presentations will be worthwhile.

I'm not really nervous, per se, as I've done plenty of presentations before. However, this will be the first in a long time where I'm presenting on a topic where I don't have a solid and lengthy background. I'm also accustomed to practicing my presentations on my coworkers, but I don't have any of those at the moment. I'll do fine on the speaking part, but I'm not looking forward to fielding questions. Whenever I talk about I-DEAS, I'm among, if not THE, most knowledgeable subject experts in the room. I'll be shocked if that is the case with iPhone development, and a couple of well-placed questions could shatter the illusion that I know what I'm talking about. But, this is a brand new conference, so I don't really know what to expect.

So at any rate, if you are within a reasonable drive of Lexington and have any interest in iPhone development, come check us out.

Thursday, July 02, 2009

Rethinking The Problem

I believe this is officially the first of what will hopefully be many technical posts about my iPhone program SlickShopper. I'm just about to release a semi-major update, and a couple of revelations I had along the way are, I feel, deserving of some attention.

The Reason



SlickShopper doesn't break any new ground in the area of user interface. It is a simple, table-driven interface that uses built-in widgets almost everywhere. But the actual table cell - the row of information that is displayed - is a key area where I needed to provide something a little beyond what Apple includes out of the box. Here is a sample that is typical of my three main list views:



It's not super fancy, but for sake of this discussion, the important thing to notice is the number of pieces of information. There is the 1) description, 2) quantity, 3) cost, and 4) checkbox. So far, so good.

I am a big believer of options in software. As a user, I generally want options, and as a developer, if two reasonable people can see two reasonable ways of doing something, then if possible I'd like to support both people. And I carried this philosophy into this program. Except for the description, each other piece of information can be disabled. If you don't care about costs or quantities, you can turn them off. I personally can't stand having the checkboxes there (they are great looking; don't get me wrong... but I don't like having the second touch zone that they provide), so I turn those off, too.

The more math-oriented readers might already see the factorial that is forming here. I have 3 items with different display possibilities, so right now I have 3! = 3x2x1 = 6 variations. But I'm not done yet. I do have one display mode where I need to show the checkboxes, even if the user has turned them off. I need them for visual distinction between selected and not-selected, but I just want them for display; I don't want the second touch zone. So add one more option, and now I'm at 4! = 4x3x2x1 = 24 possibilities. It actually isn't this bad; due to some overlap of the options, it turns out that I really only have 12 scenarios to handle. For example:
checkboxes ON, quantity OFF, price ON; or
checkboxes ON, quantity ON, price OFF
...and so on. The logic for determining which scenario I'm in is going to be convoluted pretty much no matter what, but what about displaying of the actual cells?

The First Attempt



This would have been much simpler without the checkboxes. I've had enough trouble getting my head wrapped around the use of Interface Builder for iPhone development as is, but I couldn't find any examples that included a button in the cell. The only examples I could find built the cells in code, so that's what I did. I'm not going to bother laying out the code for them, but I'll list a few of the file names just to give an idea of what I was doing:

CompleteListCell.h
CompleteNoCheckListCell.h
CompleteImageOnlyListCell.h
MinimalListCell.h
MinimalNoCheckListCell.h
MinimalImageOnlyListCell.h

So first I decide how much information is being shown, based on the preference settings. If costs, prices, and checkboxes are all turned on, then I use the CompleteListCell. If the user turns off the checkboxes, then I fall back to CompleteNoCheckListCell. BUT, if the user then chooses a display mode where I need to show the checkboxes, I swap in the CompleteImageOnlyListCell, which replaces the button with an image.

This approach certainly does work, and is what shipped with my 1.0 and 1.1 versions. When I originally planned this out, I came up with 12 variations, so I have 12 of these files. Making them was easy enough; I built the most complicated one first, then pretty much just copy-pasted to make the others, removing code that no longer applied. And as long as I don't ever need to change anything (HA!), these files will be just fine. But if I decide to, say, change the font used for the description, I have to make that change in 12 places. And if I decide to add more information to my cell, I'm going to need a crapload of new files. So, this approach is workable, but ultimately doomed.

Duh



The first revelation concerns the checkboxes. What normally happens when a user taps on a row is that tableView:didSelectRowAtIndexPath: is called, and in the method you decide what you want to do in response to that tap. In this case, I want to slide in a detail view:



Easy enough. However, the whole point of having the checkbox is to provide an alternate action. If the user hits the checkbox, I want the row to animate out, like this:



I have the checkbox pointed to a buttonPressed: method, where I do the necessary steps to animate out the row.

The stumbling block was when I needed to show the checkboxes, but I didn't want them to function as buttons. So instead of imbedding the button into my table cell, I chose to make extra cells that contained the checkmark image. And then based on the appropriate preference setting, I chose which cell to display. I was thinking about this far too literally.

It suddenly occurred to me that I don't need to care about what kind of physical item - button or image - is being displayed, I only care about what happens when it is touched. If it is an image, normal row selection should happen, if it is a button, something extra should happen. But how do I tell the difference if I don't use a physically different item?

The answer is so blindingly obvious (in hindsight, of course) and simple that I'm really mad I didn't figure it out sooner. And that answer is the buttonPressed: method. I already have a method for declaring what should happen when the button is tapped, so what I need to do is make a small change to it to accommodate both of my needs. Here is the code:


if (![userDefaults boolForKey:kPrefsCheckboxesKey])
{
[self tableView:[self tableView] didSelectRowAtIndexPath:indexPath];
return;
}


First, I figure out what the preference setting is. If the checkboxes are turned off, I redirect to the exact same method that would normally be called when a row is tapped, and then bail out of the rest of the method. The end result appears to be only a single touch zone for the user, even though technically it is still two. I get my desired behavior, and this lets me remove the CompleteImageOnlyListCell.h cell and equivalent variations. So, this realization alone allowed me to go from 12 to 8 cells.

Don't overthink the problem, kids.

A Better Example



I didn't get super motivated to evaluate my cell structure until I saw this post on the Cocoa-dev mailing list by mmalc Crawford. I had glossed over it originally, not realizing it was actually an iPhone question. But sure enough, down under the 'Replicated content' section he provides instructions for using Interface Builder to graphically build cells that contain buttons. I believe that mmalc is one of Apple's tech writers, and have since found almost the exact same explanation in the "A Closer Look at Table-View Cells" section of the "Table View Programming Guide for iPhone OS". There is also a relatively new example called TaggedLocations that demonstrates the technique.

So, just like the first go-around, I laid out the most complicated version first, just to see if I could make the technique work. Here is what that looks like, with color added so that you can more easily see the different UILabels involved:



There really isn't too much code going along with this cell. This is my header file, and the implementation doesn't contain a whole lot more. It pretty much just synthesizes the accessors, inits, and deallocs.


@interface CompletePortraitListCell : UITableViewCell
{
UIButton *checkButton;
UILabel *primaryLabel;
UILabel *leftSubLabel;
UILabel *rightSubLabel;
}

@property (nonatomic, retain) IBOutlet UIButton *checkButton;
@property (nonatomic, retain) IBOutlet UILabel *primaryLabel;
@property (nonatomic, retain) IBOutlet UILabel *leftSubLabel;
@property (nonatomic, retain) IBOutlet UILabel *rightSubLabel;

@end


So that's good, but doesn't really help me a whole lot yet. Don't I need 7 more of these? As it turns out, no, this is the only file I need, and it can handle all 8 of the remaining variations.

I should probably take a moment to say that everything I'm about to achieve probably could have been used on my older code-only cell, too. But I do feel confident in saying that it probably would have been a bit more complicated to do so. And I can make size and position changes in IB so much more quickly than I can in code.

We begin with the complete cell as shown before, and let's take a quick look at it running on the phone to make sure it works:



The first option I want to handle is when the user has elected to display only one piece of additional information - quantity OR cost, but not both. I made the decision early on that in this case, the piece of information would be displayed at the left (green box), regardless of which piece of information it was. I can redirect the text into either box, so that's not hard. And it turns out that choosing not to display a box isn't hard, either. UILabel inherits from UIView, which in turn has a hidden property. So, after initializing my cell, all I have to do is:

[[cell rightSubLabel] setHidden:YES];


This results in:



Or, if only cost is being displayed:



So if hiding can make things go away, maybe I can do that with the button, too. And I can:

[[cell checkButton] setHidden:YES];


...which results in:



So the checkbox is gone, but now the text looks funny dangling out in space. I need to shift the text over to occupy the space vacated by the checkbox. This is accomplished by messing with the UILabel's frame. First, I'll grab the existing frame for the description label:

CGRect primaryFrame = [[cell primaryLabel] frame];


Then I'll feed that frame right back into the label, but make an adjustment to the X coordinate:


[[cell primaryLabel] setFrame:CGRectMake(primaryFrame.origin.x - 30,
primaryFrame.origin.y,
primaryFrame.size.width,
primaryFrame.size.height)];


Let's see what that does for us:



Well, we did succeed in pulling the label to the left, but the entire label moved. With short descriptions, the user might never notice the difference, but once they get some longer titles, they'll see their text getting truncated at an odd location. So at the same time we're moving the box to the left, we need to make the box wider to fill up the space. So, with a minor correction to the previous code, we now do this:


CGFloat adjustment = 30;
[[cell primaryLabel] setFrame:CGRectMake(primaryFrame.origin.x - adjustment,
primaryFrame.origin.y,
primaryFrame.size.width + adjustment,
primaryFrame.size.height)];


...and check our results:



Bingo. We can do the exact same thing with the green box. The blue one doesn't need to move in this case.

Speaking of moving a text box, that can probably handle the case where prices AND quantities are turned off. All that needs to happen there is for the description label to move down. Since we don't want the box to get taller as it moves, all we need to do is increase the Y coordinate:


CGFloat adjustment = 8;
[[cell primaryLabel] setFrame:CGRectMake(primaryFrame.origin.x,
primaryFrame.origin.y + adjustment,
primaryFrame.size.width,
primaryFrame.size.height)];


And of course hide the two detail boxes:

[[cell rightSubLabel] setHidden:YES];
[[cell leftSubLabel] setHidden: YES];


...resulting in:



At this point, the only differences between selected and not-selected are the checkbox state, and the color of the text. We'll stay with the black for selected items, so for unselected items we'll change the text color:

[[cell primaryLabel] setTextColor:[UIColor grayColor]];


The checkbox is similarly easy. In Interface Builder, select the button, and then in the Inspector set an appropriate image for "Default State Configuration", and the checked image for "Selected State configuration". After that it is simply a matter of feeding a boolean in for the state, which in this case is based on a property of my data model:

[[cell checkButton] setSelected:[currentItem isSelected]];


So after all of this, we are left with two cases: 1) not-selected item, no checkbox, 2) selected, but all options (checkbox, prices, quantities) turned off. Technically, our same cell could handle this. Set the checkbox to hidden, make the appropriate transformation to the frame coordinates, and we're there. But, this may perhaps be overkill. After all, we're talking about a cell that contains only a single line of text. That's a basic UITableViewCell. No reason to reinvent the wheel for that. Set the font size and color, done.

And as an added bonus - and my real reason for messing with my cells in the first place - this all works in landscape, too:



There's a little sneak peak at SlickShopper 1.5 for loyal readers.

Yeah, So What?



What did I actually accomplish? The key difference is that I went from 12 custom cell classes to only 1 (plus 1 built-in cell). That's less code to manage. And the new custom class is designed in Interface Builder, which means even less code. Less code is always good (less to break). And by having all of the important cell design in one place, that means a one-time change can have a wide-ranging impact.

I'm sure at some point I'll learn about a reason not to have done this, but for now it's working just fine. The only real weakness I can see at the moment is when I move the labels in code. Right now the transitions are all relative, so if I move the red box in IB, then the red box will also move in the simplified display. I'll have to make corrections to the code at that point. I could hard-code the destination coordinates, but then I'm really putting a wall between the nice stuff I now have in IB and what is happening in my code.

But for now, I'm happy, proud of myself, and grateful to mmalc.

Sunday, June 14, 2009

WWDC Recap

I'm on my way home from WWDC and have a bit of a layover here in Minneapolis/St. Paul, so I thought I'd jot down some passing thoughts.

Let's Get Physical



I've identified three categories of physical activities that happened a lot during this conference. Unfortunately, I only prepared for one of them.

1. Walking. Lots and lots of walking. This is the one I prepared for. I've been doing a couple laps around the neighborhood each day for several weeks, and that exercise served me well.
2. Standing. Standing in line. More standing in line. Even more standing in line. And yeah, some more standing in line. Oh, and also some standing around during the social mixers. And don't forget about standing in line. Oddly enough, I found that even though the standing really wore on me, as soon as I started walking I was fine. I don't know exactly how to prepare for this, but I'd suggest simply standing for a 1/2 hour several times a day. Maybe shuffle forward a couple feet every few minutes. For bonus practice, hold your laptop bog.
3. Sitting. I thought the worst seats on this trip would be on the airplanes. I was wrong. On Monday I was thanking and asking for another, on Tuesday I was able to keep to name, rank, and serial number, but by Wednesday I was giving up state secrets and begging for mercy. In order to prepare for this, I suggest finding a nice concrete block, and bringing along a small sheet of plywood for a backrest. Sit on this for an hour, four times a day. You probably still won't be adequately prepared, but at least you'll be more ready to accept the almost total loss of the concept of personal comfort. Chances are you won't be able to sit on the end of a row, so as you sit practice keeping hold of your laptop without crossing your legs.

Big Brother



This is the first conference I've attended where all of the content was provided by the host company. Every single lecture was given by Apple employees. I don't think I can adequately articulate how much less useful PLM World and SolidWorks World would have been with exclusively UGS- and SW-provided content. Certainly, it is nice to get information direct from the horse's mouth, but there is so much valuable knowledge in the user base. On average, the useful information acquired that can be immediately applied tends to come from user presentations. This is largely due to the fact that the host company is mostly talking about what's coming up. The next version of SolidWorks, the next version of NX, etc.; capabilities that aren't even available yet and won't be for months. Users stand up and talk about what they've been doing for the last year, and provide a little reality to combat the unicorns and roses offered by the company. I was already overwhelmed by the amount of information that Apple provided, but I can't help but wonder how much more valuable and tangible information I could have acquired from a few decent user presentations.

Brush With Greatness



I didn't get to meet everyone that I wanted to, but I did wind up being surprised at the numbers I did encounter. Several book authors, several of my Twitter followers, and so on. It's tough to meet people when all you know is a screen name. Who knows how many times I walked past someone I would have liked to meet, but didn't know that's who they were. I did see a couple of people I would have liked to talk to, but didn't have a convenient situation to do so, and judging from Twitter there were a significant number people present that I would have loved to meet but never saw. Maybe next year, on the assumption this whole programming gig lasts long enough to justify a return, I'll have to send out some emails in advance to arrange meetings.

Wednesday, June 10, 2009

Conference Comparison

This week I'm in San Francisco attending Apple's World Wide Developer Conference (WWDC). This represents a number of firsts for me. First time attending an Apple conference of any kind, first time attending a non-CAD (well, week-long) conference, might even be my first visit to San Francisco (don't remember).

It is only natural that I draw comparisons to my prior conference exposure. I attended PLM World for several years, and last year attended SolidWorks world for the first time. I don't remember if I blogged about it, but I believed at the time that SWW was hands-down the best conference experience I had witnessed. Can Apple trump that? In short, no, but they come pretty close. So let's take a look at some aspects that have jumped to my attention.

It should be noted that I have missed the last 2 PLMW conferences, so some of my information may be out of date, and my complaints may have been addressed in the meantime.

Planning Ability

PLMW and SWW both announce their conference dates for the following year at each conference, and sometimes even 2 years in advance. Although everyone knows there will be a WWDC each year, Apple announced the early-June dates in late-March, barely 2 months of warning. That's no good. There's no reason to be so secretive about the dates.

Winner: PLMW/SWW
Loser: WWDC

Preparing Ability

I got used to PLMW publishing session schedules well in advance of the conference. There would often be revisions, but the bulk of the schedule was made public early on. Either SWW's site really sucked, or I am an idiot, or blind, whatever, but I didn't find session schedules until almost immediately before the event. In fact, I think it was my wife who pointed out to me where it was on the site, and I swear I didn't see it before then. So I'm willing to acknowledge it could have been my oversight, but it left a bad taste in my mouth either way. Apple only released a session list about a week or so before the event. So that's bad. BUT, they did provide the ability to broadcast a calendar subscription, and indicate on their web site which sessions I would want to attend. This updated directly into iCal, so I was quickly able to see that there were far too many interesting sessions for 1 human being to attend. And about 2 days before the event, they made an iPhone app available that hooked into the same scheduler, and also provides maps and things.

Winner: Apple for capabilities, PLMW for timeline
Loser: SWW, but might have been my fault

Registration and Schwag

The day before things kick off, you go to the registration tables to get your various badges and things. Registration is registration, so I can't say that there is anything particularly noteworthy about any of them, so let's focus on schwag.

PLM World started off pretty well for me, then quickly went downhill. The very first conference I attended, they handed out Palm Pilots to all attendees. The next year was a memory stick. The next, a shirt. The next, either another shirt, or nothing, I don't remember. Meanwhile, they found a sponsor to hand out a horribly crappy bag. Think of a re-usable canvas grocery bag, only much, much, much cheaper. That became a standard for several years, and they mostly handed it to you to keep track of all of the sponsor ads and other miscellaneous crap they also handed out. The bag was really only useful for carrying this stuff back to the hotel room, never to be touched again.

SWW was a shirt and a backpack. I still wear the shirt periodically to this day, and would be using the backpack if I didn't already have a great one. It is a pretty decent backpack.

Apple is a shirt and a backpack. It's more of a stylish backpack than a particularly useful one (cue Apple haters...). Shirt's not bad.

I should point out that I am actually carrying around a shoulder laptop bag that I got from PLM World. But, this was one of the gifts I received for being a presenter, and not part of the general handout. It's an odd bag, and has proven to be surprisingly useful at events like this, but I'm not going to count it since it is a special case.

Winner: SWW
Loser: Recent PLMW

Identification

PLMW has long gone with the fairly standard huge identification lanyard. Ugly, but always functional. Large, easy to read letters so you could catch the names of people without too much trouble, handy little slots for business cards and pens. No complaints. SWW took a slightly different route, with a clear plastic holder. But they added two particularly useful innovations. First, attached to my name card was a printout of the sessions I had indicated I was interested in during registration. THAT was handy. Second, they managed to cram the entire conference agenda into a small booklet that slid into a slot on the back of the ID holder. This is noteworthy because PLMW's conference agenda is a freaking Sears catalog. Apple has gone with a plastic card about the size of a credit card. The text is rather small, and the card has a gift for rotating around so the wrong side is facing out, so you can't see names anyway. About the only thing positive I can say about it is that it's easy to stuff in a pocket when leaving the conference center so that you aren't displaying your "please rob me, I'm from out of town" bullseye.

Winner: Tie between PLMW and SWW, slight edge to SWW
Loser: WWDC

Innovations

Again, PLMW got off to a great start. They handed out the Palm Pilots because they included conference software that listed the sessions and locations. They never handed out such devices again, and I don't believe they offered the conference software again (I have missed the last two, so they may have updated in the meantime). SWW didn't really go for technology in this area, but their conference agenda was very clever, and I don't mean the small one that was in the ID pouch. They produced a spiral-bound version that was roughly half as thick as PLMW's catalog, despite having significantly more content, AND the back half of that contained blank engineering paper for doodling or taking notes. You almost didn't need to carry anything else around with you. I'm not going to give Apple too much credit for having an iPhone app; after all, it's a developer conference, with particular focus on the iPhone. It would be more significant if there wasn't an iPhone app. But I'm still going to give credit for providing the calendar subscription. It's a nice touch.

Winner: Each, for different reasons
Loser: Recent PLMW

Keynotes

PLMW keynotes were spectacularly dull and uninteresting. I cannot think of a single positive thing to say about any of them. I don't think they understood their audience. The presentations were always geared towards my boss, or even my boss's boss, but neither of them were at the conference. I was. The keynote did not once speak to me. SWW was like a breath of fresh air. The keynote was interesting, entertaining, and relevant to me. Not my boss, not my VP, me. It was a highly charged, highly motivating experience. How does that compare to one of Apple's legendary keynotes? I didn't actually care to wait in line to see the keynote (not sure if I would have felt differently if el-Steve-o was presenting), I just wanted breakfast. But you had to wait in line to get inside to get to the conference food, so I bailed and went to Starbucks. The line was already several blocks long, and by the time I came back was nearly wrapped all the way around the conference center. I believe the line came full circle by the time they started letting people in. As is, I was in line for roughly 45 minutes, and got shuffled into an overflow room 15 minutes after the keynote had started. Was it worth it? Meh. Oh, don't get me wrong, they announced some cool stuff. But I really didn't leave with a sense of "Oh wow, I want to go write some code!" I totally wanted to go design something after the SWW keynote. It's not the same audience, not really even the same purpose, but I'm afraid to say that SWW out-keynoted Apple.

Winner: SWW
Loser: PLMW

Meals

PLMW has always had decent catering. The crowd is shuffled into a large room with plenty of tables, all pre-stocked with silverware, condiments, and usually a choice of water or tea. (Hopefully) soon after being seated, food would be served, and an eager wait staff would whisk finished plates away. The food was usually fancy, but not really my thing. I won't say it was bad, just that I would have preferred a bit more of a common menu. As I type this, I can't remember what SWW meals were like, so it must not have been noteworthy in either direction. WWDC's meals are pre-packaged. They seem to offer 3 choices - yesterday was ham & cheese sandwich, chicken wrap, or vegetarian - and you move pretty quickly through a line to get what you want. Food quality isn't bad, though it is significantly lower quality than PLMW. But you can grab and go. Generally there are better things to do at a conference like this than to wait on your food to be served, so I think that's an advantage.

Winner: WWDC for speed, PLMW for quality
Loser: PLMW often had long food delays

Snacks-n-Things

PLMW did a pretty good job of leaving out water bottles on a regular basis, and there would be sweets in the afternoon. They typically did a pretty good job of covering a wide area in the conference center, so you wouldn't miss out on a cookie just because you were on the wrong floor. SWW stepped this up a notch, providing custom-labeled water bottles constantly, and if anything the snacks were even better than PLMW's. I kept reading tips for WWDC recommending that you grab the water bottles from your hotel room ($3 for a modest bottle). Surely this is unnecessary, I thought. They have to provide water bottles.

They don't provide water bottles! Apparently if you know where to look, you can find some office-style water jugs, with paper cups. During meals and during snacks, they basically wheel out these barrels filled with ice and a couple flavors of canned drinks, and I've seen some varieties of juices in plastic bottles. But not much water. And let's talk quantities. Maybe I was just in the wrong place at the wrong time, but when I wandered out for a snack, there was exactly one table available with cookies and M&Ms. One table. This is the largest conference I've attended. One table. Twice the size of PLMW, edging out SWW by a bit. One table. And of course, hungry software developers lacking in people skills descended upon this table like a pack of wild dogs. I've never seen so much interest in M&Ms, and I struggle to think of the last time I saw such a poorly organized means of delivering food. The CAD conferences typically naturally form lines and efficiently retrieve food. This was almost scary.

Winner: SWW, CAD users
Loser: WWDC, software developers

Signage

For as long as I can remember, PLMW has used custom-printed foam board propped up on easels for session topic signs. I was amazed when I attended SWW, and they had big LCD screens outside of each room indicating the next session subject. Apple has, of course, stepped that up with a level of style.

Winner: WWDC
Loser: PLMW


Granted, I'm not even half way through WWDC yet, but based upon initial impressions, I'd have to say that SolidWorks World will hold onto its coveted title of "Most Impressive Conference Brian Has Attended". Seemingly everyone involved genuinely cared that the attendees had a great - not merely good, or acceptable, but great - time, and SolidWorks was willing to throw around some serious dollars. PLM World has been hamstrung with budget issues, no doubt in part to being a separate entity, and being roughly half (in terms of number of attendees) the size of the other two. WWDC is falling somewhere in between, although definitely closer to the SWW end of the spectrum. Apple is throwing some money around, but I'm not certain that it is winding up in the right places, and I'm not getting quite the same level of enthusiasm. Maybe it is social differences - although engineers and programmers aren't too far apart on the introverted nerd scale - maybe it is the always-present Non Disclosure Agreement hanging over everything here. Not sure, but SWW got "it", whatever "it" was.

Monday, June 01, 2009

It Has Begun

So, Brian... what have you been up to lately? Quite a bit, thanks for asking.

On November 17, 2008, I placed an order for Beginning iPhone Development: Exploring the iPhone SDK, by Jeff LaMarche and Dave Mark. I had no way of knowing that just a few days later, I would lose my job as a Mechanical Engineer. In pretty much every way except financially, this has turned out to be one of the best series of events in my life. Rather than moping around about losing my job (did enough of that the last time I lost my job), I threw myself into the book, determined to make myself into an iPhone programmer.

I am not a total beginner, but not too far from it. Roughly two years ago, I attended a programming class at Big Nerd Ranch, one of the best Mac programming instructional organizations in the world. I toyed a bit with Mac programming for a little while after that, but for various reasons didn't keep much momentum. When Apple made it possible for anybody to create programs for the iPhone, I jumped at the chance to dive back in to programming. Unfortunately, I am still a beginner, and Apple was still new at supporting this particular ecosystem. The examples and documentation were hard to understand, tutorials non-existent, and the available tools didn't work as well as their Mac OS counterparts. As Apple continued to release updates to the developer tools, I downloaded each one hoping that things would finally get to a point where I could figure them out, but it just wasn't working.

Thank you, Jeff and Dave.

At last, a well-written book appeared that would pave the way for what hopefully turns out to be my new career. I spent the next several weeks patiently and diligently working through the examples in the book. Somewhere around Chapter 9, I decided that I probably knew enough basics to start working on my own program. I started putting together small sample programs, testing different functions that would be components of an application that I wanted to make, and proved to myself that I could make it happen. Looking back at my project history, somewhere around mid-February is when I started to create my real program.

I'm planning to do a separate blog post detailing the creation of my program, so for now let's just say that my initial estimate of 6-8 weeks to completion was, um, inaccurate. I'm sure that someone who knew what they were doing could have completed the program in half that time. I slammed into speed bumps and brick walls constantly, rewrote the entire thing from scratch at least 3 times, and spent many a late night trying to squash bugs. I have learned that I am unable to get to sleep if my program crashes. My learning curve has been more of a jagged, rocky, and steep cliff face.

On May 28, 2009, Apple approved my program - SlickShopper - for sale on the App Store. I was really hoping to get it onto the store in March. And then I was really hoping to get it on the store in April. And then I was hoping I would just finish the darned thing. I finally bit the bullet and submitted the app into the approval process, and then nervously waited for what turned out to be 7 business days, meanwhile watching a competitor conduct a major advertising campaign. But it finally happened. My program exists. It is available for purchase. People who aren't friends or family have bought it.

I am an iPhone developer.

This is by no means the end of the story. For one thing, SlickShopper only sells for a dollar, so it's going to require a truckload of unit sales to provide useful income. I'm not expecting that to happen. For another, my wife will be losing her job in just a few weeks, which will drastically cut down on the amount of time I can do this iPhone thing before I have to go bring in real money elsewhere. And SlickShopper isn't done. There are several features I still want to add, and the main reason they aren't there yet is that I just plain don't know how to do them. So I have some learning to do. This doesn't take into account what my paying customers might want the program to do that I haven't even thought of yet.

Step 1 was to ship software. Now that I've made that happen, I can figure out what step 2 will be.

Tuesday, March 10, 2009

What Was That Noise?

What noise? Oh, that? That was the sound of the other shoe dropping.

Loyal readers (both of you!) know that I have have been unemployed since late November. I'll talk more about what I've been doing in the meantime at a later date, but basically I haven't been trying all that hard to find another job. That may need to change sooner than I had hoped.

Teri was informed on Friday that her position will not be renewed this summer. It's not a 100% done deal, but close enough that there's no real point in hoping that she'll keep her job. She will finish up at the end of June. I suppose we could view this as she is getting nearly 4 months severance, but she still has to work for it. Heh.

Although it's always shocking to learn of job loss, it wasn't a complete surprise. The university, like everyone else, has been facing budgetary issues. Also, in response to being questioned about job security, her boss hinted a few weeks ago that she should keep her eyes and ears open. That's what we in the business call "a sign".

This will be the first time Teri has lost her job, and it's just a great big happy freaking coincidence that it happens when I am also jobless. So this drastically reduces the amount of time that our savings will last. With Teri employed, our pile 'o cash can go for roughly 3 years. With no income, that drops to about 9-10 months, or roughly a year from today. So we still have time to find jobs, but a lot less of it.

Semi-related side note: If you have a nice, perfectly functioning - and paid off - automobile, and are thinking about selling it, buying something cheaper, and using the difference to pay off credit cards, DON'T DO IT! Nothing sucks like have to pay for repairs on a POS car when you don't have a job. Reliable transportation is very important. Also, if you think that used cars devalue slower than new cars, um, no. My POS car is worth roughly half of what I paid for it not even 9 months ago. Did I mention repair costs?

Anyway, Teri has spent the last few days applying for other jobs. Basically none of them are local. So chances are, our lives are about to change. Once we are both jobless, aside from a couple of friends, the only thing keeping us here is the house. And as one of those friends said: "Gotta eat!" Damn straight. So the house will most likely go up for sale and we'll move. No idea where or when yet. The good news is the pretty much everything Teri is looking at comes with a decent pay increase. How the cost of living will increase is yet to be determined.

I've started waking up my headhunter network, so I'll probably go off and do some contract jobs in the meantime to bring in some money (so I can buy a better car!). Depending on the timing of when Teri finds a job and where it is, or when I do, we may be spending a fair amount of time apart this year.

As I was typing this, it occurred to me that I've been in Cincinnati for almost 11 years. This puts it 2nd on my list of "places I've lived the longest" (cities, not specific addresses). I was moved away from Anderson when I was 12, so if we're still here next year, I'll tie that record.

Go, economy!

Monday, February 23, 2009

The (Official) End of an Era

Although I lost my job back in November, the severance package worked out to be 3 month's pay. Rather than giving me that money in a single lump sum, the company elected to simply continue paying me for 3 more months. I deposited the final check yesterday.

Up till now, I've basically had an extended paid vacation. Now, I lose money. Well, technically, March 20 is the first date that I will have failed to receive a paycheck, so that is when I will really feel the difference.

I'll be honest; when I first lost my job, I thought I would have a new one by now. But the reality is that I just haven't found anything that interesting, and certainly not enough to warrant a lower salary than I previously had. I had a flurry of phone calls from recruiters in January, and even did a couple of phone interviews, but February has been pretty quiet. Few of the opportunities have been local, and most of the out-of-area opportunities have been in places with ridiculously high costs of living. I'm a long, long way from needing a job for the sake of bringing in a paycheck, so I'm not feel overly motivated to go do something that I don't find interesting. I don't want another job, I want a career. Only one single opportunity presented to me has represented a potential career, and due to the economy I won't find out if that opportunity still has life until April.

So I have mostly given up on the job search for the time being. That's not exclusively my decision, of course, as I haven't been getting too many recruiter phone calls lately. Instead, I've decided to focus my attention in a different direction.

Shortly after losing my job, I purchased an iPhone programming book, and have spent the time since trying to become an iPhone programmer. The learning curve has been brutal, and progress has been slow, but nonetheless I am making progress on my first iPhone app. I figure I'm another week or two away from having all of the raw functions that I want, then I will need to spend some time refining the interface. I have recently applied for the Apple iPhone developer program, which will allow me to conduct beta testing on phones, and eventually allow me to post my app on the store. If all goes well (and so far, it hasn't), I hope to have my first app posted by the end of March.

Assuming I do eventually get the app onto the store, I will then watch what happens for a few months. If it looks like I can bring in some money this way, then I may just give up on engineering altogether and focus on programming. Maybe I can make my own new career, rather than hoping someone else will provide me a good opportunity. I have plenty of time to find out. Wish me luck.