Rob Eberhardt

cleverness ensues

skip navigation

 Tuesday, May 31, 2005


---------------------------
Information
---------------------------
Thank you for choosing Acrobat Reader!
---------------------------
OK   
---------------------------

"choosing"

Hey, how come people don't bash Macromedia's monopoly/success?

5/31/2005 10:13 PM Eastern Daylight Time  #    Disclaimer  |  Comments [4]  | 

 Friday, May 27, 2005

5/27/2005 1:26 AM Eastern Daylight Time  #    Disclaimer  |  Comments [1]  | 

 Wednesday, May 25, 2005

Symptoms:

Bad acting.  I guess Frakes & Sirtis are several years outta practice (and shape).  And who wrote that dialog anyway?

Bad effects.  Can't think of a good excuse here.  I mean, really: stars between the camera and the ship?!? (space-fireflies???)

Bad production.  Tons of obvious overdubs.  They must've already pink-slipped the sound engineer.  (Not to mention the amateur-looking phasers...)

Why end an otherwise decent series (and legacy) on a bad note??  Bah!

Diagnosis:

"slapped together"

5/25/2005 12:16 AM Eastern Daylight Time  #    Disclaimer  |  Comments [0]  | 

 Tuesday, May 24, 2005

Traditional email spam like the unsolicited Door Store ads they drop on my step (in plastic covers to maximize slipping).

Comment spam is a "We're voting for Mr. Shmiggle" sign put in my yard without my consent.

Now that I've worked it out, I understand why comment spam irks me so much more, because it (ab)uses my reputation for its own (search engine) advancement.  But I don't want to put up a fence by closing comments tho, because I do want my friendly neighbors to visit and talk to me.

So anyway, if anyone using .Text 0.95 is interested, here's my code to negate the search engine benefit to the comment spammers:

Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
	Dim reqURL As String = Request.CurrentExecutionFilePath
	IF reqURL.toLower().indexOf("/archive/")<0 OR Request.Form.ToString()<>"" THEN EXIT SUB
	
	'-- get content
	Dim oWriter As New StringWriter()
	Server.Execute(reqURL, oWriter)
	Dim strResponse As String = oWriter.ToString()
	oWriter = Nothing

	'-- find comment section
	Dim iStart As Integer, iStop As Integer
	iStart = strResponse.IndexOf("<div id=""comments"">")
	IF iStart>0 THEN iStop = strResponse.IndexOf("</div>", iStart)

	If iStart <> -1 And iStop <> -1 Then
		'-- nofollow comment section's links
		DIM strTarget as string = strResponse.Substring(iStart, iStop - iStart)
		DIM strTargetFixed as string = _
			strTarget.replace("<a target=""_new"" href=""http", _
			"<a target=""_new"" rel=""nofollow"" href=""http")
		strResponse = strResponse.replace(strTarget, strTargetFixed)
	End If

	'-- send content
	Response.Write(strResponse)
	Response.End()		'prevent conventional response
End Sub

Just replace the standard Application_BeginRequest procedure with this one in the global.asax.vb file (or absorb mine into it.)  It intercepts outgoing comments and dynamically inserts rel="nofollow" into any contained links.

It won't prevent comment spam, but it will negate the search engine benefit to the comment spammer, turning the "Vote-For-Me" signs into mere litter in your yard.

One catch:  this breaks .Text's inline "Remove Comment" links.  You can still delete them in the the admin area's Feedback section, tho.  Since the comment spam seems to come in waves, that's an easier way to delete them all at once anyway.

(I guess my next goal is actually preventing comment spam via a captcha or challenge-reponse mechanism, but til then I feel more luxury of time to explore possibilities.)

5/24/2005 12:42 PM Eastern Daylight Time  #    Disclaimer  |  Comments [1]  | 

 Monday, May 23, 2005

This sucks, but the gambling comment spam has hit a critical limit, and I've wasted a stupid amount of time trying to solve it (without luck). 

So I've closed commentsAnd now reopened, with my own clever nofollow solution.

To enumerate my frustrations:

* The code for both .Text and Community Server's code is way too complicated.  Why is an open-source app -- which is supposed to encourage hacking from other devs -- full of such highly-abstracted code??  A main reason I settled on CS/.Text was because I know ASP.net fairly well (and ASP extremely well).  Unfortunately, the extreme complexity/abstraction and lack of decent docs pretty much cancels that out.  I've seen PHP apps which were easier to figure out (and I barely know PHP).

....If I'm going to waste this much time on fixing one little thing (comment spam), it's so tempting to just write my own.  I specifically tried to avoid that, though, because I have so many other technical time-drains.

Argh!

5/23/2005 4:08 PM Eastern Daylight Time  #    Disclaimer  |  Comments [3]  | 

 Thursday, May 19, 2005

I found this exploring in VS.Net's Object Browser.  That's what, 6 layers of inheritance?  I'm frightened!

5/19/2005 5:22 PM Eastern Daylight Time  #    Disclaimer  |  Comments [0]  |