Posts Authored by filosofo

“filosofo” is the nom de guerre of Austin Matzko.

Counterexample

From Scientific American:
Researchers insist they can tell someone’s politlcal affiliation by looking at the condition of their offices and bedrooms. Messy? You’re a lefty. A neatnik? Welcome to the Right.
According to a controversial new study, set to be published in The Journal of Political Psychology, the bedrooms and offices of liberals, who are generally thought [...]

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, [...]

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 [...]

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 [...]

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 obvious way to match a pattern that extends [...]