Testing Godwin's Law
Last week I came across Godwin's Law. Many of you may already be familiar with it. For those of you who aren't, Godwin's Law, according to wikipedia, states:
As an online discussion grows longer, the probability of a comparison involving Nazis or Hitler approaches one.
To test this law I wrote a little program to look at comments in the drupal database that contains the Linux Journal web content. The script first gets all the distinct article ids (nids in drupal speak) from the comments table where the comment includes one of the key words. Then it gets a count of the number of comments for each article, sorts the list, and outputs the count along with the article title.
Here's the script:
#!/bin/bash
source mysqlpwd.sh
echo "<table border=\"1\">"
echo "<thead>"
echo "<tr><th># Comments</th><th>Article Title</th></tr>"
echo "</thead>"
echo "<tbody>"
mysql -u $MYSQL_USERNAME -p$MYSQL_PASSWORD drupal_lj \
-e "SELECT DISTINCT nid FROM comments WHERE comment LIKE '%hitler%' OR comment LIKE '%nazi%'" |
while read nid
do
if [[ $nid != 'nid' ]]; then
count=$(mysql -u $MYSQL_USERNAME -p$MYSQL_PASSWORD drupal_lj \
-e "SELECT COUNT(*) AS cnt FROM comments WHERE nid = $nid")
count=$(echo ${count/cnt/})
printf "%d\t%d\n" $count $nid
fi
done | sort --numeric --reverse |
while read count nid
do
t=$(mysql -u $MYSQL_USERNAME -p$MYSQL_PASSWORD drupal_lj \
-e "select title from node where nid = $nid")
t=$(echo ${t/title/})
printf "<tr><td>%d</td><td><a href=\"/node/%d\">%s</a></td></tr>\n" $count $nid "$t"
done
echo "</tbody>"
echo "</table>"
Here's the output:
For comparison we need to get a list of articles that contain a large number of comments but that do not contain the keywords. Now we look at each article, then we check to see if it has any comments that contain the keywords. If it does not then we count the number of comments and output the article if the associated discussion was long. I arbitrarily chose 100 as the minimum number of comments needed for a discussion to be classified as long.
Here's the script:
#!/bin/bash
source mysqlpwd.sh
echo "<table border=\"1\">"
echo "<thead>"
echo "<tr><th># Comments</th><th>Article Title</th></tr>"
echo "</thead>"
echo "<tbody>"
mysql -u $MYSQL_USERNAME -p$MYSQL_PASSWORD drupal_lj \
-e "SELECT nid FROM node" |
while read nid
do
if [[ $nid != 'nid' ]]; then
count=$(mysql -u $MYSQL_USERNAME -p$MYSQL_PASSWORD drupal_lj \
-e "SELECT COUNT(*) as cnt FROM comments WHERE nid = $nid AND
(comment LIKE '%hitler%' OR comment LIKE '%nazi%')")
count=$(echo ${count/cnt/})
if [[ $count -eq 0 ]]; then
count=$(mysql -u $MYSQL_USERNAME -p$MYSQL_PASSWORD drupal_lj \
-e "SELECT COUNT(*) AS cnt FROM comments WHERE nid = $nid")
count=$(echo ${count/cnt/})
if [[ $count -gt 100 ]]; then
printf "%d\t%d\n" $count $nid
fi
fi
fi
done | sort --numeric --reverse |
while read count nid
do
t=$(mysql -u $MYSQL_USERNAME -p$MYSQL_PASSWORD drupal_lj \
-e "select title from node where nid = $nid")
t=$(echo ${t/title/})
printf "<tr><td>%d</td><td><a href=\"/node/%d\">%s</a></td></tr>\n" $count $nid "$t"
done
echo "</tbody>"
echo "</table>"
Here's the output:
Can we conclude anything about the validity of Godwin's Law from this? Ahhh, I dunno.
p.s. File this under blather #2.
Mitch Frazier is an Associate Editor for Linux Journal.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Speed Up Your Web Site with Varnish | Jun 19, 2013 |
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- Non-Linux FOSS: libnotify, OS X Style
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- RSS Feeds
- Varnish works!
16 sec ago - Reply to comment | Linux Journal
29 min 53 sec ago - Reply to comment | Linux Journal
2 hours 55 min ago - Reply to comment | Linux Journal
6 hours 55 min ago - Yeah, user namespaces are
8 hours 11 min ago - Cari Uang
11 hours 43 min ago - user namespaces
14 hours 36 min ago - yea
15 hours 2 min ago - One advantage with VMs
17 hours 31 min ago - about info
18 hours 4 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
It's a counter-meme. The purpose is to invalidate itself.
The point of Godwin's law is to be a counter-meme:
http://www.wired.com/wired/archive/2.10/godwin.if.html
"In time, discussions in the seeded newsgroups and discussions seemed to show a lower incidence of the Nazi-comparison meme."
godwin's law
Perhaps an additional refinement would be to look for some kind of time related association - like if the h & n stuff is increasing or lessening with time, or something... you can probably find several more similar ways of studying this... ;)
here in Europe one might try for a EU grant for studying this in depth... ;)
Best
Seppo
Wow, this Godwin is one
Wow, this Godwin is one messed up dude.
Some professor at Standford came out with a more pertinent observation about 10 years ago, saying as time goes on it's inevitable there will be a nuclear war. I'm sure there are an infinite number of pithy observations that can be made when you take something and apply infinity to it. They all seem profound. They all need a bit of common sense to override the insanity behind them.
Maybe they should require all high school students to take enough logic and math to understand "laws" before being allowed to graduate. If nothing else if we inundate them with a few hundred of these mental puzzles they won't be so susceptible to them when they encounter them in real life. Ahh, who am I kidding. We'd have to teach them how to read, locate the USA, and teach them a little history first and you know that's never going to happen.
That's not Godwin's Law
That's not Godwin's Law, as I understand it. Godwin's Law states that in any given discussion, whoever is the first to make a comparison to Hitler or the Nazis loses the argument, by definition.
Not quite.
"As an online discussion grows longer, the probability of a comparison involving Nazis or Hitler approaches one." That's Godwin's Law, and it was formulated as a tongue in cheek way of *reducing* Nazi comparisons in usenet board threads -- by making light of an increasingly common rhetorical hot-button.
It's definitely an amusing experiment. Maybe we can find someone who runs an active political site to conduct the same test on their data. RedState? DailyKos?
Post length Distribution
Could you provide us the full length distribution ?
Then we can normalize the "Godwin" comments distribution and figure out if the normalized frequency increases with the length.
Yay! Insanity is COMMON in sysadmins! I'm normal!
See, I love the effort you put into this. Really, I do. The part that ticks me off, however, is that it's taking all the effort I can muster not to comment about hitler and nazis on every article on the website. Or any website for that matter.
Now my Saturday is shot.
Shawn Powers is an Associate Editor for Linux Journal. You might find him chatting on the IRC channel, or Twitter
Resist the temptation
I almost titled the second table "These Articles Need Help", but I resisted the urge. I find that push-ups help.
Mitch Frazier is an Associate Editor for Linux Journal.
Hah!
And here I thought Hitler was going out of style. Fun post, Mitch. :-)