Unswitch

Ted Leung has a very good list of the things the open-source desktop should be doing.


I started to respond by giving pointers to various half-solutions to these problems; Deskbar or Arnic to replace Quicksilver, for example; but he really has a point. There are some definite weak areas on the Linux desktop that MacOS X addresses well. The lack of some unified scripting approach is particularly embarrassing; the fact that it is easier to script applications in both major proprietary desktops (OS X through Applescript, Windows through COM) is sad. Also, DVI and EDID are (as far as I can tell) far enough along that the hardware side of color profiling would be possible in Linux these days, it's just up to the OS and the desktop to support it.


(I am not mentioning KDE here because the last few times I've tried it, it has crashed constantly, and that mirrors my abysmal experience with programming PyQT. I understand a great many people use it, and more power to you, but it's just not likely to be relevant to me any time in the near future.)


So, rather than pointing out how a user such as Ted might hobble through Ubuntu-land, I'll give an explanation from my point of view: for me, Ubuntu is indispensible, and the Mac is basically unusable.


I'm not prejudiced against Apple. Far from it, in fact. I grew up on the Mac, and I will always have a soft spot in my heart for them. Through the first few years of my career as a professional programmer, I had the absolute first release of MacOS X server, and every beta of MacOS X. My experiences with Ubuntu have made me disappointed with Apple though, and I despair of MacOS ever being my platform of choice again. Following the structure of Ted's rant, here are some things that Apple might do to make me "switch":


Add some keyboard shortcuts. During normal use of my Ubuntu desktop, the only time I have to use the mouse is to quickly select links in a poorly-designed application (usually a web application, where keyboard bindings are really hard to get right). I move windows, maximize, minimize, resize and otherwise shuffle things around all the time - not using any crazy third-party utility, but the built-in keybindings in Metacity.


For that matter, building virtual desktops into the OS wouldn't hurt. I'm aware that there are a few third-party programs, but it would be much nicer to have there be one right way to do it. I've heard it said that this would be "too hard" for new users, but I think that's wrong. The idea of a single virtual monitor you can "move to" makes more sense to every user I've ever talked to than the mac's "invisible sheets with a menu bar and icon stuck to them" mental model you're supposed to adopt with the mac desktop. It took about five tries to explain the difference between an "open" and "closed" application on the mac to my grandmother, because the icon to indicate this difference is literally about 9 pixels, and applications will happily stay open forever with no visible windows.


Give me a panel I can really customize, not just drop applications onto. There are a few things I want to see on the screen at all times: memory usage, mounted disks, the current weather, the current time. The GNOME panel lets me put all of these somewhere omnipresent in a nice, small form factor with no fuss. These are not things that every user wants to see, so it has to be customizable. This is not a case of not having selected the right default or not having "designed" it right. Some people's needs are different enough that you need some freedom to choose.


