<?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>dev:ices &#187; Jonathan</title>
	<atom:link href="http://www.mindthe.net/devices/author/jonathan/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mindthe.net/devices</link>
	<description>Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. - Douglas Adams</description>
	<lastBuildDate>Wed, 11 Jan 2012 13:06:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Immersive Pomodoro</title>
		<link>http://www.mindthe.net/devices/2011/07/07/immersive-pomodoro/</link>
		<comments>http://www.mindthe.net/devices/2011/07/07/immersive-pomodoro/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 11:59:58 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[XCode]]></category>
		<category><![CDATA[GChat]]></category>
		<category><![CDATA[Google Calendar]]></category>
		<category><![CDATA[iCal]]></category>
		<category><![CDATA[Pomodoro]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/?p=273</guid>
		<description><![CDATA[<p>Some of my colleagues have been applying the <a title="Pomodoro Technique" href="http://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro technique</a> to their pair programming of late, so I thought I&#8217;d give it a try. I&#8217;m trialling a combination of tools which now integrates my Pomodoros more with my daily working life and I&#8217;ll set them out in this post.</p> <p>I&#8217;m currently coding [...]]]></description>
			<content:encoded><![CDATA[<p>Some of my colleagues have been applying the <a title="Pomodoro Technique" href="http://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro technique</a> to their pair programming of late, so I thought I&#8217;d give it a try. I&#8217;m trialling a combination of tools which now integrates my Pomodoros more with my daily working life and I&#8217;ll set them out in this post.<span id="more-273"></span></p>
<p>I&#8217;m currently coding in XCode on a Mac so I discovered the <a title="Pomodoro" href="http://pomodoro.ugolandini.com/">Pomodoro app</a> (available via AppStore or source code) which adds a countdown timer to my status bar at the top. It&#8217;s got a range of good features to it that brings it well above just being a glorified egg timer. The two features I&#8217;m liking the most are the GTD (Getting Things Done) and Calendar integration.</p>
<p>In the GTD section, the Pomodoro app sets my iChat status announcing my current Pomodoro and what time I&#8217;ll be done by. It automatically marks me as Busy during my Pomodoro and sets me back available afterwards and marking me as on one of my rest breaks. We&#8217;re using GChat more at work now so this is perfect because it can hopefully guide people who want to contact me on to the best time to do so.</p>
<p>In the Calendar section, I&#8217;ve set it up to log my Pomodoros to iCal. I&#8217;ve linked iCal to Google Calendar following <a title="Get started with CalDAV" href="http://www.google.com/support/calendar/bin/answer.py?answer=99358#ical">a guide from Google&#8217;s help pages</a> on how to use CalDAV to sync the two. I changed my Google Calendar&#8217;s notification settings to stop adding Email/Popup notifications for each Event by default. Before I&#8217;d done this iCal was alerting me to Pomodoros I&#8217;d already completed which was pointless.</p>
<p>So I can now embark on a fresh Pomodoro with a simple click or keypress, enter the description for the Pomodoro and know that my colleagues can see my current status and know that I&#8217;m tracking my own Pomodoro progress in my calendar at the same time.</p>
<p>I&#8217;ll let you know how the experiment continues, but at the moment it&#8217;s proving a positive way of focussing intently for a fixed period. The integration from using the Pomodoro app with iChat and iCal does provide a very immersive Pomodoro experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2011/07/07/immersive-pomodoro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are your contacts portable?</title>
		<link>http://www.mindthe.net/devices/2011/03/24/are-your-contacts-portable/</link>
		<comments>http://www.mindthe.net/devices/2011/03/24/are-your-contacts-portable/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 13:31:59 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Open Standards]]></category>
		<category><![CDATA[Portable Contacts]]></category>
		<category><![CDATA[Contacts]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[OpenSocial]]></category>
		<category><![CDATA[POCO]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/?p=249</guid>
		<description><![CDATA[<p><a href="http://www.flickr.com/photos/sidewalk_flying/2421382093/"></a></p> <p>With an increasing amount of technology to help you communicate, the job of keeping your multiple contact lists up-to-date across these devices and services has mainly fallen to you.</p> <p>Contact information lurks in many places and is often locked to serve one purpose. Whether it&#8217;s contact details in your mobile phone; on the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/sidewalk_flying/2421382093/"><img class="size-full wp-image-253  alignleft" title="Spare Office by sidewalk_flying (Flickr)" src="http://www.mindthe.net/devices/wp-content/uploads/rolodex.jpg" alt="Spare Office by sidewalk_flying (Flickr)" width="184" height="240" /></a></p>
<p>With an increasing amount of technology to help you communicate, the job of keeping your multiple contact lists up-to-date across these devices and services has mainly fallen to you.</p>
<p>Contact information lurks in many places and is often locked to serve one purpose. Whether it&#8217;s contact details in your mobile phone; on the address book in your email client at work or the list of friends you&#8217;ve built up on social media.</p>
<p>This post introduces <a id="aptureLink_OOZFVwLyeH" href="http://portablecontacts.net/">Portable Contacts</a> as a solution to getting access to these distinct collections of your contacts to avoid needing to duplicate them.</p>
<p><span id="more-249"></span></p>
<h2>Importing leads to duplication</h2>
<p>On-line services can often encourage you to import your contacts from other services so they&#8217;re available to use with their service. Making it easy for you to import contacts seems helpful as you can start to use your contacts in new ways. At the same time duplicating your contact information in yet another place means that the maintenance task to keep everything in sync increases. Importing contacts in multiple places can lead you to experience these services as separate &#8216;boxes&#8217; instead of being really interconnected on the Internet.</p>
<p>Portable Contacts is an <a id="aptureLink_MyWtvoxgVU" href="http://www.opensource.org/osr">open standard</a> which has a simple goal to</p>
<blockquote><p>&#8220;make it easier for developers to give their users a secure way to access the address books and friends lists they have built up all over the web&#8221; &#8211; portablecontacts.net</p></blockquote>
<p>Instead of forcing you to duplicate your contact information, Portable Contacts allows you to unlock your information and share it in a controlled and secure way. If your friends and family are stored in one place and your work contacts in another, if you could access them elsewhere via Portable Contacts then you only have to make edits in one place.</p>
<h2>A secure way to share</h2>
<p>A service that implements Portable Contacts uses <a id="aptureLink_upIHvSkYV9" href="http://en.wikipedia.org/wiki/OAuth">OAuth</a> to control access to any contact information to be shared. OAuth is increasingly used in services to allow 3rd party services to interact with them. <a id="aptureLink_eIabk3ThlI" href="http://twitter.com/">Twitter</a> uses OAuth to give you the choice of allowing other applications to &#8216;tweet&#8217; on your behalf. Sharing contacts with OAuth also stops you needing to share the security credentials to get access to your contacts. Usually websites that offer to import your contacts on your behalf will blatantly ask for your username and password details which, for the ease of use, users freely share.</p>
<h2>Easy to consume</h2>
<p>Portable Contacts shares information via HTTP operations and supplies the information in either JSON or XML formats to applications which want to use them. This approach is widely used in modern <a id="aptureLink_u6P9AUGAjZ" href="http://en.wikipedia.org/wiki/Application%20programming%20interface">APIs</a> and makes the contact data easy to consume in many programming languages.</p>
<p>The <a id="aptureLink_zsRkHVynEO" href="http://wiki.portablecontacts.net/w/page/17776143/Software-and-Services-using-Portable-Contacts">Portable Contacts&#8217; wiki page</a> shows some of the services using the open standard at the moment. Since the driving force behind Portable Contacts, <a id="aptureLink_j6Hn0BxbB0" href="http://josephsmarr.com/">Joseph Smarr</a>, now works for Google it&#8217;s no surprise that they have continued their support for <a id="aptureLink_XA9kmn1UnP" href="http://code.google.com/apis/contacts/docs/poco/1.0/developers_guide.html">exposing Google Contacts in this way</a>.</p>
<p>There are a few libraries to help developers integrate Portable Contacts in applications: a Java library called <a id="aptureLink_02uHHyHwlp" href="http://code.google.com/p/jpoco/">jpoco</a> and <a id="aptureLink_50HH4zUjlu" href="https://github.com/pelle/portablecontacts">a Ruby client</a> too.</p>
<h2>Sociable</h2>
<p>Another open standard, <a id="aptureLink_qUJib8QidO" href="http://www.opensocial.org/">OpenSocial</a>, is compatible with Portable Contacts. OpenSocial has <a id="aptureLink_C0CFxJDY9D" href="http://wiki.opensocial.org/index.php?title=Main_Page#Container_Information">been adopted by sites</a> like LinkedIn, MySpace, orkut, and Yahoo!. As Joseph explains on the Portable Contacts website:</p>
<blockquote><p>&#8220;The OpenSocial and Portable Contacts communities chose to wire-align our respective specs in order to maximize widespread adoption of a single API for accessing people data.&#8221; &#8211; Joseph Smarr</p></blockquote>
<p>Portable Contacts might not be widely known yet but the opportunities to access your contact data without duplicating it is increasing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2011/03/24/are-your-contacts-portable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco VPN Mac Client</title>
		<link>http://www.mindthe.net/devices/2008/03/16/cisco-vpn-mac-client/</link>
		<comments>http://www.mindthe.net/devices/2008/03/16/cisco-vpn-mac-client/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 16:39:30 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Comment]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[LegacyIKEPort]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/2008/03/16/cisco-vpn-mac-client/</guid>
		<description><![CDATA[<p>I needed to get VPN access using a <a href="http://www.cisco.com/en/US/products/sw/secursw/ps2308/index.html">Cisco VPN client</a> over the weekend. I didn&#8217;t have access to the PC version so I decided to search for a Mac version if there was one.</p> <p>Thankfully MacUpdate came to the rescue and I found a <a href="http://www.macupdate.com/info.php/id/10317/cisco-vpn-client">Mac flavour of the Cisco VPN client</a> and [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to get VPN access using a <a href="http://www.cisco.com/en/US/products/sw/secursw/ps2308/index.html">Cisco VPN client</a> over the weekend. I didn&#8217;t have access to the PC version so I decided to search for a Mac version if there was one.</p>
<p>Thankfully MacUpdate came to the rescue and I found a <a href="http://www.macupdate.com/info.php/id/10317/cisco-vpn-client">Mac flavour of the Cisco VPN client</a> and I was able to use the saved .pcf file I&#8217;d been sent.</p>
<p><span id="more-49"></span>There was one problem I came up against. I imported the .pcf file and tried to connect to the VPN connection. It failed saying that the IKE Port was already in use by another VPN client. I had been trying to use the Mac OS X VPN client to connect using some of the settings in the .pcf file but that failed, probably due to the encrypted Group Password that I&#8217;d have needed.</p>
<p>The solution came from forums about needing to add a setting to the .pcf file. When you&#8217;ve imported the .pcf file into the Cisco VPN Client, it copies it into its own profile folder. Close the VPN client and open up a Terminal window and navigate to the profiles directory:</p>
<pre>cd /etc/CiscoSystemsVPNClient/Profiles/</pre>
<p>Open the .pcf file you wish to use in your favourite text editor (nano for me) and add this extra line to the bottom:</p>
<pre>UseLegacyIKEPort=0</pre>
<p>Save it and try loading it again.  Worked first time for me!</p>
<p>Now the only trouble is that the Mac Remote Desktop Connection application just can&#8217;t handle sending the backslash character from a non US keyboard. The word on the blogs were that even the latest version 2.0 beta didn&#8217;t fix the problem after years of it kicking around.  Still its so useful that its not that bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2008/03/16/cisco-vpn-mac-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A little SugarOS on your Plesk?</title>
		<link>http://www.mindthe.net/devices/2007/09/13/a-little-sugaros-on-your-plesk/</link>
		<comments>http://www.mindthe.net/devices/2007/09/13/a-little-sugaros-on-your-plesk/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 22:32:40 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[SugarOS]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/2007/09/13/a-little-sugaros-on-your-plesk/</guid>
		<description><![CDATA[<p>There are many quirks which are picked up by using a website management package like <a href="http://www.swsoft.com/plesk/">Plesk</a>. My remote Linux server has this installed by default on it, and it does simplify a lot of basic operations. It does become difficult when standard Linux / <a href="http://www.apache.org">Apache</a> information doesn&#8217;t help because Plesk rearranges things into [...]]]></description>
			<content:encoded><![CDATA[<p>There are many quirks which are picked up by using a website management package like <a href="http://www.swsoft.com/plesk/">Plesk</a>. My remote Linux server has this installed by default on it, and it does simplify a lot of basic operations. It does become difficult when standard Linux / <a href="http://www.apache.org">Apache</a> information doesn&#8217;t help because Plesk rearranges things into its own way of doing things.<br />
This has been improved in the latest version installed ( version 8 ) as the virtual hosts directory is finally under the /var/www/ directory more like a standard Apache setup.</p>
<p>I&#8217;ve been wanting to trial the open-source customer relationship management software, <a href="http://www.sugarcrm.com/crm/community/sugarcrm-community.html">SugarOS</a>. I kept finding a block at Install Wizard Step 2 where it did a system check and failed at accessing the <a href="http://www.php.net">PHP</a> Session directory.<br />
<span id="more-16"></span><br />
Many attempts at trying to get the PHP <a href="http://uk2.php.net/manual/en/function.is-dir.php">is_dir</a> function to acknowledge its existence failed.<br />
All files under a virtual host&#8217;s main httpdocs directory are by default owned by the Linux username which is the FTP username assigned when creating the domain, with a group of &#8216;psacln&#8217;. I tried to add the &#8216;apache&#8217; group to the Linux user for that virtual host, but that didn&#8217;t help either.</p>
<p>A quick search for &#8216;Plesk PHP session writable&#8217; on Google uncovered a <a href="http://www.sugarcrm.com/forums/showthread.php?t=5102">relevant forum post</a> which was on the SugarOS forums site. I also found a <a href="http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/">helpful post by Aaron Gadburry</a> on using the vhost.conf file with Plesk to configure additional options for each Plesk virtual host. Do not try to edit the httpd.include file because Plesk will just overwrite it next time you change something with the web front-end. </p>
<p>So in the end, all I&#8217;ve done is added a vhost.conf file containing:</p>
<pre lang='text'>

<Directory /var/www/vhosts/DOMAINNAME/httpdocs/>
php_admin_value open_basedir "/var/www/vhosts/DOMAINNAME/httpdocs:/var/lib/php/session"
</Directory>
</pre>
<p>and then ran the command that Aaron mentioned:</p>
<pre lang='text'>
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com
</pre>
<p>You should now be able to get past that pesky step 2. Happy CRM-ing.</p>
<p>[Edit]<br />
You will need to amend the original vhost.conf to add the BlowFish directory if you want to set up Incoming Email mailbox monitoring. I found a <a href="http://www.sugarcrm.com/forums/showthread.php?t=23013&#038;highlight=inbound+email+blank">forum post about getting a blank page after setting up an incoming mailbox</a> which helped fix it.</p>
<p>It should now read:</p>
<pre lang='text'>

<Directory /var/www/vhosts/DOMAINNAME/httpdocs/>
php_admin_value open_basedir "/var/www/vhosts/DOMAINNAME/httpdocs:/var/lib/php/session:/Blowfish"
</Directory>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2007/09/13/a-little-sugaros-on-your-plesk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stored procedure error handling in SQL Server 2000</title>
		<link>http://www.mindthe.net/devices/2007/08/30/stored-procedure-error-handling-in-sql-server-2000/</link>
		<comments>http://www.mindthe.net/devices/2007/08/30/stored-procedure-error-handling-in-sql-server-2000/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 15:59:25 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Esendex]]></category>
		<category><![CDATA[error 2601]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/2007/08/30/stored-procedure-error-handling-in-sql-server-2000/</guid>
		<description><![CDATA[<p>Today, we&#8217;re continuing work on our <a href="http://devproj20.blogspot.com/2007/08/esendex-inbound-multipart-messaging.html">multipart message aggregation</a> upgrade for a future <a href="http://www.esendex.com">Esendex </a>release.</p> <p>One part of the investigations this morning has been looking into how we manage the database access as we add parts of an incoming message to it for later processing. As we have multiple servers processing inbound messages, [...]]]></description>
			<content:encoded><![CDATA[<p>Today, we&#8217;re continuing work on our <a href="http://devproj20.blogspot.com/2007/08/esendex-inbound-multipart-messaging.html">multipart message aggregation</a> upgrade for a future <a href="http://www.esendex.com">Esendex </a>release.</p>
<p>One part of the investigations this morning has been looking into how we manage the database access as we add parts of an incoming message to it for later processing. As we have multiple servers processing inbound messages, there was the potential for two threads trying to write to the database simultanously with different parts of the same message. Both could look at the database and think there were no existing parts of a multipart message, and decide to try and insert a new multipart message record.</p>
<p>During this work we found out that <a href="http://www.microsoft.com/sql/prodinfo/previousversions/default.mspx">SQL Server 2000</a> will still raise an <a href="http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlexception(VS.71).aspx">SQLException</a> error despite error handling put in <a href="http://msdn2.microsoft.com/en-us/library/aa260642(sql.80).aspx">T-SQL</a>.<br />
<span id="more-15"></span></p>
<p>A quick mockup test yesterday revealed that two competing threads could indeed try and insert twice despite checking for an existing record and caused a <a href="http://msdn2.microsoft.com/en-us/library/aa258747(SQL.80).aspx">Unique Key error 2601</a>. As this was all being coded in a stored procedure we looked to see what error handling T-SQL provided us.</p>
<p>Whilst you can detect the error number after a T-SQL statement in a stored procedure by querying the global variable @@ERROR, you <a title="Don't show T-SQL error 2601" href="http://www.developerfood.com/don-t-show-t-sql-error-2601/microsoft-public-sqlserver-programming/04db38fe-5ed8-483b-b028-3accedc190c1/article.aspx">cannot prevent SQL Server 2000 from sending an exception error</a> to the calling script. Therefore the following snippet does work, but you will still get an exception thrown. This is not the complete script but highlights the additional features which we used to get this working:</p>
<pre lang="sql">-- stored procedure snippet

-- declare a local variable to hold the error number
-- The global variable @@error gets reset after each
-- command so you would lose the error number following
-- the next statement should you wish to do extra things with it
-- like return it back to the script calling it

DECLARE @err int
...
-- update the parts received
UPDATE [PendingMultipartMessage] ...

-- check to see if the update ran by checking
-- the SET value of @multipartMessageID from the ID field

IF (@multipartMessageID is NULL)

BEGIN
  SET @multipartMessageID = NEWID()

  INSERT INTO [PendingMultipartMessage] (...) VALUES (...)

  SELECT @err = @@error

  IF (@err = 2601)

  BEGIN
    -- try updating instead of inserting as the record
    -- exists as the 2601 error says there's already a unique key
    UPDATE [PendingMultipartMessage] ...
  END

END</pre>
<p>All that&#8217;s left to do is to wrap your stored procedure call in a try&#8230;catch wrapper and catch any SQLExceptions and check they&#8217;re not 2601. You can do what you like with the error, but choosing to ignore it means your application will no longer fail.</p>
<p>Improvements in SQL Server 2005 have afforded developers a TRY CATCH definition in T-SQL to help catch errors within stored procedures. This feels a lot more sensible as the database is the singular resource we&#8217;re trying to gain shared access to and it should be able to handle these errors internally without an extra callback. Just to remind you, the <a href="http://support.microsoft.com/lifecycle/?p1=2852">mainstream support for SQL Server 2000 ends in April 2008</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2007/08/30/stored-procedure-error-handling-in-sql-server-2000/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Of spam and things…</title>
		<link>http://www.mindthe.net/devices/2007/08/28/of-spam-and-things%e2%80%a6/</link>
		<comments>http://www.mindthe.net/devices/2007/08/28/of-spam-and-things%e2%80%a6/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 13:27:15 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Comment]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/2007/08/28/of-spam-and-things%e2%80%a6/</guid>
		<description><![CDATA[<p>It&#8217;s been a few times this last year that I&#8217;ve been the victim of a domain spam attack. Sending email appearing to be someone else isn&#8217;t a difficult thing to achieve. Yet when someone takes one of your domains and sends spam, well I was going to say on my behalf but I never asked [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a few times this last year that I&#8217;ve been the victim of a domain spam attack. Sending email appearing to be someone else isn&#8217;t a difficult thing to achieve. Yet when someone takes one of your domains and sends spam, well I was going to say on my behalf but I never asked them to, it gets very annoying.<br />
I&#8217;m currently processing over 50 emails a day with people&#8217;s email servers returning spam blocked or unknown mailbox responses.<br />
<span id="more-14"></span><br />
My <a href="http://c-command.com/spamsieve/">spam filter</a> for my <a href="http://www.apple.com/macosx/features/mail/">Mail </a>application on my <a href="http://www.apple.com/macbookpro/">Macbook Pro</a> is excellent at learning as it goes. With unknown users or error messages, collected from having a &#8216;catch-all&#8217; address, it struggles to cope as they are genuine errors which I don&#8217;t necessarily want consigning to the bin automatically.<br />
Sure you could apply a security certificate to your outgoing mail to prove that it is you that&#8217;s sending, but there&#8217;s a lot of unnecessary traffic being generated by idiots.<br />
Traffic aside, this style of attack also doesn&#8217;t help the reputation of whoever owns the domain, a side effect which I&#8217;m sure isn&#8217;t lost on those who perpetrate this kind of thing. The one time I did get a real complaint from a user, I wrote back to explain the situation but thankfully it was a personal domain. Wonder how many businesses are affected by this kind of thing? Maybe they don&#8217;t have catch-all addresses to try and stem the flow of ploughing through malformed or misaddressed mail.<br />
Until such time as my spam filter adopts a psychic approach to reading my mail, I&#8217;ll continue to ride out these waves and grumble at the speed of the internet clogged down by all this unnecessary traffic.<br />
(Conspiracy theories that ISPs have no drive to stop spam because they can continue to move to charging people for bandwidth usage as the internet (or rather their copper based networks) reaches capacity, in a hark back to the days when we were on dialup and paying for time online are welcome here)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2007/08/28/of-spam-and-things%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking it out</title>
		<link>http://www.mindthe.net/devices/2007/08/22/checking-it-out/</link>
		<comments>http://www.mindthe.net/devices/2007/08/22/checking-it-out/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 10:56:50 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Comment]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/2007/08/22/checking-it-out/</guid>
		<description><![CDATA[<p>I have a feeling that a lot of small to medium development operations will still be using <a href="http://www.microsoft.com">Microsoft</a>&#8216;s <a href="http://msdn2.microsoft.com/en-us/vstudio/aa718670.aspx">Visual SourceSafe</a> to manage their central code-base despite its <a href="http://www.highprogrammer.com/alan/windev/sourcesafe.html">limitations</a>.<br /> Given that Microsoft have since addressed this hole in their development offerings with the excellent <a href="http://msdn2.microsoft.com/en-us/teamsystem/aa718825.aspx">Team Foundation Server</a> which offers a seamless [...]]]></description>
			<content:encoded><![CDATA[<p>I have a feeling that a lot of small to medium development operations will still be using <a href="http://www.microsoft.com">Microsoft</a>&#8216;s <a href="http://msdn2.microsoft.com/en-us/vstudio/aa718670.aspx">Visual SourceSafe</a> to manage their central code-base despite its <a href="http://www.highprogrammer.com/alan/windev/sourcesafe.html">limitations</a>.<br />
Given that Microsoft have since addressed this hole in their development offerings with the excellent <a href="http://msdn2.microsoft.com/en-us/teamsystem/aa718825.aspx">Team Foundation Server</a> which offers a seamless experience within Visual Studio 2005 and a raft of source control features woefully missing from Sourcesafe. </p>
<p>Not wanting to turn this into too much of a rant about SourceSafe, today&#8217;s observation concerns SourceSafe&#8217;s supposed &#8216;Multiple Checkout&#8217; feature when used with Visual Studio 2005.<br />
<span id="more-13"></span><br />
When checking out a file that someone else has already checked out, normally you&#8217;ll get the following handy error:<br />
<img src="http://www.mindthe.net/devices/wp-content/images/checkout.jpg" alt="Error message from Visual Studio saying 'Checked out by another user, continue?'" title="Checked out by another user &copy; Microsoft"  /><br />
This is fine and you can continue by selecting Yes and all is well.<br />
There are times where I want to change around the Project&#8217;s References to point them to another project in the same solution instead of a precompiled DLL when I want to be able to step through code provided from another project.<br />
If someone has the project definition file (.csproj) checked out, then we run into a problem with Visual Studio vs SourceSafe. They may have the file checked out because they&#8217;ve been changing references over, or maybe adding some new content to the project.<br />
If I attempt to change the references when someone else has the file checked out, multiple checkouts mean nothing. You get this handy little error:<br />
<img src="http://www.mindthe.net/devices/wp-content/images/binary.jpg" width="564" height="130" alt="Cannot check out. It is binary and is already checked out. &copy; Microsoft" title="Cannot check out. It is binary and is already checked out. &copy; Microsoft" /><br />
Followed swiftly by:<br />
<img src="http://www.mindthe.net/devices/wp-content/images/checkouterror.jpg" width="664" height="112" alt="An error or user cancellation occured during checkout. Some files may not have been checked out. File was not checked out. &copy; Microsoft" title="An error or user cancellation occured during checkout. Some files may not have been checked out. File was not checked out. &copy; Microsoft" /><br />
So much for multiple checkout, hey?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2007/08/22/checking-it-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Have you got the Bug?</title>
		<link>http://www.mindthe.net/devices/2007/08/13/have-you-got-the-bug/</link>
		<comments>http://www.mindthe.net/devices/2007/08/13/have-you-got-the-bug/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 16:28:29 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Comment]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/2007/08/13/have-you-got-the-bug/</guid>
		<description><![CDATA[<p>Being involved in web development work, I have to have a wide range of browsers installed to make sure what I&#8217;m creating is accessible to as many people as possible. Whilst I still have a soft-spot for <a href="http://www.opera.com">Opera</a>, it is without a doubt that Firefox is the <a href="http://www.swissarmy.com/multitools/default.htm?category=multitools&#038;">Swiss Army Knife</a> of all browsers.<br [...]]]></description>
			<content:encoded><![CDATA[<p>Being involved in web development work, I have to have a wide range of browsers installed to make sure what I&#8217;m creating is accessible to as many people as possible. Whilst I still have a soft-spot for <a href="http://www.opera.com">Opera</a>, it is without a doubt that Firefox is the <a href="http://www.swissarmy.com/multitools/default.htm?category=multitools&#038;">Swiss Army Knife</a> of all browsers.<br />
The ability for developers to <a href="http://addons.mozilla.org/">add-on</a> functionality has created such a rich platform for linking useful tools with web browsing that there&#8217;s nothing finer in my humble opinion.</p>
<p>Here&#8217;s a few addons that I can&#8217;t live without:</p>
<ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/1419">IE Tab</a></li>
</ul>
<p><span id="more-12"></span><br />
The latest addition to this list has been Firebug.</p>
<blockquote><p>Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page</p></blockquote>
<p>I find the ability to browse the HTML and CSS source without needing to open a new window invaluable, but also it will time how long each of the elements take to download which is great for working out what&#8217;s slowing down the rendering of your page. </p>
<p>IETab allows you to render pages within Firefox using the Internet Explorer engine. Perfect for viewing those picky websites like Sharepoint or any bad web applications that only render properly in IE.<br />
And the Web Developer toolbar is just a no-brainer for anyone involved in web development.</p>
<p>If anyone else has any suggestions of addons that you can&#8217;t live without, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2007/08/13/have-you-got-the-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Credit card regular expressions</title>
		<link>http://www.mindthe.net/devices/2007/08/10/credit-card-regular-expressions/</link>
		<comments>http://www.mindthe.net/devices/2007/08/10/credit-card-regular-expressions/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 15:44:38 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Esendex]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[BIN]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/2007/08/10/credit-card-regular-expressions/</guid>
		<description><![CDATA[<p>Following on from my <a href="http://www.mindthe.net/devices/2007/08/10/maestro-music-please/">previous post</a> about credit card authentication with regular expressions, I thought I&#8217;d share my other discovery.<br /> The <a href="http://www.barclaycardbusiness.co.uk/docs/binranges.pdf">BIN Ranges list</a> I found showed a list of Visa cards which were designated &#8216;ATMOnly. Figuring these would be a good thing to filter out during validation.<br /> There&#8217;s plenty of [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my <a href="http://www.mindthe.net/devices/2007/08/10/maestro-music-please/">previous post</a> about credit card authentication with regular expressions, I thought I&#8217;d share my other discovery.<br />
The <a href="http://www.barclaycardbusiness.co.uk/docs/binranges.pdf">BIN Ranges list</a> I found showed a list of Visa cards which were designated &#8216;<abbr title="Automated Teller Machine">ATM</abbr>Only. Figuring these would be a good thing to filter out during validation.<br />
There&#8217;s plenty of regular expression help about joining pattern matches with logical OR clauses, but what about wanting to specify patterns which prevent certain things coming through?<br />
<span id="more-7"></span><br />
Any card number beginning 4 is a Visa card. This is simple to do in a regular expression</p>
<pre lang="text">
^4.*
</pre>
<p>This will match anything beginning with 4. Not very useful though as it&#8217;ll match anything, including text like &#8217;4CORNERS&#8217;. So we&#8217;ll refine it to only look for numbers after the 4. There are two ways of doing this:</p>
<ol>
<li>The more formal set definition
<ul>
<li><strong>[0-9]</strong></li>
</ul>
</li>
<li>The shortcut
<ul>
<li><strong>\d</strong></li>
</ul>
</li>
</ol>
<pre lang="text">
^4[0-9]*
^4\d*
</pre>
<p>So that&#8217;s better now it only accepts numbers, but there&#8217;s a limit to the number of digits in a card: 16 normally but can be 18 or 19 in some cases (there is an entry on the <a href="http://www.barclaycardbusiness.co.uk/docs/binranges.pdf">Barclaycard BIN Ranges document</a> that says some Maestro can be as low as 12!)</p>
<pre lang="text">
^4[0-9]{15-18}
</pre>
<p>This would accept a 17 digit card number which isn&#8217;t valid, so we have to start grouping conditions to get these two possible outcomes using the pipe character &#8216;|&#8217; as a logical OR operator.</p>
<pre lang="text">
^4([0-9]{15}|[0-9]{17-18})
</pre>
<p>The next challenge is to stop the ATM Only cards being let through. The list of these I found from Barclaycard&#8217;s BIN Ranges document, however I stress you should check with your own card processing service to see what their particular rules of operation are before copying any of this blindly. </p>
<p>In order to prevent certain matches being made, we need to make use of a &#8216;look-ahead&#8217; operator. When a regular expression engine is checking to see if there&#8217;s a match, it works from left to right normally. So when it&#8217;s checked &#8216;^4&#8242; is present, it&#8217;s moved its pointer to after the 4, ready to check what&#8217;s next. In my previous example, what we asked it to look for next were 15, 17 or 18 more digits. However, we want to jump in before that to make sure that none of the ATM Only prefixes are present. </p>
<p>To do this we use the &#8216;<strong>(?!)</strong>&#8216; operator. What this does is has a look for a matching pattern without moving the pointer along the string, and fails if the match is found. Formally it&#8217;s defined as &#8220;Match if suffix is not found&#8221;; suffix refering to the fact the string will be checked from the pointer onwards, looking right.<br />
One of the ATM Only card ranges starts 490300-1, meaning anything starting 490300 or 490301. To check this is NOT present, we do the following:</p>
<pre lang="text">
^4(?!9030[0-1]{1})([0-9]{15}|[0-9]{17,18})
</pre>
<p>That&#8217;s the basic idea. Here&#8217;s the full list, but I stress this is a) probably out of date already and b) may not be complete or may be incorrect for your application.</p>
<pre lang="csharp">
patterns = "(^4)" +
                                        "(?!9030[0-1]{1})" +
                                        "(?!9031([0-2]{1}[0-9]{1}|3[0-4]{1}))" +
                                        "(?!903[4-9]{1}[0-9]{1})" +
                                        "(?!9040[0-9]{1})" +
                                        "(?!90419)" +
                                        "(?!90451)" +
                                        "(?!90459)" +
                                        "(?!90467)" +
                                        "(?!9047[5-8]{1})" +
                                        "(?!905[0-9]{2})" +
                                        "(?!91001)" +
                                        "(?!9110[0-2]{1})" +
                                        "(?!9110([3-6]{1}[0-9]{1}|7[0-3]{1}))" +
                                        "(?!911(8[3-9]{1}|9[0-9]{1}))" +
                                        "(?!92183)" +
                                        "(?!928[0-9]{2})" +
                                        "(?!987[0-9]{2})" +
                                        "[0-9]{15,19}$";
</pre>
<p>Disclaimer: This code is not production-ready nor should it be used directly without thought or modification to fit your own purposes. No responsibility or liability is accepted for any fraud, losses or inconvenience for following this advice which has been given in good faith as an documented example only. That should cover it <img src='http://www.mindthe.net/devices/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2007/08/10/credit-card-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maestro, music please</title>
		<link>http://www.mindthe.net/devices/2007/08/10/maestro-music-please/</link>
		<comments>http://www.mindthe.net/devices/2007/08/10/maestro-music-please/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 12:52:01 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Esendex]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[BIN]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[maestro]]></category>
		<category><![CDATA[Mastercard]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[Visa]]></category>

		<guid isPermaLink="false">http://www.mindthe.net/devices/?p=5</guid>
		<description><![CDATA[<p>We&#8217;ve been working on a change request to add <a href="http://www.maestrocard.com/" title="Maestro">Maestro </a>to the credit cards that we accept for ecommerce payments. Switch started in 1988 but has now merged with the Maestro network owned by <a href="http://www.mastercard.com" title="MasterCard">MasterCard</a> in the UK.</p> <p>Until recently, if you took Switch payments then UK customers who had new [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been working on a change request to add <a href="http://www.maestrocard.com/" title="Maestro">Maestro </a>to the credit cards that we accept for ecommerce payments. Switch started in 1988 but has now merged with the Maestro network owned by <a href="http://www.mastercard.com" title="MasterCard">MasterCard</a> in the UK.</p>
<p>Until recently, if you took Switch payments then UK customers who had new Maestro cards would still be ok (as long as you accepted the new 6759 prefix for your payments) however with the merging of the worldwide card base there&#8217;s a whole new set of card numbers which need validating.</p>
<p>A quick search on 18-digit Maestro cards that <a href="http://www.hsbc.com" title="HSBC">HSBC</a> have been issuing raised a few e-commerce shopping cart forums where people were confused about these new card types. So I thought I&#8217;d share my findings:<br />
<span id="more-5"></span><br />
Validating payment card details is important to catch incorrectly entered details from the customer before requesting payment authentication from your banking service, saving unnecessary external calls.</p>
<p>Information from <a href="www.barclaycard.com" title="BarclayCard">BarclayCard</a>&#8216;s site about <a href="http://www.barclaycardbusiness.co.uk/docs/binranges.pdf" title="card type formats">card type formats</a> showed though that Maestro cards can have 16, 18 or 19 digits. This is an important deviation from the standard 16 digits that used to be a quick check. </p>
<p>We ask the customer what Card Type they want to pay with in order to present the relevant input fields to collect all the information the bank requires for that type. Issue number and start date are two common items of information which can be mandatory or optional depending on the issuer.<br />
Using <abbr title="Bank Identification Numbers">BIN</abbr> ranges, you can detect what kind of card an entered number represents. You could have a single step where a customer enters their card number, and based on that then it would prompt for other information. The trouble is that there are card features that say that items like Card Security Number are optional, so it&#8217;s down to the individual card issuers&#8217; preferences. </p>
<p>Based on the Card Type selected, we then validate the details the customer has entered to make sure they make sense. To do this, we make use of <a href="http://en.wikipedia.org/wiki/Regular_expression">Regular Expressions</a>. For ages, regular expressions have been a black art to me. They are very powerful but at first glance mean little to the uninitiated. The advantages of regular expressions can really be seen when using them for validation as you can specify the ranges of values that are valid.</p>
<p>The regular expression we&#8217;re using to authenticate Maestro cards is:</p>
<pre lang='text'>
(^6759[0-9]{2}([0-9]{10})$)|
(^6759[0-9]{2}([0-9]{12})$)|
(^6759[0-9]{2}([0-9]{13})$)
</pre>
<p>Each pattern match is separated by &#8216;|&#8217; characters to indicate OR. The leading &#8216;^&#8217; and the trailing &#8216;$&#8217; on each expression means that the pattern has to match the beginning and end of the string. Therefore, this has to match exactly and not just be a substring of the card number we&#8217;re comparing this with.</p>
<p>6759 is the literal match for the Maestro card leading card number digits. The BarclayCard document says that the next two digits can between 00 and 99. The pattern states we&#8217;re looking for two numerical digits 0 to 9. The last bit of the pattern then make up either the remaining digits to make the card number 16,18 or 19 (10, 12 or 13 remaining characters). We could&#8217;ve easily just matched using 12, 14 or 15 digits instead of splitting it out, but this retains the formatting specified in the document.</p>
<p>The new regular expressions are working really well now, and with a change of validation, can look forward to welcoming new customers who prefer paying with Maestro. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindthe.net/devices/2007/08/10/maestro-music-please/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

