<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Alice, Bob and Mallory: Category Blogging</title>
    <link>http://alicebobandmallory.com/articles/category/blogging</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>metasyntactics</description>
    <item>
      <title>Blog comment spam taken to the next level?</title>
      <description>&lt;p&gt;Only days after starting this barely visited blog the &lt;a href="http://en.wikipedia.org/wiki/Spam_in_blogs"&gt;comment spammers&lt;/a&gt; showed up. I activated &lt;a href="http://akismet.com/"&gt;Akismet&lt;/a&gt; and it solved my problem for a while. Over time the spamming got worse and although almost no spam actually showed up on the blog, my fear of false positives still forced me to remove the spam manually. Not my idea of fun.&lt;/p&gt;

&lt;p&gt;I then activated a very simple hurdle. I demanded JavaScript to be able to post comments. Well, not really, what &lt;a href="http://wiki.github.com/fdv/typo/"&gt;Typo&lt;/a&gt; really did was to expect the HTTP header &lt;code&gt;X-Requested-With: XMLHttpRequest&lt;/code&gt;. That worked flawlessly for about three years. Just six weeks ago I noticed the first spambots including the needed header to pass through. Almost all posted stupid drug ads that Akismet easily identified as spam. The situation was still under control.&lt;/p&gt;

&lt;p&gt;Yesterday something completely new happened. I got a comment on an old post about my admiration of Ira Glass and &lt;a href="http://www.thisamericanlife.org/"&gt;This American Life&lt;/a&gt;. The comment seemed believable enough and it passed the spam filter. Still, the link at the end undeniably identified it as spam.
Then there was another, and another, and up until now a total of six spam comments in the new and more advanced format. I'm still not sure if these are scripted but it seems an awful lot of work if they are actually manually typed. &lt;/p&gt;

&lt;p&gt;&lt;a href="/articles/2010/02/03/ira-glass-on-storytelling"&gt;&lt;img src="/images/advanced_blog_spam1.png"&gt;
&lt;/a&gt;
And also these on a post about &lt;a href="/articles/2009/10/20/infinite-ranges-in-c"&gt;infinite ranges in C#&lt;/a&gt;:
&lt;a href="/articles/2009/10/20/infinite-ranges-in-c"&gt;&lt;img src="/images/advanced_blog_spam2.png"&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm kind of bothered with the ones both referring to content of the post and at the same time mentioning that it's not about programming like most of my posts are.&lt;/p&gt;

&lt;p&gt;Are these human or machine made? A clever combination? Also, if you happen to be a spambot and actually answer this then I guess I will have to congratulate you for passing the Turing test.&lt;/p&gt;

&lt;p&gt;PS. They spammed from &lt;code&gt;110.0.0.0 - 110.255.255.255&lt;/code&gt; so if you happen to have problems with the same spammers and aren't worried about blocking the Philippines then you know what to do. DS.&lt;/p&gt;</description>
      <pubDate>Wed, 19 May 2010 23:01:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:060e83d9-08e0-41f0-b66c-ec986c11fc16</guid>
      <author>Jonas Elfström</author>
      <link>http://alicebobandmallory.com/articles/2010/05/19/blog-comment-spam-taken-to-the-next-level</link>
      <category>Blogging</category>
    </item>
    <item>
      <title>Ira Glass on Storytelling</title>
      <description>&lt;p&gt;When a new episode of &lt;em&gt;This American Life&lt;/em&gt; is made available, that is the first thing I listen to. There are a lot of great podcasts out there  but if I had to choose only one, I think I would go for &lt;a href="http://www.thisamericanlife.org/"&gt;This American Life&lt;/a&gt; (sorry &lt;a href="http://www.wnyc.org/shows/radiolab/"&gt;RadioLab&lt;/a&gt;, I love you). Recently I learned that the host and producer of the show, &lt;a href="http://en.wikipedia.org/wiki/Ira_Glass"&gt;Ira Glass&lt;/a&gt;, can be found on YouTube talking about storytelling. 
