Women in Open Source

I’ve been thinking about the topic of women in open source for quite some time. For context, the percentage of women in IT is about 20%, and the percentage of women in open source is about 1.5%. For larger context, read Skud’s OSCon keynote, because she is *way* better at articulating it than I am.

Which brings me to my point.

The women I know in open source are way above average. By which I mean, quite simply, that almost all of them make me feel stupid by comparison.

Now, I don’t consider myself a genius, but I also know that I’m no dunce. I’ve written 13 books. I can read several languages, and make myself understood in one or two of them. I have a masters degree in mathematics. I’m no slouch.

But then I look at people like Skud, Allison Randall, Noirin Shirley, and Elizabeth Naramore, among others, and feel like maybe I should have paid more attention in school.

But, see, if I look around all of the Open Source projects that I’m involved with, *all* of the women are this caliber. There are no average or below-average women in Open Source, it seems. Which makes me look at some of Skud’s statistics, and wonder.

Sure, men are unaware of the problem, because they look around and see these amazingly talented women working with them, and figure, how can there be a problem.

But that seems to only highlight the problem. Why’s that? Well, apparently, when you’re a woman, you have to be amazing just to get past all of the old-boys-club and macho chauvinism that pervades the entire Open Source culture. Granted, this is less true in some corners of the kingdom than others, but it’s pretty prevalent where I live.

I remember riding up to my hotel room (at a conference) in an elevator with my wife, and a PHP developer who, fortunately, I don’t know the name of, wearing a shirt that was so profoundly offensive and degrading to women that it was all I could do to not make him apologize right there. Perhaps I should have. And that’s certainly not a one-off anecdote.

Now, I don’t pretend to know what the solution is. But I think that a good way to start is reading Skud’s presentation, and not wearing shirts like that – not only at conferences, but ever. Until we men adjust our attitudes about women, we’re going to perpetuate this problem – even if we refuse to acknowledge that it’s a problem.

vim: *.asp = perl

Useful .vimrc entries for today. Working a project where the files are named *.asp, presumably for historical reasons, but are actually Perl. Thus:

syntax on
filetype on
au BufNewFile,BufRead *.asp set filetype=perl

FallbackResource

There’s a new directive in mod_dir, and I’m very pleased about it, because it’s something that we’ve wanted for a long time, and which a LOT of people will benefit from. The directive is called FallbackResource, and is documented here.

Many web applications use the concept of a “front controller”, which means that every incoming request is mapped to a single script/handler/program that determines what needs to be done based on the URI. There’s some kind of an internal URL parsing mechanism that takes the action and arguments from the URI and sends it to the correct function or controller to produce output.

In order to produce this effect, there needs to be some kind of rewrite that sends all requests to that front controller. Something like this:

RewriteEngine On
RewriteRule (.*) index.php

Then, when the URI /foo/bar is requested, that gets sent to index.php, which, in turn, looks at the variable REQUEST_URI (‘/foo/bar’) and figures out what to do.

The trouble with this approach is that actual file resources, like ‘my_logo.jpg’ and ‘style.css’ also get sent to index.php, so we have to take steps to avoid that happening:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php

-f and -d are rewrite-speak for “is a file” and “is a directory”, respectively. So this says “if it’s not a file, and not a directory, do the rewrite.”

A lot of web app projects use a rewrite ruleset exactly like this one. WordPress does. CakePHP does. Drupal and Habari and Django, and lots of other things do. Unfortunately, many of them get it horribly wrong, or, sometimes, just sufficiently wrong to make it hard to troubleshoot. And WordPress famously had a 72-line version of this at one point. Fortunately, they fixed that several years ago.

But even that isn’t enough, because sometimes you have Aliases that need to be explicitly avoided, and you’ll need to list those, too:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(pony|server-status|server-info|icons)
RewriteRule (.*) index.php

And, of course, you may have other rewrite rules for other things on your site. And with added complexity comes added fragility, so there’s greater chance of breaking something, or just getting confused.

