The things I change right after installing Fedora

Did a fresh Fedora 7 install on my laptop, and I went through my usual routine of fixing up a few details. We’ve actually gotten pretty good about being “stateless”; I already store almost everything online (GMail, delicious, Last.fm, Mugshot, Picasa, etc.), so there was little data to copy around manually, basically just reinstall developer tools.

However, I have to spend a bit of time killing passwords:

  • Fix usermode to not prompt for the root passwordThis forum thread describes how to do it.
  • Delete my user password – Run passwd -d walters. That way I just click my username. My laptop is either right next to me, or in a trusted environment, so I don’t need a password. Ideally GDM would auto-login the user if they didn’t have a password, so I wouldn’t even have to click.
  • Install Google Browser Sync – By far my biggest annoyance with the web is remembering all my website passwords. Google Browser Sync is the best solution I’ve found so far.

The next thing I’m going to add to this list is to install pam_keyring, just about to try that. Though honestly I’d like a way to basically disable all prompts from the GNOME keyring – I don’t need my local keyring encrypted (for the same reason I don’t need a local password), and I trust my local apps.

Fixing those little things

A while back I came upon this rant about the focus stealing prevention. Recently I realized just how confusing it is; I had a lot of windows open, and so didn’t even notice the Firefox tab blinking at first and thought my clicks weren’t registering. Ick!
So I decided to sit down and spend a day on backporting the upstream patch for this to Firefox 2. If you are a Firefox user (or more hopefully a distributor) interested in having the links you click on the desktop actually appear on the screen without hunting for a pulsing tab, this patch is for you.

Happenings in Python and Portland

In Python

Definitely been enjoying my mostly pure Python hacking recently. It feels so…empowering. Like I can just sit down and bend the computer to my will, instead of fighting details.
Some updates from that front:

  • Put up the code for the guest-account project for Fedora, based on a quick discussion/design session with Bryan about how we can improve account creation and login process. The current code is functional but could use a bit of polish. I had to drop back into C-land to make GDM able to execute my little PyGTK program, but it works. Hoping to squish some of the details in that patch and get it into GDM, then the guest-account programs polished, probably into GNOME SVN, and packaged for Fedora.
  • On the bigboard front, Owen landed a patch for integrating his really cool data model stuff so we get efficient updates from the server. When I get back, going to take a look at using this to help fix temporarily-disconnected operation and caching issues
  • While stuck at the Chicago airport yesterday (and I do mean basically all of yesterday, thanks United), spent a bit of time getting a new release of Hotwire out the door. Nothing earth-shattering, but some important bugs have been fixed, and I’m getting ready to add a dependency on Twisted so Hotwire can start doing some cool things over ssh.

In Portland

Some quick facts about Portland I have discovered in my first day here:

No sales tax

Seeing an item listed at $2.95, walking up to the register, and actually paying $2.95 (instead of $3.1x and therefore receiving a big pile of change) is something I could get used to. Really fast.

Punk lives

Portland has quite a lot of punk. If I still had my early-college ear piercings I’d probably fit in better. I first realized Portland was punk when a 50s-ish woman with dyed blue hair, black leather jacket, and this T-shirt (unrelated photo found via Google image search) walked by while I was eating lunch.
Unfortunately on this trip, I managed to forget my camera. Now if you saw my earlier attempts at photography, you may not consider my inability to take high-resolution photos a great loss to the Internet. However – I had to bust out my phone to get this picture while I was wandering downtown:


Punk guy with Siamese cat perched on shoulder

The cat seemed…well practiced at staying in that position. I have to admit, witnessing punk-guy-with-siamese-cat-on-shoulder was a new experience for me.

Portland is not flat

This one kind of messed up my plan to use my Hypno skates as my primary means of transportation. Because multiple people independently recommended it (and it was close to my hotel), I went to check out the Portland Japanese Garden. Which was very cool, albeit deceptively small. However, my plan to skate there didn’t exactly work out:


