I’m coming up on five years of steady Mac OS X usage and anniversaries are a time of reflection, so I went back to read my first significant article about Mac OS X.
There’s something missing from this first analysis. See, there was one killer app that I’d been dying to try out on the Mac platform and the lack of any mention in this first piece is strange to me.
It was BBEdit, people. I’d been longing to seriously develop against this editor since a brief QA stint at Symantec in the early 90s and when the time finally arrived where I had a professional reason to do so, the editor just didn’t stick.
Yes. I’m doing less coding and more managing in my current incarnation, but I use some type of editor on a daily basis, so why the constant stream of semi-criticism of an application that so many people love?
The answer is TextMate. As I wrote about in Bright, Patient Design, this editor has filled the editor vacancy on my Mac OS X desktop and I was happy to interview its creator, Allan Odgaard, to learn more about the development of my new favorite tool.
RANDS: Tell us the story of the moment you decided to develop a new editor for Mac OS X.
ALLAN: It wasn’t a singular moment. It was having worked with the Mac for maybe half a year that lead me to the conclusion, that if I wanted to make shareware for the Mac, a text editor was something where there was no native offerings, so definitely a niche to fill.
It might seem I little harsh to say no native offerings, but everything based on NSTextView is generally not much more than NSTextView which, while one of the best text editors that comes with a GUI kit, is not a feature packed editor for the power user.
As for dismissing the Carbon editors which did exist: at that time Carbon did not support sheets and drawers, did not use the standard key bindings infrastructure, often used the older Classic spacing guidelines, etc. So for me (a “switcher”) they often felt a bit out of place.
According to Wikipedia, you did 5 months of development to get a 1.0 release out the door. How’d you pick the feature set for this first release?
It was actually more like four months though I had experimented with various editor related stuff prior to that, but did start basically with a clean slate.
At that time, the primary goal was to get something released, so the features were mostly determined from a “do we really need this for 1.0?” As motivation (for writing yet another editor) I did however need 1.0 to have foldings, snippets, and recordable macros.
How has BBEdit (or other editors) influenced the design and feature set of TextMate?
A few of the things which definitely did influence me when I wrote TextMate were:
- CygnusEd: this is a very simple Amiga editor which I used a lot. It taught me the usefulness of recordable macros and how a few simple basic tools is generally better than specialized ones. As of such, you could say that initially I wanted to recreate CygnusEd for the Mac, but add features such as syntax highlight, foldings, snippets, and similar.
- VisualAssist: this is a plug-in for MSVC++ and it adds things like auto-pairing of brackets, re-indented pasting, and a lot of other neat stuff. Before I tried this plug-in, I probably would not have touched such smart features, because I would think they got in the way. But VisualAssist blew my mind, and it still does!
- NEdit: I used this at the university for everything text related, and while I was not a power user, I once took a look at how it did language grammars, which it did pretty free form, and that has stuck and was my outset for TextMate’s language grammar system. Also, the ability to execute the current line as a shell command and move around a column selection, I loved that about NEdit as well and added that to TextMate.
A big non-editor inspiration was CSS selectors which is what I recreated as scope selectors. The first time I read the CSS specification I was pretty excited to try out the concept. Unfortunately I did not have access to any browser which implemented it, so I started writing my own implementation, though I never got very far with it. Still, a seed had been planted and on an unconscious level I have probably tried to find a place where I could implement them, ever since.
There’s something very satisfying that TextMate has built-in software update. Was there any special reasoning behind this feature?
Yes, this comes from me wanting to push frequent updates, but not inconvenience the user too much. If there’s too much manual work, the user might not appreciate frequent updates and might either choose to receive less of them or just feel annoyed.
That said, it was actually Nicholas Jitkoff (of Quicksilver fame) who was bugging me about having to do the manual work each time. But I wouldn’t have spent as much time on it had it not been for what I mentioned above.
Do you have a favorite pet feature?
What I really like myself about TextMate is the infrastructure, but there are two things which comes to mind, probably because they both act as enablers:
1. The ability to switch a normal selection to a column selection by tapping the option key once. For me that upgrades column selection from something I occasionally use to something I use dozens of times each day, even with columns that span only two rows.
2. The ability to have a command receive “current scope” as input. For me this exemplifies the abstraction I am pursuing with TextMate: you want a command to uppercase a string? Make the command (tr ‘[a-z]’ ‘[A-Z]’) and set the scope selector to ‘string’, input to ‘current scope’ and output to ‘replace’. While this action is contrived, it illustrates how everything unrelated to the task of ‘uppercasing the current string’ is irrelevant to the command. In all other editors (that I know of) you would have to write code yourself to find the string delimiters, and then you have the problem that these can be defined differently for different languages.
From your profile on the Wiki, you state you have a skepticism regarding the HCI field. Where does your skepticism lie?
Let me start by saying that I think understanding human cognition is very important for good software design. My skepticism about the HCI field comes from the fact that it is often hard to quantify the quality of results because a lot is subjective and subject for interpretation.
At one point I was semi-employed by a Ph.D. student (of HCI) which wanted me to log all sorts of data so that he could look for patterns afterwards. This is fine in some situations, I have just seen too much of it, and too little aggregated theory, instead there is a lot of common sense and a few authors making a fortune writing about it.
Do you plan to release TextMate as open source? If not, what’s your exit strategy, if any?
I am extremely torn on this issue. I have a lot of things I want to see happen with TextMate and there really is too much for me to do this all alone.
So one option is to hire programmers and basically build a company. Is this something I want to do? Maybe, but running a company requires a steady cash flow. Hiring good programmers can be difficult, and hiring a bad programmer can turn out to be worse than not hire anyone at all, but you will rarely know in advance.
It also requires me to spend time communicating my ideas and do a bit of micromanagement as I probably can’t just hire five programmers and say “make TextMate better” and expect them to know what that means.
On the other hand, the current model (where I do all the work) is not really working as in, it does not scale, and already I have people to help me out, not just for bundles but e.g. while I am on vacation I have other people handle support etc.
So the company slowly becomes a necessity. But you asked about open source, open source I have considered for a few reasons:
1) TextMate already has open source components and it occasionally bugs me that I can’t just point users at the source.
2) I said above that I don’t want to micromanage. When I delegate a job, I expect something specific and if I do not get that I might sometimes be a little disappointed. With open source I am not asking for anything, meaning I will get things I did not ask for, thus I will probably be positively surprised, and the things I may get, will sometimes be things which never occurred to me, thus even with infinite resources, I would not have asked for it (look at Microsoft, they have the closest you get to that, and they do not know what to ask for, so they do not get it, and thus have software which is bad and/or imitations of other products).
So what is stopping me from open sourcing TextMate? Basically two things:
1) if TextMate is open source, can I make any money?
2) if TextMate is open source, will people actually contribute?
Going the company route does not present these problems and I would be able to ensure that TextMate becomes what I have in mind.
Presently I am thinking of both things as possible scenarios, and I am consciously moving toward a modularized architecture that will allow me to test these things in a smaller scale. For example, making some modules open source while hiring people to work on other modules.
Do you have a feature roadmap and, if so, what are your big ticket features of the next six months?
As I mentioned above, the stuff which I get the most excited about myself is the infrastructure.
Things in TextMate are generally triggered when the user does some form of interaction. For example, pressing a key, dragging a file to the edit area, or typing a keyword followed by tab and then based on the structural context (e.g. are we inside a string in a source file?) which TextMate knows about from having parsed the document, some action will fire, like running a command or inserting a snippet.
This simple system has allowed a plethora of cleverness in the form of bundle items, and TextMate 2.0 (though the ETA is not within the next six months) will make the parser able to work with more complex document types, have scope selectors select more than just the structural context, have commands fire for more than just file dropping, key equivalents, and tab triggers.
These improvements to the existing infrastructure will allow for a lot of cool new things. I am deliberately being a little vague on what exactly they are since people have started to copy my ideas, which I have nothing against, I just want to be the first with the implementation.
The design of TextMate is one where you discover what you need rather than features being shoved down your throat. Isn’t there a risk here that a good feature might never be found?
Certainly. One of the reasons I do the screencasts is to educate users of features which might not be easily discovered.
But I don’t think it is a problem that users do not find specific (cool) features unless the feature they do not find is fundamental, like opening files, or something they miss and have spent more than 20 seconds looking for.
I do consider how features can be made more visible, but if you enumerate the features in TextMate there is probably around a thousand, depending on what you count, and most users would be hit by information overflow if all features had an equally prominent visibility.