On returning to Gnome

Just over a week ago I completely my conversion to Ubuntu (my laptop was the last machine over).  One of the reasons for doing this conversion was to get the benefits of some of the gnome stack, like dbus, which are very nicely configured in the Ubuntu environment.  It meant that after about 1.5 yrs with Ion, I gave it up for the default Ubuntu Gnome environment.

Running Ion for a year and a half gave me perspective on a few features that are really nice:

  • Go to Window By Name - Alt+G, start typing a window title name, go
  • Go to Urgent - Alt+K, jumps you to windows that need your attention
  • Go to Prev - Alt+K, if no urgent, jumps between current and last window
  • Dynamic Desktop Creation - for a new work effort move everything to a new workspace that is relevant to it
  • Kludges - policy based placement of windows so Pidgin stays on it's own workspace
  • Full screen windows are the way to go
  • Scratchpad - a frame that is smaller than the rest of the workspace that pops up and back on demand.

There were also a lot of drawbacks:

  • Ion had so many key bindings it tended to collide with xemacs bindings (like Alt+G).  I lost some xemacs functionality while running Ion
  • Ion didn't really do multi window applications well, like Inkscape or Gimp.  There was a float workspace type which acted like very old fvwm.  As such I tended to use Gimp and Inkscape less because they were hard to manipulate in the environment
  • Tumo (the Ion maintainer) decided that people were forking his software, so he removed access to the darcs repository, and you could only get snapshots.  And he changed the default license to something very odd.  Running a software stack that is fundamentally unsupportable because the maintainer is actively trying to make it hard for people to get source access is bothersome.
  • Config formats changed, and 2 attempts to roll forward to something current wasted 2 hours each.

One of the reasons for Ubuntu is that their community support is pretty good, and using main path base software was what I was looking for.  But I learned a lot of lessons in the time with Ion about things that I liked, and wanted to duplicate in a gnome environment.

Policy Engine

After watching many people in meetings on MS Windows get a sensitive IM while they are giving a presentation, and scrambling, you realize the value of a policy engine for windows placement.  IMs are always on Workspace 5, always.   My presentation won't be on  Workspace 5, so  I can get to the IMs when I'm ready to deal with them.

One upon a time, the default gnome window manager did this.  Then we got Metacity, which pretty much can't do anything (interesting enough that compiz is bringing features like this back).  The fact that useful features are being slipped past the anti-feature HIG overlords under the guise of eye candy has a certain irony that you don't find many places. 🙂

However, my laptop is old.  It can't do compiz.  That's ok, as Devil's Pie can do it for you instead.  Devil's Pie lets you create small policy files in lisp which control window behavior.  Before you run away screaming because of this being lisp, look, it isn't that bad:

