Categories
Weblogging

DDT for comments

Recovered from the Wayback Machine.

From the trackback entries I’ve received from an old comment spamming entry, I gather the spammers have been out and about recently. I received a recent comment spam myself – a shotgun message that seems to provide links to everything your kid wants to know about, but you don’t want them to ask.

It goes by vig-rx. Rings the bells?

Even though I discussed a method for preventing these, I received the comment because I don’t currently have the comment trap (described in the post referenced by the trackbacks) enabled. Why? The reasons are simple: I’m currently adding new weblogs and there’s too much overhead for too little payback with the technique.

The comment trap requires changes to all comment forms in all templates in all weblogs. I have recently added several new weblogs, and am adding three new ones in the next week or so; that’s a lot of template changes. As all of the weblogs use the same comments application, mt-comments.cgi, either the template change is added to all weblogs and weblog pages, or it’s not used for any of them.

I could add the change, and that leads to my second reason for not using the comment trapper at this time – effort and payback. If I implement the comment trapper, it’s used with every comment to my weblogs, from either friend or foe. Though the code seems insignificant, it adds to the overall process burden on my weblog’s server; start adding up tiny little burdens and over time, you have some significant performance hits every time a person tries to post a comment.

It would be worth the performance hits if I received a lot of comment spams, but I don’t, and other than the bad nuisance ones that post a thousand comments at once, the comment spams I get aren’t much more than a minor annoyance. I see them, I delete them, end of story.

What I find more annoying is the Google searchers who search on some esoteric search phrase and post comments on old posts that are irritating and irrelevant to the post. These do not fit the criteria of ‘comment spams’, but they also don’t add a lot of value, either.

I have a couple of options for older posts. The first option is the one I’m currently using, and that is allow the comment but filter it from my ‘recent trackback/comment’ list. I also did this with trackbacks after getting several trackbacks on old posts from Radio-based weblogs when trackbacks were enabled. However, this also filtered out the recent trackbacks because of the comment spam problem – odd how this works out – and I decided to keep the comment filtering, but eliminate the trackback filtering. For now.

Another option is one that I’m very seriously considering and that is turning off comments for older posts. Weblog writing is both ephemeral and enduring, contradictory as this may seem. Our writing rolls of the page to barely accessed archives, with faint hiccups of activity that linger a week or two from latecomers; but because of search engines and other weblog writers with long memories, the writing never completely disappears.

Have you ever been to a party and been in an animated discussion with a group of people, and someone joins the group with comment about a conversation you were involved in 6 months ago? Unlikely in real life, but this type of activity can occur in weblogs. It’s particularly noticeable with weblogs like mine and so many others that implement some form of recent trackback/comment feature.

While I can see the value of the trackback on older posts – look how three pings have re-awakened an old conversation in response to comment spammers – I question the value of comments on old writing and old conversations. The players have moved on, the songs changed. Additionally, turning off comments for older posts provides fewer entry points into our systems for comment spammers. This is an option I’ll continue to think on.

Two options I won’t explore, though, are IP banning and comment registration. I find comment registration to be irritating, and have been put off more than once having to register to leave a comment. I’d rather just turn comments off.

IP banning is more troublesome, and I hope that people who’ve implemented this consider carefully the consequences. As some of you may have discovered, the recent vig-rx comment spam originated from a domain that’s part of the Asia Pacific Network. APNIC is the equivalent agency as ARIN, which manages the IP addresses for America; it is one of the four major registries that manage DNS for the world. Further lookup at APNIC shows that the IP originates with ChinaNet. In case you’re curious, ChinaNet is the major Internet backbone for China.

If you add the IP address to your .htaccess file to block it, congratulations – you’re effectively denying your weblog to people in China, because chances are, the next time someone uses that IP, it’s some student or other person out exploring or looking for information. If you add them to MT to block comments for the IP, they can still view your weblog and most likely wouldn’t leave a comment anyway; however, then you’ve added a tiny bit more CGI processing for every comment that is left.

The problem with IP banning is that it only works with consistent IP addresses, and the only entities with consistent, unmasked IP addresses are companies who don’t use proxies and people affluent enough to have a static internet connection. It’s too easy to spoof IP addresses – originating a comment spam from one IP address, making it seem like it comes from another – and too easy to use a random connection to change the IP address next time you’re in the neighborhood with porn to sell.

An additional constraint on the effectiveness with IP banning is that people and organizations also use open proxies to access the internet so that their IP addressed aren’t exposed. The use of proxies was covered not that long ago when it was discovered that China was blocking access to Blogspot weblogs from people using IP addresses that originated in China. In fact, IP addresses from that same China Net that originated the current flurry of comment spam activity.

As regards to our friend, vig-rx, if lists of IP addresses are passed around weblogs, as was discussed over in comments at Liz’s weblog, and added to .htaccess files everywhere, then the Chinese government doesn’t have to censor weblogs – we’re doing it for them.

Categories
Diversity

Shinto Commandments?

Recovered from the Wayback Machine.

