January 2004

Convergence

I just added about 70 photos to the site. These were all available on the site I began in September of 2001, and sort of disappeared sometime during the spring of 2002.

The earliest photo at the time of this writing was taken on 9/26/1999, an astonishing 4.25 years ago.

Having added the photos to Movable Type using the dates upon which they were taken, the archives now go all the way back to 9/1999, which is somewhat mind-blowing to me.

When I started spending the occasional Saturday or Sunday driving around Los Angeles and taking photos, I had vague aspirations of creating a site like the excellent Roadside Peek, but again and again the prospect of managing such a site statically was just too much of a downer for me to ever make a serious effort. By late 1999 I had come to the conclusion that managing content-oriented websites with static HTML pages was a losing proposition, but lacking PHP and database knowledge at the time I didn't know what to do about it.

So the photos accumulated... first on Zip disks and then on CD-ROMs. Some of the backlog made it onto my 2001 web site, but many, many more photos remain scattered across those old CD's.

Enter iPhoto - A great tool for organizing groups of photos, and Movable Type - a great tool for putting content online. Connectivity between the two is still lacking, but I feel like a solution is in sight, and it will probably involve some combination of AppleScript, ImageMagick and PHP. My holy grail is to manage photographs in iPhoto - import them, label them, add comments, and then run an automated process to take that information from iPhoto, resize the photos for web use, build Movable Type Entry and Excerpt HTML, and push it all to the webserver.

Eric Sigler's jaw-dropping iPhoto2Weblog plugin comes so close, but the current release doesn't quite give me the flexibility I want.

Nevertheless, this is exciting stuff that I couldn't have imagined getting my hands on when I got my Olympus digicam back in 1999. Who knows what this site will look like by the end of 2004?

Hoist by My Own Petard

The former incarnation of this website was a homegrown godawful mess of a CMS that I cobbled together using PHP and MySQL. It did a so/so job of separating content from presentation.

Not that I bothered to get a backup of the actual MySQL database before abandoning the site. I think it was one of those things that got lost in the shuffle of preparations for the move back east.

I did manage to grab a more-or-less complete mirror of the old site with wget, which enabled me to brute force my way through the old static HTML files (thankfully generated using a somewhat-thoughtfully commented template) and kluge the contents into Movable Type's import format.

I took a closer look at my archive files tonight and realized that all of the old photo pages are intact as well. The gears started turning, and here it is 1:21 AM and I'm up to my elbows in a procedural PHP script to process the old pages into something I can reincorporate into my new site without too much trouble. My plan of attack was something like this:

  1. Find a text pattern distinguishing the photo pages and retrieve a comprehensive list using grep
  2. for each file in that list, read the contents into memory and use regexes to extract the title, photo filename, and description data.
  3. Read the EXIF data from the photo file to get the photo date and time
  4. Generate thumbnails using GD
  5. Assemble the resulting data into a Movable Type import file
  6. Upload all the photos and thumbnails
  7. Run the import
  8. Rebuild and revel in how L337 I am

The only catch is that the FileDateTime info in the headers was set to the date upon which I copied them to my desktop from whatever old CD-ROM I found them on, not the actual dates of the photos.

Fortunately the dates are contained in the photo pages themselves - a bit more regex hacking will take care of that. I don't have the times, so by miraculous coincidence each one will appear to have been taken at 12:00 PM precisely.

Some of the thumbnails are missing, so I'm now in the process of downloading the ImageMagick binaries for Darwin... I could probably put together a PHP script to do it with GD in the time the download will take, but I don't feel like burning the mental energy.

The biggest problem of the whole process will probably be uploading all these photos to the server.

Humbug

Humbug

Like a Barfbag on a Bumpy Flight

Having a satellite receiver on the roof instead of a TV antenna means that we don't get programming from any of the major networks... with very, very few exceptions that's no loss. The Simpsons was the last network show I watched religiously, and the Simpsons hasn't been all that funny for a long time now.

Reality TV in particular is something that I can do without. No matter which show you watch, it amounts to 30 or 60 minutes spent watching human beings at their worst.

One of the more recent shows in the genre is the A&E network's Airline, which chronicles the zany happenings in and around the Southwest ticket counters and terminals around the country. You know, bitchy customers, drunk passengers, everything people hate about dealing with air travel in the first place. This is entertainment?

A lot of people apparently think so... the TV ad I saw tonight was rife with tidbits from glowing reviews. One in particular struck me:

"Like a barf bag on a bumpy flight!"

I didn't catch whose quote that was, but if you watch A&E for more than 5 minutes I'm sure you can see the ad for yourself.