(if (is (application_name) “firefox_bin”) (set_workspace 2)

See, didn't make you blind or anything.  The policy for devil's pie is way easier to grok than ion's kludges file, and provides a few more options.

Scratchpad for Terminals

Remember Quake?  No?  Well it's that first person shooter all us old folks rave about, as it existed prior to 3D hardware, and let us waste nights in college on our brand new Pentium computers.  When you hit the tilda button, you got a drop down console, that did an overlay on your screen, and let you type in commands, or Say stuff.

Behold Tilda.  The default configuration actually does look like the Quake overlay.  With a bit of configuration you can make it look like an Ion scratchpad with a terminal embedded.

Unfortunately I'm having mixed success with rendering in Ubuntu 7.10 (plus a bad interaction with the next piece of software).  I'm bad, and haven't sent in a bug report, but I will so.  When tilda was working for me, it was great. 

In full disclosure I need to say I found out about Tilda by listening to LUG Radio, where Aq brought it back in the spring.

Desktop Navigation

Once I started to use Gnome again I knew I needed better desktop navigation than the default.  I even set aside most of a weekend to write my own "go to window by name" program, as I was convinced that libwnck would give me enough to do that.  While writing a bunch of sample code that would get, but couldn't set window properties, I found superswitcher.

Superswitcher takes over your Windows key and/or Caps Lock and creates all manner of interesting key strokes to navigate and control your work spaces.  I'm pretty convinced it was designed as the ideal test can for libwnck, as it seems to use all the features in there.

You can dynamically create/destroy workspaces, navigate very nicely through windows based on typing partial names.

Things that I still want

Tilda to work.  After a few rez / derez of tilda on gutsy, it stops displaying properly.  I need to file a bug on this.

Jumping to urgent windows with Alt+K, and a command line interface to "Go to window by name", which let's me have an edit command that loads a file in xemacs, then jumps my focus there.  With the code provided by superswitcher and devilspie that shouldn't be too bad, as soon as I figure out why libwnck was ignoring all my set requests for focus and workspace changing.

Superswitcher currently segfaults when tilda is running.  This has to do with tilda not being in any workspace, which defies the superswitcher logic.  Should be an easy fix, just need to carve out an hour or two to do it and send it in.

What makes you productive in Linux?

Sit down and think about it some time.  Post a comment about it, I'd love to hear your thoughts on this, as well as any experiences with other interesting Linux desktop tools that collectively make your environment optimized.

Dear Joss Whedon, please remake Blake's 7

Ben had the following as his AOL status today:

The Browncoats Prayer

OUR JOSS,
Who art in Hollywood,
Whedon be thy name.

Thy ideas come,
and will be done
On film as they are in Comic Books.

Give us someday a little more Serenity,
And deliver us from Reality Television.
For thine is the Wit, the Wisdom,
And the Imagination

Forever and ever,

AMEN.

And it got me thinking again about the current state of American television.  Yes, there are some new shining bright spots (Pushing Daisies, House, How I Met Your Mother among them), but most of TV is aweful.  It's been a few years since Joss had a show on TV, and all of the attempted shows by Tim Minear (who worked with Whedon on Angel and Firefly) have managed 6 or less episodes aired on TV (Wonderfalls, The Inside, Drive).  It's a sad state of affairs for TV.

Recently I was introduced to Blake's 7, which ran 1978-1981 on the BBC (I'm 1/2 way through series 3 now).  I was introduced to it by Joe, who sold me on the story that Whedon was in the UK when in originally aired.  You can definitely see that Firefly owes quite a bit to Blake's 7, in a very good way.  Blake's 7 has no issue in killing off characters, which I suspect may have also influenced Whedon in his writing.

The failure of Minear's series, all of which had really compelling characters and stories, makes me wonder if there is a place for people like Whedon or Minear in American TV at the moment.  But maybe there is a better place for them, like the BBC.  The BBC is in remake mode now, reviving Dr Who, doing a new Prisoner, so why not bring back Blake's 7.  And why not bring Whedon over to do it.  Whedon's take on Servalan, Avon, Blake and the rest would be really interesting, and I think incredibly compelling.

Not that Joss will ever read this, or anyone that could make this happen, but if I had one wish in the whole realm of TV right now it would be to see a Whedon powered remake of Blake's 7.

New approaches to CS1

As a professor you get sent new sample textbooks all the time, or so I learned from Dr Nick last night. The "hot" area for these textbooks is the CS1 (or Intro to Computer Science) classes. Computer Science programs have the unique challenge of getting beat up by Industry because they aren't producing enough new graduates. At the same time Mass Media keeps saying "all your tech job are belong to India", scaring potentially interested students to the much more secure careers of History and English.

The thing that is exciting about software development is the ability to be creative with a nearly infinitely malleable canvas. The tools for creating software are better than they've ever been, and the massive prevalence of Open Source Software makes finding example code really easy. In a weekend you can create a completely reasonable web application with Rails, or a nice client application using Glade. In each case they solve a problem you have, and make you're life a little easier.

The bad old ways of teaching CS definitely miss this whole point. I'm a firm believer in students needing to understand interesting data structures and what is going on in the memory of the computer, but that doesn't have to be the CS1 focus. That's like teaching shop in high school, but instead of letting people build boxes or bridges, having them spend the entire first semester pounding nails into boards until they get it right. As with any industry that has a stigma for boring, you need to show students the creative aspects early in their education.

Back to text books. One of the new textbooks that Nick got was teaching CS1 in Javascript, in a browser. It did all the standard CS1 things about loops and datastructures, but in an environment that students might actually intrinsically care for. Relevancy is key to interest, and what can be more relevant in this day and age than the web browser. I'm sure the purists will loose their lunch over the idea of Javascript as the first language people learn, fortunately lunch is cheap and easy to find.

I for one, am excited about anything that brings more creative and talented people to the field. The current approach of making 18 year olds decide they don't like software because they didn't understand inane java syntax in the first 4 weeks that they were in college isn't working out so well.

A semester of search

