Sunday, June 24, 2007

I'm not ignoring you...

I've been incredibly busy with the paying work (technical translation) this year, and after getting the blog back up, it has literally been wall-to-wall translation ever since. I have some nice ideas for little apps, but absolutely no time at all to implement them; very frustrating.

I really do expect this to change relatively soon, but how long have I been saying that?

Anyway, I was noodling around with some Markov chain code I wrote a year or so ago on a lark, and decided it would be funny to autopost a blog, because I've always thought the output (which is based on statistical analysis of my Toonbots cartoon blurbs, the discussion forum there, and the CNN and Yahoo headlines for the day) is at times hilarious, and if you've ever looked at Markov-chain output, it's really surreal at times. It's like Dutch, it almost makes sense...

Anyway, if you're in the mood for random textual weirdness (and hey, who isn't?) cast your eyes over at Toonbotting. You ... well, I won't say you won't be sorry you did, because you might not be cool enough, and who could blame you?

Tuesday, June 05, 2007

We're back

OK, anappaweek.com is on a new server now, one I control with an iron fist. And it won't be going down again. (Unless it does.)

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.

Wednesday, March 28, 2007

Sorry for the hiatus -- I've moved again

Every few months, my family and I move household, just to stay in fighting trim. Our current coordinates are now here. Ponce, Puerto Rico is a very strange place. It's ... it's like New Castle, Indiana, in that there are townies and non-townies, but the townies have been here for five hundred years. It's part of the United States. Kind of. It's a foreign country. Kind of. It's tropical, but dry. It's hot, but breezy.

We're here because my son is healthier here. We're not sure why, but when you're talking about allergies and kidney disease, you don't argue, you just go with what works. For some reason, his physical health is better here. Socially things are different; we don't speak Spanish very well, and so things can get somewhat sparse. But we do have a lot of friends in town (we've been here off and on for three years now) and so we get by. But after about six months to a year, you start thinking of those libraries and restaurants in Bloomington, and then you decide to go back. Or you start thinking about Europe. That's the last two times we left Puerto Rico. But proteinuria lab results bring us back every time. We just wish we knew why...

Anyway, all is not lost with respect to AppAWeek; as soon as I have a reliable Internet connection, now that the Indiana house has been made ready for the market and the Puerto Rico household has again been retrieved from the storage unit, I should be ready to reengage. In the meantime, um, I dunno, go play Tetris or whatever the kids are doing this year.

Thursday, February 08, 2007

Stupid PyPop tricks

I've been playing with timers in PyPop (the current version has them enabled) because I had originally thought I'd do the directory monitor with a timer. Here's a neat little application for PyPop:

<ui>
<frame id="main" title="File monitor" h="100" w="200">
<html field="html">Nothing to see here, move along</html>
<timer field="timer" interval="1000" cmd="tick">
</frame>

<action id="initialize" lang="command" parms="">
set state tick
</action>

<action id="tick" lang="python" parms="">
state = [context]['state']
if state == 'tick':
: set state tock
: hide
else:
: set state tick
: show
</action>
</ui>
All it does is to show the frame and set up a timer that calls a "tick" command. The "tick" hides the frame if the state is "tick", and shows it if the state is "tock". End of story. The frame appears and disappears every second. When you've had enough, click on the close button quickly before it disappears. Ha.

Try it! Remember: PyPop installer here at SourceForge.