Category Archives: Uncategorized

mod_rewrite misinformation

rewrite.jpgI wrote a book about mod_rewrite. Perhaps you have a copy. If so, thanks.

Additionally, I spend a lot of time on IRC (freenode.org, #httpd) answering mod_rewrite questions. And I speak at various conferences, frequently on the topic of mod_rewrite.

mod_rewrite isn’t in fact, terribly difficult. However, it is made more difficult by two factors.

First, regular expressions are universally perceived as being difficult. Thus, even people who haven’t even tried to learn about them already *know* that they are difficult, because someone else communicated this dread to them in a weird tribal knowledge rear-brain kind of way.

Second, and perhaps more damaging, is the ENORMOUS quantity of misinformation that exists online about mod_rewrite. If you search for a rewrite recipe to do X, you’ll find a hundred of them, and at least 75% of them will be Just Plain Wrong, while 20% of them will be either misleading, or confusing, or actually work, but do it in such a way that enormously obfuscates things to the point that nobody can understand what’s actually going on.

The other 5% will make the observation that the task in question doesn’t actually require mod_rewrite, but that there’s another, more efficient and simple, configuration directive that does exactly what is being requested. Such as Redirect, or SetEnvIf, or Alias, or UseCanonicalName.

I became interested in mod_rewrite primarily because of regular expressions. Having read Jeffrey’s marvelous book from cover to cover back in the first edition, and using regex extensively in Perl, I figured, how hard could it really be? The secret answer is, not very hard at all. But since people go pretty far out of their way to make it hard, I’ve been guaranteed a speaking spot at any conference I want to submit a paper to, because people say, Oh, mod_rewrite is HARD!! Lucky me.

So, once again, a huge thank you to Ralf for creating this beast.

I will now resume my eternal quest to find and gently correct all of the bad mod_rewrite examples out there on the web.

William Purvis and Fountain Pens

Today I saw an ad for the UNCF that indicated that the fountain pen was invented by an African American, William Purvis. This struck me as wildly improbable, since fountain pens have been around considerably longer than there were non-native persons living on the North American continent, and certainly before there were persons of African descent here.

Another website made the same claim, giving a date in 1890 for the invention, but lacked any useful information to indicate what, exactly, Mr. Purvis invented. Strangely, Wikipedia doesn’t mention Mr. Purvis at all, and gives a date in 953 for the invention of the fountain pen, in Egypt. For the purposes of this claim, “fountain pen” is defined to be a device with an ink reservoir and some kind of gravity-fed ink delivery to a nib. And, further, there are surviving fountain pens from the 1700’s, which would make an 1890 invention date impossible.

As a huge fan of fountain pens, my curiosity was piqued, and I wanted to know what in fact he did invent and patent in 1890.

After a little more poking around, I found that Mr. Purvis invented improvements to existing technology, making a fountain pen that didn’t leak as much, and which was more affordable to most people, ushering in an era where everybody could own one. He also invented a number of other very cool things, including self-inking hand stamps, electric railway track switchers, and machines for making paper bags.

Edit: Here’s another great resource on the history of fountain pens.

All of this leaves me wondering why a respectable organization like the UNCF would make such a claim which is so trivially debunked. And yet, even as I write this, I know that folks will accuse me of being racist by even pointing out such a thing. If the goal here is to celebrate the accomplishments of African American inventors, there’s certainly no shortage of those without making any up.

Now, I’m certain that many of the inventions attributed to white men were in fact invented by someone of, shall we say, lower social class at the time of invention, either for reasons of race, nationality, or gender, and the white man in question took credit for them, because he knew that the actual inventor lacked the clout to do anything about it. I’ve heard this claim about Edison repeatedly. The controversy we know about is that of Nikola Tesla who was Serbian. But he was white, and so he got some little recognition at the time, and a lot more since his death.

But revisionist history doesn’t help anyone. We should celebrate William Purvis for what he did invent – which was some very cool stuff – without making up claims that he invented other things, which not only opens the claims up to debunking, but also undervalues the cool things he did accomplish.

Out Of Touch Lexingtonians

3-090608Sidewalksacb012.embedded.prod_affiliate.79.jpg

Once again the rich folks in Lexington are talking out of both sides of their mouths, and it really irritates me.

They claim that they oppose the sidewalks on Tates Creek Road because it will spoil the grass, because it will be dangerous for people to walk there, and because the people will be exposed to exhaust fumes. But we know better, don’t we?

The truth is that they don’t want *that kind* of people walking in front of their million dollar homes.

Whenever there’s something proposed in Lexington that benefits the low-income folks who don’t drive SUVs and don’t own horses, it gets shot down. And the sidewalk proposal will probably fail in the city council tonight, because the city council is a bunch of spoiled rich kids who are more interested in having direct flights to Las Vegas and Martha’s Vineyard than they are about whether their less advantaged neighbors are able to walk to work without ruining their clothes.

It’s not even like there’s a cost involved – this is a federal grant.

The number of completely ludicrous statements made in opposition to the sidewalk would be funny if it wasn’t so disgusting.

“Sidewalks would destroy the greenery of the corridor and increase storm-water run off,” said Steve Kesten,

… leaning against the side of his Lexus SUV that gets 7 miles to the gallon, downhill.

“I see no good reason for sidewalks out here, and neither do my neighbors.”

…. Presumably because they all have SUVs, too, and so don’t need to walk anywhere.

“My constituents don’t see people walking along the road,” Beard said, adding that when he drives along Tates Creek, “I never, I mean never, have seen anyone walking.”

… Presumably because he was talking on his cell phone and drinking his Starbucks at the time.

Lexington is increasingly a divided society, with a widening gap between the rich folks that run the show and the poor folks who make up the majority of the population. Here’s hoping I’m wrong about the council meeting tonight. At least this is a good sign.

Sveasoft vs Cisco

I have a WRT54G, the ancient 2.2 version of the hardware, back before there was an L edition. I’ve been running the Sveasoft Alchemy firmware on it for years and years. I don’t even remember when I installed it.

Yeah, I know, there are some folks with ideological reasons why I shouldn’t run Sveasoft. Whatever. That’s not the point.

Anyways, for the last few months, we’ve had to reset the device on a nearly daily basis, otherwise the DHCP server just stops handing out addresses.

This weekend, we got fed up, and I downloaded the latest firmware from Linksys/Cisco. It seems to have all the same features as the Sveasoft firmware I was running. Or, at least, if it’s missing any, it’s ones I wasn’t using. Presumably I could run a ssh server on it, so that I could ssh in and … um … do something … I’m not sure why I would want to do that, actually.

Anyways, we haven’t had that problem since we did that, and it makes me wonder, not for the first time, how it is that software can suddenly take it into its mind, after years and years of functioning correctly, to just suddenly quit.

So strange.

Tandoori Chicken

We spent most of yesterday afternoon making dinner – tandoori chicken, chapatis, and aloo gobi. Although we usually make tandoori chicken with a mix, yesterday we made it from scratch, which is always better, and a lot more fun.

There are lots of recipes online for tandoori chicken, but none of them are quite what I remember from a cookbook I used to have, but seem to have misplaced in some dark corner.

So we took several of the recipes as inspiration, and came up with something all our own. Like all good recipes, I’m not entirely sure what I put in it. Yoghurt, fresh-pressed garlic, grated fresh ginger, cumin, cardamon, coriander, black pepper, cloves, cayenne, garam masala that we already had, and lots of chopped cilantro. As to the quantities of each, I really couldn’t say. Which is a shame, because it was some of the best I’ve ever made.

We’ll have to try that again some day. Maybe that time I’ll write down the amounts. But, realistically, I doubt that I will.

The aloo gobi recipe is the one that’s at the end of the “Bend it like Beckham” DVD.

The chapatis are my own interpretation of the technique that my brother taught me.

Maybe we’ll make it for you next time you visit.

Nancy’s Kitchen

We just came back from breakfast at Nancy’s Kitchen. We walked down there and back – about a mile each way – so not nearly enough to work off the effects of an epic breakfast. Two eggs, sausage, home fries and sausage gravy, toast, and coffee, all for the low, low price of $6.

Amazing.

In fact, we drove over 200 miles for this breakfast, because Skippy told us that they are closing next month, after being open for 20 or 30 years, and serving hearty, inexpensive food to millions of customers. So, naturally, we had to come, to have one last meal there before it is gone forever.

We told the chef, as we were checking out, that we had driven 200 miles for breakfast, and he thanked us, and said that there is some hope – not much – that they’ll stay open. Hope is still alive.

If you’re anywhere in the Columbus Ohio area, you owe it to yourself to go to Nancy’s for breakfast before they’re gone. It’s on High Street, in the Clintonville area.