Category Archives: Uncategorized

Time Change

I’m somewhat baffled by the press that the time change got, with respect to Microsoft Windows. We’ve been doing daylight savings time since that Ben Franklin guy, and it’s not like the change in the date was a surprise. We’ve known about it for 2 years. Why on earth did they wait to the last minute?

Anyways, all of my Linux machines change my clocks for me, and kept it to themselves. No fuss. No clicking OK. No patches needed. They just did the right thing.

phptidy

Long, long ago, Steve Hancock gave us PerlTidy, which allowed me to quickly and reliably convert raw Perl code into code that abided by all of my coding standards, whatever they might be for a particular project. This was much goodness.

I even have a vim macro that allows me to select a block of text, type a key sequence, and have that code reformatted so that it is more easily readable, evenly indented, and just prettier.

For many years, I’ve looked for a similar tool for PHP. I’ve seen references to something that Coogle did, but I can’t actually find it, and it doesn’t completely sound like what I’m looking for anyways.

Apparently the problem is that the intermixing of form and function (html and php) that happens in php code, makes this a more difficult problem than just parsing and reassembling source code. I naively think that there must be a simple way to treat HTML as comments and ignore it, but seeing as I have not the vaguest idea of how to go about this, it’s kinda of condescending of me to make such claims. What do I know?

This morning I discovered that PerlTidy works, some of the time, to tidy up PHP code. And, of course, sometimes it doesn’t, because part of what PerlTidy does is inspect the Perl code itself, in order to determine how to format things, and PHP code doesn’t generally parse as valid Perl, except when it does.

When I was learning PHP, I observed repeatedly that it was almost exactly the same as Perl, in most respects, most of the time. This gained me many dirty looks from the “Perl is evil” PHP programmers I encountered, but, since language bigotry has never struck me as a survival strategy, I continue to maintain this belief. Indeed, this belief allowed me to uncover features of PHP that I don’t frequently see used, and aren’t very well documented, but I discovered blindly by assuming that PHP should behave the same as Perl if I need it to. And most of the time it does.

Ahem. Back to the point.

I find numerous postings on various blogs and mailing lists, where people are bemoaning the lack of a usable PHPTidy tool. I’m really curious why it’s a hard problem. I don’t understand what’s involved in doing this, in the least, either in PHP or Perl, so I have no real notion of whether it is hard or not. What gives?

Burnt coffee

Obviously (yeah, lots of things are obvious in retrospect) running the coffee roaster indoors makes it heat up faster, and cool down slower, than running it outdoors. So I burned the coffee this morning. Still getting used to this thing, but the coffee is way better than buying it pre-roasted. Even when burnt.

The Apache Modules Book

A few days ago, I received The Apache Modules Book in the mail, and today I received 4 more copies of it. I had the great honor of writing the foreword to the book, and so my name appears on the cover, too, which is very cool. It’s good to have my name associated with such a fine book.

Nick has written a lot of Apache stuff, as well as numerous articles about Apache. And now there’s this book, which is simply the best documentation available on the topic of writing Apache modules.

Unfortunately, there’s really nothing else out there to compare it to. There’s the official developer documentation, which is sparse to the point of embarrassment. And there is a rather outdated book known as the eagle book, which was good when it was fresh, but has grown a little outdated over the last 8 years.

But, fortunately, this book is great whatever we have to compare it to. I highly recommend it, and highly recommend Nick as the right person for the job of explaining this particular topic. Go. Buy it now.

Apache Cookbook Training in Amsterdam

I’ll be giving a new training session at ApacheCon in Amsterdam. It’s a three hour hands-on tutorial covering as many Apache Web Server recipes as we can fit in.

After I gave me “20 things you didn’t know you could do with your Apache web server” talk at a few conferences, a number of people suggested that I give it at a not-quite-so-frantic pace, and that idea eventually turned into this tutorial. The talk consists of step-by-step how-tos, solving common questions asked on IRC and mailing lists.

This tutorial is geared to the beginner or intermediate Apache Web Server administrator, but experienced admins may also pick up some tricks that they hadn’t considered before.

Closer to the event, I’ll post a list of the specific questions that I intend to cover.

Attendees are encouraged to bring a laptop with Apache installed, so that they can go through each recipe with me, and have them working at the end of the class. Attendees will also be provided with the recipes themselves in either electronic or hardcopy form.

July 8, not August 19

So, that thing that was scheduled for August 19 is now scheduled for July 8. Because we didn’t check the calendar very carefully, that’s why. If you don’t know what I’m talking about, then presumably the date change doesn’t matter very much to you.