"Like a barf bag on a bumpy flight"? That's what describes a good TV show these days? As in, "This reality TV show is marginally less puerile than the rest!"

Thought Processes Into Which I Would Like Insight

From The Guardian | Computer's chips turn into potatoes:

Staff at a department store in the German city of Kaiserslautern called detectives after an angry customer tried to return a computer stuffed with potatoes to the shop twice on the same day.

The man berated sales assistants in the store, complaining that the computer he had bought only hours before did not work, according to police reports.

The store's staff opened the machine and discovered it was not functioning because its working parts had been replaced with small potatoes. The bemused shop assistants gave the man a new computer free of charge.

But bemusement turned to suspicion when the shopper returned a short while later with another computer - again potato-filled.

Police were called and the man was arrested.

It sounds like a sketch comedy vignette, but this is actually some guy. Some guy bought a computer, went home, and very deliberately removed the side panel and inner components, filled the compartment with potatoes, and put the panel back on - and just as though he had installed a new sound card or some RAM, he assumed it would work.

Potatoes!

While very amusing on one level, it's very disturbing on another... that's well beyond mistaking the CD tray for a cup holder, it's closer to "The neighbor's dog told me to kill those people." Or fill the computer with potatoes for a start.


Postscript: I find it mildly amusing that three out of four of the 'related entries' links at the time of orignal publication are Macintosh related.

Severe Weather Alert

Severe Weather Alert from the National Weather Service

...CENTRAL MIDDLESEX MA-EASTERN ESSEX MA-EASTERN FRANKLIN MA- EASTERN HAMPDEN MA-EASTERN HAMPSHIRE MA-EASTERN NORFOLK MA- NORTHERN WORCESTER MA-NORTHWEST MIDDLESEX MA-SOUTHEAST MIDDLESEX MA- SOUTHERN WORCESTER MA-SUFFOLK MA-WESTERN ESSEX MA- WESTERN FRANKLIN MA-WESTERN HAMPDEN MA-WESTERN HAMPSHIRE MA- WESTERN NORFOLK MA- 400 AM EST THU JAN 15 2004

... WIND CHILL WARNING LATER THIS AFTERNOON INTO FRIDAY FOR ALL OF INTERIOR MASSACHUSETTS...

AN OUTBREAK OF DANGEROUSLY COLD WEATHER WILL FOLLOW THIS MORNINGS DUSTING OF SNOW. LITTLE IN THE WAY OF ADDITIONAL SNOW IS EXPECTED NORTH OF THE MASS TURNPIKE... CERTAINLY NO MORE THAN AN INCH.

TEMPERATURES WILL PLUMMET TO RECORD LEVELS TONIGHT... IN THE 10 TO 20 BELOW ZERO RANGE AND INCREASING NORTHWEST WINDS WILL DRIVE CHILL VALUES INTO THE VERY DANGEROUS RANGE OF MINUS 30 TO MINUS 40 DEGREES BELOW ZERO. THIS WILL MAKE IT DIFFICULT FOR VEHICLES TO WARM UP... CAN SAP BATTERY STRENGTH... INCLUDING CELL PHONES... AND IF CAUGHT IN EXPOSED RURAL AREAS WITHOUT PROPER PROTECTION... CAN BE LIFE THREATENING. IF YOU DONT HAVE TO TRAVEL LATE TONIGHT AND EARLY FRIDAY... IT IS RECOMMENDED YOU DONT.

THIS IS A VERY SERIOUS OUTBREAK OF BITTER COLD. IT COULD BE QUITE DANGEROUS TO THOSE WHO WILL BE OUTSIDE... EVEN IF FOR JUST A FEW MINUTES WAITING FOR THE BUS FOR EXAMPLE. FROSTBITE CAN DEVELOP IN JUST 10 MINUTES WITH THESE TYPE OF CONDITIONS. DRESS IN MANY LAYERS AND WEAR A HAT TO COVER THE HEAD....

Brick Wall

It's bound to happen every so often... You'll be programming merrily along, and all of a sudden a chunk of code simply refuses to work.

You double check the usual pitfalls... a statement accidentally placed outside a loop, an inadvertent "=" assignment when what you meant to do was an "==" comparision, a mistyped variable name (which you can get away with in PHP4), and any number of other common pitfalls.

Everything looks OK, so you throw in some debugging statements to dump diagnostic bits to STDOUT.

Debugging indicates that everything is working as it should, but the actual code still refuses to cooperate.

You read and reread the documentation, and scour Google to see if anyone else has encountered your problem, and there's... just... nothing.

