MacOS X vs. Ubuntu Linux

[Update: Tim O’Reilly writes that not only Apple but Red Hat should be worried about Ubuntu.]

We bought our older daughter a cheap used ThinkPad as a grade 8 graduation present, and I installed Ubuntu Linux on it for her. It was by far the easiest install I’ve ever done for any operating system — everything just worked, including sound, wireless networking, DVD playback (once I downloaded special restricted packages), remote printing, and suspend-to-ram. I did not have to edit a single text config file — I could do all of the setup, even WiFi, entirely through the Ubuntu/Gnome GUIs. [Correction: I did edit /etc/apt/sources.list to add the sources for the restricted packages, but I think I could also have done that through the GUI if I’d wanted to.]

Why not a Mac?

My daughter is familiar with Linux (at least the GUI parts), MacOS X, and Windows XP. We had considered buying her a Mac notebook, but used Macs cost more than new Wintel books of the same capabilities, so that was a non-starter. She doesn’t much like Windows, probably because they make her use it at school, so Ubuntu it was.

I always liked the Mac interface, especially during the early period up to about 1990 when they led the industry in GUI innovation. Contrary to the accepted wisdom, however, before MacOS X I never found Macs to be a particularly stable desktop computing platform, even compared to Windows. For example, earlier versions of MacOS had highly unreliable TCP/IP support and required huge fixed-size memory allocations for applications, problems that other OS’s had long ago fixed — as much as I liked looking at Macs, I always shrank in terror when family members asked me to help fix problems with them. Windows might crash a lot, but at least it crashed in more predictable ways.

Return of the king …

Fortunately, Apple finally addressed these problems a few years ago by admitting that their backend was completely broken, throwing it out, and replacing it with Unix in MacOS X. They’ve even admitted that maybe the one-button mouse wasn’t such a great idea after all. After that the Mac, if still overpriced, was a strong and stable platform: Mac notebooks started to reappear at IT conferences, Mac ports of Open Source software flourished, and everyone in the Mac world was generally happy. Mac even started innovating in GUI design again, after letting Windows take the lead for a decade.

… but the natives are restless

So why are some of the highest-profile Mac users starting to show disaffection? Mark Pilgrim was the first to announce that he was moving to Ubuntu Linux, and he recently posted a very funny list of Ubuntu essentials for ex-Mac users. Next, Tim Bray announced that he was thinking of switching to Ubuntu, though he’s worried about WiFi support and LCD projector support (my experience has been the opposite of Tim’s). Now Cory Doctorow is also planning to move from Mac to Ubuntu. For all of them, I think, one of the big issues is gaining control over their data which is now locked into Mac proprietary formats that Apple changes at whim.

Cool or cheap?

Do only three defections matter, even if they’re high-profile? Possibly not for Mac usage, but perhaps for Mac price. Historically, Apple has been able to sell its computers for up to a 100% price premium because of the perception that they’re cool — if the mavens suddenly decide that Ubuntu is cooler than MacOS, as seems to be happening, Apple’s price premium could suddenly evaporate.

The end of the Mac-is-cool myth would be as good for Mac users as it would for everyone else (except Apple itself), since cheaper Macs could mean a much larger user base. Would even the hardest-core Mac afficionado complain about a $500 Mac notebook? I didn’t think so.

Posted in General | 8 Comments

XML 2006 submission deadline today (Monday 19 June)

Today is the submission deadline for XML 2006 papers and tutorials. They’ve been pouring in over the weekend, and I’m very happy with the high quality of them. If you have not had a chance to submit yet, please send in your proposal today.

Tagged | Comments Off on XML 2006 submission deadline today (Monday 19 June)

XML 2006 submissions due Monday 19 June

We’re getting close to the XML 2006 paper/tutorial deadline and there are a lot of good submissions. Please keep ’em coming:

http://www.idealliance.org/xmlusa/06/call/

If you’re proposing a paper, all you need to provide right now is an author, title, and abstract — the full paper (in PDF or XHTML format) won’t be due until 18 December, after the conference (Boston, 5-7 December).

For more details, see the call for participation. And thanks in advance to everyone who volunteered to referee papers — you’ll be hearing from me soon.

Tagged | Comments Off on XML 2006 submissions due Monday 19 June

XML 2006 deadline approaches

Next Monday (19 June) is the main paper and tutorial submission deadline for XML 2006 (Boston, 7-9 December; Tutorials 6 December). You can submit proposals for papers and tutorials through IDEAlliance’s system here:

http://www.idealliance.org/xmlusa/06/call/

For more information, see the full call for participation.

Changes for 2006

