Posts Tagged ‘development’

Decision 2009: A new Mac. What’s your take?

Friday, May 8th, 2009

I need help.

I need a new Mac. I’ve needed one for a while.

I do all my developing on a Late 2006 white MacBook. Not a bad machine, but i’m a little hard on it. What’s worse? My logic board has been bad for a while, leaving me only 2 hours of battery life. I have Apple Care, but sadly I haven’t been able to spare a week to have it repaired.

I’d love to hear what everyone else is rocking for their dev setup.

I see two options:

  1. Desktop (+ External Monitor) + Light Duty Laptop
  2. Heavy Duty Laptop + External Monitor

I wouldn’t say my budget is unlimited, but I am an extremely practical person. If someone has a compelling argument for a Mac Pro, I’d get it.

Desktop Laptop combo:

iMac or Mac Pro

I’m leaning towards a high-end iMac. I think it is powerful enough for my needs. If needed, I can get an external monitor to augment the screen space. My biggest gripe right now is the lack of an LED screen (One of the reasons I am holding out for WWDC and a possible hardware announcement). I can’t imagine buying the LED Cinema Display and only having the LCD for the main monitor.

The Mac Pro feels like overkill. I know I am buying compile time, but is the saved time significant enough considering the size of my projects? The upgradability woul be awesome, and I wouldn’t need another machine for 4-5 years.

Macbook Air or Aluminum Macbook

Since the laptop would be almost exclusively for recreation, I think an Air would be perfect. I could do some light coding if the mood struck me. Of course, I think hardware update is eminent, maybe not this summer, but possibly in the fall. I can’t imagine buying one before Apple brings some of the battery tech over from the 17″ MacBook Pro. And you know the black trim is coming.

My wife has a new Aluminum MacBook (yes, a better machine than me). It is nice and light. I think it would be a more than serviceable laptop. I know the battery life is great, its just not as light as the Air.

Powerhouse Laptop:

MacBook Pro 17″

There is only one choice here. My 8-hour seductress. This is an awesome machine, I just picked one up yesterday and it is surprisingly light. I would have to lug it back and forth to work and I absolutely need the 24″ cinema display. I know I would be sacrificing some speed and screen space, but I could work anywhere.

So, what’s your pick?

iPhone code snippet: Phone number formatter

Thursday, May 7th, 2009

If you have had to create a text field for a user to enter a phone number, you may have had to do this yourself.

If not, this snippet may save you 15 minutes. Set the keyboard type to phone pad and add these 2 methods to the delegate of your text field. This code does rely on a UITextField category method: fullRange. You can implement this yourself, it just returns an NSRange representing the entire string.

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{

    NSMutableString *localText;

    if(range.length>0){

        localText = [[textField text] mutableCopy];

        NSRange deletionRange = [localText fullRange];
        deletionRange.location = ([localText length]-1);
        deletionRange.length = 1;
        [localText deleteCharactersInRange:deletionRange];

        phoneNumber.text = localText;
        [localText release];

    } else if([[textField text] length]<13){

        if([[textField text] length]>0){

            localText = [[textField text] mutableCopy];

            [localText replaceOccurrencesOfString:openParentheses withString:@"" options:NSCaseInsensitiveSearch range:[localText fullRange]];
            [localText replaceOccurrencesOfString:closeParentheses withString:@"" options:NSCaseInsensitiveSearch range:[localText fullRange]];
            [localText replaceOccurrencesOfString:dash withString:@"" options:NSCaseInsensitiveSearch range:[localText fullRange]];

            [localText appendString:string];
            self.phoneNumberString = [[localText copy] autorelease];

            [localText insertString:openParentheses atIndex:0];

            if([localText length]>3)
                [localText insertString:closeParentheses atIndex:4];

            if([localText length]>7)
                [localText insertString:dash atIndex:8];

        } else{

            localText = [openParentheses mutableCopy];
            [localText appendString:string];

        }

        phoneNumber.text = localText;
        [localText release];

    }

    return NO;

}

- (BOOL)textFieldShouldClear:(UITextField *)textField{

    phoneNumber.text = @"";
    return NO;
}

App Store sales figures for our iPhone app, Compounds

Monday, April 27th, 2009

Finally, after my promise, I have gotten around to tabulating some data. I won’t delve too deep into the analysis of Compounds‘ sales figures. I will be dipping into greater detail in another post. For now, I just want to get our sales figures out, hopefully, to assist other developers in estimation of their own sales.

I’ve used Numbers to graph our sales for the import range of data. These figures are AFTER Apple’s 30% rake. I’ve also placed some significant markers that properly scope the data.

Sales

April 11th and 12th were a Saturday and Sunday, which are traditionally poor performing days for our work-oriented Chemistry app. We did have a few sales, but they were, in fact, our worst 2 sales days since we launched Compounds.  For reference, are sales were normally a modest 5-15 units a day. (Edited)

Tuesday, April 14th was an awesome and welcome surprise.  I honestly was a little down about out app until this happened.

You can see another significant jump on the day we decided to reduce the price of Compounds to $0.99. The effect of dropping the price just $1.00 was astounding.  In retrospect, I probably should have reduced the price earlier to make it into the top 100. Ahh, hindsight…

Lastly, is next Tuesday, when we moved to the second page. What a difference a single click makes.  You can see we approaching a asymptote near $100 a day, which I would be extremely satisfied with.  For our first released app, I am extremely pleased.

In another post, I’ll also compare this data to our popularity within the Productivity category.

Transitioning from Mac power user to developer

Tuesday, April 21st, 2009

It’s a seemingly natural transition. The more you use the platform, the more you want to learn. This is a path that almost  inevitably leads to application development. Maybe not in a professional context, but many will at least dabble in AppleScript or create some freeware out of need or desire.

For me, this was accelerated by the iPhone SDK. It is a simple sandbox that allows beginner programmers to have a chance to focus on a well defined set of functionality and features.  Moreover, it provides UIKit classes that do the visual heavy lifting. In my opinion, it is the perfect environment for a fledgling programmer.

The ecosystem created by Xcode, the SDK, iPhone Simulator, Instruments, etc… has allowed many programmers to not only write, but also distribute apps with an ease that has never before been seen in world of software publishing (at least not in my limited knowledge of this area). Of course, the downside has been the flood of $0.99 apps that are negatively impacting the App Store.  Additionally, developers have given up a large amount of control, but many of us new to the game didn’t know we lost.  In regards to bringing new programmers to the platform, the overall effect seems positive.

Just being a curious Mac user has afforded me a great opportunity. Mostly, I’m just grateful I have a chance to be create my own company and be my own boss. Which, while not impossible, would have been much more difficult without the iPhone.