RSS Recent Posts

I Am an Official Regex Day Winner

Ben Nadel declared June 1, 2008 the first National Regular Expression Day, and to celebrate he hosted a giveaway of regex-related prizes, including Jeffrey Friedl’s Mastering Regular Expressions. As you can see, I won the book and got it in the mail yesterday. I use regular expressions all the time—in PHP, JavaScript, Perl, sed, grep, [...]

Who’s Using WordPress 5 Years Later

In honor of WordPress’s fifth birthday, I’ve surveyed about 6000 blogs to see how many are running WordPress. This is the same group that I queried back in January, when I created a spider that harvested the blogs from all of Technorati’s main blogging categories. CMS Count Percentage WordPress 2178 34.3 Unknown 1523 23.98 Blogger [...]

Webmonkey.com Returns

When I was first learning web development about ten years ago, I frequently consulted Webmonkey.com for tutorials about how to do all things “DHTML.” I still remember how an article comparing frames to a cafeteria tray made it all click for me, for some reason. I also picked up some bad habits that I had [...]

What Motivates Islamic Radicals

A friend and I keep having different permutations of the same conversation, which revolves around this question: what is the essential explanation for Islamic terrorism? My friend’s answer is that it’s primarily religious; in other words, that something intrinsic to Islam spurs on suicide bombers and the like. I disagree for a number of reasons: [...]

OpenID Servers: Allow Redundant Means of Access

That’s the lesson I take from Kyle Neath’s critique of OpenID (HT: Ma.tt), from his first point, the one that I think has the most traction. OpenID servers should allow users to associate their account with several OpenID providers, if they want, and/or an email address.

sed and Multi-Line Search and Replace

I’ve been experimenting with getting regular expression patterns to match over multiple lines using sed. For example, one might want to change <p>previous text</p> <h2> <a href="http://some-link.com">A title here</a> </h2> <p>following text</p> to <p>previous text</p> No title here <p>following text</p> sed cycles through each line of input one line at a time, so the most [...]