Sunday, July 30, 2006
42 was an interesting number, mainly because Douglas Adams used it as the answer to the Ultimate Question of Life, the Universe, and Everything. 42 appealed to my sense of the absurd.
43 seems like a much less interesting number. The biggest things it seems to be associated with are 43 Things and 43 Folders which is all about getting organized, figuring out priorities, Getting Things Done, that sort of thing.
Absurdity has always appealed to me more then organization. We’ll see....
Posted at 10:34 PM
Link to this entry || 5 comments
Friday, July 28, 2006
The spammers seem to have, at least partially, discovered my new field names. The volume has been increasing steadily in recent weeks. It seems to take them a while to parse them out, though; it doesn’t happen immediately. So I’ve implemented yet another anti-spam tactic. I’m changing the comment form field names every day.
I’m not doing this manually, mind you. I wrote a small perl script to create the names from words chosen at random (or as random as you get in perl) from the /usr/share/dict/words dictionary file that comes with most copies of UNIX®. I use that script to create a small PHP file defining variables containing the new file names. It’s pretty simple:
#!/usr/bin/perl -w
$outpath = "/usr/home/foo/";
$outfile = $outpath . "fieldnames.php";
@fields = qw(name email userurl);
$dict = "/usr/share/dict/words";
$bytes= -s $dict;
open IN, $dict;
open(PFIELDS, "> $outfile");
print PFIELDS "<?phpn";
for ($i=0; $i < 3; $i++) {
seek(IN,rand($bytes-11),0);
$_=<IN>;
$_=<IN>;
chomp $_;
print PFIELDS "$", $fields[$i];
print PFIELDS "="";
print PFIELDS $_;
print PFIELDS "";n";
}
print PFIELDS "?>";
First I define the directory where the file defining these variables is going to live. I place this outside of the web directory for security reasons. The @fields array defines the three fields I’m creating names for. I open the dictionary file, then the output file, then print the beginning of a PHP wrapper. Then I loop three times grabbing a random word and associating it with one of the fields defined in the @fields array. Output the closing PHP wrapper and it’s soup.
The result is a small PHP script like this:
<?php
$name="cafiz";
$email="formlessness";
$userurl="floweret";
?>
This is then included into the various files that run commenting.
At a particular time every day, the perl script above runs, creating a new set of random words associated with the fields, which are then automatically incorporated into my pages.
This won’t stop drive-by spammers, but I don’t honestly see many of those these days. The spam all seems to come from zombie PCs; similar spams coming from a bunch of different IP addresses. They don’t seem to actually access the pages in question, just submit POST requests containing a set of variables that equal whatever the field names for the comment form were whenever whoever configures the zombie controller configures it to spam There Is No Cat. I’m hoping that changing the field names every day will stop the spammers, as their configurations will pretty much always be out of date.
That’s the idea, anyway. We’ll see if it works. If you have any problems commenting on the site, let me know via my contact form. If this doesn’t work, I may just shut off comments completely. I’ve been pretty lucky up to this point; writing my own content management system has given me a certain level of immunity to automated spam (I know this because my spam levels here are still well below those on another site I run using WordPress, although I moderate all comments there, so none of them show up on the site). That’s less and less the case now. Feh.
Posted at 6:16 AM
Link to this entry || 8 comments
Saturday, July 15, 2006
For the benefit of those of you who just absolutely can’t do without your dose of There Is No Cat while you’re mobile, I’ve added a stylesheet to automagically reformat the site so that it displays in a more pleasing manner on such things as PDAs and maybe even telephones. Laura recently won a Siemens SX66 Windows Mobile 2003-based phone/PDA, so I finally have access to a copy of Pocket Internet Exploder, and I realized that what I had been seeing on my Palm Tungsten C with WebPro 2.5 wasn’t just an aberration based on WebPro’s mediocre CSS support, but rather something fundamental within how I had set up my CSS that was causing the site to display poorly on mobile devices. Basically, when you only have a couple hundred pixels to work with, three columns just doesn’t work very well. Widths for things like sidebar columns that work fine on a large computer screen when specified as "23%" can only fit one word per line on a tiny screen, which was the worst thing I noticed. Floating columns is also problematic. So I’ve created a separate CSS stylesheet for handheld computers that resets column widths to something more appropriate, and changes the three column layout to a single column, with the postings displaying first, then the left navigation, then the right navigation.
There doesn’t seem to be a whole lot of information out there about developing sites that work on handheld devices. I did find one interesting e-mail message from someone at Opera, who have found their greatest success in the mobile arena (largely for phones). It’s a year and a half old, but still interesting and helpful. Blithely assuming that because you use standard (X)HTML and do the styling with CSS didn’t seem to work too well for me, and I assume it won’t work too well for a lot of other sites either. But using standard (X)HTML and CSS means that fixing the problem will be quick work. It took me less than an insomniac hour to come up with a display that works. Basically, I import my regular stylesheet within a style tag that sets the media type to all:
<style type="text/css" media="all">
<!--
@import url(/nocat50s-aqua.css);
-->
</style>
Then I take advantage of the cascading nature of CSS to import a stylesheet just for handhelds using the same method:
<style type="text/css" media="handheld">
<!--
@import url(/nocat50s-aqua-mobile.css);
-->
</style>
The mobile CSS file, since it is imported after the main CSS file, overwrites problematic CSS directives in the handheld’s browser.
The design I’ve created for handhelds isn’t perfect; I need to adjust the colors, and the background graphic that works so well on a computer is kind of big for a handheld. When I was originally designing this site, the squares that make up the background graphic were much smaller; I’ll have to dig up those files and see if it makes sense to use those graphics for handhelds. But that’s work for later; it’s five in the morning, and I just wanted to get something that works posted. (And it’s now taken me as long to write this up as it did to make the changes, so it’s almost six in the morning now....) I’ll tweak later.
Before posting my changes, I tested everything in all the browsers I have for the Macintosh and Windows, but I suppose it’s possible that something that I did broke some obscure browser out there. If you have a problem displaying the site, please let me know.
Posted at 5:55 AM
Link to this entry
Sunday, July 9, 2006
It’s not possible, really, to watch all 64 games of a World Cup. Thanks to a shameful collusion between West Germany and Austria in the 1982 World Cup where the two teams basically stopped playing after Germany scored their first goal, thereby ensuring that both teams would go through, the third games in the initial group play round for each group are played simultaneously, so that the result of one game can’t affect the result of the other game. So from a practical standpoint, it’s really only possible to watch 56 of the 64 games.
I watched 56 games of the World Cup over the past month. (Well, okay, I caught a couple of the games on the radio thanks to XM when I had to be away from the television.)
I didn’t play soccer as a kid. The sport hadn’t come to the midwest yet when I was growing up there. I wasn’t really even aware of it until I moved to New Jersey in high school. They played soccer here. In fact, my girlfriend in high school was a talented player in the local youth leagues. She wanted to play for our high school, but we didn’t have a girl’s soccer team at the time. The school administration wouldn’t listen to her protests that it wasn’t fair, but she really wanted to play, so she tried out for the boy’s team. She worked out with them for almost the whole summer, but stopped shortly before the decisions on who would make the team were made. I was so proud of her for trying out, and I’m not really sure why she stopped; she was a very shy person in general, and I don’t know if she was afraid of what would happen if she actually made the team, or if she just realized that she wouldn’t make the team anyway. In any case, she worked as the scorekeeper for the team that year, and as a result I went to all the games they played, home and away. It was fun.
At Penn State, we were required to take four credits of Phys Ed in addition to the usual classes. I didn’t take soccer, but for my two credits of bowling(!), my professor was Walter Bahr, who coached the Penn State soccer team. I think I was dimly aware at the time that he had played for the U.S. national team. I don’t think I knew that he played in the World Cup and was a major participant in the biggest upset in World Cup history, the 1950 U.S. victory over England. He assisted on the goal that won that game. Last year, they made a movie about it.
I didn’t pay much attention to soccer for years after that. But in 1994, the World Cup was played in the U.S., and it coincided with a strike in my then-favorite sport, baseball. I thought both sides were wrong in that strike, and it turned me off to baseball ever since. But the World Cup captured my imagination. I was hooked. And I’ve watched all of them, mens’ and womens’, ever since.
I wouldn’t claim to be a huge soccer fan. I don’t go out of my way to see games at any time other than during the Copa Mundial. But I really enjoy it every four years.
I was sorry to see Germany go out in the semifinals. I thought they were one of the more interesting and entertaining teams. Similarly, I was sorry to see Argentina go out (even though that was against Germany); I thought they played Brazilian-style futbol better than the Brazilians did. I thought Italy played disgracefully against the Americans during the group rounds, so I was really sorry to see them make it to the final. And I was very impressed by France’s Zinedine Zidane, who played like a man on fire once France got out of the group round. At times, he looked like he was putting on a clinic. So, despite my Italian name and heritage, I was rooting for France in the final. I may also be part French, but I haven’t gotten that far back in my genealogical research yet. :-)
Given that, I was happy to see Zidane score the penalty kick that put France ahead seven minutes into today’s final. And I thought that France overall looked like much the better team.
And then, away from the run of play, Zidane head-butted Materazzi in the 110th minute, with only ten minutes to go in the last overtime, in what was billed as his last game ever, the last game for one of the best players of all time, probably the best of the past 20 years. He had played with style and elan, and then in one stupid moment, threw it all away, leaving the field for the very last time in disgrace. The Guardian reports that it was because Materazzi tweaked his nipple. Feh.
So hey, Forza Italia! I still think France played better and should have won, and I still think Italy played disgracefully for much of the tournament, particularly those portions where they made the pitch look like a swimming pool with all their diving. But ultimately, after watching as many games of the World Cup as possible, I was left with a sour taste in my mouth, and didn’t want either team to win.
Hopefully the women’s World Cup next year will put on a better, more sportsmanlike display.
Posted at 6:47 PM
Link to this entry || 1 comment
Back to There Is No Cat
This site is copyright © 2002-2024, Ralph Brand