Programming

Adding ReCaptcha to a Weblog

I've added a ReCaptcha component to the comment form on Workbench to deter spammers. The ReCaptcha system presents two hard-to-read words that must be typed in successfully for a comment to be saved. Here's what the component looks like: I tried as long as possible to avoid using captchas, but the amount of spam hitting this blog continues to grow, particularly from foreign IP addresses. Workbench has received 16,000 comments and more than 260,000 spam since it began accepting comments in 2002. ... (read more)

SiteMeter Crashes Internet Explorer with 'Operation Aborted'

Last night several of my web sites, including the Drudge Retort, began crashing Internet Explorer with the error message "Internet Explorer cannot open the Internet site ... Operation aborted." I've encountered this error before, and when it occurs out of the blue on a site you haven't changed, the culprit is usually a problem with third-party Javascript code, as CNet's Clientside blog explains: IE does this when you attempt to modify a DOM element before it is closed. This means that if you ... (read more)

Displaying Twitter Updates on a Web Page

I recently began using Twitter, a microblogging service for posting short, chat-like blog entries and reading what other users of the service are doing. The site has severe reliability problems, but it's still an entertaining way to get real-time updates from bloggers I read along with others I know who've been sucked into Twitter's maw. I wrote some code to display my most recent Twitter update on my weblog, Workbench, in a sidebar at upper right. This afternoon, I've released the ... (read more)

Following Web Page Redirects with Java

CNET moved a bunch of its blogs to a different domain this weekend, including Beyond Binary, Coop's Corner, Geek Gestalt, One More Thing, Outside the Lines and The Social. I mention this because the change hosed Meme13, which treated all six as if they were newly discovered sites. One of my ground rules for developing Meme13 is that I won't hand-edit the site to make it smarter. I need the application to recognize when existing sites in its database have moved. Meme13 monitors sites using a ... (read more)

Setting the Link on a ShareThis Widget

I'm continuing to work on Meme13, a site that packages together the last 13 sites to show up on the Techmeme Leaderboard so they can be sampled as a feed or web site. The site has attracted around 25 RSS subscribers in its first month. I've added a ShareThis widget on each entry that makes it easy to share content from Meme13 on sites like De.licio.us, Digg and Facebook. Normally, ShareThis links to the page the widget has been displayed on. That doesn't suit my purposes on Meme13, because I'm ... (read more)

How to Crash Your Apache Server with PHP

I returned from a trip out of town Monday to crashing web servers that ate my lunch all week long. For several days, I used the top command in Linux and watched helplessly as two servers ground to a halt with load averages higher than 100. Top reports the processes that are taking up the most CPU, memory and time. On the server running Workbench, the culprit was always httpd, the Apache web server. This didn't make sense, because Apache serves web pages, images, and other files with incredible ... (read more)

Twitter: Where Ruby on Rails Goes Off the Track

An article posted on eWeek today was written in an alternate universe where Twitter works: As the maker of one of the largest applications using Ruby on Rails on the Web, Twitter knows a thing or two about scaling applications built with the popular development framework. Britt Selvitelle, a senior engineer at Twitter, offered a few tips and tricks for scaling Ruby on Rails and expressed particular appreciation for the Rails framework itself and the language is it based on, Ruby. "For us, for a ... (read more)

Meme13: Angering New Bloggers in Tech

Meme13 is getting knocked around a bit by people who think that it's just another scraper republishing RSS feeds, hurting the search-engine rank and traffic of the publishers who created the content. Two of those people are Tony Hung and Darren Rowse, bloggers currently featured on Meme13. Hung writes: ... Meme13 is simply pulling feeds and republishing them all. Like any good ol' scraper blog. ... More of the GD same -- and what's really funny (again, not in a ha ha way) is not even that ... (read more)

Meme13: Finding New Bloggers in Tech

Steven Hodson writes: I get a real kick out of it when people start pontificating on why the tech blogosphere is becoming nothing more than [a] self-fulfilling chamber filled with the dull echos of me-too posting that attach themselves like leeches to the supposed brilliant writings of the blogosphere mucky mucks. Me too. Every six months or so, techbloggers reach the joint realization that we're all linking to the same people having the same thoughts about the same subjects. Somebody blames ... (read more)

Loading Ad Javascript with PHP

I serve ads on the Drudge Retort using Blogads, a great ad broker that occasionally has trouble serving the ads. When this happens, pages on the Retort load more slowly because they can't fetch a Javascript program and CSS stylesheet required by Blogads. I decided to fix this problem by writing Cache Remote File, a PHP script that performs three functions: Save a cached copy of a remote file Display the cached copy for 10 minutes before requesting the file again Display the cached copy when the ... (read more)