Brent Simmons On Large Cocoa Projects

April 25th, 2007

Brent Simmons shares a good deal of wisdom in his post about managing a large-ish Cocoa project. In particular he’s referring to NetNewsWire, but his advice is especially pertinent to me now that I own and maintain a rather substantial number of source files that were designed and authored by Brent (MarsEdit, for anybody late to the party).

I love the emphasis on “researchability.” He points to the fact that projects of a certain size become impossible to keep in your head. So when you go to work on any particular subsection of the app, you need to be confident that you’ll find your balance quickly so you can get on with your work.

In particular, I liked the suggestion that weak binding in the form of notifications or key-value observing can be detrimental to researchability. Brent notes that the weak binding makes it difficult to mentally follow the source code, so it can be prudent to strongly bind classes that are otherwise useless without each other.

He also reminds us of some good IDE habits for maintaining code. I was glad to be reminded that the function popup in Xcode is keyboard invokable (as Brent says, “Every time you touch the mouse, God kills a kitten.”). This is very cool because with keyboard navigation of the menu you can quickly jump to a method by name.

Another tip he reminds us about is the “Open Quickly” option (cmd-shift-D). I use this feature frequently, but not in the way he describes. It’s infuriating that when you want to “open quickly,” the dialog for typing in the name of a source file doesn’t tab-complete. Imagine how much more powerful it would be if you could type “MyPic<tab>” and get “MyPictureThingyController.h”. Having to type the whole name of a file in removes most of the quickness. When I use the shortcut, I do so with the cursor inside the quotes or brackets of an include line. When invoked in this context, Xcode is smart and just jumps to the desired header file.

Update: Quentin over at Rogue Amoeba noticed this shortcoming a long time ago, and developed an Xcode plugin to address the problem. Check out Xcode Open Quicker.

Free Idea: Cooperative Advertising

April 21st, 2007

Update 4/24/07: Om Malik asked me to write a trimmed down version of this article for his Found|Read site. It was a great honor to be asked by Om to contribute, and hopefully this will get it a little more exposure among web-types who might be able to help make it a reality!

Original Article below:


I’m tired of suffering under the weight of all of my brilliant ideas. Just joking. Mostly.

I’m sure that most of the ideas I have aren’t particularly unique, but once I have the idea, I find it difficult to resist the temptation to implement it. I am hoping that by sharing ideas with the public, I’ll get them out of my mind and spark the ambition of some other developer/facilitator.

Today’s idea is pretty simple. As small Mac businesses who earn most of our revenues through the web. What do we need in order to achieve these revenues? Only three basics spring to mind:

  1. Development labor in coding and testing, to produce a compelling product.
  2. Customer support labor, increasing the odds of an ideal user experience.
  3. Marketing investment and labor, increasing the total number of ideal user experiences.

Some developers mistakenly assume they have accomplished the first two, and move quickly into marketing their fundamentally flawed and poorly supported products. This is a good way to burn through what little revenue is coming in. Worse, it can be difficult to judge for ourselves whether our products are “ready to pop.”

I think the situation would be helped if there was more fluidity between the lowest level of financial commitment (blogging, participation in internet fora, etc), and the pricier options. When is it worth the investment risk of a print ad in Macworld, for instance?

It’s often pointed out that the Mac developer community is just that, a community. We take it for granted, but it seems unusual that a large collection of people should be so simultaneously devoted both to money-making and to helping each other out. Frankly, it’s one of the things that prevents development on the Mac from becoming a grind: the fact that even your biggest competitor will probably sit down with you for a friendly chat. Heck, they’ll probably even buy your lunch!

As a community, we share lots of things ranging from advice, to icon designers, to source code. But we don’t share advertising. Why is that?

The one thing every Mac developer has in common, regardless of our particular emphasis, is some number of loyal Mac-loving customers who visit our web sites regularly. Yet when visitors come to our sites, unless we’ve specifically called out a colleague’s product, they only see our products. This is good, but chances are they already know about our products.

Enough! What’s the idea?

OK, I know I’m rambling! Enough preface, here’s the idea: a network of Mac-businesses trading a tiny patch of our web page in exchange for the cooperative advertising of our colleagues.

Think The Deck, without the money. I’m envisioning a scenario where a central server dispatches ads to participants. For every ad a viewer sees on your site, one of your ads gets displayed to a viewer of another participant’s site. The degree to which your ads get shown is directly proportional to the number of viewers you bring “to the collective.” So slightly bigger companies get lots of exposure across the network, while even the tiniest of companies at least gets occasional exposure on a big site.

To head off some obvious criticisms, I would propose a few required features for 1.0 of this service:

  1. Participants must be vetted by some high-level filter. This could be as simple as one person giving the go-ahead for new participants, or as complex as the existing cooperative approving by majority any new participant. The idea here would be to prevent utterly inappropriate members.
  2. Participants would have “line-item veto” on any participant’s ad appearing on their site. Inevitably there will be some marketing that you simply don’t want to have showing up on your site. For instance, BBEdit probably doesn’t want to promote TextMate, Sandvox doesn’t want to promote RapidWeaver, etc.
  3. Perhaps participants could also take the “opt-in” approach. Imagine a menu of cooperative members, from which a member could check on or off the inclusion of ads for their “feed.” The resulting URL would encode the ids of the specific companies whose products should be included.

Another problem to tackle would be questions of ad format. I’m expecting there would be a single specific size and content. Perhaps as a condition of admission to the collective, the joining member would have to propose a mock-up of exactly how they would display the ads on their site.

