PyCon Day 1, Morning Sessions

This morning following the “keynote”, I attended the “State fo Zope Panel”. As Jim pointed out at the start (and as I remember from past years), this is typically part one of the Jim Show (part two being about Zope 3 or the Zope Component Architecture). This year the panel consists of four developers, with someone representing Zope 3, Zope 2, Plone and Zope writ large (including the Zope Foundation). After hearing about the state of Plone, Zope 2, and Zope 3, Jim spoke about the Zope Foundation. I was particularly suprised to that there are only 48 committer members in the foundation. Given that I’m one of them, well… wow [1]. I appreciated Jim’s frankess about the challenges the Foundation faces, as well as his thoughts on Zope as a Pluggable Application versus Zope as a Library.

Based on the questions to the panel, there still seems to be lots of angst over the future of Zope 2 with respect to Zope 3. Jim made some deceptively sane comments about Zope 2 and Zope 3 last year [2], and it seems like people still want to know “when will Zope 3 be the real Zope” which implies the corollary, “when will Zope 2 die?” I think this agnst stems from the desire not to invest in a “dead” technology, or to invest too early in an immature one. But the answer just doesn’t matter. Zope 2 is appropriate for use cases which Zope 3 is not, and vice versa.


Following the Zope Panel I attended Ernesto Posse’s talk on writing parsers using grammar transformation. Posse set out to implement the LL(1) parsing algorithm based on its simplicity and speed. However, given the limited expressiveness of an LL(1) grammar, his solution (called aperiot) was to writer a parser grammar transformation which transforms a non-LL(1) grammar to an LL(1) grammar. Aperiot allows you to generate a parser as a Python module from a give grammar definition.

Grammar parsing is one of those topics which I find academically interesting, but which I have a real problem following in the course of a talk. Especially with 2 hours of sleep. But from what I was able to absorb, I think aperiot is something I’d investigate if I needed to write a parser.


The final morning talk I attended was an overview of developing desktop applications with Dabo. Ed presented on Dabo two years ago at PyCon is DC; I remember it well because I was in the same track as him [3], presenting about cross-platform development with wxPython. If I recall correctly, Ed’s talk in DC talked a lot about the automated database to UI development. Today’s talk focused on how Dabo wraps the wxPython API to make it more “Python-ic”. Ed has a really good point: wxPython is powerful, and it looks great on each platform, because it uses native widgets. But when it comes to the API, knowing how C++ works is unfortunately a benefit, because it’s C++ roots show through [4].

After some slides presenting an overview of Dabo’s API, Ed presented a deceptively simple example program. The example loads an image, and allows the user to rotate, resize, stretch, clip, etc. Image handling is a particular token of pain in wxPython, so the demo really resonated with me. Particularly cool points:

  • Loading an image is as simple as assigning a file path to the picture property of an image control; Dabo handles the loading process.
  • Python objects can act as “data sources”; more accurately, Dabo has a really flexible binding method, which allows you to do things like create a drop-down that changes the image clipping mode (this is really simple, but hey, saving 4 lines of code is saving 4 lines of code).

For his final image demo, Ed demonstrated adding drag and drop support to the image control. Drag and drop is… well, it still doesn’t work exactly right under some edge cases in ccPublisher or ccLookup, and that code’s been reworked half a dozen times with special exceptions and handlers. I think the total code to add support was something like 3 or 4 lines. If it works half as well as the demo, that’s really cool.

Ed wrapped up his talk with a demonstration of creating a wxPython grid bound to a database. Holy crap. I’m not sure exactly when I’ll use Dabo, but the next time I’m doing cross-platform desktop development, dabodev.com will be one of my first stops.


[1]I say “wow” only because my contributions have been sparse and sporadic, to put it generously.
[2]Zope 3 doesn’t need to replace Zope 2, maybe it never will, or maybe there should be something called Zope 5 that just builds Zope 2 as an application on the Zope 3 library… or something like that. It was a year ago, and I have been to Rio since then.
[3]It was sort of the year of the desktop development talk, if I recall correctly.
[4]Admittedly they show through to a much smaller degree now, but there are still moment
date:2007-02-23 13:36:19
wordpress_id:485
layout:post
slug:pycon-day-1-morning-sessions
comments:
category:development

PyCon Keynote: Ivan Krstic

I finally made it to the conference hotel this morning at 4AM. I expected to arrive around midnight. Five minutes before we started boarding in San Francisco, our plane was pulled from service due to infestation. Gross. So two hours later we finally boarded, and after sitting on the tarmac for another 40 minutes, we finally took off. Half an hour for luggage, and hour to get my rental car, and then the drive to the hotel (did I mention I had to blow a toll because I only had $20s, and the promised bill changer apparently only does $1s and $5s?). And its 4AM.

So this morning after what can really only be called a nap, and a big-ass cup of coffee, I’m in the first keynote at PyCon. The speaker is Ivan Krstic[1]_, from the OLPC (One Laptop Per Child) project. If I wasn’t convinced that the OLPC is cool before, I am now.