You take a walk and have a snack, thinking to yourself that you'll clear your head, elevate your blood sugar, and spot the problem instantly the moment you sit down.

No such luck, and you've now killed half an afternoon on this stupid piece of code that should just work.

The worst part is that you know whatever the problem turns out to be is going to be staring you right in the face once you do find it, and it's going to be so trivial that you feel like an idiot for the rest of the day.

Welcome to my Tuesday afternoon wrestling match with PHP Variable variables.


Five Minutes Later...
Sure enough, as soon as I closed the Movable Type window and went back to the code, I tried a single trim() statement in just the right place and everything else magically worked just the way I knew it was supposed to. Stupid.

Related Entries with MTSQLEntries

Results are pretty good and will continue to get better if I can remember to be diligent about keywords.Now that I've got the SQL plugin installed, I figured I might as well check out a feature I saw in its trackback entry - Adam Kalsey's Related Entries.

Now that I've put it in place on my individual archives, I am discovering that I don't have much in the way of keywords on my old entries. I'm not sure if they were never there, or somehow got omitted on their way into MT.

Anyway, results are pretty good and will continue to get better if I can remember to be diligent about keywords.

Lastn Entries By modified_on

I just killed most of a perfectly good Sunday afternoon trying to solve this stupid problem in Movable Type, and now that I've got it I had better preserve it for posterity.

All I wanted to do on my home page was display one entry excerpt from my 'Photo' category, selected by most recent date modified as opposed to most recent date authored; this is because I have a big backlog of old photos that I would like to appear on the home page as I add them, regardless of their original date (which I plan to preserve as the entry date.)

The problem is that the only attribute of the <MTEntries> tag that lets you limit the number of entries displayed is lastn, and lastn is only good for displaying entries based on entry_created_on in descending order.

I haven't had many gripes about MT so far, but that's a fairly major one now that I've come across that particular limitation.

The workaround is to use Brad Choate's, SQL Plugin, with this query:

SELECT entry_id FROM mt_entry LEFT JOIN mt_placement ON placement_entry_id = entry_id WHERE entry_blog_id = x AND entry_status = 2 AND placement_category_id = y ORDER BY entry_modified_on DESC LIMIT z

Where x, y, and z are the desired blog id, category id, and number of entries respectively. An entry status of '2' restricts the query to show only entries set to 'Publish'.

I installed the plugin and worked out the above query, only to get an error from the DBI library. As usual, Google was my friend, and pointed me to Mike James' post, Solution to MT SQL plugin DBI error.

The problem is with an older version of the Perl DBI module. The solution: Assuming you have a shell account but not root access to your web server, download the latest DBI module from CPAN, build and install it in your home directory, and tweak MT to use your version instead of the system version. This last is accomplished by adding the line

use lib qw(/home/your_user_name/lib/i386-linux);

above the use DBI; statement in /path/to/mt/lib/MT/ObjectDriver/DBI.pm. See the actual post for more specifics.

I do love Movable Type, but the lack of a more generic, SQL-like 'limit' attribute in the <MTEntries> tag is kind of puzzling.

People Still Write Weblogs. Journalists Still Don't Get It.

Nearly two years after I wrote this, journalists are for some reason still scratching their heads over why the unwashed masses enjoy maintaining weblogs.

The latest in-depth look at the lives of teenage bloggers? "My So-Called Blog" by Emily Nussbaum of the New York Times.

Emily's article is at least a departure from the usual smug snarkfests by everybody's favorite windbag, but it still comes across as an effort by a "Real Writer" to make a mountain out of the weblog molehill.

This is what we learn from "My So-Called Blog": teenagers spend lots of time writing things in their weblogs, and a lot of it is very personal. So personal, in fact, that the overall tone of the article is "Those blogging teenagers are meddling with powers they can't possibly comprehend!". For example:

A result of all this self-chronicling is that the private experience of adolescence -- a period traditionally marked by seizures of self-consciousness and personal confessions wrapped in layers and hidden in a sock drawer -- has been made public. Peer into an online journal, and you find the operatic texture of teenage life with its fits of romantic misery, quick-change moods and sardonic inside jokes. Gossip spreads like poison. Diary writers compete for attention, then fret when they get it. And everything parents fear is true. (For one thing, their children view them as stupid and insane, with terrible musical taste.) But the linked journals also form a community, an intriguing, unchecked experiment in silent group therapy -- a hive mind in which everyone commiserates about how it feels to be an outsider, in perfect choral unison.

