Saturday, July 09, 2005

Emacs?!

I have this growing stack of books on my night stand. I tend to read some of a book, pick up another and eventually return to the original one. This can continue for as many as 10 or 15 books and 2 or 3 months at a time. My night stand is obviously quite a mess! It occurred to me that someone out there might be interested in at least some of the things I'm reading, so I put together my second book list that you can find here... This is the list of books that are currently on my night stand.

Now on to the actual point of this entry - I started reading The Pragmatic Programmer last week. I'm about half-way through and had to stop in order to implement at least some of what it says before going any further. Ali and I dropped into Stacey's on Friday afternoon and picked up a pile of books that should help us on our way. Among many other compelling and wise statements, the authors (Andrew Hunt and David Thomas) make a significant and effective argument that I hadn't really seen so clearly before.

The Power of Plain Text

They make the case (extremely effectively for me at least) that we should keep our most important data NOT in secretive, proprietary, volatile, incompatible, binary formats, but instead - in human-readable, cross-platform, version-able, merge-able Plain text files. It's OK to compile this plain text into more efficient binary formats for specific purposes (like network transmission for example), but it's unwise to store our most critical information using transient and volatile means such as Micorosoft Word documents and Excel Spreadsheets. It's important to note that the authors do not come out and say anything about these particular file formats, and I'm eager to point out that even Microsoft itself has finally embraced the wisdom in this idea...

They cite the following primary reasons for using Plain Text:

  1. Insurance against Obsolescence: Unlike binary files, for as long as that file exists, you can use any standard tool to parse it and unlock it's secrets.

  2. Leverage: Just about every tool available in computing can operate on Plain Text. Within this argument, these guys proceeded to describe some ancient (1980's) and yet stunningly efficient and powerful tools that I'm frankly ashamed to not be intimately familiar with. (for example: Emacs, Sed and Awk)

  3. Easier Testing: It's much simpler to verify and validate inputs and outputs if a system works with Plain Text rather than hidden binary formats. This argument really goes to the core of my problems with Flash Remoting.



Finally, as a result of reading The Pragmatic Programmer, I wound up getting all involved in learning Emacs (I'm using it right now to create this blog entry). I picked up Learning GNU Emacs from O'Reilly and haven't been able to put it down. I am seriously considering this as my primary editor for all-things-text. Yes - even ActionScript, Java and maybe even my address book, calendar, journal, blog and email?!. I'll definitely report back as I learn more on the subject. I'm a little concerned that I might be getting too excited, but my initial research is extremely encouraging. It seems that some very focused and very smart people have been refining this tool as a development platform since 1984. I didn't know this, but apparently Emacs was originally written and continues to be led by RMS himself. ;-)

Monday, July 04, 2005

XUL Runner?!

A couple of weeks ago (thanks to my handy Firefox t-shirt) I ran into a super-smart young guy on BART.

http://weblogs.mozillazine.org/josh/
http://josh.trancesoftware.com/

I ended up hanging out this weekend with him and a friend of his named Alex. We wound up talking about the future of GUI application deployment (Since the topic pretty much consumes every waking moment for me these days). He and his friend both are doing some work this summer in Mountain View for the Mozilla Foundation and turned me on to something that's pretty damn exciting.

I had this idea a couple of weeks ago - what if I could wrap up the XUL foundation classes, download, install and instantiate the Flash Player for whatever platform the user was on, and ultimately deploy a single, distributed application that will run from the web within whatever browser you have, but also offer (with roughly identical code) a downloadable, installable, more feature-rich, occasionally-connected version of that application? What if we could combine the in-browser ubiquity of the Flash Platform, with the small footprint and easy installation of the desktop XUL platform? Could this possibly work? Ali and I have talked about it a bit and neither of us really have the skills to be ripping out C++ code from the Mozilla project, but we were preparing to try anyway!

As it turns out - Josh and Alex turned me on to XULRunner, a thin, installable implementation of the XUL runtime without Firefox, Mozilla or any other specific application. Of course it's not really released yet, but it sounds like we'll be able to distribute applications as singular binaries or bundles on any platform at some point this summer. For now, thanks to the nature of open source - we can download nightly builds and learn about this thing!

Here's how to get started:

1) Get the exe:
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/latest-trunk/

2) Put it somewhere you'll remember... I unzipped into:
C:/Program Files/Mozilla XULRunner/

3) Update your path so that xulrunner refers to this location.

4) Download the simple-browser example:
http://friedfish.homeip.net/~darinf/xulrunner/mybrowser.html

5) From wherever you unzip it, open a command prompt and run:
xulrunner application.ini

Here are a few other links that I found useful:
http://wiki.mozilla.org/XUL:Xul_Runner

http://blogs.acceleration.net/ryan/archive/2005/05/06/1073.aspx

http://developer-test.mozilla.org/en/docs/XULRunner

http://www.mozillazine.org/talkback.html?article=6421