Yesterday I wrote a post about accessibility, and have been getting some useful feedback on that post.  One post in particular suggested a number of free screen readers.  The built-in readers on Mac and Windows are also suggested.

I just installed NVDA on a Windows machine and tried out just our front page.  NVDA seems a little quirky — it stutters often and maybe just has some performance issues.  I think I hit ins+down (which tells it to read the current page) a couple times to many, as it was slow to start reading, and then kept reading the first line over and over.  But after that got worked out the page does reasonably well.  A couple things I noticed:

  • Our search box doesn’t seem to have any label, and NVDA reads the access key.  A weird choice.  If we add a title attribute I am sure this would fix it, but sometimes the tooltips can be annoying.  Here I think a tooltip is actually justified, since there’s no other label.
  • Titles on the project icons are distracting, and cause the title to be read twice.  An empty alt would read better there.  But it’s contextual — if the icon is placed next to the title (which it usually is) then an empty alt is best.  But if it is on its own (is it ever?) then it should have a title.
  • Portuguese turns into gobbledygook.  I doubt we can do anything useful about that.  But there’s not even a hint that it is a foreign language, it just starts saying weird words (and not Portuguese either, since it’s using English pronunciation).
  • Navigation links seem quite usable; they are well placed, labeled sufficiently (I think).  It takes time to read through a page, so succinct labels actually seem better than complete labels.  But for a long page of chunks, like our front page, actually getting to a content chunk (e.g., site news) takes a long time, and you can’t tell how far off it is.
  • I was complaining in my article about the difficulty of distinguishing <em> from <i>­.  I can report that the bold strong text on our front page sounds lousy, so I don’t know why I’d be concerned which kind of lousy it should sound like.  These finer points of markup don’t seem to make up any noticeable part of the experience.­  (And stupid Xinha, probably due to misguided ideas of accessibility and standards, translates my <i> to <em> without even asking.)

I haven’t actually tried doing more than reading the site.  Making the site readable is itself an important goal, and I think where we should start.  Actually interacting with the site as an author is going to be much harder.  How is Xinha going to work?  Well, I suppose I should give it a quick try, but I’m not optimistic.  I imagine if you become very familiar with the layout of the screens it would be possible.  But reading screens like the edit screen, or even worse this WordPress composition screen, is going to be hard.

Filed March 24th, 2008 under Uncategorized

1200 male geeks in one windowless conference center reminded me a bit of engineering school at the worst of times. I’m sort of kidding here :) Really Pycon was a great bunch of people with a lot of talent and a lot of passion for what they are doing.

One talk that was interesting was “What Zope 2 did wrong.” It really shed some light on the weakness (and strengths) of Zope 2 and also suggested characteristics to look for when choosing among web frameworks.

I think the talk that most moved me was Ivan’s talk on his recent trips bringing the OLPC to schoolchildren in Peru and Uruguay. There, I could really see how technology was improving people’s lives, and such cute and innocent people at that. That Ivan chap turned out to be quite a character I later gathered at Ian’s party. He’s got a reputation for being able to solve problems that are unsolvable. Very impressive!

This inspired me to sprint with the OLPC bunch. I first got Ubuntu up and running in VMWare on my system and was able to install the sugar emulator, that’s the OLPC’s GUI. To help out with the procedure for porting python apps to the XO (the OLPC laptop), I ported the great game of Asteroids. ship.pngThis, no doubt, will come in handy the next time Peruvian children get lost in an asteroid belt armed only with forward phasers and a bomb. Actually, I really do have doubts as to whether Asteroids was a great thing to export to the world’s children. I also wonder about digital games in general, however, I do like that I was able to improve the porting process somewhat for the OLPC bunch.

So Pycon was fun. One thing I really enjoyed was just being able to hang out with our bunch of TOPPers in a different environment. I really do appreciate being able to work with such great (and a little eccentric) people.

Filed March 22nd, 2008 under Python

by k0s

pycon was really fun.  It was the first time I’ve gotten to see a good sampling of the python community all in one place and it was a good experience to see the diversity of the pythonistas, doing all sorts of things (though web programming and scientific use seemed the most prominent, at least from my vantage point). 

The talks were pretty cool.  I especially liked Guido’s talk about py3k.  I guess if I had been following more closely, none of what he said would have been much a surprise, but for someone that does not have as much time to pay attention to the vast world that is python the talks were good updates to many things that I’ve had half an eye on but not my full attention.

 I liked the lightning talks better than the regular talks.  Many of them were the obligatory corporate “we are hiring” talks, but some of them were pure jewels.  After seeing how not a big deal they were the first day, I signed up for one on Saturday which ended up happening on Sunday basically plugging http://bitsyblog.biz/ .  Being five minutes and completely unrehearsed, I didn’t get much to “how bitsyblog works”, but probably more importantly I covered “why bitsyblog?” pretty well IMHO.

