Archive for December, 2004

Take a Hint, AllResearch – Go Away

It was a couple of months ago when I had to ban a bot for the first time. At the time, I noticed one IP address (My Most Frequent Visitor) outshining all others in my web stats. A little research showed MMFV to be an outfit called, who appears to specialize in hoovering down other sites in order to provide such services as trademark tracking, webclipping, and “law enforcement” services.

As bad as that sounds, the only reason I took even took note was the bandwidth comsumption. Every 60 minutes, they hit my RSS feed, and then pulled down every item listed in the feed. What a horrible perversion of intent. At the time, I banned the IP address, thusly (in .htaccess):

RewriteCond %{REMOTE_ADDR} “^$” RewriteRule .* – [F,L]

I then watched, ammused, for several days as the 403 errors stacked up, once an hour, from their IP address. Worst. Bot. Ever.

Well, I got around to checking my stats again today, and what do you know? My Most Frequent Visitor just can’t take a hint. He’s back, using IP address And I didn’t find him due to vigilance; he’s just stupid. The exact same usage pattern. While expanding my ban, I even corrected the unescaped dots in my original version:

RewriteCond %{REMOTE_ADDR} “^38.144.36.” RewriteRule .* – [F,L]

I’m not the only one seeing this. If you run a site, take a minute and check your stats or your logs for addresses beginning with 38.144.36.. If you see abuse like I’ve seen, take a minute and ban them. Maybe they will eventually take a hint.

Hackers and Painters

Via Tim Bray, via Tim Bray, via, well, you know: Go and read Hackers and Painters, an essay by Paul Graham. This is a must-read for anyone who considers themselves a hacker, especially those like me who make a living at it. A few choice quotes:

I tended to just spew out code that was hopelessly broken, and gradually beat it into shape. Debugging, I was taught, was a kind of final pass where you caught typos and oversights. The way I worked, it seemed like programming consisted of debugging.

For a long time I felt bad about this, just as I once felt bad that I didn’t hold my pencil the way they taught me to in elementary school. If I had only looked over at the other makers, the painters or the architects, I would have realized that there was a name for what I was doing: sketching. As far as I can tell, the way they taught me to program in college was all wrong. You should figure out programs as you’re writing them, just as writers and painters and architects do.

And also:

In hacking, like painting, work comes in cycles. Sometimes you get excited about some new project and you want to work sixteen hours a day on it. Other times nothing seems interesting.

Amen, Brother.

Firefox Printing

Earlier today I wanted to print a web page for some offline reading. It was a page from a blog, featuring a left-handed nav/info bar and content on the right. Of course, I only wanted to print the content area. I tried printing, hoping for a print stylesheet that would supress the navbar. No such luck (note to self: implement a print stylesheet for your own glass house, and put down that stone).

I then tried turning off styles, figuring I could omit the pages of the printout which contained the navbar. I was surprised to find that Firefox prints using the default style sheet when styles are turned off (View|Page Style|No Style) (note to self: check Bugzilla, report if needed).

I considered adding a user stylesheet, hoping that it would cascade with the existing stylesheet. In trying to figure out what my stylesheet should do, I used the DOM inspector. I was disappointed to find the layout used a 1 row <table> with with 2 <td>s to achieve layout (note to self: you don’t do that- good job). No wories, judicious use of a following sibling CSS selector did the job:

td {display:none} /* don't show <td>s */
td+td {display:block} /* okay, show <td>s that follow another td */

The net affect is that only the first <td> (in each <tr>) is hidden. Perfect for this application. I tested this CSS snippet using the Edit CSS feature of fantastic the Web Developer Toolbar. On a whim, I tried printing, and was pleased to see that Firefox printed using the edited CSS.

Update: I dutifully checked Bugzilla. Bug 260762 looks like a match.

The Lazy Web

Whenever I learn something very cool that’s been around for a while, I wonder if I’m the last one to the party. I’ve seen mention of the lazyweb many times… the idea is that somewhere, someone has probably already solved your problem (whatever it may be), or would like to. To invoke the lazyweb, you post a problem or question to your blog, often mentioning “Lazyweb” in the post, and sit back and wait for enlightment. You must need decent blog visibility in order to get results from the lazyweb. I’ve never really tried it, since I don’t think my readership levels are very high (and I don’t want to prove it to myself).

At least, this is what I always thought. It turns out that someone has built a tool (someone always does, that’s the point of the lazyweb). After posting your lazyweb request, you can send a trackback ping to (or if your blogging software is configured for auto-trackback, just link to it). displays the trackbacks, allowing interested (and helpful) folks to see and respond. Naturally, there’s an RSS feed as well (as seen in the Techish section of my blogroll).

Considering the bloggeratti who have worked on the site, I can’t believe I just learned about this. Makes me wonder what other gems I’m missing.

Site Browsing Stats, November 2004

In honor of the November official launch of Firefox 1.0, and because I happened to be looking at my site stats tonight, here’s the breakdown of the browser usage for this site, as reported by my stats package, awstats. Unknown is anything the package has never heard of, whereas Others are known browsers, too small to list separately. This includes things like wget and curl, and even 57 hits from a pre-Firefox copy of Firebird. :

Browser              Hits      %age
-------              ----    ------
FireFox             34868    37.9 %
Internet Explorer   28008    30.4 %
Safari              10536    11.4 %
Unknown              6080     6.6 %
Mozilla              4103     4.4 %
NetNewsWire          3253     3.5 %
Opera                1744     1.8 %
Netscape             1525     1.6 %
Camino                518     0.5 %
Konqueror             362     0.3 %
Others                861     0.9 %

I’m very proud of my readers for using Firefox far more than Internet Explorer. As to the 30.4%, and you know who you are, go on. Try it. All the cool kids are doing it.