One of the cool things about BottomFeeder is that I don't have to resort to eyeballing in order to figure things out - I have the full power of Smalltalk in front of me. So, I thought I'd have an objective look at the spam damage from splogs over the weekend. Here's what I did. First, I selected the folder that holds all my search feeds. Then I executed this:
| folder mgr dict |
folder := RSS.RSSFeedViewer allInstances first feedTree selection.
mgr := RSS.RSSFeedManager default.
feeds := mgr getAllFeedsFrom: folder.
dict := Dictionary new.
feeds do: [:eachFeed | | matches |
matches := eachFeed items select: [:eachItem |
eachItem link
ifNil: [false]
ifNotNil: ['*blogspot*' match: eachItem link]].
dict at: eachFeed title put: (eachFeed items size -> matches size)].
^dict
That resulted in an inspector that looks like this:
That's a useful view for scrolling through - let's cut things down and create a table that can be easily posted. I'll limit the table to feeds that have at least 10 bad results in them. First, I added a test to the previous script, such that only feeds passing my test get into that dictionary. I have 44 search feeds; 22 of them passed the bad results test. On to the html script:
stream := WriteStream on: (String new: 1000).
stream nextPutAll: '<table border="1" cellpadding="3">'; cr.
stream nextPutAll: '<tr>'; cr.
stream nextPutAll: '<td><strong>Feed Title</strong></td>'.
stream nextPutAll: '<td><strong>Total Items</strong></td>'.
stream nextPutAll: '<td><strong>BlogSpot Items</strong></td>'.
stream nextPutAll: '<td><strong>Splog Percentage</strong></td>'.
stream nextPutAll: '</tr>'; cr.
dict keysAndValuesDo: [:key :value | | total spam percent |
stream nextPutAll: '<tr><td>'.
stream nextPutAll: key, '</td>'.
total := value key.
spam := value value.
stream nextPutAll: '<td>', total printString, '</td>'.
stream nextPutAll: '<td>', spam printString, '</td>'.
percent := ((spam/total) asFloat * 100) rounded.
stream nextPutAll: '<td>', percent printString, '</td>'.
stream nextPutAll: '</tr>'; cr].
stream nextPutAll: '</table>'; cr.
^stream contents
Running that produces the following output:
Feed Title | Total Items | BlogSpot Items | Splog Percentage |
IceRocket: "VA Smalltalk" | 80 | 10 | 13 |
IceRocket: "Squeak Smalltalk" | 80 | 23 | 29 |
BlogPulse: "Squeak Smalltalk" | 29 | 15 | 52 |
IceRocket: BottomFeeder | 80 | 62 | 78 |
BlogPulse: Cincom | 80 | 34 | 43 |
BlogPulse: BottomFeeder | 80 | 13 | 16 |
IceRocket: "Dolphin Smalltalk" | 80 | 16 | 20 |
Feedster Smalltalk | 80 | 49 | 61 |
Google Blog Search: BottomFeeder | 80 | 35 | 44 |
Feedster: VisualWorks | 80 | 10 | 13 |
BlogPulse: Smalltalk | 80 | 31 | 39 |
IceRocket: Smalltalk | 80 | 38 | 48 |
Feedster: Cincom | 80 | 28 | 35 |
BlogPulse: Dolphin Smalltalk | 57 | 19 | 33 |
BlogPulse: "Cincom Smalltalk" | 57 | 17 | 30 |
IceRocket: Cincom | 80 | 55 | 69 |
Technorati: BottomFeeder | 80 | 31 | 39 |
PubSub: Smalltalk | 80 | 80 | 100 |
BlogPulse: VisualWorks | 80 | 24 | 30 |
Technorati: "James Robertson" | 80 | 46 | 58 |
Feedster on: "James Robertson" | 80 | 27 | 34 |
Technorati: Cincom | 80 | 44 | 55 |
Gives you an idea of the kind of spam attack that was running over the weekend, doesn't it?