Installing Software on Linux Doesn't Need to be Terrible: A Photo Essay

Installing third-party software, especially end-user GUI software, on Linux is frequently a disaster.  This is frequently taken (especially by pundits) as some kind of inherent limitation of the platform, an indictment of its design and core principles, but it isn't.  In fact, the platform has had solutions to this problem for a long time, but it seems like the people who need the solutions the most, i.e. the people packaging commercial software, don't know about them.

I love to complain about this problem.  I'll take this opportunity to do so, as a matter of fact.  Installing the vmware-server management console is a typical commercial-software-on-linux experience: you download an archive, start up a terminal, run a shar executable (as root!) to install their crappy package which doesn't fucking work, you play with obscure tools that a real "end user" is never going to figure out, like ldd and ltrace, and eventually the damn thing starts up.  (Their solution to this problem?  A web-based management console which is uglier, less usable, and still doesn't fucking work.)

I love vmware - well, vmware-server 1.0, at least.  I really like the fact that the management console uses GTK, fits right into my desktop, and seems to behave like an actual application on linux.  (If the gross web UI is some kind of trick to get me to buy Workstation instead of continuing to use Server... well, it might work.)  The packaging of the software, though, is a masterful example of snatching defeat from the jaws of victory.  It's bad enough that every time I have to set up a new vmware installation I spend a few hours surveying the virtualization options on linux to see if anything might ease the pain.

The point of this little write-up isn't to stare unblinking into the gut-wrenching horror of a vmware install on Ubuntu, though.  The various ubuntu forums do that well enough.  Thank goodness for that, too, or I probably wouldn't have figured out how to use it.  No, my purpose here is to show what happens when you do it right.  Installing software on Ubuntu can be as nice as on a Mac.

I've been telling people for a long time to make Debian packages of their software, when they release builds for Linux, but I don't know if I've really communicated why having a package is better than anything else.  Thankfully, Ubuntu has now set up everything so that there is a really obvious reason why you should build a package: it's about a million times more user-friendly than doing the opposite.

Inform 7 has managed to provide an excellent example of how an installation on Linux should go, for an end user.  It just so happens that inform 7 is not open source.  I installed the whole thing using only the mouse, except for typing my administrator password.  The story begins on their Download page.

http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/screenshot2.png
Notice how this page is clear about which thing I should click on, even if I can't read.  I just need to identify the little penguin, and the little three-hugging-people logo.  It would be pretty weird for an illiterate person to install Inform, but nevertheless, it saves us from reading lots of extra stuff.

So I click on the download link, and Firefox prompts me to decide what to do with this.
http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/screenshot3.png
In fact I would like the package installer!  I click OK (after waiting for it to activate, since firefox has helpfully prevented me from clicking that by accident...).  Now I wait for it to download...
http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/screenshot5.png
Done!  I don't even need to do anything before the Package Installer window helpfully pops up to help me install this package:
http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/screenshot6.png
Now, I click "Install Package", and my keyboard gets involved in this process for the first time:
http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/Screenshot.png
I'm pretty sure I do in fact want to install Inform 7, so I type it in, and the package installer does its magic...
http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/screenshot7.png
http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/screenshot8.png
Yay!  It's done!  I just need to look in my Applications menu to find it.
http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/Screenshot-2.png

And there you have it:

http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/i7essay/screenshot9.png

This is what I want installing third-party and proprietary GUI software to be like on Linux.

Please do not use a shar archive.  I don't want to have to tell nautilus that yes I actually want to run this file which may be an executable text file, and I definitely don't want its EULA prompt on the console to be lost.

Please do not use a zip file.  Id on't want to have to drag files out of archive manager or open a terminal.

I just want to click a button and have the whole thing work.  The work required to make this happen is seriously not that substantial.  You even can pay me to do it, but chances are if you've already built an application for linux, you have enough experienced people on staff to do this yourself.

Notice that with very little additional work you could also provide a similar experience on Fedora; I haven't done it myself, but I have to assume that clicking on the little blue icon on a fedora machine would be a better experience than a bunch of shell commands.

Numbers That Go Up

A few years ago I was talking to Ying about my aspirations to one day develop my own game (Iä! Divunal! May its slumber soon be ended!).  I was telling her about its design — naïve student of interactive fiction that I was, I had decided that there would be two salient features: permanent death, and "no numbers anywhere".  Everything would be relayed to the player by way of descriptive phrases, because that was, like, more real, man.

Never one to pull any punches on my account, Ying told me she didn't think it would be any fun.  I asked her why she thought this game — which, if I could pull it off, would be artful, like a reading a novel that was written for you every day — would not be fun, whereas a grindy stat-monster like DragonRealms was fun. She said:
People like numbers that go up.
This is a phrase which I have now both said and heard in countless conversations with professional game designers.  At the time it struck me as insightful, but I didn't realize how insightful it was for many years.

Now, I am obsessed with the power of numbers that go up.  It's not just a trick for game designers.  It's a basic part of the human condition.  A power so great it can be used only for good, or evil.  A tool for positive social change.  A force which, every day, keeps little babies from dying.

You think that last bit was hyperbole, right?  Wrong.  Doctor Virginia Apgar developed the Apgar score, which is a way of rating how healthy a newborn baby is.  The development of the score itself, not any particular technique for improving the score, was responsible for drastically reducing infant mortality.  (I believe one of the largest drops in recorded history, but I can't find an online citation for that.)

Lest you think this had something to do with the culture around video games, she did this in 1952.

Many people have observed that there is also a dark side to this phenomenon.  In 1987, Alfie Kohn famously wrote an article that is now distributed with every copy of emacs which notes that giving people incentives gets them to focus on the incentive rather than the task; and enjoy the incentive more than the task.  In 2000, Joel Spolsky wrote "Incentive Pay Considered Harmful", which details the numerous problems with HR reviews and employee incentive pay.  Just this month, he expounded again in "How Hard Could It Be?", noting that when you pay people to optimize something, they will optimize it, whether that helps you or not.

I don't believe there's a contradiction here.  What these studies are observing is that, if you crudely design and crudely present an incentive, it will have crude effects.  There's an art and a science to designing incentives, and the people who write employee incentive plans (and incentive impact studies) are not really using interested in using incentives in the way that makes them effective: to make activities more fun.  The only people who really get this right are game designers.  Unfortunately, the insight that game designers have is rarely shared with other disciplines. Game studios make even software startups look tame by comparison, leaving their employees little time for professional development, or, you know, sleeping.  When their ideas are shared, they are frequently, almost implicitly dismissed — after all, it's "just a game".  The "serious" folks want measurable objectives, clearer research, not "fun".

But tell a "serious" cognitive scientist or a "businesslike" incentive plan designer to produce a scheme which will cause the user's brain to release large amounts of Dopamine on demand, and they're not likely to deliver anything useful.

I certainly don't have as much experience with this as I'd like, but I've made plenty of observations.  My personal hypothesis is that the key factor here is subtlety.  The apgar score is an arbitrary number.  It means nothing beyond what it means.  Your progress, or health in a game has no meaning beyond the game.  It's an obvious yardstick by which you can judge your progress, but it doesn't really matter.

Stack Overflow is, I think, a great example of this type of subtlety.  Your reputation is arbitrary, and there are lots of arbitrary little landmarks you can achieve.  "Badges", originally from City of Heroes, and also known as  "achievements" on Steam, are a great way to motivate users to stick around just a while longer.  "Oh, I'm done for the day, but I'm only 30 votes from civic duty.  Let me vote on a few more things."  Because the motivation is there, you stick around; but because it's subtle, it's not worth aggressively gaming the system (and thereby wrecking it).

You can see the flip side of that pretty quickly on similar sites that try to motivate participation based on money.  I can't tell how good Experts Exchange is, because it throws up roadblocks, to protect their precious "content" and make sure they can make money on it.  Those who I know who have tried it assure me that it is full of spam and fraud, largely because the incentive structure is all based around money.  The "score" doesn't represent progress or mark status, it is progress and it is status.  The point of Experts Exchange is to get money, and the questions are just there to provide you with a mechanism to do so.  The point of Stack Overflow is to provide good answers to questions, and the reputation score is just there to get a rough idea of who does that best.

I think that this principle can be applied in lots of places in everyday life.  To give you a hint of where I hope to apply it at Divmod, in Blendix: consider the feeling of getting a point in a game, and the feeling of checking off an item on a to-do list.  Compare beating a level to seeing a page full of "done" items.  Just imagine that page full of ticked-off checkmarks.  Makes you want to write a to-do list, doesn't it?

ScribeFire Rocks

I promised I would say so, and so I am.  I might have given it away in the lead, but:

ScribeFire Rocks.

ScribeFire especially rocks now, if you are a Python blogger, because you can do this:

    def proto_init(self, string):
        """
        String received in the 'init' state.
        """
        self._currentBox = AmpBox()
        return self.proto_key(string)

I'm indenting code!  On a blogger-hosted blog!  And the code stays indented!!!

The elaborate process that I used to do that?
  1. alt-tab to emacs
  2. copy
  3. alt-tab to scribefire
  4. paste
And... I'm done!  (Well, okay, not really.  I did have to manually insert the tag to change the font face.  But still!  I didn't have to type    three million times.)

When I'm writing, I don't like to focus on markup.  I want WYSIWYG editing.  I want to drag screenshots off of my desktop and drop them into my text without worrying about how they get uploaded, and I want to see how they cause my text to re-flow.  I want bulleted lists and italics and boldface and I don't want to worry about closing tags.


ScribeFire gives me all of these things when I'm writing, with pretty much no hassle.

Thank you, ScribeFire.  Stay awesome.

Wow! Java (Swing) doesn't have to look crappy!

I have a long love-hate (well, mostly hate-hate) relationship with Java.  I used to be a Swing hacker, in my callow youth, and the whole experience left me feeling pretty bad about Java GUI programming.

Over the years, I've watched as Java has gotten better and better native look and feel on Mac and Windows, but every time I've started a Java application on Linux, it's time to party like it's 1995; the default "Metal" look is reminiscent of a souped-up Motif, and clashes terribly with my desktop.

Totally by accident, I discovered this gem on stackoverflow...

This page explains how the work with Look&Feels: http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html

You can do it commandline:

java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel MyApp
... and my jaw dropped.  Really?  It's that easy?  I tried it with my favorite Java GUI application, Tiled - and here it is, not looking like crap:



As with every native look and feel, it's not quite right.  The behavior of 'tab' is off in a few places, there are tons of things that should be keyboard-focusable but aren't... but it's a huge improvement.

I still have no idea why this isn't just the default behavior on Linux — although I'm sure I have a few fun inexplicable segfaults to look forward to — but I'm certainly going to enjoy using Java applications quite a bit more now.

Programming (And Markup) Languages I've Learned In Order

Catching up with some blog backlog, I saw this post from James Tauber and it looked memeish.  I think my list is interesting:
  • HyperTalk
  • SuperTalk
  • AppleScript
  • CSH
  • Bash
  • HTML
  • POVRay
  • C++
  • Emacs Lisp
  • VRML
  • Java
  • Perl
  • Scheme
  • C
  • x86 assembler
  • Python
  • Squeak Smalltalk
  • Common Lisp
  • Ruby
  • JavaScript
  • ActionScript 3
I would consider myself proficient in the boldface languages, and use them all frequently.

Languages I intend to learn in my copious spare time:
  • C#
  • Erlang
  • Haskell