All of the above is now replaced by one directive:

FallbackResource index.php

That’s all. It says “if a request doesn’t map to something, send it to index.php.”

This directive is in trunk, and so will be in the 2.3/2.4 release. I don’t know if it will get backported to 2.2.

… and back to Perl

For the last five years, roughly, I’ve been doing PHP programming, gradually forgetting the Perl that I knew, except when I wished PHP would do something that Perl makes easy.

One particular syntax I missed on an almost daily basis was:

foo( ) unless $bar;

It was therefore with some trepidation that I started on my new project, which uses Perl, mod_perl, and a heap of CPAN modules that I used to be very familiar with, but have, I thought, forgotten.

I’ve been very pleased to discover that I haven’t forgotten it, although some of it is pretty rusty. Perl’s use of different variable sigils ($, @ and % to denote different variable types) was welcomed back like group of old friends of whom you have fond memories, but sometimes confuse their names. If you know what I mean.

But it’s all coming back to me, and the various Perl colloquialisms are springing to my fingers.

I think that my years in PHP have benefited me, but I’m not very clear just yet in what way. The ability to jump back and forth between languages can make you perpetually confused, or it can make you stronger in both, depending on your approach. One hopes that you can learn something from the one to take back to the other, but that doesn’t always work out.

I am reminded on a regular basis, by support email, that I have a bunch of modules on CPAN which have largely languished while I’ve been in PHP-land. Of course, many of them have been superseded by better modules while I’ve been away. The Date ones, in particular, have almost all been superseded by the Perl Datetime project, which, although I helped start, Dave Rolsky has been heading for several years now. Maybe, if I’m lucky, I’ll have an opportunity to resurrect some of those modules and start playing with them again. Non-gregorian calendars, and traditions about different dates have long held a fascination for me, and I’d like to play with that again.

But, meanwhile, I’m learning the slang again, and since I’ve missed a half-dozen releases of Perl, I’m sure that it does even more weird and wonderful things than I did when I was a common face around the Perl circles.

Working from home

Well, this ends week one of working from home.

Mostly, I was concerned that I wouldn’t be able to concentrate, but amazingly that hasn’t been the case. Although the boy has had a little trouble adjusting to the fact that when he gets home from school I’m still at work, even that hasn’t been too much of a distraction, and I’ve been able to get quite a lot done during this first week.

I started out on one project, which I had begun to get the basics of after the first two days, but was then switched to another project, which is *way* exciting, and which I think I have a good idea of what needs to be done. By the end of Friday I was, I think, making actual useful contributions to the project, and I have high hopes for next week.

Oh, and today I wore shorts to work for the first time in more than 10 years, so that’s got to count for something, too. 🙂

Speedup

Earlier this week:

Today:

Nothing to write home about, but an improvement, anyways.

Unfortunately, I didn’t get the full story, and apparently I didn’t get any faster uplink, which means that things like voip that need both directions, or something like Sugersync which is primarily upload, or updating web content, didn’t benefit much.

Looking around, it appears that the fastest uplink I can hope for is about 1mbps unless I want to pay for business-level service. I don’t really understand why the upload is so much slower than the download.

Craig’s List

This weekend, for the first time, I posted something to craigslist. I was cleaning out the attic, and I came across some ancient computer hardware, and on the way to the garbage I thought, there’s probably someone would could benefit from this.

So I put a Seagate DDS3/DDS4 tape drive, and a Serial-to-USB converter, as well as two old car stereos.

Within an hour, I had someone at my door giving me $15 for a Serial-to-USB thingy that I was about to toss in the trash. Not much, but I felt like I did him a favor, and we had a little pocket money.

I *love* the craigslist website, precisely because it doesn’t waste a moment on anything superfluous. It’s just raw data, and the minimum amount of formatting required to make it legible. And it works.

I admit I was a little nervous that some nutjob would show up at my door to check out my place for a later burglary, but he seemed like a fellow-geek who just wanted some esoteric piece of hardware.

The Margin Is Too Narrow