Content

blog, portfolio, and links

TST down

Saturday 31 December 2005 - Filed under Trend Sweet Trend

Trend Sweet Trend suffered a glitch over the past several days. To begin with my power went out over xmas so updates stopped occurring until I could get back and turn on my Fedora server.

Then TST began to show only one link rather than the 25 or 35 it usually does. This was caused by a deficiency in my livemarks curl script that couldn’t handle multiple matches per line. It’s all fixed now but it gave me pause.

If you’re thinking of using “if(/pattern/) ” to match something in a feed and do something with it, you might as well replace that bit with “while(/pattern/g) ” so you’ll match pattern as many times as it might occur in a line.

With web services, you’ve got to think ahead and program for the odd change that might happen upstream. You’ve got to think what if there’s more than one match per line in this regex script or if the odd formatting change should occur.

2005-12-31  »  David Sterry