Log Cruncher

Spent the last couple of days writing an apache log cruncher in PHP. Scans a dir for the oldest log (so it doesn’t try and work on the one apache is currently writing to), crunches it with analog, which outputs machine-readable report.dat, which is passed to ReportMagic, which makes lots of pretty graphs and charts, zips, archives, and deletes the original log, creates a date-stamped folder in the intranet’s logs dir, moves the latest batch of reports to that dir, and creates a new link on the intranet’s Traffic page connecting to the new report. The whole thing gets run by TaskScheduler weekly.

Update: analog was discontinued back in 2010. Here is a list of the current
10 Best Log Management Tools.

Los Platanos Machos Quattros

Over the past couple of weeks I’ve been practicing guitar and playing a couple of times a week with a group of friends, preparing a song for our friend Roger’s surprise 40th birthday party. The party was last night and totally rocked. Amazing food, big circle of good friends, hooch to spare…

We played the song for him around halfway through the evening and he was floored (the intended effect). Amy got the whole thing on tape and I put up a low-fi version on the infernal interweb.

What a great evening. No matter how hard it is to find a place to live in the Bay Area, it would be almost impossible for us to leave our friends here. Just wish Will and Sage lived out here rather than NY.

RedirectMatch

Spent too much time today trying to get mod_rewrite to behave. The problem was simple enough, but I just couldn’t get reliable behaviour out of it. Thought I needed it because straight Redirect doesn’t do regex. Then found RedirectMatch, which is exactly that – redirects with pattern matching. Is this httpd’s best-kept secret?

What I hate is that when you’re reading complicated docs and examples on something like mod_rewrite, nobody ever puts a line in there: “By the way, if you’re like 99% of people, you’ll probably find that RedirectMatch accomplishes the same thing but much more easily.” Nope. Nerds gotta do it the hard way or it doesn’t count.

Seeing Bill Clinton

Went to see Bill Clinton speak today. The J-School sponsored the event, but it was held in Zellerbach Hall. Cool to see Gray Davis, Orville Schell, and Bubba all onstage at once. Very inspiring. Listening to him really made me aware of how quickly we synopsize our feelings about leaders into a few summary thoughts. “Democrat. Two terms. Mixed track record. Kinda liked him, kinda not. Reputation tarnished by scandal.” It also made me aware of how our impressions of leaders are almost entirely governed by the sound bites and snippets the media choose to publish. But listening to him speak in complete thoughts, and without having to be on the campaign trail and sell himself, was fascinating. Lives of politicians are so complex, the issues so huge, the problems so multidimensional. The country was left with the impression of a kind of bumbler, and many people forgot just how intelligent he is. But his wit is so quick, his grasp of the big picture so vast.

His main talking point was globalization, and he had a lot to say on that. One of the most interesting things he pointed out was how we took the long view towards Japan and Germany, and poured resources into those countries to help shape the world for the future. If we had just won WWII and left it at that, our relationship to Germany and Japan today would be very different than it is. So what about Afghanistan? It’s not enough to bomb it further into oblivion, and it’s not enough to eliminate Al Qaeda (efforts he supports completely). Taking the long view, we have to pour resources into the Middle East to foster freedom of thought, education, etc. That kind of thing costs us peanuts, and has a huge pay-off for the future. But how much are we talking about that now?

He also made an unusual point about exhaustion. All of our senators and congresspeople, and in fact all the leaders of the world, live under such heavy workloads and under so much continual stress that the world is basically run by walking zombies. Scary thought.

I had felt non-committal about going to this thing, but was really glad I did.

Also got to hang out before the event with the founder and editor of Wired Digital. Had a very interesting conversation about what kind of media is successful today. Now that everything is so specialized – people have 100 TV channels and infinite web sites to choose from – the really successful publications are super specialized and all about lifestyle. Yoga magazine has a huge circ and is fat with ads. U.S. News and World Report is sinking out of view. Slashdot (tech specialized) is doing great, but Plastic (general topics) is struggling. Etc. etc. Interesting.

Fire in the Hood

A and I went out for a walk and saw a giant pillar of smoke stretching up above Telegraph Ave. Walked up there and found the local liquor store / laundromat in an inferno. A dozen fire trucks, suds foaming on the street, hundreds of people gawking from behind police tape. We really like the old Chinese man who runs the liquor store, and felt bad for him. Couldn’t find him though. The air stunk. Took them hours to get it under control. Telegraph blocked off, so traffic being re-routed through all the side streets.

Baby Pix

Amy and I went in for an ultrasound this morning. What an amazing experience – the first pictures of our little appleseed (that’s how big it is right now — 3.5 mm, with a heart the size of a poppyseed). Actually they weren’t sure whether we’d be able to catch the heartbeat at this early stage, but suddenly, there it was, fluttering like a hummingbird. A living being, sparking to life before our eyes. I’ve felt happy all along, but suddenly I felt pride for the first time.

closeup
First close-up, hanging out on the side of the egg sac. The sort of curved area at the top left is a “leg bud.” Which must mean the big area above the head on the right is its giant schnozz. ;)

first_both

The top image shows the size of the yolk sac compared to the embryo – the little guy is swimming in an ocean of food! The placenta has not yet developed – that will come at about 12 weeks. The bottom image shows the heartbeat along the bottom – just subtle dips here, but at one point we were able to see it really dramatically — not on the chart, but the embryo itself, fluttering with every beat. The vertical line along the right is the TCG – time compensation gain – it lets the sonographer compensate for imaging fluctuations due to depth / distance.

What’s playing now:

The knower of the past, the present and future
Crowning even this, you’re knowledge itself
Oh merciful benevolence, eternal
You’re the trinity of knowledge, truth, and bliss
You are the source of truth, the one with infinite attributes
You are the ocean of love we sorely miss
– Pete Townsend

Surrogate

Mentioned a while ago that Amy had a book release party for “Surrogate.” Finally got around to putting the images and essays from the book online today. As I was working with this stuff, was amazed all over again at how good she is, how much I love her work. I’m a lucky guy.

If you have comments on Amy’s photos, please leave them in the LiveJournal account I secretly set up for her : ;)

Lynda Barry

One of my favorite things about Thursdays has always been the Express, one of the three free weeklies we get in the Bay Area. But recently they “restructructured” and removed Cecil Adams (The Straight Dope), Gina Arnold (a music writer who has been with them for a decade) and Lynda Barry, my favorite cartoonist, whose stuff I’ve been in love with since the mid-80s (it used to be called Ernie Pook’s Comeek). The Express is now next to worthless, and Thursday lunches aren’t what they used to be.

Half a year ago Barry was offering to draw a panel “just for you!” for $25, so Amy and I took her up on it and she sent a panel of Marlys tip-toeing upstairs, and even sent a personal note. We gotta frame that one of these days. Fortunately Salon posts Barry’s strip online each week, so all is not lost.