Cocoa Radio Interview

I was recently interviewed by Blake Burris from CocoaRadio. If you haven’t heard about CocoaRadio before, be sure to check the archives for interesting interviews with other Mac developers. Thanks of course to Blake for taking time to do this.

I felt a need to clarify/augment a few things I said, nothing too big.

  • Number of people with commit access to the bundles repository: the actual number is 71 (I said around a hundred).

  • Release early, release often: The software update framework I mentioned was Sparkle by Andy Matuschak. TextMate doesn’t use it mainly because my own stuff predates the work of Andy. In addition to making it easy for your users to update, you should make it easy for yourself to release new versions. That means, write a script that takes care of everything related to pushing out a new build. That is, run the deployment build, package it, upload it to your server, and have it update the file/feed in which you link to latest version. I am using a makefile for this because it is easier to split up the process into various steps and re-run only one or some of the steps as necessary. You may want to create a test feed on your server for new versions, that way you can start by pushing the update to that feed, and after verification, to the actual (public) feed.

  • The full (boring) list of software I regularly use: Adium, Colloquy, Finder, GeekTool, iTunes, Mail, OmniWeb, Quicksilver, ReminderMate (something I wrote primarily to tell me when the tea is ready), Terminal, and TextMate. I have an EyeTV, so I also run their controller software.

  • Music I listen to: the genres I enjoy (while programming) are (in a nutshell) ambient/dark ambient/introspective, singer/songwriter, and trip-hop. I have a smart playlist which shows all music played within the last month, and it currently shows 2,265 items (7.8 days worth of unique music), so I wasn’t kidding when I said I have the stereo on 24/7. I have created an empty playlist in iTunes and set Party Shuffle to source that. That way, when the PS runs dry, it won’t start playing random tracks (I dislike listening to random music). I have the default action for music (in Quicksilver) be “Play in Party Shuffle”, so I can do: space, B, →, select artist, select album, and then return (). If something is already playing, I press ⇧A instead of return to have it do “Add to End of Party Shuffle”. I also have ⌘5 (on the numeric keypad) do pause/play in iTunes (⌘4 and ⌘6 are previous/next, and ⌃⌘0-5 are rate with 0-5 stars).

  • Generic programming: I mentioned that I am a fan of STL/generic programming. I haven’t seen any good written introductions to the topic. Part of the problem is that C++ syntax isn’t always the most user friendly, and generic programming is a paradigm, not a syntax thing, so it’s not easy to write a tutorial that grabs the reader and makes him think that this is it — it took me probably a year from adopting STL to really master it (and I learned new stuff throughout this period). There is a good interview with Alexander Stepanov.

  • Lack of Intel native Photoshop: I came off as accusing Adobe of being inefficient and not caring about their product (and that this was the general case for big companies). I feel this was too condescending. I do think that passion is easily lost in a big company, because when you reach a certain point, it’s more about marketing than the product, and when you reach a certain team size, you have people leave and join the team a lot, and no-one feels a real responsibility for the code, because no-one really wrote it, and too much of it was done by someone who is no longer there, and did a sub-optimal job, but no-one wants to spend their time fixing it. Of course I have no idea how things actually work at Adobe.

  • Number of licenses sold: I said I hoped to reach the five digits in a few months. I will actually sell license number 10,000 in roughly two weeks time. That makes for an average of 16 licenses sold every single day, since the initial 1.0 release in October 2004. That also means that when you write that “if you do X, I will buy a license”, you have a rather weak bargaining chip on your hand ;)

  • The things I hate (hate here means: “do not fanatically love”) about Cocoa: I was interrupted by Blake, so I only got to say the one thing, which was the retain/release system, which in itself is not bad, but it is when coupled with something like bindings, because retain cycles can easily occur, and they are sometimes very hard to avoid. A similar problem exists when you want a tree data structure where nodes have pointers to their parent, for easy removal, but here at least all connections are in the user code. The other thing I hate about Cocoa is the first responder field editor and cell system. I plan to write a longer entry (on my other blog) where I will go into detail. For the records: Cocoa is fantastic, and I could not have done a better job myself!

So that was it (I think), feel free to use the comments for anything you want clarified or follow-up questions. Just don’t ask when 2.0 will be ready ;)

