Archive for June, 2007

Happenings in Python and Portland

June 21, 2007

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…

June 20, 2007

…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

June 10, 2007

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

June 8, 2007

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

June 3, 2007

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.