I’m excited about the proposals we’ve received so far, and I’m looking forward to receiving many more over the next few days. We’re planning a sharply-focussed conference this year, with four well-defined tracks. While the traditional XML community will always be the backbone of our conference, we’re reaching out this year to people who have not previously thought of submitting. To make things easier, for example, we’re no longer requiring a paper marked up in XML — PDF or XHTML are just fine (and not due until after the conference, to boot). We’re also introducing the XML Scholarship and extending popular features from previous conferences, including the Master’s series.

Track chairs blogging

For more information on individual tracks, see the blog postings by Microsoft’s Michael Champion (Enterprise XML computing track co-chair) and O’Reilly’s Simon St-Laurent (XML on the Web track chair).

See you in Boston this December.

(Note: late-breaking presentations and XML scholarship entries are due on 30 October.)

Tagged | Comments Off on XML 2006 deadline approaches

Gap buffers

Tim Bray updated an old piece on binary search this morning — I missed it the first time around, so I was glad that it popped up in my blog reader. Tim’s taking some flak about data abstraction from people who don’t have his experience in high-performance environments, but what got my attention most was his mention of using gaps in a long array to provide efficient updates.

It turns out that this technique, called a gap buffer [wikipedia], is one of the cornerstones of text editors like Gnu Emacs. I’ve been using Emacs for 20 years and have contributed to the main distribution (see derived.el), but never bothered to look at the C code long enough to discover this particular technique. There’s surprisingly little information online — if anyone’s ever bothered to do testing for the optimum gap size, etc., it’s not showing up in Google — but it’s still nice to experience the joy and excitement of a new (to me), simple algorithm that solves a common problem well.

Does anyone have pointers to more detailed research on gap buffers? It seems to me that they’d have applications far beyond text editing, including (perhaps) storing compiled tree data (aka binary xml) on disk.

Tagged , | 1 Comment

Firefox vs. PRG

[Update: it’s working now, after upgrading Ubuntu. Here’s an online test for your own browser.]

Post/Redirect/Get (PRG) is a common web-application design pattern, where a server responds to an HTTP POST request not by generating HTML immediately, but by redirecting the browser to GET a different page. At the cost of an extra request, PRG allows users safely to bookmark, reload, etc.

When someone attempts to reload a page generated by a POST request, browsers will generally pop up a warning that reloading will cause a form to be resubmitted, possibly causing you to purchase two sports cars (etc.) — that warning is a good thing. Strangely, however, Firefox 1.5.03 will pop up the same warning after a PRG operation, when reloading should not cause anything bad to happen. I can think of a few possible reasons:

  1. Firefox wants to repeat the entire PRG operation rather than just the final GET
  2. Because the GET was the (indirect) result of a POST operation, Firefox still wants to warn you that there might be something fishy.
  3. An obscure bug.

I’m leaning towards #3, but I’m curious about whether anything thinks that Firefox is doing the right thing here, and whether other browsers (MSIE, Opera, Safari, etc.) act the same way.

Tagged , | 10 Comments

Continuations, cont'd

[Update: see further contributions to the discussion from Ian Griffiths, Avi Bryant, James Robertson, and Joe Duffy; note also John Cowan’s excellent comment below, pointing out that hidden fields work with the back button but not with bookmarks.]

It looks like continuations are back on the discussion board (Gilad Bracha, Tim Bray, and Don Box). I spent some time with Scheme a decade ago and continuations were one of the new features I had to try to understand. Then, as now, I found them more clever than practical.

Gilad sets up a use case for continuations before he goes on to oppose them: in essence, a web application could use continuations to maintain separate stacks, so that as a user hits the back button and then starts down new paths, the web application would not become confused, selling the user a trip to Hawaii instead of Alaska. I can see how continuations would work for that, just as I can see how a bulldozer could turn over the sod in my garden, but I’m far from convinced that either is the right tool for what is really a much simpler problem.

Explicit state

First, a continuation preserves the entire state of a program, including the stack, instruction counter, local variables, etc. How much of that do you really need for a hypothetical travel web app? In reality, you probably need, maybe, 1-5 variable values to restore a previous state in the travel app, so why not just save those explicitly? It would be faster, more secure (less information being saved), and much easier to performance tune and debug (since no magic is happening behind the scenes). Save those variables in a database, in a hash table, in an XML or CSV file, in memcached, or wherever happens to be most convenient. You may be looking at under 100 bytes for each saved state, so if you really want to do this, it’s not going to hurt too badly.

REST

But do you really want to do this? Most of the discussion around REST has focussed on the use of persistent URLs and how to use HTTP verbs like GET, POST, PUT, and DELETE, but there’s another, perhaps more critical idea behind REST — that the resource your retrieve (a web page, XML document, or what-have-you) contains its own transition information.