14 Comments

  1. 01 May 2006 | # David wrote…

    How is 3.0 coming along? :D

  2. 01 May 2006 | # Joachim wrote…

    Great to hear that you're considering open sourcing the TM framework! Believe it or not, I've been thinking about asking you just this over the past few days, because I need to implement a text editor in my app, and I'd love to leverage on TM's magnificent editing features.

    Joachim

    P.S. If you ever come to Vancouver, let me know, and I'll take you out for a local beer.

  3. 01 May 2006 | # Andreas Wahlin wrote…

    The most I got out of this was probably the empty playlist thing in iTunes :) The only windows app I ever miss since switching is Winamp, to me, iTunes doesen't stand a chance interface-wise. I hate not having a "now playing" list that I can reorder as I see fit and party shuffle is the closest thing I can come. Now, would it be possible to have some apple-script that checks if something is playing and then appends to party shuffle if it is, or begin playing if nothing is playing?

  4. 01 May 2006 | # Thomas Aylott wrote…

    Does DHH still help you develop TextMate?

    I wonder if any of the bundles were written by him.

  5. 02 May 2006 | # Allan Odgaard wrote…

    Thomas: he did the initial Ruby and Rails bundles. And our cooperation stopped after the 1.0 release — he has his own things to work on :)

  6. 02 May 2006 | # Marshall Elfstrand wrote…

    I'm interested to know what you dislike about the first responder system. Is it the concept or the way it's implemented? When I was first looking at Cocoa, the first responder concept seemed to me to be one of the more brilliant inventions (having had to deal with tracking focus and writing my own cut/copy/paste routines in other GUI environments). But I haven't done anything really serious in Cocoa so I wouldn't be as aware of flaws in it.

  7. 02 May 2006 | # Allan Odgaard wrote…

    Ups… it should have said field editor, not first responder. The first responder system is indeed ingenious! :)

  8. 02 May 2006 | # Justin wrote…

    Great interview, Allan. I'm the developer of Pukka, which Blake mentioned. You're success is an inspiration — and it sounds like you're having fun doing it. That's the best part.

  9. 03 May 2006 | # Andy Matuschak wrote…

    Thanks a lot for the Sparkle plug in the interview, Allan! :)

  10. 04 May 2006 | # Martin Winter wrote…

    In the interview, which I enjoyed very much, you mentioned that somebody should write a decent mail application. I'd like to know what exactly you mean — what is it that you don't like about current apps and what would you like to see in a potential future one?

  11. 05 May 2006 | # Charles Parnot wrote…

    You got me intrigued by what Generic Programming is and I read the interview you link to (btw, maybe this link from the interview can be some kind of intro to those concepts: http://www.sgi.com/tech/stl/table_of_contents.html).

    Anyway, I was wondering if you were using any of these concepts in TextMate's implementation, and/or if you see any possible implementation of these concepts into ObjC (its dynamic nature might be a plus, but it is likely that it would also make an implementation slower).

  12. 05 May 2006 | # Dan Kelley wrote…

    Allan, I really enjoyed the radio interview. I also enjoyed — and recommend to others on this thread — the interview with Alexander Stepanov. I laughed out loud at the new (to me) acronym MOP … money oriented programming .

  13. 08 May 2006 | # Allan Odgaard wrote…

    Martin: I posted my reply in the form of a new blog entry.

    Charles: Yes to using generic programming in TextMate.

    The core of the application is an STL conforming container which expose only a handful of member functions, and the storage is accessed through iterators. This means that I can use all the standard library functions on my text storage, which I do a lot. It also means that everything I build on-top of it, is ignorant about the actual storage, which means they function on whatever unit they are given as input (via iterators), be it current word, line, selection, column selection, or entire document.

    This might just sound like abstraction, but the beauty is that this abstraction has zero overhead when it comes to both performance and more importantly (IMHO) syntax.

    For example advancing the caret to the next space is just a matter of:

    caret = std::find(caret, document.end(), ' ');

    What’s important to notice here is that std::find is not a function I wrote. It is a standard re-usable algorithm from the standard library, unlike e.g. Foundation Kit, where each container has its own indexOfObject: and related methods.

    Being able to use standard functions like that not only cuts down on the amount of code I have to write, but it is a clear testament to the interchangeability of things with STL, which is a tremendous win when trying to keep the complexity and inter-dependency of components to a minimum.

    As for bringing these concepts to Objective-C, I don’t really see it working. There would of course be a performance penalty, but the syntactical overhead would also be big. The fact that Objective-C is very dynamic is partly responsible for this, because the C++ compiler does a lot of work compile-time to make the proper choices, e.g. select the proper function/operator to call based on argument types or which namespace arguments are from, perform implicit type conversions when necessary, handle proper construction and destruction of all stack-allocated resources, including potential member data for such (and even does proper deconstruction when exceptions are thrown during partial construction), etc.

    STL makes use of close to every single C++ feature, and C++98 had a lot of stuff added solely to better support STL concepts. So without the C++ compiler, one would first have to re-implement what it does, and I don’t think that is feasible with Objective-C.

    As I see it, Objective-C and C++ solve problems in two different domains, and so does it rather differently.

  14. 09 May 2006 | # Charles Parnot wrote…

    Thanks for the insightful answer, Allan!

Comments closed, you can use the mailing list for discussion.