Oh, please. Substitute "bull session at Perkins" for "online journal", and all the above paragraph describes is the same teenage experience that kids in America have had for probably the last 50 years, if not longer. The difference is that in a lot of ways, it's easier to find sympathetic people with like interests on the internet than it is in the tangled web of high school-style social interaction; Your pimples, last-year's fashions, and general social ineptitude don't show on the internet.

As for how personal some of this stuff is, when was the last time you went reading a bunch of teenage weblogs when you weren't researching an article about them? The fact that the stuff is out there for everyone to see doesn't mean everyone is necessarily going to see it. Give teenagers some credit; they're savvy enough to know whether or not their parents are likely to netstalk them and read their deepest, darkest online confessions. They can censor themselves accordingly, or just use a pseudonym.

At the end of the day, the fact remains that people like writing weblogs, even though they don't get paid, or even necessarily have anything profound to say. It's really not a big deal, no matter how much Real Writers want it to be.

After I Zoquo, I like to Ushnu

Pholph's Scrabble Generator

My Scrabble? Score is: 8.
What is your score? Get it here.

First there was a Miserable Failure

...and for a while there was a Plagiarizing Bastard. For background, see MetaFilter.

Now that they've removed the infringing article from the website I'm of two minds about leaving this post and its snarky Googlebomb link attempt up at all... sure, the page was taken down (not before somebody tried to tell the original author that "You can't copyright anything on the internet"), but that doesn't absolve the Glenn Beck Program of having done it in the first place. The thing about internet publishing is that it's so easy to make things like this disappear into the memory hole... for instance, I've already edited this post three or four times since it went up this morning. Even I don't remember exactly what it originally said.

So, the link stays, at least until somebody over at glennbeck.com checks the referrer log and sends me a threatening letter.

As for Beck's call to replace Michael Moore with George Bush as the top google result for Miserable Failure, no thanks. As much as Michael Moore annoys me, I'd say he's rather more successful at his job than George W. has been.


Welcome MeFi readers, I guess, and thanks to Paul Reeve for pointing out my gross misspelling of the word 'Plagiarizing'. I'm usually better than that - or at least, I usually choose less important words to misspell. Too bad I can't fix the spelling on the trackback.

Cold

As a relatively recent resident of Southern California, I have been repeatedly asked "Bet you're having second thoughts about leaving California, eh?"

Not really.After a startingly mild December, with temperatures in the 40s and even 50s for much of the month, the weather has gotten rather cold over the last couple of days... highs of 20 degrees during the day, single digits overnight, and who knows how cold with the wind chill.

As a relatively recent resident of Southern California, I have been repeatedly asked "Bet you're having second thoughts about leaving California, eh?"

Not really. I don't really know what to say other than No... It's cold here, but it's also woodsy, hilly, and generally beautiful. It's warm in L.A., but it's also overpopulated, smoggy, and generally blighted.

Even in the bleak depths of last March I wasn't inclined to second-guess our move.

GarageBand... Kawasaki Rhythm Rocker for the Rest of Us

The iLife applications have to be some of the most underused ones on my computer… Once I can figure out a way to easily get my photos out of iPhoto and into Movable Type I’ll be using iPhoto a lot more, but the thing that’s going to get me to drop $49 on the new iLife suite next week is GarageBand.I’ve been drinking the Apple kool-aid pretty much since I heard what OS X was all about a few years ago. It wasn’t until last spring that I actually got my hands on anything other than a floor model at Fry’s, and now with a PowerBook as my primary computer at home and at work the only place my fairly new PC has is running Linux and sharing our internet connection from the basement.

The iLife applications have to be some of the most underused ones on my computer… Once I can figure out a way to easily get my photos out of iPhoto and into Movable Type I’ll be using iPhoto a lot more, but the thing that’s going to get me to drop $49 on the new iLife suite next week is GarageBand.

As I watched the demo during yesterday’s Macworld keynote address, the recurring thought in my mind was

“Gah! What if they had this when I was a kid! How good I would be on electric guitar if I’d had something like this to practice against instead of buddies who only ever wanted to play ‘Purple Haze’ and ‘Sunshine of your Love’!”

As a matter of fact, my parents did (after much pestering) buy me a program called Kawasaki Rhythm Rocker for our Commodore 64, which sort of did the same thing GarageBand does, on a much, much smaller and cruder scale; it had loops and a number of different instruments, and you could record your melody via the keyboard - there was even a plastic piano keyboard overlay you could buy that would fit over the C64. I believe the thing was even MIDI capable, if you had the proper MIDI processor (probably hundreds or thousands of dollars at the time) to plug into the RS232 port.

But, it was fairly limited, and suffered from lack of a way to record your finished pieces, and I suffered from a general lack of musical knowledge and probably a lack of patience.

