Thursday, August 27, 2015 [Tweets] [Favorites]

A Salute to Solo Programmers

Jean-Louis Gassée (comments):

Parkinson’s Law tells us that “work expands so as to fill the time available for its completion”. Applied to software, this means that applications tend to bloatware, obese programs whose complexity makes them nearly impossible to debug and maintain. Today, we look at happier counterexamples, past and current, of ambitious products created by “hermit programmers”.

[…]

As it turns out, the size and complexity of operating systems and development tools do not pose completely insurmountable obstacles; we still find programs of hefty import authored by one person. One such example is Preview, Mac’s all-in-one file viewing and editing program. While the Wikipedia article is out of date and tepid, the two-part Macworld article titled The many superpowers of Apple’s Preview (here and here) does justice to the app’s power and flexibility. Read it and join me in my appreciation for this labor of love from a solo, unnamed programmer who, I’m told, has been at it since the NeXT days.

[…]

Newer than Preview but no less ambitious, we have Gus Mueller’s Acorn, an “Image Editor for Humans”, now in version 5 at the Mac App Store. To get an idea of the breadth and depth of the app, scan the documentation on the company’s web site.

5 Comments

Preview is an example of going the other way in scripting. For years there was no Applescript support. (Although a terminal hack could activate some in a rudimentary form) However it seems with El Cap there is a dictionary for Preview 8.1 supporting the full text suite. I've not yet tried extensive scripting it, but a few things I tried worked fine. (Things like get path of front document) However while it says it supports the text suite I've not been able to access a lot of it. (So get text of front document won't work for instance)

Still it's progress.

@Clark Yes, Preview’s AppleScript support has always been somewhat of a mystery. Why did it for so long not support even the basic Cocoa scripting features, like TextEdit does?

Acorn is an incredible achievement.

@Clark: No, Preview.app's still not scriptable in 10.11. All they've done is flip the (misleadingly named) NSAppleScriptEnabled flag in the app's Info.plist. That activates the Cocoa Scripting framework, which comes with some default functionality for opening and closing documents and moving windows, but the app developer has to add their own code and terminology to actually do anything useful like provide access to a document's content.

See also Maps.app in 10.10. It's just a pisstake.

...

@Michael: To be fair to Preview, TextEdit has the advantage of working with textual data already represented by Cocoa's standard text system, for which CS provides (lousy) support out of the box. The TextEdit devs had very little to do themselves beyond add a text property to CS's default document class and bind that to the NSTextStorage object.

Preview has to deal with a whole range of non-textual and pseudo-textual documents - JPEGs, PDFs, etc. - so the real question becomes "What would you actually expect/want/need it to do with all these different documents?" Because all of that logic would need to be implemented by the Preview developer; and even then they'd just be duplicating capabilities already found in existing "scripting" tools such as sips and textutil, so where's the business case for making that investment? I mean, it's not like they've got a hundred thousand new AppleScript users lining up at the door chanting "take my cash".

@has I was referring to the basic Cocoa scripting (NSDocument) features of TextEdit, not working with document content.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment