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, [...]
Author Archives: filosofo
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 [...]
McDonald’s Spaced Out
This is McDonald’s idea of making their Happy Meals educational. (That I took this photograph may also be proof of bad parenting on our part, but let’s overlook that.) I think what they mean is that you can jump six times as high on the Moon. In case you were wondering, that’s because the surface [...]