He covers how he thinks you should tell a story for a radio/TV show. I recognize how the show executes that narrative but it also doesn't take anything away from the fact it's excellent and that there are a lot of hard work and talent put into it.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=n7KQ4vkiNUk"&gt;Ira Glass on Storytelling #1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=3qmtwa1yZRM"&gt;Ira Glass on Storytelling #2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=-hidvElQ0xE"&gt;Ira Glass on Storytelling #3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=9blgOboiGMQ"&gt;Ira Glass on Storytelling #4&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 03 Feb 2010 23:48:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:e807b540-0372-4aaf-a685-b02cbcd21598</guid>
      <author>Jonas Elfström</author>
      <link>http://alicebobandmallory.com/articles/2010/02/03/ira-glass-on-storytelling</link>
      <category>Blogging</category>
    </item>
    <item>
      <title>Counting the number of Google Readers</title>
      <description>&lt;p&gt;I run this blog on a 9 year old laptop hidden in a cabinet in the living room. It's not a powerful machine but it has been up to the job since I turned it into a web server 7 years ago. This could maybe be one of the last HP Omnibook 4150b still in use, at least it has to be in a very exclusive club of laptops being switched on for the past 7.5 years. Recently I've seen an increase in traffic and especially from &lt;a href="http://www.google.com/feedfetcher.html#manycrawlers"&gt;Feedfetcher-Google&lt;/a&gt;. It so happens that Feedfetcher also shows the number of subscribers.&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;[19/Oct/2009:22:01:19 +0200] "GET /xml/rss20/feed.xml HTTP/1.1" 304 0 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 4 subscribers; feed-id=7686756599804593322)"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The above is only one out of five different feed-ids because I have both atom and rss and for a short while this blog was at another address. The fifth feed is actually myself subscribing to the comments.&lt;/p&gt;

&lt;p&gt;I'm not using &lt;a href="http://feedburner.google.com/fb/a/myfeeds"&gt;FeedBurner&lt;/a&gt; so I can't get my statistics from there but I still wanted to be able to see the number of Google Readers of my blog (as far as I can see I only have one other type of subscriber).&lt;/p&gt;

&lt;p&gt;Usually I script anything more advanced than a &lt;code&gt;grep&lt;/code&gt; in &lt;a href="http://www.ruby-lang.org/en/"&gt;Ruby&lt;/a&gt; but this time I made an exception and stayed in &lt;code&gt;Bash&lt;/code&gt;.&lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;tail &lt;span style="color:#00D;font-weight:bold"&gt;-1000&lt;/span&gt; /www/logs/access.log |&lt;tt&gt;
&lt;/tt&gt;grep &lt;span style="color:#036;font-weight:bold"&gt;Feedfetcher&lt;/span&gt; |&lt;tt&gt;
&lt;/tt&gt;cut -d &lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;span style=""&gt;;&lt;/span&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; -f &lt;span style="color:#00D;font-weight:bold"&gt;4&lt;/span&gt; | sort -u |&lt;tt&gt;
&lt;/tt&gt;&lt;span style="color:#080;font-weight:bold"&gt;while&lt;/span&gt; &lt;span style="color:#036;font-weight:bold"&gt;IFS&lt;/span&gt;= read -r line&lt;tt&gt;
&lt;/tt&gt;&lt;span style="color:#080;font-weight:bold"&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   tac &lt;span style="background-color:#fff0ff"&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;span style="color:#808"&gt;www&lt;/span&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;/span&gt;logs/access.log | grep -m &lt;span style="color:#00D;font-weight:bold"&gt;1&lt;/span&gt; &lt;span style="color:#d70;font-weight:bold"&gt;$line&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;done |&lt;tt&gt;
&lt;/tt&gt;sed &lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;'&lt;/span&gt;&lt;span style=""&gt;s/^.*html; &lt;/span&gt;&lt;span style=""&gt;\(&lt;/span&gt;&lt;span style=""&gt;[0-9]*&lt;/span&gt;&lt;span style=""&gt;\)&lt;/span&gt;&lt;span style=""&gt; subscribers.*/&lt;/span&gt;&lt;span style=""&gt;\1&lt;/span&gt;&lt;span style=""&gt;/&lt;/span&gt;&lt;span style="color:#710"&gt;'&lt;/span&gt;&lt;/span&gt; |&lt;tt&gt;
&lt;/tt&gt;awk &lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;'&lt;/span&gt;&lt;span style=""&gt;{tot=tot+$1} END {print tot}&lt;/span&gt;&lt;span style="color:#710"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Most certainly this can be optimized in a number of ways. Don't be shy, just tell me!&lt;/p&gt;

