Archive for September, 2009

Make it easier! – Dterm

Thursday, September 24th, 2009

I am new to git and shamefully incompetent with the Terminal. However, I am working on it.

One of the tools I came across since I began using git is DTerm. It is essentially a free floating terminal that you bring up with a keystroke.

The killer feature (for me) is once you invoke it with a keystroke, DTerm is set to the working directory of the front most document.

The other killer feature is that DTerm (v. 1.x) is free!

Quick Code – AppleScript from Cocoa

Wednesday, September 23rd, 2009

This is just something I picked up over the weekend to interface with Terminal.app via AppleScript:

NSString *s = [NSString stringWithFormat:@"tell application \"Terminal\" to do script \"cd %@\"", folderPath];
NSAppleScript *as = [[NSAppleScript alloc] initWithSource: s];

[as executeAndReturnError:nil];

The intent is pretty easy to pick up (Also, please feel free to handle the error). The question and answer can be found on StackoverFlow.

Understanding the Objective-C Runtime

Sunday, September 13th, 2009

The runtime has been a bit of a mystery to me.

To be sure, I have yet to explore some of the more dynamic aspects of Objective-C/Cocoa in my applications.

In fact, as many know, you can move along quite happily though your Cocoa/iPhone programming without directly daling with it. Others might not realize what’s “under the hood”.

If you really want to have some fun, you will need some fundamentals.

To this end, Mobile Orchard last podcast featured Rogue Amoeba’s Mike Ash who gave an overview of the runtime.

MDN also released episode 7 of the MDN Show which goes into more depth in an interview with Jonathan Dann of Sofa.

If these podcasts wet your appetite, Mike Ash has also produced a nice series of blog posts on the subject as well.

I’m sure you will find other great resources in the community as well, but this should give you a good head start.

Open Source iPhone – Glossy Buttons

Friday, September 11th, 2009

The buttons in the iPhone SDK suck. There, I said it.

Almost everything on the iPhone round, glossy and “3Dish”.

Except the standard RoundRect buttons included in UIKit.

Of course we can go off and use one of many drawing apps to crank out some nice glossy buttons, but there a few problems with this approach.

First, you have to be at least competent in using some advanced drawing tool.

Second, any buttons you create are static and must be shipped as a resource in your app. It is acceptable to want to generate multiple colors on the fly.

To solve our dilemma, we can use the work of two other people.

Matt Gallagher posted a great article on generating gloss gradients a while back.

It’s quite informative in explaining and implementing the effect. You can run a OS X app and play around with the setting.

The code didn’t quite work on the iPhone because of the absence of NSColor.

So we have two problems. First, we need to adapt the code to the iPhone. Second, we need to add this code to UIButton as a category.

Good news everyone! It’s already been done.

More than that, you can follow a 5 step tutorial taking you through the process of building the code and some explanation behind it.

The first post of the series can be found here.

I would credit the author, but I think he (or she) has gone through great pains to omit his (or her) name from the blog. (Or maybe I’m just too dense).

Update: Michael Heyeck wrote in to claim his awesome work and updated his “About” page to be a little more forthcoming.

Anyways, try it out. It works good for making glossy buttons pretty quickly and it is tweak-able.

Taking the Comcast Plunge

Wednesday, September 9th, 2009

I just moved back to Philadelphia and needed to get some internet. I wanted FIOS, but unfortunately it isn’t yet available in my neighborhood (Comcast just lost the fight to keep FIOS out of Philadelphia). Until then, I settled on Comcast.

The tech arrived promptly on last Monday morning. He was a new guy, but seemed pretty settled in and got to work quickly.

We hooked the modem directly into my MacBook Pro to perform the setup. I had a feeling this would be a problem since I would be using my Airport Extreme, but he didn’t seem to modem/internet savvy, so I just went with it.

My internet was turned on with only a small hitch and the tech went on to his next job. Total time: ~1 hour. Not too shabby. I was feeling good about Comcast.

All I had to do now was plug the ethernet cable into my Airport and I was done.

Not so fast.

I restarted the modem, no-go.

I restarted the AE, no-go.

After a few more restarts and I decided to call Comcast. A few tests and modem resets proved unhelpful. After that, the customer service rep ran out of ideas. Not long after I was disconnected.

Not a good start.

So I dialed back, got in touch with a new rep rather quickly. Unfortunately, she immediately told me they don’t support routers and to contact my router manufacturer. Nice.

(Begin Rant)

I think it is a little ridiculous for any ISP to say they “don’t support routers”. The whole business of an ISP is to deliver bytes from the internet to your browser.

Most households now have multiple computers. This is double true for homes with broadband.

If you are in the internet business, you can’t escape routers. It is just a cop out and blaming other company’s hardware does not especially endear you to your customers.

The cost to having support reps Google a router manual is almost assuredly offset by the amount of good will you bank from solvinf your customer’s problems.

(End Rant)

Now what? Well I started with Google, but nothing useful popped up in any of my searches.

Eventually, I remembered the Comcast twitter handle: @comcastcares.

Over the course of the afternoon I communicated with both Frank Eliason and William Gerth. They were extremely helpful. Frank even called me in between meetings to help troubleshoot my problem.

Shamefully, I must admit that a simple reset of my Airport Extreme fixed the problem instantly.

Setting aside my personal failures in diagnosing my own network issues, I must say I was actually quite impressed with the help I received.

With all of the criticism that Comcast receives on the internet, I was admittedly surprised.

My only hesitation in crowning Comcast “King of ISPs” is the nagging question of: “What if I didn’t use Twitter?”

I would still be in the dark, at least internet wise. I would probably be incredibly upset. Not even Comcast’s own customer service reps pointed me to Twitter. I barely remember gleaning it from some obscure tweets a month or two ago.

I’m sure the company doesn’t want CSRs pushing every difficult question to the Twitter crew, but hopefully they can get the word out a little better.

Even with that, I want reiterate that I indeed had an overall positive experience with my Comcast installation.

Comcast is actively working to improve their image with customers, and it is working.

[corey move:philly] complete

Wednesday, September 2nd, 2009

It’s been a long time and TFJL has been neglected. No more!

The Mrs. and I are finally settled down in a quite nook of Bella Vista in Philly.

Of course life doesn’t begin anew until internet is connected which, with a few hitches, was completed on Monday.

Now to think of something to complain about…