Sunday, April 29, 2007

The AppA{TimePeriod} community

Besides this modest blog, the PHP Jedi reminds me that there is an IRC channel on Freenode at #TheSoftwareJedi -- if, like me, you're IRC-challenged, you can also use a convenient Java client at the software Jedi's site: click here to get there.

Friday, April 27, 2007

Google counting

So as you may or may not know, I've been dabbling lately in the despamming of online forum posts, with more or less success. And I've been helping people pro bono in despamming their own fora, if they're interested.

This is in response to the wave of forum spam which has arisen since the availability of XRumer in November, 2006. XRumer has a number of tricks in its toolbag to get around spam blocking measures in place, because after all, if you don't actually track people down and shoot them when they spam, you must actively want "advertising" on your forum for cheap handbag knockoffs, Viagra, and lesbian porn, right? Right.

So forum despamming is getting interesting. One of XRumer's little tricks is to post through HTTP proxies to make it difficult or impossible to do IP-based banning of posters. And that was really pretty effective -- until the very popularity of XRumer and similar spambots using HTTP proxies made traffic through HTTP proxies really, really prominent.

The epiphany I had this week was that if a proxy is well-known by forum spammers, it's going to get indexed by Google a whole lot. So the natural next step is to check Google for the IP of an untrusted poster, right?

Thus the Google counter was born (code presented here). Very simple. And it seems to block about 30% to 60% of forum spam so far.

In other news, since the Big Move back down to the Caribbean, the translation work has been incredibly voluminous. I keep thinking, "Today I'm going to do some GUI work" but I still end up falling asleep translating. (And that's really weird: yesterday I tried to type "replacement and wearing parts" and typed "replacement and wearing turbans" instead. Typing while asleep is very Zen.)

Sunday, April 01, 2007

A file monitor

Well, lo and behold, it turns out I've implemented a very simple version of App #3, the file monitor. It's not very flexible -- if invoked from the command line with a source directory and a target directory, it will monitor the source directory and move anything and everything added to that directory into the target directory. It does no error checking. And it's too stupid to find the Desktop to monitor.

But it's a file monitor, and in the next couple of days I'll post a more complete version. The monitor thus far is just this:

<ui>
<frame id="main" title="File monitor 1">
<args id="main">
<arg field="source" default="."/>
<arg field="target" default=""/>
</args>
<html field="html"/>
<timer field="timer" state="off" interval="1000" cmd="look"/>
</frame>

<action id="initialize" lang="python">
if not [context]['target']:
: notify "You need to specify a target directory."
: exit

[context].list = set(os.listdir( [context]['source']))
[context]['timer'] = 'on'
</action>

<action id="look" lang="python">
oldlist = [context].list
[context].list = set(os.listdir ( [context]['source']))

for f in [context].list:
if not f in oldlist:
shutil.move (f, [context]['target'])
</action>
</ui>
To run this bad boy, you'll need the latest Pypop from SourceForge (v0.2) -- if you're still running 0.1, you'll run into some bugs I just fixed, and as I haven't done very good error handling, things will just fail silently and you won't know why. Eventually I need to put some error handling into that beast.

Anyway, this is just a taste. I've also written up a nice tutorial on Pypop which goes over some of the design considerations in the apps so far, but it's not uploaded yet (I still have to write some formatting scripts to turn it into proper HTML.) When I do that, I'll post here again, and hopefully sunny Ponce will keep me happy and productive.