Then came Ian’s party.  I probably learned more and talked about python at a much higher level than at the conference.  I met plenty of folks during the conference, and it was good to meet them, but at the party people were, um, loose enough to really say their minds.  (Spare me abuse regarding “geeks” and “parties”) There was much (not undeserved) ripping on the rails community, and more high level talk about how python works, why python is awesome, and what could be better.  Most of it transcended “just” python.  Okay, it was a party.  No world-breaking programs will come out of it, but it is good to put things in perspective now and then.

 Then came the sprinting.  I didn’t do as well as at the snow sprint, partially because it was over as soon as it began (or so it seemed).  I didn’t get up until late Monday, then I marched ahead until 4a getting bistyblog to 1.0 until only me, a redhead, and some other guy were in a room.  Tuesday I played with Mel and Ian’s commenting webob middleware, but other than that was thoroughly unproductive (I ended up spending the afternoon starting at a screen waiting for a brain reboot).  I wish I had done the repoze sprint, or maybe got bitsyblog packaged for the OLPC.  ::sigh::

 And then it was over.  Bye, PyCon!  Maybe I’ll see you next year!

Filed March 20th, 2008 under Python

(written Sunday during the lightning talks; I couldn’t get a net connection at the time.)



Things are winding down at Pycon (barring sprints), we’re currently in the last session of lightning talks.

I’m writing this offline because the wireless in the big rooms has been pretty unusable for me.. I can usually connect fine, and then a minute or so later I have no bandwidth whatsoever and it never comes back. Much better out in the atrium.