Long day and I’m working on some things that will take me away from the weblog until next week. Not the least of which is wanting to attend the Japanese Festival at the Botanical Gardens this weekend, thanks to the tip from Jack Such in my comments.

I didn’t know about the Festival but after Jack’s comment, I checked the schedule and there are some fascinating events planned. With the weather improving, I should be able to attend several, either Sunday or Monday, or even both if I can be productive tomorrow and Saturday.

Among the sessions is one titled “Zen”, which I’m assuming is a discussion of Zen Buddhism. I don’t want to guess further than that, because I know little about Japan and each time I make what I think is an accurate statement, I’m almost always proved wrong; so, less said the better. Perhaps next week, I’ll be a little more knowledgeable. If nothing else, sounds like a terrific opportunity for some photos.

I plan on attending the Zen session, as well as the cooking and Bonsai demonstrations, the dances, the traditional tea ceremony, Hinode Taiko (drums), martial arts and theater. I’ll pass on the Karaoke, though. In the evening the Festival is showing Anime films, in addition to providing candlelight walks through the extensive gardens. Doesn’t that sound lovely for a warm summer evening?

Speaking of Zen and Japanese religions, Joi Ito writes on being Shinto, especially in regards to the recent fiasco here in the States about a certain huge cement granite statue of the Ten Commandments in a certain court house in Alabama. (Why do these things always happen in Alabama?)

Frank Boosman also comments on the problem with the “Thou Shalt Have No Other Gods Before Me” commandment.

Like I keep saying, all of you “I only have one God, and my God is the best” people seem to be a bit insecure about your God. As Christopher Hitchens says, “The first four of the commandments have little to do with either law or morality, and the first three suggest a terrific insecurity on the part of the person supposedly issuing them.”

As we Shintos like to say, you can put your god over there next to our other gods. While you’re at it, why don’t you get of your high horse and quit defining Good and Evil as Us and Them.

Not everyone agrees with Joi, as you can see from his comments. In particular, Charlie Whipple wrote…If ever anyone defined things in terms of “us and them,” it’s the Japanese.

Move carefully around this issue – as you write visualize your words as walking about, bare ass naked, among opinions prickly as cactus and crowded very, very close. This goes beyond separation of church and state in our country and goes into the culture of religion, of nationalities, as much as the belief of religion. Race, culture, nationality, and religion, all rolled up into one issue.

This will not surprise you, and it’s lowering to me to present such an uncomplex persona, but I must place myself in the camp of those who found the statue to be appalling, not the least of which was Judge Moore’s own admitted bigotry against other religions; explicitly apparent when asked about displaying a statue of the Koran:

Asked on CNN whether he would support an Islamic monument to the Koran in the rotunda of the federal building, Moore replied, “This nation was founded upon the laws of God, not upon the Koran. That’s clear in the Declaration [of Independence], so it wouldn’t fit history and it wouldn’t fit law.”

Freedom of religion aside, Judge Moore seems to have at best a confused notion of law, at worst a completely missing notion of law, and on what principles our laws are based. Islam Judaism, and Christianity all share the same roots, and even much of the same history, and yes, even moral code. And I believe our legal system was not based on the Ten Commandments, and not on Christianity, either.

There is a point missed in all of this fuss about Judge Moore that goes beyond this basically uninteresting man, and the point is hypocrisy. It is hypocritical to prevent Moore from having that really ugly piece of cement granite (I mean, couldn’t they do a better job of the statue?) in the court house when ministers are asked to open sessions of Congress with a prayer, our coins have “In God we Trust”, we swear on the bible in court, we legislate against gay rights, and the Supreme Court opens with “God save the United States and this Honorable Court”.

All in all, I like Joi’s Shinto beliefs, with the concept of there being room for all gods. Yeah, hard to fight about that one.

Categories
Photography

Shy globe of war

I tried to capture an image of Mars last night, but the fates weren’t with me and the globe seemed elusive. I could see it in the telescope but it was a dull yellow pink in color, not the vibrant rust-orange we’ve come to expect from Mars.

We’ve had no rain and St. Louis is one of the ten worst cities for air pollution though thanks to the cooler temperatures we haven’t had the problems we had last year. With the morning rain, I hoped the air would be clearer, and set the telescope up on the back deck.

I spotted Mars peeking out from behind the big tree on the corner and was turning the telescope around when bright flashes of light caught the corner of my eye. As fast as Mars was heading to the West, a storm was heading to the East. A beautiful and usual storm, too, and I was momentarily tempted to take photos of it, until I came to my senses and recalled exactly which event is the less frequent.

I have a good camera, a Nikon 995, but not a beauty like a D100 or even, in my dreams, a D1X. I have a good telescope, a Meade ETX70, but not a powerhouse like the 14″ Schmidt-Cassegrain. Added to the mix, I don’t have an attachment that will allow me to take photos through the special port on the telescope and I have to use the eye piece. This is my way of saying that my photos of Mars are properly orange, helped a bit by the haze and the 800 ISO camera setting, and I guess we’ll need to be content with that.

mars1.jpg