Slightly hilly
I had two choices for speed, embodied by the above photo: Thigh-exhaustingly slow, or pedestrian-creaming no-hope-of-stopping fast. I spent most of the time with my blades detached, walking.

Even though I love to program them…

…it doesn’t mean they can’t annoy me.

Currently stuck in the Chicago airport because all the local United airline computer system crashed for almost two hours. So I miss my connecting flight. The next flight to Portland is full, and also delayed on top of that. Who knows what happened to my luggage.

Despite all this, I’m in a good mood. Currently eating some cheap tofu and reading a copy of the wonderfully imaginative Un Lun Dun by China Miéville.

The Good, The Bad, and the Ugly

The Good

VirtualBox – A fairly complete VMWare Workstation replacement, it even supports the VMWare disk format. Worked pretty much out of the box for me – I’m sold. Would be nice if someone stepped up and packaged up the open source version which seems to support everything I want anyways.

PyGTK Shell – Not bad, though it needs to gain the autosaving feature from my version.

The Evergreen Open Files Dialog – The last refuge of hierarchical filesystems nowadays seems to be software for programmers, who apparently want to inflict the pain on others of their kind. I wish my current editor let me type a file name and open it, regardless of where it was or whether had it open currently. It just…makes sense. Not ready to switch to Evergreen yet, but the author has the right idea. (Hotwire‘s current cd command offers something similar for directories).

The Bad

Python zipfile module – Whoever designed this API should have their Python commit access revoked. This is apparently what you have to write to just extract the contents of a zipfile. No. Just…no.

The Ugly

The canvas situation. Honestly, what I would really like to see is a nice API for embedding a (web) browser. I put (web) in parenthesis because most apps would want significantly tighter integration than that offered by something like GtkMozembed – e.g. the ability to easily insert a hyperlink that invokes a callback in your app, have slick DOM control, write scripts in Python instead of JavaScript, etc.

The benefit to this is that you get to reuse all the knowledge about web page programming and layout that basically all programmers today have to know anyways. Now, this doesn’t fill every use case – certainly things like Clutter would still be the sane way to write particular classes of application. Anyways, more and more I find myself hoping someone steps up and really makes something awesome like this – whether it’s based on XULRunner, Gtk-WebCore or something else.

Keeping an eye on what matters

Maybe I am just getting older, but I’ve found that my perspective on what matters in software has shifted quite a bit.

I see so much discussion and thought about things that really in the end, don’t matter a whole lot. Or if they do at all, they only matter to developers. For example, an IRC discussion about whether packages should have capitals in the names. Revision control choices. Whether packages are sharing code enough. Whether files go into /usr/lib or /usr/lib64.

I think what I’ve realized now is that in software, these kinds of things are actually endless. You could spend your entire lifetime doing things like making sure every package in Fedora accepts CFLAGS correctly, or making sure that all the modules in GNOME share as much code as possible.

What I personally have been trying to do recently is keep in mind a target user when I’m thinking about problems. Last night while eating at Boloco I walked by a guy running Linux, so I stopped to talk to him. Turned out he was a programmer working for Tripadvisor. I actually used their site recently when scheduling a trip to Portland; they have an awesome Google Maps mashup with their hotel rankings that I found incredibly useful.

How much would this guy care about capitalization in package names? Not at all.

I know I’m not saying anything new here; it’s a well known problem. And I’m not saying none of this matters at all (in particular Subversion annoys me a lot); but you have to have a good sense for when to tackle things and when not to. I won’t complain if I have to use Subversion, it’s just not worth arguing over.

Some random thoughts on how to avoid technical holes:

  • Write in Python or another high level language. In C, just getting a socket open or something can make you feel like you accomplished something. It’s pretty hard to reinvent the wheel in Python, because so many awesome wheels already exist.
  • Never write the library first. Or at most, write the application (what matters to users) hand in hand with the library.
  • Get something running on to the screen as quickly as possible.
  • Make it cool. Make it something that someone wants as soon as they see it.

I’m sure if the younger Debian developer version of me of years ago had seen this blog entry now I would have thought I’m on crack =) I guess I do have to admit I learned something from that time.

