Bean: A Word Processor for OS X

return to homepage

origins of Bean



In case you're curious, this is how Bean: a Free Word Processor for OS X came about.


I used to write a lot of fiction, but at one point I hit a wall. While sitting and staring at an empty word processor document, I wondered how possible it would be to create a word processor that works just the way I do. And so, I set out on the path that would lead to the creation of Bean. I suppose this is why painters sometimes resort to mixing their own pigments, why fiddle players resort to making their own fiddles. It's certainly not necessary for what they do; yet, the process of creating the tools needed for a medium serves to deepen one's understanding of that medium. In fact, this pattern has emerged in my life: I create in order to understand.


There are many people who use Text Edit and wish it had a live word count and adjustable margins. But the user interface for Text Edit stems directly from Cocoa's text object and the Objective-C messages it expects. With Bean, I strove for beauty and user-friendliness, so I began with the interface and worked backwards. Even so, Bean is just a wrapper for Apple's NSTextView object, which itself is a refined version of the text object NeXT developed about twenty years ago. Also, all document format conversion in Bean is handled by Cocoa. So all of the heavy-lifting in Bean programming-wise is done by OS X's native frameworks. They are a real treasure.


In planning Bean, I studied "Lean Word Processor Specifics," by Marten van de Kraats. Also, I took his advice and studied the old, beloved word processor WriteNow, which van de Kraats and others have called 'the best program ever written.'


Pretty much, I was able to implement all of van de Kraats specifics:


• RTF and HTML formats

• remember cursor location

• spellcheck (free with OS X)

• find and replace (free with OS X)

• document and selection word count

• ruler (free with OS X)

• page breaks (free with OS X)

• insert pictures

• headers and footers

• separate controls for font and size and paragraph styles (in the Inspector)

• show invisible characters

• page view option

• change view size (zoom)


Something I decided to skip, after much soul-searching, is footnotes. Adding footnotes is difficult for a number of reasons. For one, Apple's RTF implementation doesn't understand footnotes, although this can be overcome. Also, the algorithm for balancing footnotes with text becomes more and more complex in extreme cases. For instance, the first five words of a long document (say, "In the beginning, God created...") might require fifteen pages of footnotes. These things happen in academia! So the notes have to be balanced with the text. While footnotes might appear in some future version of Bean, don't count on it.


Another thing missing in Bean is hierarchical styles. I know there is a camp out there for whom hierarchical styles (Heading1, Heading2...) is the be-all and end-all of document creation. The exemplar of this is TeX, the markup language where you tag bits of your document, then compile it with a style sheet. The opposite of this is "narrative" markup, where you simply apply different styles to text here and there (which is in fact what Bean, and RTF in general, does). In no way do I mean to minimize the importance of hierarchical styles, which are necessary for professionals to create documents that are consistent and professional-looking. But for most people and the documents they create, this represents too much overhead to the process of writing. Again, perhaps one day stylesheets will appear in Bean, but don't count on it.


About Bean, some have said, "Why switch from Word? It has everything that I need!" So, keep using Word; I used Word for years and was reasonably happy with it. But Word is a big brute of a program. Sometimes using Word is like going out for lunch and getting this huge platter of greasy food when all you wanted was something light, like half a sandwich.


Some people wonder about the name Bean. The name is a wordplay on Java and Cocoa (and now, Cappuccino), which are programming buzzwords. Plus, it's cute. I really did not want a generic name like "Pro Writer 3000, Express Edition." Also, I didn't think the world needed another icon featuring a piece of paper and a ball-point pen. The app icon for Bean was created by Laurent Baumann. As Laurent pointed out, coffee is a 'tool' that many writers (and programmers) use. So that's the symbolic tool you see in the icon.


I am not a professional programmer. I taught myself what I know of Objective-C and the Cocoa frameworks using the references I had available. The cost was minimal, except for time. The Xcode tools are free from Apple, so they deserve gratitude. Cocoabuilder.com, cocoadev.com, and stackoverflow.com are also free and are great resources for when you run into a problem. Apple provides sample code, and open source code examples are available on the internet.


The feedback from users of Bean has been brilliant. Many of the features available in Bean are the result of user suggestions and feedback. So, gratitude is also due to the users who emailed with complaints and ideas.


Programming is a fun and addictive hobby. It's even better when the end product is useful to others.


James Hoover