Let’s say that you load a web page into your browser, load more web pages, then use the back button to return to the original one. Now, select a link. What happens? Did you browser have to go back to the original web server, which was using continuations (or other kinds of saved state) to keep track of the links from every page you visited, so that it won’t send you to the wrong one? Of course not. The web page that you originally downloaded already included a list of all its transitions (links), and intuitive things just happen naturally when you hit the back button.

The web is stateless, but web application toolkits maintain pseudo-sessions (using cookies, URL rewriting, or what-have-you) that makes them look stateful, and that makes programmers lazy. Obviously, you don’t want to stick information like ‘isauthenticated’ on a web page, since it could be forged; likewise, you don’t want to put a credit-card number there. But it is trivially simple to make sure that forms, like links, go to the right place even when you hit the back button — just make the transitions fully independent of any session stored on the server side. For example, consider this:

<form method="post" action="/actions/book-trip">
  <button>Book this trip!</button>
</form>

Presumably, the trip the person was looking at is stored somewhere in a session variable on the browser. DON’T DO THIS! As Gilad pointed out, someone hitting the back button might end up booking the wrong trip. There are gazillions of ways to push all of the context-sensitive stuff into the web page itself, where it belongs. Here’s one example:

<form method="post" action="/actions/book-trip">
  <label>Book your economy trip to Alaska!</label>
  <input type="hidden" name="destination" value="alaska"/>
  <input type="hidden" name="package" value="economy"/>
  <button>Book it.</button>
</form>

Here’s another:

<form method="post" action="/actions/book-trip/alaska/economy">
  <label>Book your economy trip to Alaska!</label>
  <button>Book it.</button>
</form>

This is 100% backbutton-proof and it’s trivially simple to implement. It took me a while after reading Gilad’s (admittedly, strawman) example to realize that there are people who do not develop webapps this way. If they do this much damage just with a Session stack, how much pain will they be able to cause with continuations?

The REST people are right, at least on this point: there’s no need to drive a continuation bulldozer through your webapp, when a little REST garden spade will work quite nicely (and won’t tear up your lawn in the process). Don suggests that there may be other, more legitimate use cases for continuations outside of web applications, and I have no reason to disagree, but I would like to look at them pretty carefully.

Tagged , , | 11 Comments

National Debt(s)

Tony Coates is celebrating the elimination of the Australian federal government’s net debt. During the 1970s and 1980s, Canada carried a brutal public debt, to the point that our federal government was spending more on interest than on any major government program (healthcare, defence, education — you name it). I suspect that Australia was in a similar situation. It’s a vicious circle, where the government ends up spending more and more but delivering less and less.

The ratio between public debt and GDP in a rich country shows how capable that country is of dealing with its debt; less directly, it also shows how fond that country is of big government (though high debt can also simply indicate undertaxation). With that in mind, the following table destroys a lot of the stereotypes about how well different governments manage their finances and how fond they are of big government:

Country Public debt:GDP ratio
Australia 16.2%
New Zealand 21.4%
Canada 38.7%
U.K. 42.2%
Spain 48.5%
Sweden 50.3%
U.S. 64.7%
France 66.5%
Germany 68.1%
Italy 107.3%
Japan 170%

(Source: CIA World Factbook; all figures for 2005.)

Anti-big-government U.S.? Impoverished Spain? Debt-ridden U.K.? Soviet-Canukistan? Forget it. On the other hand, however much Americans may complain about financial mismanagement under their current administration, things could have been worse — at least they didn’t have to deal with five years of Silvio Berlusconi.

Tagged | Comments Off on National Debt(s)

Announcement: XML 2006 RSS news feed

The XML 2006 conference (Boston, December 5-7) has a low-traffic RSS news feed for major announcements. In your weblog reader, subscribe to the following RSS 2.0 feed to stay up to date on deadlines, dates, and other important information:

http://2006.xmlconference.org/news.xml

If you prefer to read an HTML page, the same information is available as a formatted web page (autogenerated from the RSS).

Tagged | Comments Off on Announcement: XML 2006 RSS news feed

XML 2006 Call for Participation

I’ve just come back from announcing the XML 2006 Call for Participation at the XTech 2006 conference in Amsterdam (I had the privilege of following two excellent opening keynotes, Paul Graham from Y Combinator and Jeffrey McManus from Yahoo, ensuring a good crowd).

From now until Monday 19 June, we are accepting presentation and tutorial proposals for the XML 2006 conference in Boston (5-7 December; tutorials 4 December). This year, we have four focussed presentation tracks, and we’re eager to see your submissions. You can read the full call for participation online at

http://2006.xmlconference.org/call-for-participation.html

Please spread the word on other mailing lists or discussion groups. Thanks.

Tagged | Comments Off on XML 2006 Call for Participation