Comment Filters

When Slashdot first implemented user comments, a curious phenomenon developed. A small portion of the userbase developed a strong competition to post the first comment on a fresh Story. This lead to a significant volume of “Me first!” comments instantly attached to Stories, adding little to the quality of discussion. They were followed by users who thought it the height of hilarity to post ASCII art, breaking the site’s layout. First posters were noisy, but ASCII “artists” were annoying. Soon, comment filters were born.

The Comment Filters List

A Slash comment filter has two parts: the behavior detected by a pattern match and a quantitative level of that behavior to tolerate. For example, if half or more of a comment consists of non-alphanumeric characters, it may be an ASCII drawing instead of a thoughtful discussion. (It may also be a regular expression.) A Slash site functioning as a church newsletter may wish to suppress excess occurrences of certain colorful Anglo-Saxon monosyllables.

Each filter contains a regular expression that defines and measures the behavior component. Additionally, two numeric fields set the limits on its occurrence: a ratio (how much of the behavior is permitted) and a threshold number of occurrences (how many times is it permitted). This allows a filter to block posts either by frequency of behavior or by the number incidents of the behavior. For example, any post that uses the words “Nazi” or “Hitler” more than once could be disallowed ...

Get Running Weblogs with Slash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.