A Trifle Absurd
Matthew Morgan’s software notions
Why I Do What I Do
28 February 2005 at 17.37 • in ProgrammingSeveral years ago, I was interviewed by a Norwegian anthropologist (no, really). He asked me how I felt about my profession, with a between-the-lines implication that computers were a dehumanizing force. Here’s the gist of my answer:
The personal computer is a fantastic tool of individual empowerment. Unfortunately, it suffers from two big problems: it’s too hard to use, and it’s not as powerful as it could be. My job making software is to fix those problems — to make software more usable and more powerful so that more people can use it to do more wonderful things.
I was surprised to hear that coming out of my mouth; it wasn’t anything I’d ever thought about in such direct terms, but it made sense. And indeed, part of the reason I quit programming a few years later was because I felt like my job no longer fit that description.
Being reminded of that interview yesterday, I connected the dots with what I’m doing now. Given that vision, it’s no wonder that I’m strongly attracted to open-source software — software that people can freely use, share, and improve, and that extends the empowerment of good software to people without the means to pay hundreds of dollars for it. And writing fits the mission as well: empowering people by teaching them how to do things, and in particular how to program. I’m convinced that with better tools, languages, and training, the world of programming can be opened up to a far larger group of people. And who knows what wonderful things those people will create?
Mac Tweaks
25 February 2005 at 11.18 • in MacI figure I ought to catalog the lower-level tweaks and additions I’ve been making on my new Mac, and what better place to do that than here in public? So here are some great little pieces of software to put on your Mac:
TextExtras enhances text editing in every Cocoa app, from TextEdit to Safari. I’m only beginning to scratch the surface of its power, but one useful feature I’ve found so far is the ability to rework Tab and Delete to use spaces instead of tabs. Another great Cocoa enhancement is I-Search, which adds incremental search across the board.
DoubleCommand lets you remap modifier keys; I’m using it to turn Caps Lock into another Control key. Of course, my pinky is so used to avoiding that key it may take me a while to start actually using it.
Saving the best for last, I come to Quicksilver, the single coolest software find I’ve come across in years. I’ve been using it for less than a week, but it’s fundamentally changing the way I interact with a computer. If you are a keyboard fan at all, you’ve got to try it. Check out the Quicksilver category over at 43 Folders for lots more information and links (you may want to start with this post).
Okay, enough with the Mac stuff. Next week, I’ll write about something else, I promise!
Useful Mac Starter Sites
23 February 2005 at 09.52 • in MacSome sites and books I’ve used to get up to speed on Mac OS X:
Merlin Mann’s 43 Folders has a wealth of information on cool Mac programs; check out especially his OS X Inventories page, which links to a bunch of other folks who’ve written up the list of software they use and/or tips for using the Mac. Tim Bray and Ted Leung have good tips to share. And of course there’s macosxhints.
I checked out a few books from the library to tantalize myself with while the Mac was on the way. Switching to the Mac: The Missing Manual isn’t very dense (it’s aimed at a general audience) but is easy to read and has some good information now and then. Mac OS X Panther for Unix Geeks delves into the Unix side of Mac OS X; it’s not so necessary for just using a Mac, but it’s still interesting to take a peek at what goes on beneath the surface, and I’ll probably need some of that knowledge for building Unix apps on the Mac. Modding Mac OS X expanded my knowledge of just what tweaks are possible on the Mac–good stuff to know.
The Mac At Last
21 February 2005 at 17.00 • in Mac • Comments (1)A few months ago I switched from WinXP to Ubuntu Linux, but now I’m moving on to Mac OS X. My new iMac had its midplane replaced to fix a defective memory slot, and now it’s finally up and running.
Making the switch has been more of an adjustment than I expected, but there’s so much to enjoy that I happily keep plugging away at it, trying out applications, making little tweaks here and there. I may not be getting much Real Work done, but (I tell myself) I’m setting up and learning my new work environment, so it’s okay. Right now I’m just trying to pick a basic set of applications to use.
Email was a toss-up between Mail and Entourage; I went with Mail, though Entourage’s Project Center looks intriguing. I had been using Thunderbird on Linux, and before that, on Windows; it wasn’t bad, but I felt like trying something new.
Picking a browser is more difficult on the Mac. On Windows or Linux, using Firefox was a no-brainer. On the Mac, though, Safari and Camino are also tempting–in fact, I’m writing this post in Safari.
And then there are text editors. Should it be TextMate? SubEthaEdit? The often-sworn-by BBEdit? Or should I stick with a cross-platform open-source editor like jEdit? Looks like I have several more apps to try.
Nonstandard but Ubiquitous Browser Components
18 February 2005 at 17.17 • in ProgrammingIn the spirit of using the primitives, I’ve been poking around to see what kind of powerful components have snuck into modern-day browsers. Even with the stipulation that each component should work in at least Mozilla and IE (and hopefully also Safari), there’s a surprising amount of power lurking in there.
XMLHttpRequest is practically old news at this point. GMail is the recent poster child, though hardly the first.
Google Maps has a host of interesting implementation details, including the use of client-side XSLT. Both Mozilla and IE provide it, and in a compatible-enough way that you can actually use it in a cross-browser app. Safari doesn’t have XSLT yet, but it sounds like Safari 2.0 will include it.
Hearing about client-side XSLT made me wonder if I could simply query a DOM tree using XPath without having to use a full XSLT stylesheet. Sure enough, you can, using document.evaluate() in Mozilla or MSXML in IE. This means you could download and parse an XML file (using XMLHttpRequest) and keep it around as a simple client-side database, using XPath for queries. If the data is sufficiently large and/or complex, this could easily outperform a custom-coded JavaScript database.
Making Beautiful Things
17 February 2005 at 11.59 • in ProgrammingIan Bicking bemoans the fact (warning: strong language) that he, like most developers, gets paid to make ugly things. “And I should be making beautiful things! I shouldn’t be making ugly things to enable me to spend some time on beautiful things.” Bill Mill commiserates in a comment, and suggests three potential ways out:
1) write something stunning so that some “cool” company will want to hire me before I suck myself dry working for corporate america, 2) grad school, academia, and professorship (which carries its own problems) or 3) get out of the field entirely, do something radical, start a business, make coding a hobby.
I’m in the process of returning to programming after getting fed up with it (partly due to the reasons Ian describes) and not programming at all for a few years. I’ve thought about going back to a regular programming job, or working as a contractor, but that seems far too likely to lead me back where I started. So, all three of Bill Mill’s proffered solutions have been on my mind for the past year or two.
Solution 1 was a small part of my motivation for starting Trifle. Honestly, though, it doesn’t strike me as a likely scenario. That’s fine, because I’m mainly writing Trifle in order to use it, not to impress people.
Solution 2 caught my interest for a while, especially since I live near a university with a good CS department (and grad students who clearly know how to have fun). Ultimately, though, jumping through the hoops of academia doesn’t excite me.
Solution 3 makes me think of a couple of alternative careers: music and fiction writing. Being a professional musician would likely entail lousy hours and low pay, so that’s one hobby I think I’ll keep as a hobby. As for fiction writing, I’ve given it a go and decided it’s not for me.
Recently I’ve been attracted to a variant of solution 3: stay in the field, but make a living doing something other than programming (while coding for love on the side). The obvious “something other” for me is writing. My fiction-writing experience has, if nothing else, given me confidence that I can churn out words. How better to do that than in service of the technical subjects I care about? No doubt it will take a while to get good at it, but I have the time–all I need is the discipline.
WordPress Upgrade
15 February 2005 at 23.01 • in AdminI just upgraded this blog from WordPress 1.2 to 1.5–the transition was just as painless as I’ve been led to expect by my consistently positive experiences with WordPress. Kudos to the WordPress team (and community) for building a great product.
From Spatial Metaphors to Tagged Search
14 February 2005 at 18.39 • in Tags • Comments (2)Since the advent of the file system, interfaces for organizing computer-based stuff have used spatial metaphors. In Unix and its command-line imitators, a directory is a place, and things (files or other directories) reside in that place; a shell session consists of moving from place to place and doing things. GUIs like the original Mac interface extend those ideas to include actual screen coordinates–a particular folder always pops up in a certain place on screen. For the systems and situations of those times, those were elegant solutions for managing information.
But spatial metaphors have been unable to scale as the quantity of information has exploded. The spatial-folders model of the standard GUI is overtaxed already, and would be even more so if information was stored at a more granular level. Zooming interfaces are touted as an improvement, which they probably are, but they still don’t solve the essential problem: each object lives in only one place. (Symlinks/aliases/shortcuts don’t solve that problem, either: they just ameliorate it.)
In the earlier days of the Web, it was easier to find what you were looking for by poking through Yahoo’s hierarchy than by using a search engine. Now it’s easier to just Google for a few words and get what you’re looking for. And so the primary interface of the Web has moved from spatial-hierarchy to search. I’m convinced that this same transition will happen at the level of individual-user data, but don’t take my word for it: look at the investments Google, Apple, and Microsoft are making in that direction.
Search-based interfaces eliminate the need for each object to live in only one place, and thus solve the fundamental spatial problem. But this also gives up one of the better features of the spatial model: the sense of security that comes from knowing “I’ve put this thing here, and that’s where it’s staying.” By contrast, a search-based system is more like “I’m dropping this in the ocean, and hoping that I can fish it out later when I need it.”
And this is where tags come in (meaning personal tags, not social tags/folksonomies). Tags can give you back that sense of security where simple search cannot. You don’t have to worry that something relevant might fall through the cracks because it didn’t have the right word form to match your search. Of course, the success of your search depends on having things tagged correctly, but that’s no different than looking for something in nested folders. Besides, you still have full-text search to fall back on.
Search is already replacing spatial hierarchy, from the Web on down; tags will only accelerate that transition, and, with any luck, lead us toward interfaces that are more usable–and more useful.
Almost a Working iMac
10 February 2005 at 17.10 • in MacMy brand new shiny 20″ iMac arrived at last. Everything works great–except for the top memory slot. I have three RAM modules: the stock 256MB module plus two 512MB modules from Crucial. Each of the three works in the bottom slot, but fails in the top slot. The failure mode alternates between not booting and booting but not seeing the top-slot module.
Sigh. I was so psyched to get to play with a sweet new machine, too. Oh well, at least there’s an Apple Store nearby; we’ll see how good their service is.
Update: Took it in, and their customer service was excellent. The best part: they recognized that I knew what I was talking about, so I didn’t have to slog through all the basic-level questions. Now, in a few days, I should have an actual working iMac.
Use The Primitives
4 February 2005 at 11.59 • in Languages, ProgrammingR0ml makes the case for language primitives that package powerful iterative algorithms behind a clearly-defined interface. His classic examples: BitBlt in Smalltalk and regular expressions in Perl. He concludes:
Language designers need to search for those compelling abstractions that subsume significant algorithmic complexity or computational capacity. It’s the only way to get efficiency leverage in a dynamic language.
And because of this, dynamic-language users need to look for creative ways to use the primitives they’ve been given. Most of the time, a primitive-based solution will be faster than implementing an iterative algorithm yourself, even if, in the abstract, your version is more efficient.
I came across this situation just yesterday. I was searching through an array of strings in JavaScript, looping through the array and testing each string individually. I realized that I could eliminate the loop from the JavaScript level entirely by joining the strings together and using a single regular expression to search them. Faster and simpler, all in one solution.
The downside of JavaScript is that you don’t have many of those powerful primitives to work with. But that’s just more opportunity for creative hacks using what’s there.