Python object definitions and threading

I posted a brain dump of some random thoughts recently about Python object attribute definitions and threading: another thread on Python threading

One thing that I really appreciated about this was that Python uses a newsgroup (reflected in Google Groups) instead of a mailing list. The experience is so much better than a mailing list. I was able to visit the Google Groups page, click “New message”, and type it in, and it appears. In contrast starting or contributing to a discussion for a typical free software project mailing list if you aren’t already subscribed is an enormous pain; you have to subscribe to it, do the dance confirming your address, and then for a busy project it’s like having a fire hose in your mailbox, so you need to set up filtering – ugh! Even if it’s not a busy project, you will get mail about things unrelated to the post. And finally, you need to manually unsubscribe when your interest wanes.

Have you considered using a Google Group or the like for your project? If not, you should. You don’t have to deal with crappy email clients, spam is taken care of, no more monthly mailman reminders or passwords. And and most importantly, people who want to send a message to your project or contribute to an existing thread don’t have any hoops to jump through.

Hotwire 0.444

Hacked a bit Thursday and this weekend and put together Hotwire 0.444. For the impatient, you can skip directly to the Google Group and download. The cool thing about this release is that it has initial undo support. I’ll talk more about that in a minute.

Sometimes, writing applications for the web is quite nice, compared to traditional desktop UI toolkits.  It can be very easy to bang together something that looks awesome, is functional and usable.  In particular, one of my favorite features about the web is javascript:alert(). Wait a second you say, javascript:alert() sucks! Exactly. It’s so bad that no self respecting web developer uses it in the normal app flow. It’s impossible to make it look decent, and it just feels clunky and weird in a normal web page. Therefore, most web applications tend to avoid dialogs, and (hopefully) use better solutions like undo or whatever makes sense for the situation.

I think in general, there are 3 possible reasons you might add a modal dialog that requires a user action or choice to your application.

  1. Need username/password – Ok, but you better remember what I type.
  2. List infos – Things like the Eclipse new-class dialog. This one could be done inline too but it’s mostly fine as a dialog.
  3. It’s probably wrong – everything else.

In particular, I often notice that where a lot of the confirmation type dialogs (“Do you really want to foo?”) are used, it would make more sense to just do what I asked, and if it wasn’t what I really wanted, allow me to undo.

I am going to take a relatively extreme (and topical) example here; the default Fedora root .bashrc which has alias rm='rm -i'.


It asks you this for every file by default

Is there a better way? Yes.


Click to undo!

This took all of maybe 20 minutes to implement for the cd and rm commands; it should be relatively straightforward to add undo support to Hotwire’s builtin mv command, and cp will likely have it once it’s written.

Some other new features for this release:



Terminals in tabs


A help display so you don’t need to read the source to know what commands there are

For more details, see the Google group post.

Boston Zombie Walk 2007

The 2007 Boston Zombie March [link deleted, taken over by porn] was completely awesome. I heard from others last year was maybe 20-30 people; this year I would say there were at least 200 at the peak.


Zombie looking hungry

This guy was a bit more liberal with the stage blood than I was

Now originally I thought, being a computer programmer, I would have a leg up on the competition in the looking-undead department. However, when Brian and Steve mentioned they were thinking of going in their robot costumes as robots protesting zombies, I knew I would be spending most of the night watching them getting ogled. And I did, but I still had a ton of fun taking pictures and being part of the event! Carolyn took some good pictures too I think, I’ll edit this later when I get the link.

Me attempting to devour Brian

One completely amazing thing about this event was just how many people had digital cameras and video cameras. The two robots grabbed attention wherever we went. I had this feeling that everything visible would be tagged and uploaded to Flickr in short order, which will probably be more true as photographers wake up today. But this morning Mike discovered us!
For reference, their signs say Zombies take robot jobs and Robots against Zombies.

Steve having a malfunction while everyone is watching