Let’s assume for a moment that OLPC is a miserable failure at its primary goal of creating a learning machine for children. Even then, after hearing Ivan speak about the technology that’s been developed to support the project, it sounds like a success to me. Some highlights:

  • A dual-mode display that works in either black and white, low power, reflective mode, or a medium-resolution, color backlit mode. And you can switch between the two.
  • A touch pad that’s both capacitive and resistive. Since I didn’t know exactly what that meant myself, I’ll share what Ivan demonstrated. It’s a three-panel touch pad that stretches the width of the laptop. The center section is capacitive, like the touch pads you’re used to. You put your finger on it and the pointer moves. But the entire pad can operate in resistive mode, which means you can grab a stylus, a stick, or any sharp, pointy object and use it like a mini-tablet. Darn cool.
  • Experimentation with battery chemistry. Chemistry was my nemesis in college, so I promptly blocked out the checmical formula. But Ivan passed around two batteries with the same capacity. One a traditional NiMH, and the other Super-Duper-OLPC. The weight difference was really amazing. Apparently it also runs cooler than the NiMH.

So while all of that is really darn cool, you might wonder why Ivan was invited to keynote at PyCon, which is, afterall, the Python conference. Sugar, the OLPC user interface model, is written in Python. In fact, as Ivan describes it, the OLPC is rife with Python. Non-Python components consist of X11, the kernel and the sound driver. The file system is written in Python as an object-store of sorts, and therefore supports things like n-way syncing, versioning, deltas, compresion and metadata tracking.

In addition to talking about the technology developed for the OLPC and the use of Python in OLPC, Ivan spoke about the state of software development today. In particular, he lamented the fact that coding small does not seem to be a priority anymore. Ivan gave the example of an anonymous CD-burning package for Windows. When he recently recommended it to a friend recently, he found that it had grown by an order of magnitude from about a 40 Megabyte download to a 400 Megabyte download. And just what has changed so dramatically in the world of CD burning in that time period?

Ivan’s solution to this epidemic of growth is something near and dear to my own heart: plugins. He posed the question, why aren’t we building decomposable software that can be extended via plugins or extensions? Using the CD burning example again, if there is some crazy huge feature that 5% of the population will use, why not decompose it so that those users can download it as a plugin[2]_? As Ivan put it, “plugins are the new #ifdef.”


[1]His last name has a diacritical mark on the final letter, but I can’t figure out how to do that on my MacBook.
[2]I’m definitely guilty of the “disk space is cheap” argument, and it is; part of Ivan’s point was with respect to memory usage in general, not just disk space.
date:2007-02-23 12:03:41
wordpress_id:484
layout:post
slug:pycon-keynote-ivan-krstic
comments:
category:pycon2007

Heading to PyCon

I’ve spent the first part of this week in San Francisco for some face time with the rest of the Creative Commons staff and participating in what I believe are our first all-staff meetings [1]. This afternoon I’m flying to Dallas for PyCon 2007. The program looks really strong this year, and I’m looking forward to a few days of what you could almost call a vacation. A really, really geeky vacation.

My goal is to blog the sessions I attend, but that’s been my goal every year and I usually end up doing about 25%. We’ll see just how well it works this time around.


[1]“All-staff” including San Francisco, Berlin, South Africa, Boston, and (of course) Fort Wayne.
date:2007-02-22 14:11:54
wordpress_id:482
layout:post
slug:heading-to-pycon
comments:
category:conf, geek, pycon2007

A Feisty MacBook

After the HP woes (which are incidentally ongoing, and if they didn’t make me so persistently pissed and angry I might actually write about them) and a nice tax refund check have caused me to go notebook shopping. After some looking I decided on a Black Macbook. After picking it up from Sweetwater, I promptly set about getting Linux loaded on it. I had done some looking before purchase, and knew the process wouldn’t be exactly seamless. It ended up being easier than expected in some areas and harder in others.

I primarily used the Community MacBook instructions from the Ubuntu wiki. Some brief notes on deviations when installing Ubuntu 7.04 (Feisty) Herd 3 on a new Macbook[1]_:

  1. You can skips steps 6 and 7 completely. When you reboot after the installation completes you may receive an error message when selecting Linux. Just reboot, and select the rEFIt boot option to “enter rEFIt shell”. You’ll see the “do you want me to fix the MBR?” message; select Yes, reboot and you’re up and going.
  2. The wifi chipset on the newest MacBook (and perhaps MacBook Pros) is currently unsupported by MadWifi (bug report). However, ndiswrapper is able to wrap the Windows driver just fine. One report I read said to use a DLink driver. That worked for the most part, but caused intermittent kernel panics. Switching to the Lenovo driver, as described here [STRIKEOUT:resolved that problem] improved the situation. (update 20 Feb 2007: the Lenovo driver is better, but still causes a kernel panic when I connect to a particular network; not sure what’s up with that)
  3. The latest Feisty kernel (2.6.20-8) seems to bork the keyboard and trackpad. I just set grub to use 2.6.20-6, and all is well.
  4. Speaking of grub, you don’t seem to actually have keyboard support in grub… not sure what’s going on with that, since it works just fine in rEFIt.
  5. Getting the double/triple-tapping to work on the Trackpad requires loading the appletouch module before usbhid. Not being one to really crave fucking with initrd, I just wrote a little script and installed it as /etc/rc2.d/S03appletouch. It’s a bit of a blunt instrument, but I fully expect that it’s just a temporary fix until things are fixed upstream:

<pre>#! /bin/sh /sbin/rmmod appletouch /sbin/rmmod usbhid /sbin/modprobe appletouch /sbin/modprobe usbhid </pre>

Overall it makes a great Linux notebook: sleep and hibernate work out of the box, the sound is good, and the battery life is pretty decent too. Oh, and it’s pretty. Always important.


[1]This is going on my blog and not my site because I imagine this is something of a moving target. Ubuntu 7.04 Herd 4 is already out, and I imagine lots of work will be done in the next 6 months. Your mileage may vary.
date:2007-02-19 17:55:46
wordpress_id:480
layout:post
slug:a-feisty-macbook
comments:
category:geek

links for 2007-02-19

date:2007-02-19 17:24:22
wordpress_id:479
layout:post
slug:links-for-2007-02-19
comments:
category:Links

Snowed In

So Fort Wayne and the surrounding county is under a “Level 2 Snow Emergency” until further notice. This basically means that if you park on the street, you will be towed. If you drive, you better have a damn good reason. So I’m doing neither. I’m sitting at home coding, of course.

I gave up the two-machine (desktop and laptop) dichotomy last year, selling my iMac on eBay when I found it just wasn’t getting the use I thought it needed to. In the interim I’ve had moments where I thought that was exactly the right decision and moments where I just wasn’t sure. Usually I came down on the “it’d probably be nice to have a desktop” side: sure, there are all sorts of problems with keeping things in sync, but the (relatively) cheap storage for things like audio and video means I don’t have to pay a premium for a big ass laptop drive.

Over the weekend I received a check for some consulting work I did, so yesterday I went to my local Apple dealer and bought a new iMac. I have admittedly mixed feelings about Mac OS X (see Mark’s thoughts, which mirror mine to a certain extent), but I figured I either have to pay the Microsoft Tax or the Apple Tax, so I may as well have a machine I find aesthetically pleasing that will make a great Ubuntu box[1]_.

Anyway, I haven’t installed Ubuntu yet, but I was playing with Dashcode a bit this afternoon. So if you like ccMixter (and I think you should), check out the ccMixter Editors’ Picks widget.

ccMixter Editors’ Picks widget

ccMixter Editors’ Picks widget

When you install it in the Dashboard it lets you easily play the latest Editors’ Picks from ccMixter. And if you want more information, just click the “>” button and it’ll open the selected track at ccMixter.org.


[1]And it’s not an HP.
date:2007-02-13 17:54:45
wordpress_id:475
layout:post
slug:snowed-in
comments:
category:development

Passing the buck

Let’s say, just hypothetically, of course, that one day your laptop, which is less than six months old, suddenly has multiple failures: the backlight, optical drive and touch pad all die. So you call the unnamed manufacturer [1] and arrange for service. They assure you that it will be repaired in 3-5 business days and overnight you a package.

Of course, when you look at the status on the web, the estimated return date is actually something like 7 business days, but no matter. And then the estimated return date comes and goes, and no laptop appears. So you call “Max” in lovely Bangalore, and he assures you that the backlight is being repaired and it will ship in 2-3 days, “maximum, sir[2]_“.

Four days later you call. Two days after that. And finally you’re told that they’re waiting on a backlight, and that no, they don’t have one in, and that it won’t be in until the end of the month. This, of course, stretches your repair window from “3-5 days” to 30-40 days. And of course, they understand how frustrating it is, but really, what are they supposed to do? But miracle of miracles, you receive an email two weeks early saying “your laptop has shipped.”

Of course, in HP Mind-Fuck-Your-Customer Land, “shipped” doesn’t mean “shipped” exactly. It means “we told FedEx to pick it up but they didn’t. So it’ll be there in a few days. Hopefully.” This is essentially what I was told tonite when I called again. Let’s think about the logic:

  • First, we told FedEx to pick it up.
  • But they didn’t.
  • So we told them again.
  • And we assume they’ll pick it up now.

And when I had the temerity to suggest to my helpful customer service rep that FedEx not picking up something was actually HP’s problem[3]_, he said “No, sir, we told FedEx to pick it up. You should call them to complain.” Seriously?

Hey Carly, wasn’t that merger supposed to make the company better at serving customers?

[1]What the hell, it’s HP.
[2]I should note that this is why I don’t worry about my job when I hear tales of outsourcing; I’ve yet to have a customer support interaction with one of the many “Max”, “Bob”, “Sam”, or “Andy“s that seem to populate the Indian sub-continent that actually left me feeling like that company cared to keep my business. That’s no way to treat a customer, let alone run a business.
[3]Since, well, I’m not FedEx’s customer, I’m HP’s, and seeing as this is my second HP notebook, I’m the most valuable kind: repeat. Well, I was the most valuable kind.
date:2007-02-08 22:52:54
wordpress_id:474
layout:post
slug:passing-the-buck
comments:
category:aside