Work on scaling applications up. I have dozens of gigabytes of free stock photos and artwork and photos that I've taken, and while I haven't tried Aperture, iPhoto did not handle this well, and it didn't let me use it as a way to organize metadata without making copies of all the files. My mac's hard drive wasn't big enough for all the files I wanted to categorize: I have a terabyte network appliance for this purpose. I have dozens of gigabytes of music; every CD I have ever owned has been encoded (in multiple formats, including FLAC. iTunes chokes if I try to load my entire music library, let alone load it from multiple computers all on the shared drive. Unfortunately the default music player in Ubuntu (Rhythmbox) isn't great, but the fantastic Quod Libet lets me not only load my massive library, but perform bulk cleanups on the ID3 tags (many of my CDs were ripped before I had easy access to the CDDB, some are in OGG format, I didn't adopt a consistent naming convention until recently).


Frankly, iTunes' DRM is offensive. I had a problem with my ITMS account, reinstalled my OS and reformatted my iPod one too many times, and now I can't play a bunch of my legitimately purchased music. (Update: Bob Ippolito corrects me in the comments; this was simply a problem I've persionally had with the ITMS, not a matter of policy. It's unlikely that you'd have this problem with music you purchased today.) If iTunes were otherwise a really great music management tool and had worked well with my large repository of non-DRM'd music, I probably would have cut it some slack: but part of the problem is that iTunes corrupts its own database, and my iPod crashes when confronted with the volume of music I'm storing on it and periodically needs reformatting if I want it to work.


Finally, rather than respond to Ted's list of applications, let me talk about Free Software's killer application: APT, the Advanced Packaging Tool.


It would take me forever to list all the applications that MacOS X is missing out of the box which Ubuntu includes in a fresh installation. Just to name a few: Gaim, a messaging client where I can seamlessly integrate IRC, yahoo, AIM, jabber and a half-dozen other protocols. Inkscape, an Illustrator-style vector graphics editor which works natively in SVG. Gimp, a photoshop-style bitmap editor. OpenOffice. There are, of course, equivalents to all of these on the mac, but they're expensive, underfeatured, or clunky and obviously not native, and sometimes two of the three. The real magic here though isn't one particular application (after all, Ubuntu isn't packaged with an equivalent to GarageBand or Aperture) but the fact that they were preinstalled; I don't need to mess around with ten clicks per application just to get them set up: they're all there, immediately.


As a user, this is convenient, but as a developer, it quickly becomes indispensable. To set up a new working environment on a Mac, I would have to spend hours downloading, untarring, building, checking dependencies, installing -- or if I were lucky, clicking on packages, accepting EULAs, etc. For example: "apt-get build-dep python" summons all the packages I need to compile my own version of Python; a collection of software it might take an hour to identify without this facility, let alone install.


Sure, there's fink and darwinports, but those don't manage user-visible, GUI applications in the same way that they do UNIX-style development stuff. Note that the first things I mentioned were actual end-user apps, not arcane requirements for programming tools. In other words, these aren't really a part of the OS on MacOS X, they are a port of features from other OSes, and they feel like it.


Fundamentally, what my user experience comes down to is this: I install ten or twenty programs or libraries per week, but I spend almost no time at all actually doing the installing. If each of those twenty libraries took me five minutes to set up, that's an hour of wasted time per week, which really adds up fast. Especially in weeks like last one, setting up a new computer, where I installed several hundred packages: 200 packages would be almost 2 solid work-days of just installing software!


I feel like this all boils down to an attitude. Succeed or fail, Ubuntu is just trying to provide me with tools to work with my data. It installs software as fast as it can go, it loads as much music and as many pictures as it can handle, and it doesn't bother me with the details if it can help it. The mac is too, but I feel as though each application is suffering from some sort of inferiority complex. Each new application needs to make itself heard. It can't just be ready to use instantly; it must make itself felt, through whatever mechanism. I must commune with each sacred EULA alone; I must wait for the download bar, mount the virtual disk, draaaaag the icon to my Applications folder. I must select the drive that I wish the software to be installed to. I must confirm that yes, I am sure I want to overwrite files. Yes, all of them.


This could probably be fixed at a technical and legal level - after all, a good deal of these applications are free to download already, the delivery mechanism can't make that much of a difference, and Apple already delivers all of its updates through a generic "software updates" facility which could be expanded to offer the features of an APT repository. I have no idea how to deal with the cultural problem, though, where each application author (even if all their application does is launch other applications!) feels they deserve twenty minutes of your attention and five dollars.


Sometimes free software breaks. Sometimes, all software breaks. I haven't really had one of these moments with Ubuntu yet, but I'm sure I will: Sometimes it breaks really, really bad and I have to do those ridiculous things that Apple users in commercials laugh at Windows users in Apple commercials doing to fix it. I have, in a dim and distant past I would rather not recall, had to edit the spiritual equivalent of my AUTOEXEC.BAT. I can see why to many people it just isn't worth it. I'm not suffering under some stern ascetic desktop because I want to "support free software" or anything like that though. In general, the experience is quite pleasant, and I don't think it would really improve that much if I used a Mac. Freedom does have some practical consequences, though. Those times when I want to do something with Linux that really would be better on a mac, it's worth suffering through for the knowledge that, if it breaks, it's not going to intentionally stop me from fixing it because it wants to charge me $0.99 for another copy of the song.

Ruby on Wrecks


<itamar> I'm beginning to joy my daily ritual of watching rails screw up penny arcade
<itamar> today it switched from not showing the actual image for the comic to 'Application error (Rails)'


Has anyone else noticed how penny arcade has become the world's premier advertisement for why not to write your working PHP/Perl/Java/whatever site in Rails? Do they have any idea how bad their site sucks since the rails port?

This is slightly tongue in cheek, though: it can't possibly all be Rails's fault. It wasn't anything to write home about in PHP either. How do they manage to consistently screw this up? It's a web page with a paragraph of text and a single image, updated at most twice per day. It's not rocket science; it's not even computer science. It's barely a shell script.

Potentially Of Interest

I had about half an hour in the office today where I was listening for some background noise which made using my keyboard difficult. I killed a little bit of time making this icon with my mouse: an SVG-ization of the cool new Emacs icon that comes with Emacs 22. I am sure that somebody in the open source world would like to use it, so I hereby place said icon in the public domain. Feel free to copy and use for whatever purpose.

A Rich Source of Gremlinium

Today, Tycho makes an interesting point in Penny Arcade, which is to say, he agrees with me.

A few months ago, when I was first pimping Divmod's Vertex generic peer-to-peer system, the first application I proposed was a BitTorrent-like protocol, but with explicit support for giving users credit. There is a proof-of-concept implementation of this called "sigma" in vertex (but don't try to use it yet, it's full of horrible known bugs - it's just there if you want to help implement it).

When I first mentioned this to a few potentially interested parties, they assumed that the advantage would be increased bandwidth savings on the part of the "content provider". It doesn't provide that, and I'm not sure that one can improve on BT's savings; as Steve Holden said, the only platform Avalanche runs on is PowerPoint. When I revealed what I thought were substantial advantages, this prospective audience sighed and said that BitTorrent was great and that nobody cared about any of my features.

The advantages of a Vertex-implemented BitTorrent would be as follows:
  • Vertex provides extremely aggressive NAT-traversal code. If it can get through your firewall, it will. This is important because huge numbers of people using BitTorrent don't care that they're not transmitting data; the seeds are "fast enough" and they don't have the technical knowledge required to configure their firewalls. For some BitTorrent-based applications (such as the Blizzard downloader) such configuration is intentionally impossible; the downloader uses a fixed port number and would therefore require smarts on your gateway to forward properly. I cannot fathom how they could make such a stupid decision - that's certainly not a flaw in BitTorrent itself but it seems to be a common implementation mistake.
  • Vertex totally separates the application (file downloading) from the transport mechanism. This means a vastly reduced implementation complexity for implementors (if, like Blizzard, they think they need a totally customized "user experience", they can still use common vertex libraries, or at least implement the protocol separately).
  • Most relevant to Tycho's post, Vertex provides strong identity verification for peers. This means that you can provide non-bandwidth-related incentives for people to upload. Imagine that your character got one gold piece for every megabyte of the patch that you uploaded!


This last point I have had an especially difficult time communicating, because I thought that Tycho's point was obvious and I didn't bother to explain it.

So here's the thing: if you're a "content provider" and you use BitTorrent, it's great that it decreases your bandwidth costs, but the message you're sending to your users is, "I don't care about the experience you get using my site. I care about saving money on bandwidth." Especially given that the percentage of full-duplex capable seeders is so poor (see my point about NAT traversal) it is often significantly slower to download a file over BitTorrent than over a straight-up high-upstream link, and of course it is vastly better to simply offer it via a service like Akamai's media delivery.

If you want your users to shoulder part of the burden for you, that's great, and it can improve the experience for them provided you're using the money you've saved for something worthwhile, but at least say thank you for using their upstream. To do that, you have to know who is actually helping you more or less. Since BitTorrent has started using bits of Twisted now, hopefully by the time this project gets off the ground, it won't be some custom file-download protocol that offers this feature, it will simply be the next version of BT itself.

Thankfully Divmod has a client right now who is motivating a bit more maintenance on Vertex. I hope I can present it at the next CodeCon.

Commit Messages and Cracker Jacks

Divmod and Twisted have instituted a fairly rigorous development process over the last few months. I'm very happy with the results, but there have been several objections to the strict enforcement of apparently useless or trivial parts of the policy, especially as related to small or mechanical changes.

When I was a wee lad, I took violin lessons according to the Suzuki Method. In the Suzuki Method, the first thing you do in your violin lessons (if you are a 4-year-old, anyway) is make a "violin" out of a cracker jack box and a ruler. For months, I did nothing but sit, then stand, hold the cracker jack box, extend it outward, and place it under my chin, hold it there, remove it, tuck it under my arm, and sit back down. I had to draw a diagram, on a poster, which showed where my feet were supposed to go while performing these steps. Then I stood on that diagram, placing my feet in the appropriate positions.

You are not allowed to use a real violin until you can get every step of this exactly correct. As a kid, that was pretty cool. When you have progressed to the point where you are allowed a real violin, you get to open the box and eat the cracker jacks. Parents, however, were often unhappy with this particular trajectory of violin training. Their 4-year-olds were eating cracker jacks six months after starting violin lessons, and students in other methods (read: their hypercompetitive co-workers' children) were playing Twinkle Twinkle Little Star on their shiny new violins at Christmas and Thanksgiving, much to the approval of the assembled family.

Of course it looks ridiculous to results-obsessed American parents to be messing around with crude drawings of your feet and tiny cardboard boxes when what you're ostensibly doing is learning to play an instrument. Why not move on to the instrument directly and focus on the important parts of playing, like fingering and tone and harmonics and sight-reading and so-forth?

The Suzuki Method was invented by a japanese fellow, and it follows the japanese sensibility that requires even trivial tasks to be performed according to extremely rigid rules. Have you ever watched a sushi chef prepare a meal? The next time you do, observe what they do when they wash their hands. They will always position a bowl of water in exactly the same position. They will always dip their hands in the water the same number of times. The knife will always be placed in the same position, picked up and put down at the same exact moments before and after slicing the fish. I don't know how to prepare sushi myself, but I've observed the pattern at every sushi bar I've sat in, from San Jose to Austin to Florida.

There is a reason why we focus on the small details of the development process. If there is an obviously correct way to do something, it should be done that way. Why expend effort on every method trying to decide whether it "should" be documented? Document everything. Why create elaborate rules for what "should" be tested? Test everything.

Those kids who were playing "twinkle twinkle" six months before I was? Well, I got to play with them later, in school and community orchestras. Some of them even became quite good violinists. However, there were certain differences you can easily pick up on. You can spot a Suzuki student because they sit straight; they hold the bow properly and lift the violin with their chin, not with their arm. A less methodical violinist will slouch, hold the violin wrong, hold the bow at an angle, and generally require more effort to play even simple songs. In fact, they will especially require more effort on simple songs, because the Suzuki student has every automatic aspect of playing completely ingrained in their muscle memory. No conscious thought is expended on the things that don't require it.

Not all the first-chair violinists I've played with learned on the Suzuki method, but they all know how to hold the instrument correctly without thinking about it.