So I’m pretty damn excited about GarageBand… the vintage amplifier feature is going to get me back on my electric guitar again, and it should be a great practice tool for banjo.

Retroactive Photos

I recall that posting photos was the perfect activity for when I didn't feel like writing, but wanted to add something to the site... so there's no reason I shouldn't get back into that habit as well.One thing that still bugs me about Movable Type, and Blog-related, web-based CMS in general, is the lack of good, native support for photo management.

By photo management I mean something along the lines of Apple's iPhoto, which preserves a pristine copy of your original image while letting you crop, rotate, tweak, caption, rename, and otherwise manipulate it... and then takes care of creating linked thumbnails for you.

But it occurs to me... since iPhoto is really good at organizing photos, I should let it take care of archiving my original images... I can deal for the time being with manually exporting them and then uploading them to MT for web consumption. I'll bet the process could be even better automated with AppleScript, if somebody hasn't done it already. Too bad I don't know AppleScript.

Anyway, I recall that posting photos was the perfect activity for when I didn't feel like writing, but wanted to add something to the site... so there's no reason I shouldn't get back into that habit as well, especially with the huge backlog of photos I have at my disposal. It would be an excuse to take new photos too.

(The first photo.)


Postscript, 1/6/2004: Once again, somebody's way ahead of me on this one.

Now Playing in iTunes

I love OS X, iTunes, Google and the internet.

Now that I'm getting back into the swing of maintaining a web site, I've been thinking about all the little enhancements I can make to my templates. One feature that I lamely tried to implement on my original weblog way back when was an "What I'm listening to" sidebar, complete with thumbnail and Amazon affiliate link. The only problem was, I had to update it manually.

I suspected it would be possible to automate such a feature thanks to iTunes and AppleScript, and Google just proved me right:

Now Playing in iTunes

While it would have been fun to stumble my way through such a project, I'm glad other people have laid much of the groundwork ahead of me, and generously made their knowledge available on the web.

When I Grow Up, I'm Going to Porcine University!

Pork4Kids (Via MetaFilter)

I shudder to think what the marketing meetings and focus groups must have been like... and I want to know what the prizes for the coloring contest were!

Weekend Winddown

I can remember that beginning-of-vacation "What in the world am I going to do with all this time off" euphoria, and part of me is wondering where the time went.I don't watch 60 Minutes as a weekly weekend-end ritual, but ever since I was a kid I've definitely noticed the winddown phenomenon.

Around the time the shadows started getting long on Sunday afternoons, the weekend would for all intents and purposes be over; Sunday evening was for getting acclimated to the idea of heading back to school the following morning.

Now that I'm supposedly a Grown Up Sundays aren't quite so melancholy, but today marks the end of the longest holiday break I've ever had while gainfully employed; this whole weekend has had a winddown feel to it.

No so much because I'm dreading the return to work; I enjoy my job rather a lot. It's just that after a week and a half off, the prospect of getting back up to speed is a little bit daunting.

Shame on me for ignoring my own advice, but there's also all the things I meant to do with my time off that I never got around to... all inconsequential stuff, but I can remember that beginning-of-vacation "What in the world am I going to do with all this time off" euphoria, and part of me is wondering where the time went.

CONSUME CONSUME CONSUME CONSUME CONSUME

It's not enough that back to school supplies start appearing on the shelves the moment all of the made-in-china Fourth of July decorations are put away... it's not enough that Christmas decorations (and music) suddenly appear in the 'Seasonal' aisle on November first.

Yesterday (January 1, this was) when I walked by that 'Seasonal' aisle at the grocery store my eyes were assaulted by garish pink hearts of all sizes and hues. It was only the center of the aisle; the sides are still full of Christmas landfill marked 70% off. As soon as the Christmas stuff is gone, I'm sure the entire aisle will look like the girly section at KB Toys.

When did Valentine's day become a big enough deal that retailers need six weeks to peddle their crap? Merchants have been pushing the start of the Christmas season steadily back for as long as I can remember, but in recent years Halloween and Valentine's Day are gaining... and enough people must be buying to merit the use of entire supermarket aisles for this stuff.

How long until some marketing genius comes up with a Santa Claus-type character (and all of the hats, mugs, t-shirts, plastic lawn sculptures, and guest soaps containing his visage) for Labor Day? That way, Consumers (don't you love being a CONSUMER as opposed to a 'customer', or even a 'human being'?) will have something to buy in the long gap between July 4 and Halloween.

Syndicate content

Twitter

Older

Contact

Andy Chase
(978) 297-6402
andychase [at] gmail.com
GPG/PGP Public Key