Take a look at my blog and you’ll see a few “Try My Products” items at the right side of the page. I would be happy to list a rotating product from a reputable company that I trust, in exchange for the privilege of being exposed to their customers. Rogue Amoeba, Flying Meat, Outer Level, Bare Bones, Karelia, Martian Technology, Sci-Fi Hi-Fi, Atomic Bird, Clickable Bliss, Panic, and many, many others would easily get my approval. For those I wasn’t familiar with, I could go download and try for myself before I decided to “endorse” them or not. Think of all the customers everybody else has, that you don’t.

OK! The idea out of my head. Now somebody go do all the hard work and I’ll join.

Update: In case some web-savvy person does pick up the ball here and start developing something, I’d like to suggest some development guidelines that would make this project maximally beneficial:

  1. The project should be deployment-independent. That is, the project source code should be useful for us in the Mac community, but another group should be able to install the same software and host a “Rails-Centric Ads” network, or whatever.
  2. To that end, maximum compatibility with server software should be a design consideration. So I don’t think this should be in Rails or Django. It should be done in something commonly available on all hosts. My naive perception is this means it should be straight Perl, PHP or (non-Rails) Ruby. Something I can drop in and easily configure for my “collective” to then create an account and request membership.

Update 2: Answers to some common questions:

Some people have been inquiring as to “what if” certain scenarios are met, how should they be overcome? My answer in general is “forget about it until after 1.0”, but to quell some certain concerns, here are some further refinements to the idea.

Q: What happens at the beginning when nobody has any credit to have their ads shown?
A: The situation is general, not just applicable to the beginning. The system needs to have a “tank is empty” behavior that helps to jumpstart the quid-pro-quo ad trading. I propose that the default behavior for an empty tank should be to just pick a random ad and show it, debiting the ad “vendor” as usual. So at the beginning if companies A, B, and C are all at 0 credit, company A will show a random ad C. Now A has 1 credit, B has 0, and C has -1. This should be a good enough policy to get things rolling.

Q: But what if one company is just spanking everybody in terms of ad shows, and the others can’t keep up in credits?
A: The cited scenario is that some company shows so many ads that the rest of the companies combined cannot possibly earn enough credits to allow their ads to be shown. This might be an artificial imbalance. The odds of one company outnumbering all the others combined is probably easily solved by simply adjusting your collective membership. But to address this issue in the system might be a good idea. I think it could wait for post-1.0, but the idea would be that after some threshold of disparity (the big site is basically showing ads and causing all other publishers to get negative credits), the big site’s ads should be switched off, so that it’s no long earning credits, and no longer deducting credits from the smaller guys. In this state I would suggest that the big site be served its own self-promotional ad, or optionally a “public service” ad from a set agreed upon by the collective. (Could promote open source Mac products, etc).

These questions were motivated by discussions in IRC by Jan Lehnardt, who has commented below that he is willing to implement the 1.0 version of the system, provided he gets enough donations ($500) to buy himself an ADC Select membership. I am impartial to who implements it. I only hope that somebody implements it as an open source project that I can deploy on my own if I choose. It would also be nice if they include me as an idea-motivating credit.

MarsEdit 1.1.8

April 20th, 2007

MarsEdit 1.1.8 continues the steady progress of the product with a number of bug fixes and usability enhancements:

  • Make sure newly added custom tags items show up in popup menu
  • Follow HTTP redirects when autodetecting
  • Improve reliability of category syncing by limiting concurrent server requests
  • Improve unicode blog support by defaulting to “Don’t Encode HTML Entities”
  • Improved keyboard navigation of posts and blogs lists
  • Add “extended” content to default preview template
  • LiveJournal specific:
    • Add auto-detection for LiveJournal.com blog addresess
  • Blogger specific:
    • Enable support for new enclosure support
  • Drupal Specific
    • Fix to properly support MovableType-style categories
  • Metaweblog specific (e.g. SquareSpace)
    • Fix category list retrieval

Saying Goodbye To Apple

April 19th, 2007

Buzz Andersen has written an emotional and truthful announcement of his departure from Apple. Congratulations, Buzz! Best of luck to you. You’re going to do great things.

I got to know Buzz online, through his blog and through occasional chat sessions on IRC. As it happens, I moved away from San Francisco just before I got to know a number of people online who I wanted to meet there. But since I visit often, it came as no surprise that I ran into Buzz one day at a cafe in San Francisco’s Mission District. I was sitting with my coffee when Buzz sat down a few chairs away. I recognized his resemblance to an online photo and introduced myself. He snapped this photo of me. Afterwards, we walked down to Mission Street, caught a large street protest, and then I took him to my favorite thrift store.

I was relieved that Buzz didn’t hold any personal grudges against me. After my public critique of his decision to bow out of an interview with Cocoa Radio, he would have been entitled to. He was feeling the pressure of forces inside Apple. I was feeling feisty, probably partly because I had felt similar pressures as he was then responding to. My provocative post was sassy enough to warrant a vendetta, but Buzz showed no signs of holding one. I was grateful for that.

A lot of the themes in Buzz’s blog entry hold true for me as well. The desire to work for such a great company contrast with the lure of indie-freedom. Most people think I’m being dramatic when I say that I have regular dreams about my time at Apple, but it’s true. I have at least one dream per month. Surreal dreams about fantastic Apple office buildings, where my old co-workers behave somewhat more like characters from Twin Peaks. I’m always pleased in my dreams to be back in the comfort of my Apple life. These have become a regular staple in my subconscious life. A replacement for the “showing up to school naked” dreams of earlier years. That company put a spell on me, and it’s not likely to wear off any time soon.

I’m sure it’s true for Buzz as well. As he pulls away from the safety and comfort of that great Cupertino establishment, he isn’t leaving Apple behind. He’s taking a little piece of it with him, to share with the rest of the world. Good news for the world.