<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>I do stuff - stuff is what I do! &#187; Programming</title>
	<atom:link href="http://blog.diktator.org/index.php/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.diktator.org</link>
	<description></description>
	<lastBuildDate>Wed, 01 Sep 2010 09:54:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What you specify is what you get</title>
		<link>http://blog.diktator.org/index.php/2010/06/16/what-you-specify-is-what-you-get/</link>
		<comments>http://blog.diktator.org/index.php/2010/06/16/what-you-specify-is-what-you-get/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 14:42:24 +0000</pubDate>
		<dc:creator>Fredrik</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.diktator.org/?p=417</guid>
		<description><![CDATA[I had the opportunity to assist one of my co-workers today in troubleshooting a web service + Silverlight client I had built for a customer a while back. The combination of the two enables users to upload large files to a server over intermittent internet connections. My co-worker mentioned that she got an error message [...]]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">I</span> had the opportunity to assist one of my co-workers today in troubleshooting a web service + Silverlight client I had built for a customer a while back. The combination of the two enables users to upload large files to a server over intermittent internet connections. My co-worker mentioned that she got an error message in a message box from the Silverlight client stating that something was wrong with the parameters sent to it.</p>
<p>In the end it turns out that the parameter for the maximum file size allowed to upload had been set to 3 GB. The specification I received when building this stated that the maximum file size that the system should be able to handle would not exceed 1 GB. So I figured a regular <em>int</em> would suffice for managing the maximum file size restriction.</p>
<p>So what this malconfiguration gave was that the Silverlight client tried to stuff the value of 3GB into an <em>int</em> &#8211; this is a no go.  My co-worker is not to blame for this, she just got this particular setup handed to her from someone else.</p>
<p><strong>What you specify is what you get.</strong></p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.diktator.org%2Findex.php%2F2010%2F06%2F16%2Fwhat-you-specify-is-what-you-get%2F&amp;t=What%20you%20specify%20is%20what%20you%20get" id="facebook_share_button_417" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_417') || document.getElementById('facebook_share_icon_417') || document.getElementById('facebook_share_both_417') || document.getElementById('facebook_share_button_417');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_417') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://blog.diktator.org/index.php/2010/06/16/what-you-specify-is-what-you-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Framework and pattern overload</title>
		<link>http://blog.diktator.org/index.php/2010/06/03/framework-and-pattern-overload/</link>
		<comments>http://blog.diktator.org/index.php/2010/06/03/framework-and-pattern-overload/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 15:03:34 +0000</pubDate>
		<dc:creator>Fredrik</dc:creator>
				<category><![CDATA[Methodology]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.diktator.org/?p=414</guid>
		<description><![CDATA[The past couple of months I&#8217;ve had reason (more than usual) to sit back and think about all the different frameworks and patterns available out there. One specific example of this is the following:
Imagine that you would want to build a web service whose role it is to impersonate a SharePoint list. This list is [...]]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">T</span>he past couple of months I&#8217;ve had reason (more than usual) to sit back and think about all the different <strong>frameworks</strong> and <strong>patterns</strong> available out there. One specific example of this is the following:</p>
<p>Imagine that you would want to build a <strong>web service</strong> whose role it is to impersonate a <strong>SharePoin</strong><strong>t list</strong>. This list is then supposed to be consumed by an <strong>Outlook clients calendar</strong> tool. The data you want to fill this calendar with is stored in a <strong>database</strong> containing approximately <strong>two tables</strong>. The reason I got in touch with this was that I was asked to solve some problems regarding the switch from regular time to daylight savings time and calendar items tagged as all day events. Upon hearing about this existing system I thought something along the lines of <em>&#8220;How hard could this be? It&#8217;s just a bunch of tables and a web service contract to fulfill.&#8221;</em>. Well, as it turns out &#8211; <strong>the joke&#8217;s on me</strong>.</p>
<p>I&#8217;m not kidding when I say that the code base in the repository for this project consists of ~200 files! <strong>Factories</strong>, <strong>Repositories</strong>, <strong>Providers</strong>, <strong>Containers</strong> and god knows what! When you open a project and within the time frame of about five minutes can&#8217;t figure out where approximately to begin solving a specific problem there has to be a problem with <strong>how the code is organized</strong>. And I don&#8217;t see myself as an under qualified developer. What I ended up doing was setting a breakpoint in Global.asax at the start of a request and then step my way from there. And the funny thing is that all the database access code was hand written. <strong>NHibernate</strong> (or any other OR-mapper for that matter) hadn&#8217;t crossed the mind of the previous developer (or at least wasn&#8217;t implemented).</p>
<p><em><strong>Grossly over engineered</strong></em>.<em> </em>That&#8217;s what comes to mind when I look back at this.</p>
<p>A couple of days ago I was recommended the following article: <a href="http://discuss.joelonsoftware.com/default.asp?joel.3.219431.12" target="_blank">Joel On Software &#8211; <strong>Why I hate frameworks</strong></a>. <strong>Read it!</strong> It&#8217;s quite a funny read and I can definitely relate to this problem. I also think that this specific issue should be more widely discussed. Somehow it seems that the software development world has moved away from solving real problems to solving problems related to the problem solving. Not quite sure how that adds immediate value for the customer. Also not quite sure how it relates to working agile. If we extrapolate the current situation just a liiittle bit more we&#8217;d end up with architects and developers adding a bunch of frameworks to their project and organizing them according to some new patterns (which are bound to appear) they&#8217;ll expect the code to write itself!</p>
<p>And I haven&#8217;t even mentioned the frameworks managing the other frameworks.</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.diktator.org%2Findex.php%2F2010%2F06%2F03%2Fframework-and-pattern-overload%2F&amp;t=Framework%20and%20pattern%20overload" id="facebook_share_button_414" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_414') || document.getElementById('facebook_share_icon_414') || document.getElementById('facebook_share_both_414') || document.getElementById('facebook_share_button_414');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_414') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://blog.diktator.org/index.php/2010/06/03/framework-and-pattern-overload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documenting BizTalk installations and code</title>
		<link>http://blog.diktator.org/index.php/2009/09/10/documenting-biztalk-installations-and-code/</link>
		<comments>http://blog.diktator.org/index.php/2009/09/10/documenting-biztalk-installations-and-code/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 18:20:46 +0000</pubDate>
		<dc:creator>Fredrik</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.diktator.org/?p=304</guid>
		<description><![CDATA[So, as a part of my current consulting assignment I&#8217;ve been asked to work out a way of documenting the integrations that are deployed in the BizTalk 2006 platform I&#8217;m working with. I&#8217;ve stumbled across a tool called BTM2HTML/BizTalk Map Documenter (a codeplex project), but the main problem with this tool is that it only [...]]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">S</span>o, as a part of my current consulting assignment I&#8217;ve been asked to work out a way of <strong>documenting the integrations</strong> that are deployed in the BizTalk 2006 platform I&#8217;m working with. I&#8217;ve stumbled across a tool called <a href="http://biztalkmapdoc.codeplex.com/" target="_blank">BTM2HTML/BizTalk Map Documenter</a> (a codeplex project), but the main problem with this tool is that it only documents BizTalk maps. Orchestrations or pipelines and so forth are left out of the equation. Also the presentation of the mapping wasn&#8217;t really useful to us, it was somewhere in between technical and end user friendly. A developer wouldn&#8217;t be happy with it because it&#8217;s too much of a user presentation and the user wouldn&#8217;t be happy with it because he/she wouldn&#8217;t understand it fully.</p>
<p>What I set out to find was some tool that would help me extract the generated <strong>XSLT</strong> from a <strong>BizTalk map</strong> (either from the <strong>.btm-file</strong> or the <strong>assembly</strong>) and preferably not require me to manually load over 1500 projects in one instance of Visual Studio (and then right-click every single map to select &#8220;Validate map&#8221;). After asking around I got this tip: <a href="http://www.codeplex.com/BizTalkDocumenter/" target="_blank">BizTalk Server 2006 Documenter</a> (also a codeplex project). This looked exactly like what I wanted! Everything in my BizTalk platform would be documented in detail and neatly packaged into one comprehensive file. Only problem: it threw an <strong>exception</strong> when I tried to document my local BizTalk server!</p>
<p>It turns out that the application (or well, rather the base library that the application uses (<a href="http://biztalkom.codeplex.com/" target="_blank">BizTalk OM</a>, yup &#8211; another codeplex project)) has issues with <strong>multiple versions</strong> of the same binary being installed on the same BizTalk server (i.e. in the servers assembly cache (GAC)). For some weird reason a design decision was made to store the map names, orchestration names, pipeline names, schema names and assembly names without version information as keys in a hashtable. It comes to no surprise that when confronted with a second version of for example a pipeline the application will encounter an exception due to the fact that the name already exists as a key in the hashtable storing pipelines for the current BizTalk application.</p>
<p>So for the last couple of days I&#8217;ve tried to spend as much time as possible extending the <a href="http://biztalkom.codeplex.com/" target="_blank">base library</a> so that it will be compatible with BizTalk installations that have multiple versions of the same map names, pipeline names, orchestration names and assembly names. To be brutally honest my solution isn&#8217;t the most elegant, but it works. All it does is append the version of the artefact in question to its name when the instance of the type is created. What should be done is rather some re-engineering of the way the class library is built and how the inner collections are stored. Also, I don&#8217;t know if I&#8217;ve missed some artefact type which should be extended in the same manner just because it isn&#8217;t used in our server.</p>
<p>I&#8217;ll see if I can get in touch with the persons responsible for the various bits and pieces I&#8217;ve changed in order to add my efforts to the project or atleast receive some feedback. If you should feel that my changes would make your life better before I&#8217;ve managed to add them to the official project you can always contact me through this blog and I&#8217;ll be happy to send you the code (or even the packaged installation) &#8211; the license permits this from what I can see.</p>
<p>(Of course there&#8217;s a slight chance that I&#8217;ve completely missed something about all this multi-version yahoo which solves my initial problem with the exception, but if so &#8211; I haven&#8217;t found it yet).</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.diktator.org%2Findex.php%2F2009%2F09%2F10%2Fdocumenting-biztalk-installations-and-code%2F&amp;t=Documenting%20BizTalk%20installations%20and%20code" id="facebook_share_button_304" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_304') || document.getElementById('facebook_share_icon_304') || document.getElementById('facebook_share_both_304') || document.getElementById('facebook_share_button_304');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_304') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://blog.diktator.org/index.php/2009/09/10/documenting-biztalk-installations-and-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Deploying on fridays</title>
		<link>http://blog.diktator.org/index.php/2009/08/14/deploying-on-fridays/</link>
		<comments>http://blog.diktator.org/index.php/2009/08/14/deploying-on-fridays/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 05:26:50 +0000</pubDate>
		<dc:creator>Fredrik</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Methodology]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.diktator.org/?p=294</guid>
		<description><![CDATA[Today I&#8217;m going to do something that is against my standards. I&#8217;m going to deploy stuff to a production environment on a friday.
Generally it&#8217;s a bad idea to deploy things in to production on fridays and some readers might wonder why. Well, do you like working weekends? Thought so. If something can go wrong with [...]]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">T</span>oday I&#8217;m going to do something that is against my standards. I&#8217;m going to deploy stuff to a production environment on a friday.</p>
<p>Generally it&#8217;s a bad idea to deploy things in to production on fridays and some readers might wonder why. Well, do you like working weekends? Thought so. If something can go wrong with the package you&#8217;re deploying it most certainly will go wrong if you&#8217;re deploying it on a friday &#8211; it&#8217;s like asking for it!</p>
<p>Ah well, sometimes you just can&#8217;t choose. As I like to say: The money always wins. And by that I mean that the people in charge of the money always tend to win, and if they want the deploy on a friday they get the deploy on a friday.</p>
<p>If you&#8217;re in the same business as me &#8211; try to stay away from deploys on fridays if possible, but don&#8217;t break your back over it. Because that&#8217;ll be you dying, not them. =)</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.diktator.org%2Findex.php%2F2009%2F08%2F14%2Fdeploying-on-fridays%2F&amp;t=Deploying%20on%20fridays" id="facebook_share_button_294" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_294') || document.getElementById('facebook_share_icon_294') || document.getElementById('facebook_share_both_294') || document.getElementById('facebook_share_button_294');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_294') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://blog.diktator.org/index.php/2009/08/14/deploying-on-fridays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making interface mockups</title>
		<link>http://blog.diktator.org/index.php/2009/07/16/making-interface-mockups/</link>
		<comments>http://blog.diktator.org/index.php/2009/07/16/making-interface-mockups/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 06:57:01 +0000</pubDate>
		<dc:creator>Fredrik</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.diktator.org/?p=280</guid>
		<description><![CDATA[If you should have the need to some day produce a mockup of an interface without letting the person who asked for it think that you&#8217;ve actually implemented stuff behind the mockup (and thus believing that the product is ready to ship) you should have a look at this: Balsamiq Mockups. It&#8217;s a flash application, [...]]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">I</span>f you should have the need to some day produce a mockup of an interface without letting the person who asked for it think that you&#8217;ve actually implemented stuff behind the mockup (and thus believing that the product is ready to ship) you should have a look at this: <a href="http://www.balsamiq.com/demos/mockups/Mockups.html" target="_blank">Balsamiq Mockups</a>. It&#8217;s a flash application, so it should work with any browser (that supports Flash of course =).</p>
<p>The only drawback is that it&#8217;s a demo which&#8217;ll show you a popup every 5 minutes while working with your mockup &#8211; but I think I could live with that.</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.diktator.org%2Findex.php%2F2009%2F07%2F16%2Fmaking-interface-mockups%2F&amp;t=Making%20interface%20mockups" id="facebook_share_button_280" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_280') || document.getElementById('facebook_share_icon_280') || document.getElementById('facebook_share_both_280') || document.getElementById('facebook_share_button_280');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_280') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://blog.diktator.org/index.php/2009/07/16/making-interface-mockups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Workflow Way</title>
		<link>http://blog.diktator.org/index.php/2009/06/15/the-workflow-way/</link>
		<comments>http://blog.diktator.org/index.php/2009/06/15/the-workflow-way/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 15:37:07 +0000</pubDate>
		<dc:creator>Fredrik</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.diktator.org/?p=244</guid>
		<description><![CDATA[Ijust finished reading this really interesting article about Windows Workflow Foundation written by David Chappell. I&#8217;ve only tinkered around with WF a bit and therefore this article was a good read in order to confirm some thoughts I had about it but also to give me a few new ways to think about WF.
If you, [...]]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">I</span>just finished reading <a href="http://www.davidchappell.com/TheWorkflowWay--Chappell.pdf" target="_blank">this really interesting article about Windows Workflow Foundation</a> written by David Chappell. I&#8217;ve only tinkered around with WF a bit and therefore this article was a good read in order to confirm some thoughts I had about it but also to give me a few new ways to think about WF.</p>
<p>If you, like me, prefer to write your own (bad? =) code and don&#8217;t mind handling threading and stuff like that yourself, using WF might not be the most appealing thing for you to use. But rest assured, something called <em>custom activities</em> is available and that&#8217;s the place where you wanna strut your stuff! As many others say, this technology just means you get to spend more quality time writing business-related code and don&#8217;t have to bother with the infrastructure, which &#8211; to be honest &#8211; gets a bit tedious the n:th time you implement it.</p>
<p>Happy reading!</p>
<p>&lt;P.S.&gt; I wrote the most of this post on my P1i (which happens to have an absolutely horrid keyboard) using the <a href="http://wphoneplugin.org/" target="_blank">WPhone plugin</a> for mobile WordPress access. The only drawback is that I haven&#8217;t yet figured out how to add links using this plugin, therefore I had to finish this post in a real browser. &lt;/P.S.&gt;</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.diktator.org%2Findex.php%2F2009%2F06%2F15%2Fthe-workflow-way%2F&amp;t=The%20Workflow%20Way" id="facebook_share_button_244" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_244') || document.getElementById('facebook_share_icon_244') || document.getElementById('facebook_share_both_244') || document.getElementById('facebook_share_button_244');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_244') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://blog.diktator.org/index.php/2009/06/15/the-workflow-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment spam</title>
		<link>http://blog.diktator.org/index.php/2009/05/21/comment-spam/</link>
		<comments>http://blog.diktator.org/index.php/2009/05/21/comment-spam/#comments</comments>
		<pubDate>Thu, 21 May 2009 08:38:02 +0000</pubDate>
		<dc:creator>Fredrik</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.diktator.org/?p=165</guid>
		<description><![CDATA[I guess every blogger needs to go down this road sometime&#8230;
For some reason my post about geotagging has become some comment spammers new favorite darling. When my server came back online (after this little outage) the comments started flowing in at a rate of approximately one comment every four minutes (360 every 24 hours). What [...]]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">I</span> guess every blogger needs to go down this road sometime&#8230;</p>
<p>For some reason my post about <a href="http://blog.diktator.org/index.php/2009/05/12/geotagging/" target="_self">geotagging</a> has become some comment spammers new favorite darling. When my server came back online (<a href="http://blog.diktator.org/index.php/2009/05/20/dhcp-problems-bredbandsbolaget-freebsd-vmware/" target="_self">after this little outage</a>) the comments started flowing in at a rate of approximately one comment every four minutes (360 every 24 hours). What I did then was to enable the <a href="http://akismet.com/" target="_blank">akismet</a> plugin which is shipped by default with the wordpress installation. And sure, it did mark all the offending comments as spam. But then another problem arose &#8211; the usability. How can you guarantee that none of the comments marked as spam are actually mismarked comments, so called false positives? The only way to do that is to manually check the whole spam queue before deleting all comments in said queue.  This struck me as slightly sub optimal. What I wanted was a 100% reliable solution.</p>
<p>So I started looking for <a href="http://en.wikipedia.org/wiki/Captcha" target="_blank">captcha</a> plugins for wordpress. I came up with one called <a href="http://wordpress.org/extend/plugins/simple-captcha/" target="_blank">simpleCaptcha</a> but as it turns out it requires an image processing library (e.g. <a href="http://www.libgd.org/" target="_blank">GD</a>) to be installed on your webserver. While I am the administrator of my own webserver I didn&#8217;t really feel like fiddeling around with that kind of stuff, so I kept on looking. The next suggestion on the interwebs is <a href="http://recaptcha.net/" target="_blank">reCaptcha</a> which is actually a quite nifty idea!</p>
<p>ReCaptcha is basically using images of words which can&#8217;t be recognized by <a href="http://en.wikipedia.org/wiki/Optical_character_recognition" target="_blank">OCR</a> software from scanned books. The good thing about this is that my server doesn&#8217;t have to generate the images itself, they&#8217;re already obtainable from another server. And the whole idea of using words which can&#8217;t be recognized by machines is most likely drastically reducing the amount of autonomous captcha busting bots able to post comments to my now reCaptcha protected comment forms!</p>
<p>Now the only one remaining issue with this <a href="http://recaptcha.net/plugins/wordpress/" target="_blank">plugin</a> is that it still saves the comments in my wordpress database &#8211; although marked as spam. Sure, they&#8217;re not published but I&#8217;ve still got a spam queue to clean up once in a while. It&#8217;s not that much of an issue really since after having disabled akismet there&#8217;s only one way a comment could end up in the spam queue and that is by failing the reCaptcha test. Ergo &#8211; I can empty the queue without checking it manually beforehand.</p>
<p>The ultimate solution (in my opinion) would be a reCaptcha plugin which doesn&#8217;t save the comment as spam when the check fails but rather deletes the comment all together. Atleast this could be a configurable option. If I could set an option like that it would mean that I could re-enable the akismet plugin again and then the only way a comment could end up in the spam queue is by failing the akismet test. Let&#8217;s see if anyone picks up on this. =)</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.diktator.org%2Findex.php%2F2009%2F05%2F21%2Fcomment-spam%2F&amp;t=Comment%20spam" id="facebook_share_button_165" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_165') || document.getElementById('facebook_share_icon_165') || document.getElementById('facebook_share_both_165') || document.getElementById('facebook_share_button_165');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_165') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://blog.diktator.org/index.php/2009/05/21/comment-spam/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