This photo was dead centered in the telescope. Notice that no real detail of the planet shows, including, unfortunately, the polar ice cap. No matter how I tweaked the telescope, and which lens I used, the ice cap wouldn’t come through.

I have found with the moon at least that sometimes taking a more oblique photo of the object can bring out details. I tried that with the next shot, and if nothing else, there’s more of a suggestion of roundness to the photo.

mars3.jpg

Finally, after 2 hours of taking photos and a storm quickly moving in, I managed to get the following. Now, whether the streak was something to do with my telescope, or a reflection of the major canyon system on the Red planet, I don’t know…and I don’t care. If I call it a Martian detail, it is, henceforth, a Martian detail.

Of course, Hubble photos blow away my own little attempts, but that’s not the point. The point is standing on your deck and taking a picture of another planet. All the wonderous photos from Hubble and all the major telescopes and all the detail combined won’t dim my satisfaction in these, my little orange balls of fuzz.

This photo I’ll leave for you all as I drag myself to bed after two nights up late, chasing a globe of war.

mars4.jpg

Categories
Connecting Internet

Fool you fool you

I never thought I would get to the point of welcoming emails offering to enlarge either my penis or breasts, to set me up with a single in my area, to show me girls with big boobies, or my friends from Nigeria with wonderous opportunities.

Email after email, alternating:

Thanks!
Details
My Details
Your Details
Your Application
Wicked Screensaver
That Movie
Thank You!

You access your account and you see that you have 10,50, 125, 600 emails waiting and you think of the notes from friends that might be included, or perhaps an interesting comment or two on your writing, but no, all you get is email after email with:

Thanks!
Details
My Details
Your Details
Your Application
Wicked Screensaver
That Movie
Thank You!

You hunt carefully among the dross but no glimmer of gold; or if it’s there, you can’t see it because your mind numbs from email after email with:

Thanks!
Details
My Details
Your Details
Your Application
Wicked Screensaver
That Movie
Thank You!

You hope, but the messages chant out “Fool you!” “Fool you!” At the end of the day, oddly, you feel more lonely than if you hadn’t received any email at all.

Categories
RDF

Jena Week: final examples

Recovered from the Wayback Machine.

I converted the rest of the Jena1 examples to Jena2 without any major reworking being necessary. At the end of this post is a zipped file of all of the Java source that you can download, use to start your own explorations.

In Example 7, reading in an RDF/XML file in is no different with Jena2 than it was with Jena1. The examples don’t change (other than class structure and creating the memory model using the factory object), except that iterating through statements using StmtIterator exhibits better Java behavior now. StmtIterator now returns an Object when you use next rather than a Statement, and you’ll need to cast it. Or you can use the new nextStatement function call:

// next statement in queue
Statement stmt = iter.nextStatement();

Examples 8 and 9 work against graphs/models persisted to a relational database. I used MySQL in Windows 2000 to test the examples, but you can also use Oracle or other supported database systems.

There have been some significant changes, for the better, with using a relational data model for persistence in Jena2. For instance, you don’t have to specify a storage type or preformat the storage as you did with Jena1; this is all automated in the new classes, by passing in the type of database when you create the model. Another change is that you don’t use the RDBModel.create method, which is deprecated – you can use a new class, ModelMaker, or you can call the static function, createModel.

In the following, the driver is loaded, a connection is established and a model created. Once created, a serialized RDF/XML graph is read.

// load driver class
Class.forName(“com.mysql.jdbc.Driver”).newInstance();

// establish connection – replace with your own conn info
Connection con = DriverManager.getConnection(sConn, sUser, sPass);
IDBConnection dbcon = new DBConnection(con, “MySQL”);

ModelRDB model = ModelRDB.createModel(dbcon, “one”);
model.read(sUri);

Check the documentation for Jena2, and in the DB directory, you’ll find a discussion on migrating Jena1 databases to Jena2, as well as a good description of these changes, and example code.

One interesting aspect of storing Jena within a relational database, especially as it relates to previous postings, is whether Jena2 maintains a reference to the actual source of the external data, and from what I can see, it does not.

Within Jena, you create a graph (termed a model in Jena) and can load many serialized sub-graphs (individual RDF/XML files) into it, or add statements directly using the API. I did so, loading in several FOAF files from people I know. I then looked through the data to see if the source of the sub-graph, the actual file, was maintained and couldn’t find anything.

Once the sub-graphs are merged into one graph, all blank nodes are resolved, and any traces of their separate natures are not maintained. This is proper behavior for RDF according to the RDF specifications, and this merging of sub-graphs is one of strengths of the RDF model.

Now, you can perform a little deductive work and find that a person’s properties have a specific blank node identifier, which is then the object of a “knows” predicate, which is then the property of another blank node identifier of another person with a given name – a bit of a fun challenge with RDQL – but there’s nothing I can see that identifies the source of the actual RDF/XML file, itself.

It could be among the information stored in the BLOB that makes up the graph’s name, but the only way to know this for sure is to examine the contents of BLOB itself, or to find a specific class that allows us to interrogate this data. However, that breaks into new territory not covered in the book examples, and best left for further essays.

Download file