We walked from Porter square down to Harvard. Watching the confused expressions of passersby was fun (especially when the zombies tried to eat them). I also had to laugh when the Cambridge police stopped traffic around Harvard so that the big crowd of zombies could…slowly one legged limp across the lanes. I can only imagine what people who just happened to be visiting Boston thought.

Some random highlights:


Zombie burying himself (while being consumed by girlfriend?)

A crowd of “protesters” were part of the event

Brian giving a zombie the beatdown

Heading home, this little kid thought he was meeting a real robot

Shopping at Shaw’s was hilarious

And, the full album. I know I’m a crappy photographer!

A Guided Tour of Hotwire 0.333

Hotwire has advanced quite a bit since last I mentioned it. For the most part now, I am using it to develop itself, instead of gnome-terminal. Of course I’ve tried this a few times in the past week, but I wouldrun into some bug that drove me back – until I fixed it. Add a lot of those fixes together though, and it’s starting to actually feel usable.

One feature I added last night that’s kind of a small thing but I am fond of is the last command. What last does is pretty simple – it returns the output of the previous command. This lets you interactively refine pipelines. For example, say you type cat foo.log | grep error. Now, suppose you want to further refine that for strings that match ‘192.168.1.1’. In a shell, you’d likely hit the up arrow, then append to the previous command. But doing so is wasteful (and sometimes unsafe) because it re-executes the entire pipeline; if foo.log is big you have to wait for it to be refiltered (or save it to a file, grep that…ug). Using last in Hotwire feels natural (and I plan to shorten the syntax to just ‘|’).


Hotwire executing /sbin/ifconfig


After grepping for inet6

You may notice from the screenshot that a lot more has changed. Here’s a quick sample of stuff visible there:

  • Hotwire now auto-resolves commands you type by prefixing them with sh or term as appropriate. So for example you can just type ifconfig and Hotwire knows you mean sh /usr/sbin/ifconfig.
  • There are now tabs; try pressing Ctrl-t
  • The display looks a lot nicer! I’m mostly done “porting” to GTK+.

So, cool. But there’s more! Realizing that because right now Hotwire requires the output of commands to all be of the same class (e.g. LinuxProcess, unicode), I redid the entire rendering infrastructure using a tree view. A picture is worth a thousand words here:


Hotwire executing its ps command…on Windows!

So the first thing to notice here is that the output of the ps command is nicely formatted into columns based on its object properties (remember, the Hotwire builtin ps command outputs Process objects, not random bits of text).

The second thing to notice is…wait a minute, that’s Windows! Yes. Hotwire boots on Windows now, and I fully intend to make it a mostly-first class citizen. I am still recovering from the mental scars inflicted from trying to learn the Win32 API enough to enumerate processes, but it’s there. It’s a pretty rare developer in the world that doesn’t ever have to use Windows, and frankly I think Hotwire blows cmd.exe out of the water already for when you need to.

Another thing to notice in the above screenshot is the status message about kill – that’s what you see when you use…right click menus!


Right click on a process to get a Kill option

Now, I want to talk about completion. The TAB completion engine is on its third iteration, and it’s starting to feel about 80% of what bash does. If you use Hotwire for a while you will miss common-prefix completion (you’ll know what I mean), and some other details, but it’s mostly good enough, at least for me.

One thing that is a definite improvement though is that Hotwire offers you previous-token completion. Let’s say you type host example.com. Hotwire not only records this in your history (so if you type ping you can hit the up arrow to reuse the command), but also remembers example.com as a token you used previously. If you start to type it again in any context, Hotwire offers it. For example:


Remembering you typed example.com earlier

This is all part of the Hotwire philosophy of remembering everything you type, and making sure you never type the whole thing again.
Speaking of remembering things, Hotwire now also remembers which commands you used sh for and which you used term. For example, if you type term vi /tmp/foo.txt:

From now on you can just type vi and Hotwire will remember to prefix it with term instead of sh.

Last but not least, I battled setuputils and in the end produced a FC6 RPM and a source zip file: Download page.
I’m playing around with Google Apps for hosting the user pages, so excuse the bareness.

That’s it for now, going to post before LiveJournal eats this!