&lt;p&gt;So what's going on there? Well, first I get the last 1000 rows from my access log and right now my traffic is so low that that is way more than I really would have to. Then I get all unique feeed-ids from the rows containing Feedfetcher. I pipe those to a loop that gets the very last access for each one of them. Then I parse out the number of subscribers with a regexp in &lt;code&gt;sed&lt;/code&gt; and count them with &lt;code&gt;awk&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;It turns out that I have a whopping number of &lt;strike&gt;14&lt;/strike&gt; 15 subscribers and I am one of them.&lt;/p&gt;</description>
      <pubDate>Mon, 19 Oct 2009 21:55:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:f06b0424-8326-4281-a812-953270e3b23d</guid>
      <author>Jonas Elfström</author>
      <link>http://alicebobandmallory.com/articles/2009/10/19/counting-the-number-of-google-readers</link>
      <category>Blogging</category>
      <category>Bash</category>
    </item>
    <item>
      <title>Death from lack of content</title>
      <description>&lt;p&gt;I'm sorry to admit that this blog has died from lack of content and I have absolutely no guarantees to give you that it will ever come alive again.&lt;/p&gt;

&lt;p&gt;At least I'm still alive and last night I &lt;a href="http://www.plea.se/me/Leif.html"&gt;had some fun&lt;/a&gt; with C, &lt;a href="http://www.codeblocks.org/"&gt;Code::Blocks&lt;/a&gt; and &lt;a href="http://www.libsdl.org/"&gt;SDL&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Sat, 15 Nov 2008 02:21:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:ef2bb361-e7c7-4c25-ad94-4da019368c1f</guid>
      <author>Jonas Elfström</author>
      <link>http://alicebobandmallory.com/articles/2008/11/15/death-from-lack-of-content</link>
      <category>Blogging</category>
    </item>
    <item>
      <title>Lightning crashes</title>
      <description>&lt;p&gt;Three weeks ago lightning struck nearby. Today my ISP finally tried to change the switch in the central even though I reported back to them that my VSDL modem worked just fine at a friend’s house only a couple of days after my connection died.&lt;/p&gt;</description>
      <pubDate>Mon, 09 Jul 2007 23:37:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:80bc6de4-f4fb-466f-b7ff-498d819b471b</guid>
      <author>Jonas Elfström</author>
      <link>http://alicebobandmallory.com/articles/2007/07/09/lightning-crashes</link>
      <category>Blogging</category>
    </item>
    <item>
      <title>.com</title>
      <description>&lt;p&gt;Now I've got a .com domain, you can reach this blog at &lt;a href="http://alicebobandmallory.com/"&gt;http://alicebobandmallory.com/&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Fri, 30 Mar 2007 06:59:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:e49ebebc-17ef-42c0-888b-9f7fbd462a5a</guid>
      <author>Jonas Elfström</author>
      <link>http://alicebobandmallory.com/articles/2007/03/30/com</link>
      <category>Blogging</category>
    </item>
  </channel>
</rss>