Jeff is doing a lightning talk in a minute, if he can get display on the big screen (the plague of tech conferences… will the slides work? will you be able to see your own screen too? never know till you plug it in!

Oh crap, Jeff couldn’t get on the projector. Is he giving up? not sure.

Somebody from Slide.com just said that they serve 2 billion pictures, and 2 million uploads per day, on 100% python… they use Stackless somewhere in there.

Yay! Jeff haz projector. It went well. Bitsyblog got a nice round of applause.

Now a guy from Facebook is talking about a crazy project to rewrite facebook in python, using python embedded in PHP embedded in python, or something like that. I love lightning talks.

Lightning talks continue: TGPPL is an interesting license idea, if it’s at all legally viable.

Hey! It’s over!

Holy crap. Somebody just asked how many people were sticking around for sprints and about 300 hands just went up. (Wild guesstimate.)

Things that stood out for me this weekend:

- Lots of friendly people as always.

- Having a big TOPP posse. I’ve always gone alone before. Much more social experience this year (and very little sleep).

- the Writing Trac Plugins talk

- the What Zope Did Wrong talk

- the Turbogears/Pylons cooperation talk

- the Buildbot BOF session clarified a few things for me and it’s always cool to meet the guy that wrote something you rely on. (I originally planned on attending the Buildbot sprint, but Brian was unfindable for a while so I ended up in the core Python sprint with Doug.)


- The Pyglet talk was fun. Among other things, there was a demo of a simple 3D FPS written in about a week that may not look state of the art technologically, but it doesn’t look bad either.

- A long gab-gripe-beer fest in Chris McDonough’s room. Fun people. Hopefully most/all of them will also be at Ian’s party tonight. Note to self: Don’t forget to talk to Jackie about my conversation with the guys from Columbia.

- The Managing Complexity talk started slow but got more interesting as it went. I’d like to try getting some coverage and complexity metrics from our code. He mentioned some tools for that; must remember to look that up again.

- the “Keep writing crappy daemons” lightning talk was hilarious and rang true (although I’d add a gripe: always have an option to run in the foreground so you can play nice with other programs like daemontools or supervisord).

- Giant-size multitouch displays are fun to play with. Lots of obvious applications, eg. I expect audio engineers will be using them someday.

- My talk went pretty well! I got tongue-tied a couple times; but I got done on time, I mostly avoided reading my notes, and the slides worked well. I got a couple questions at the end that I was actually able to answer.


- I took a bit of a risk coming here with just a very tiny, awkward, unfamiliar computer (Eee). It worked out fine for my talk, looked good on the projector (though the resolution was different so my built-in screen was partly cut off; thankfully I remembered to print my damn notes.)

I’m getting the hang of this tiny thing. I can almost touch-type on it now. And I deleted the awful SCIM thing that was eating emacs keybindings. Still can’t install lxml though.

- The weather Friday was beautiful. Ate lunch outside.

Wish I had seen:



- All the 9 AM sessions. I slept through all the keynotes except half of Guido’s. I got up early enough for the Saturday keynotes, but after a solid week of sleep deprivation, I opted for gym and shower instead.

- The references talk got high marks from other TOPPers.

- the PyPy talk likewise

- I missed Ian’s talk. Hopefully the video will get online sometime before 2009.

- the Unicode Demystified talk. I went to the callback idioms talk instead, which wasn’t as interesting as it sounded. And I really need to learn the details of doing text right.

There were some not so great talks, but I’ll refrain from public disparagement, as I’m pretty sure I gave the very worst talk at Pycon Dallas 2006. I feel safe in saying that even though I missed half the

con hiding in my room trying desperately to get my act together. So I have a lot of sympathy for people having a rough time, especially first-timers.

Things that weren’t so great:



- I wish we were closer to downtown Chicago. Or at least something resembling civilization. At least Addision TX had lots of restaurants. We’re in a zone devoid of anything much aside from more airport hotels that charge twice what you’d expect for the food quality. Slim food pickings out here. The train to downtown took about an hour each way, plus much waiting and walking, when we went on a pizza expedition on Friday. Jeff and I went on a futile quest for veggie fare last night. Jeff on a futile quest is a lot like Marvin the Paranoid Android.

- Lunch at the con is the usual bleh fare. It’ll do.

Addendum: Ian’s party Sunday night was the bomb. Thanks Ian and Emily!

Filed March 19th, 2008 under Uncategorized

During the Pycon sprint I ended up writing some nasty tests for a simple feature.

Let’s say you’re writing a test for a class like this:

class Foo:
    def foo():
        if os.environ['FOO'] == 'bar':
            ...
        elif os.name != 'posix':
            ...
        elif somemodule.some_function():
            ...

It’s the usual isolation problem that leads people to using mocks and stubs. What’s bothering me is the need to replace those imported names (os.environ, os.name, etc.)  for the duration of the test, and cleanly restore them after the test.

One approach, which I used in the patch I submitted for that feature,  is to monkeypatch during test setup, replacing the problematic values and functions; and then restore the originals during teardown.

This just smells bad to me; it stinks in proportion to the number of things you monkeypatch. I ended up with four, which is plenty of stink.  Why? If your setup and teardown code drift out of sync, or your teardown raises an exception before it finishes, or or or … you get very obscure failures in unrelated parts of your system.

My crazy idea is this: What if there were a way to deep-copy the global namespace seen by the object under test, and inject things into this fake globals copy, without modifying the real globals? That would be totally safe: other instances and classes would see the world as usual, and when the test exits, the copy would just get thrown away.

But I think it’s just not possible. Oh well.

Off to France! I’ll be back at TOPP on 3/27.

Filed March 19th, 2008 under Python

We’re at PyCon! The lion’s share of the openplans / opencore developers are here:

Ian Bicking, Josh Bronson,  Mel Chua, Jeff Hammel, Anil Makhijani, Robert Marianski, Doug Mayle, Whit Morris, and me (Paul Winkler). Look for us and say hi!  We are friendly and mostly harmless. Oh, and we might have a job or two open.

I’m giving a talk Friday at 3:55, and Ian’s doing one on Sunday at 11 AM

Filed March 14th, 2008 under Open source, Python, Kicking Ass, TOPP, Uncategorized

I learned something useful on the zope-dev mailing list today… Gary Poster said this:

For future reference, if you put the set_trace on the same line,
you *can* use pdb.  For instance, this would let you walk into
the "do_foo" function.

    >>> import pdb; pdb.set_trace(); do_foo()
  
Filed March 12th, 2008 under Python

I stumbled across an article today entitled

WSGI Middleware Considered Harmful

by one of the people that wrote PEP333. In the first few paragraphs I (figuratively) lept up and said “Yes! I’m not the only one that feels this way!”

I’ve only recently begun exploring WSGI middleware in any real way. Take bitsyblog. bitsyblog is supposed to be a very minimal personal blog. It shouldn’t need to know about auth. It shouldn’t need to know about commenting. It shouldn’t need to know about tagging. And it really shouldn’t need to know about site navigation. All of these things I would like to do with middleware.

So far I’ve done auth by taking some of the paste.auth stuff and wrapping it in a layer called BitsyAuth that makes it behave more sanely. But even here it has to know about the innards of paste.auth.auth.tkt to log in the user. This one could actually be gotten around, I think, by hax0ring that module. What about the other guys?

I wrote a post called why wsgi is wrong , another provocatively titled post that double backs on its position. Middleware (for instance, site-nav, comments) wants to insert HTML into a page. The obvious approach is to decompose with lxml, insert one’s HTML and recompose. But really, this should happen only once, not once per middleware. Okay, this can be gotten around. What about other insidious things? Like site-nav?

A site nav bar is really a list of links. One can imagine middleware whereby different components inject links into the environ and they get assembled into a navigation bar on the way out. But now all the components that do so need to know about the site nav middleware. Maybe this isn’t that bad. It smells funny, but maybe that’s just my oversensitive nose.

What about comments? This seems to be worse. The commenting middleware needs to have some rule about what is commentable. This could take the form of some sort of rule specific to the wrapped app(s), or you could abuse environ once again to pass this information. Then what about the case that shouldn’t be deletable if it has comments on it? All of the sudden I’m scared and disgusted.

I don’t think any of the problems here are insurmountable within the WSGI framework. Really, my point is the same as that of PJE — lets have less incestuous code and more robust APIs. I just wanted to share the article with any interested developers. Wow, it feels so awkward blogging not on bitsyblog

Filed March 9th, 2008 under Uncategorized