July 5, 2005

I will insult your code!

I'm mentoring an innocent man who I met at WWDC (we call him Dean Cain) in the finer points of programming Cocoa (he's an ex-Java guy), and he suggested that my mentoring might serve a larger audience. I thought about it, and realized (a) I like talking about how right I am, and (b) I like insulting people, so it seemed like a natural fit.

So, I thought I'd try an experiment. I don't know if this'll work, but, hey, nothing ventured, nothing chopped off and sold on the black market in New Guinea.

Send me a snippet of your code Objective-C Cocoa code -- from a single method to an entire file -- something that works, at least sort of, but maybe isn't as clean as you like. I will mercilessly tear it apart in my blog, and from this you will learn my style.

Obviously, if you don't have any faith in my style, this offer holds no allure for you, and I urge you to move on. I'm going to spend zero time justifying why you might want to listen to me, so if there's nobody out there that wants to learn things my way already, then this will be a very short experiment.

This isn't about me debugging your code, this is about me trying to teach the techniques of writing readable, beautiful, maintainable, minimal code, such as I've learned them.

I must warn you that it may seem like I'm kind of mean, because I don't say a lot of "this is interesting, but maybe..." It'll be more like, "NO! Don't do this! DO THIS! BECAUSE I AM THE MOMMY!" (Let me know if you want me to use your name or not. By default, I will not, but if you seek a perverse kind of fame, let me know.)

The e-mail address I'll use for this is my initials (William J Shipley) at Apple's mail destination -- mac.com.

Labels:

7 Comments:

Anonymous Samo Korosec said...

Great idea! Looking forward to some interesting articles, as there's generally a lack of interesting Cocoa resources on the net.

July 06, 2005 6:58 AM

 
Blogger bbrown said...

Kind of like American Idol for the Cocoa crowd?

July 06, 2005 7:15 AM

 
Blogger Mike Lee said...

...except the advice will be something more useful than "get good."

July 06, 2005 8:26 AM

 
Anonymous macFanDave said...

Thanks for pointing out that potential memory leak in the method I sent you, but why did you have to say that my father smelt of elderberries? Was that necessary?

July 06, 2005 9:59 AM

 
Anonymous Tony Jensen said...

This is great. I am new to Mac development and am looking forward to this code ripping series. It is a series, right?!?

July 06, 2005 12:46 PM

 
Anonymous Anonymous said...

You like insulting people?
Come on Wil. You must try harder. How about...
"Java is a four-letter word"

Mmm. Actual Objective-C to follow from me sometime. But I've read some of the stuff that wjs+kc+tjw et al released under an open source license. The lesson that that code taught was how to subclass effectively; anybody posting "a snippet of your Objective-C Cocoa code -- from a single method to an entire file" might not be posting enough for you to show what can be done.

July 06, 2005 1:08 PM

 
Anonymous Anonymous said...

Obligatory:

You have the weakest link, goodbye!

July 06, 2005 2:28 PM

 

Post a Comment

<< Home