My grad school class this semester is the Project Course, where the whole semester is spent on a group project.  No tests, no other grading besides the project, which is actually what I expected more of when starting grad work at Marist (that's a different post though).  The project domain is search.

We have to build an application with an integrated search engine tuned for a specific problem.  Our group problem is an user driven online restaurant review site.  Our canonical example is searching for "boston seafood", which should return all the posts that a human would, given the same tasks.  That means "the best lobster in bean town" counts as a hit that you'd want.  Guess what, SQL like clauses and regex's aren't going to cut it here.

But that's ok, we don't have to do everything from scratch.  We're expected to base our solution on Lucene, which is a search SDK.  You build custom indexer, analyzer, and searcher classes from the Lucene base classes, and feed it documents.  Lucene does the heavily lifting of building the inverted index, and scoring the results based on the rules, weights, and policies you've given it.  A project like this is pretty open ended, as you can always make it better given more time, and more interesting analysis tricks.

The whole team is making nice progress, so for the last two weeks I've been able to focus squarely on Lucene integration code itself.  Pass one got some basic queries working in Lucene.  Pass two was earlier this week, when scoring started to be useful.  Pass three will be tonight, where I'll start to integrate synonym support so that lobster is understood as a type of seafood, burgers are understood to be american food.  Though I'll have to think about how to make sure crab cakes don't show up in the desert category, though maybe we just need a hybrid seafood desert category.

A few interesting lessons have come out of the work so far.  First, search is way harder than most people think.  While Lucene gives you lots of nobs and levers to tweak how documents are ranked, the results of those tweaking aren't always what you think.  It's sort of like moving furniture by throwing bowling balls at it, you may get things close, but you do a lot of collatoral damage in the process.  Recently I was attempting to boost scores based on terms showing up in the subject of posts, which completely overwhelmed our post rating scoring, making low quality posts show up at the top of the list.

You also notice when people are using search badly, or more specifically using bad search.  Using SQL Like clauses is not search, it's grep.  Unfortunately most php sites do that because they don't have anything better (Lucene has been ported to a lot of language environments, php is not one of them).  The gentoo wikis fall into this category.

Finally, you realize that google's scoring, while good in general, may not actually be what you want for your problem domain.  The fact that the word seafood shows up 3 times in a post doesn't make it a better post, but default scoring gives it a boost based on the number of times relevant terms show up.  Badger, Badger, Badger, while being non kosher, shouldn't be scored highly in our results, even if we had a category fully dedicated to badgers and mushrooms.

are you on twitter and/or delicious?

Over the past couple of months I've started looking more at various new "web 2.0" sites, putting aside past prejudices, and seeing where the value in these applications might be.

Delicious is social book marking. I've found it is a great way to put interesting stuff on my blog that I didn't have more than a sentence to say about anyway. It also cuts down on my IM spam to people with interesting links I've found, because if they want them, they are here.

Twitter
is microbloging, which I'm still experimenting with. It's more like free form presence vs. content of any nature. I think there is something valuable there, but my few weeks of experimenting are too little to really sort that out. You can see my status at twitter now.

If you read this, and have a Delicious or Twitter account, let me know (post a comment, or find me in other ways). I'd love to network in with more people here and get a better sense of the network effects.

I love that we're in an era when software can solve a hardware problem

About 6 months ago I bought an Olevia 542i 42" HDTV. It isn't the best 42" TV that you can get, but it is one of the best deals, and it is a very respectable set. Nice features of the set include a VGA input port, upgradeable firmware via USB, and an RS232 interface to remote control it (in addition to IR). Olevia publishes the full set of protocol codes for the RS232 in a 4 page pdf file.

Not so nice features, there are 10 TV inputs, but the factory remote only has an input next button to flip between them. That means going from HDMI to Component2 is 9 button presses. Not very fun. When programming a logitech harmony to automatically change between those states you need to leave enough time gap to not miss codes, so it takes a long time to get from HDMI -> Component2.

Logitech Harmony remotes are little embedded computers with a state machine. You use a windows app to program the thing over USB (works fine via VMWare). They also get regular updates from logitech when new IR code databases are published. Apparently, some time ago someone figured out that there were IR codes for direct input setting (there were rs232 codes for it, so it made sense that you should be able to get to them from IR). 3 weeks ago they made it into the Logitech Harmony database. Last night I updated the remote, and now I don't have cycle time.

It's really nice to live in an era where a product isn't dead once it's shipped, but that it continues to improve while you own it. Especially something like a TV. 🙂