<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5845506119057732736</id><updated>2012-01-24T14:25:01.443Z</updated><category term='C#'/><category term='Esporta'/><category term='System.Random'/><category term='sports clubs'/><category term='economics'/><category term='Singapore'/><category term='Linux'/><category term='.Net'/><category term='Borg'/><category term='Mono'/><category term='assimilation'/><category term='MonoDevelop'/><category term='driving'/><category term='data'/><category term='Interview'/><category term='google'/><title type='text'>oddsandsods</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-5099428653304927087</id><published>2011-06-15T18:21:00.001+01:00</published><updated>2011-06-15T18:24:53.405+01:00</updated><title type='text'>Copy statistics from one Oracle schema to another</title><content type='html'>Sometimes statistics are needed to optimize an initial workflow or data load in an empty Oracle schema when large volumes of data are about to be processed. To accomplish this you can import statistics from another schema where said workflow has already run.&lt;br /&gt;&lt;br /&gt;Assuming the schema where you will store the stats to be imported is called "TEMP_STATS_SCHEMA" and you have a source schema called "SOURCE_SCHEMA" and a target schema called "TARGET_SCHEMA", the command syntax is as follows:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;exec dbms_stats.create_stat_table(ownname =&amp;gt; 'TEMP_STATS_SCHEMA', stattab =&amp;gt; 'TEMP_STATS_TABLE');&lt;br /&gt;exec dbms_stats.export_schema_stats(statown=&amp;gt; 'TEMP_STATS_SCHEMA', stattab =&amp;gt; 'TEMP_STATS_TABLE', ownname =&amp;gt; 'SOURCE_SCHEMA');&lt;br /&gt;update TEMP_STATS_SCHEMA.TEMP_STATS_TABLE set c5 = 'TARGET_SCHEMA' where c5 = 'SOURCE_SCHEMA';&lt;br /&gt;commit;&lt;br /&gt;exec dbms_stats.import_schema_stats(statown=&amp;gt; 'TEMP_STATS_SCHEMA', stattab =&amp;gt; 'TEMP_STATS_TABLE', ownname =&amp;gt; 'TARGET_SCHEMA');&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-5099428653304927087?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/5099428653304927087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=5099428653304927087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5099428653304927087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5099428653304927087'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2011/06/copy-statistics-from-one-oracle-schema.html' title='Copy statistics from one Oracle schema to another'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-5675888975826431624</id><published>2011-05-18T20:03:00.001+01:00</published><updated>2011-05-18T20:07:11.063+01:00</updated><title type='text'>Google - Fix your localisation strategy, please.</title><content type='html'>Honestly, in almost every way, Google services are spot on and solve problems but when it comes to serving pages in the right language, they can &lt;a href="http://youtu.be/SRnq-PFboMI"&gt;kiss my shiny metal ass&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I only speak English (HRM's), but I work in all sorts of different places and countries and despite being authenticated against an account marked definitively as a speaker of en-GB, the dim children that designed Google's language picker insist on showing me content in the language of the country my hotel's ISP connects from.&lt;br /&gt;&lt;br /&gt;Google moron developer, if you are reading this;&lt;br /&gt;I do not speak German, I do not speak French, I do not speak Italian and I do not speak gibberish.&lt;br /&gt;&lt;br /&gt;SERVE MY SEARCH RESULTS IN THE LANGUAGE OF MY GOOGLE ACCOUNT AND PROFILE.&lt;br /&gt;&lt;br /&gt;That is all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-5675888975826431624?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/5675888975826431624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=5675888975826431624' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5675888975826431624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5675888975826431624'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2011/05/google-fix-your-localisation-strategy.html' title='Google - Fix your localisation strategy, please.'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-3032369608853502894</id><published>2011-01-19T16:11:00.002Z</published><updated>2011-01-19T19:59:19.032Z</updated><title type='text'>Why the Software Craftsmanship Manifesto is a load of crock!</title><content type='html'>&lt;p&gt;I just read Martin Fowler's "&lt;a href="http://martinfowler.com/bliki/CraftmanshipAndTheCrevasse.html"&gt;Craftmanship and the Crevasse&lt;/a&gt;" &amp;amp; Dan North's "&lt;a href="http://dannorth.net/2011/01/11/programming-is-not-a-craft/"&gt;Programming is not a craft&lt;/a&gt;" and I've gotta say, I’m proud of having been aware of the &lt;a href="http://manifesto.softwarecraftsmanship.org/"&gt;SCM&lt;/a&gt;&amp;nbsp;since its early days and having &lt;strong&gt;not &lt;/strong&gt;signed it despite having some respect for those who wrote it. I’m a tradesman not a craftsman and I’m proud of writing software that works while delivering it on time and to budget. The manifesto and I agree on absolutely nothing.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Well-crafted software is nice. Working software is imperative.&lt;/strong&gt;&lt;br /&gt;&lt;i&gt;A good looking bridge is no better at crossing rivers than an ugly one. And lets face it, the point of a bridge is getting from A to B reliably, not beautifully.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Steadily adding value is nice. Responding to change is imperative.&lt;/strong&gt;&lt;br /&gt;&lt;i&gt;Inability to respond to change is like being a plumber who left his adjustable wrench at home whilst steadily adding value is like being the plumber who’s been under the damn bath for the last 3 hours and still hasn’t replaced the washer seal.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;A community of professionals is nice but you can’t have one without individuals and interactions.&lt;/strong&gt;&lt;br /&gt;&lt;i&gt;The developer community has as much appeal to it’s business customers as a Vegas dentists convention has to the gamblers at the slot machines.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Productive partnerships are nice but businesses do not function without customers.&lt;/strong&gt;&lt;br /&gt;&lt;i&gt;Saying partnerships are more valuable than collaboration is like saying marriage produces better babies than sex.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;For the record, the &lt;a href="http://agilemanifesto.org/"&gt;Agile Manifesto&lt;/a&gt; and I, agree on absolutely everything. Also for the record, this post reflects my programming ethics which are biased by the fact that I am a contractor, freelancer and mercenary. There are a lot of software craftsmen out there making our industry a better place to work because of their very different ethics. I respect them, I just have different reasons for being a developer.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-3032369608853502894?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/3032369608853502894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=3032369608853502894' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/3032369608853502894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/3032369608853502894'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2011/01/why-software-craftsmanship-manifesto-is.html' title='Why the Software Craftsmanship Manifesto is a load of crock!'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-1225173870806335764</id><published>2010-09-29T10:30:00.000+01:00</published><updated>2010-09-29T10:31:21.586+01:00</updated><title type='text'>Bye bye Plaxo, all the best.</title><content type='html'>I've had a Plaxo account for probably 6 years. Initially Plaxo was innovative and interesting but nothing ground-breaking or useful has come from Plaxo in a long time that isn't already well catered for by the likes of LinkedIn and others. It just fails to keep my attention and is one more stream that has become a boring chore to keep up to date with.&lt;div&gt;Account deleted.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-1225173870806335764?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/1225173870806335764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=1225173870806335764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1225173870806335764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1225173870806335764'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2010/09/bye-bye-plaxo-all-best.html' title='Bye bye Plaxo, all the best.'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-5951771854093337340</id><published>2010-09-21T12:49:00.001+01:00</published><updated>2010-09-21T12:50:43.584+01:00</updated><title type='text'>Get the md5 hash of an nvarchar in SQL Server 2005</title><content type='html'>&lt;div&gt;create function [dbo].[GetMd5Hash] (@raw nvarchar(max)) returns uniqueidentifier as&lt;/div&gt;&lt;div&gt;begin&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;declare @hexstring char(32)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;select @hexstring = master.dbo.fn_varbintohexsubstring(0, hashbytes('MD5', @raw), 1, 0)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;return CAST(SUBSTRING(@hexstring, 1, 8)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;+ '-' + SUBSTRING(@hexstring, 9, 4)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;+ '-' + SUBSTRING(@hexstring, 13, 4)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;+ '-' + SUBSTRING(@hexstring, 17, 4)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;+ '-' + SUBSTRING(@hexstring, 21, 12) as uniqueidentifier)&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-5951771854093337340?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/5951771854093337340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=5951771854093337340' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5951771854093337340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5951771854093337340'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2010/09/get-md5-hash-of-nvarchar-in-sql-server.html' title='Get the md5 hash of an nvarchar in SQL Server 2005'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-8222070280492012595</id><published>2010-09-02T19:22:00.005+01:00</published><updated>2010-09-02T19:40:21.221+01:00</updated><title type='text'>Lets compare tools!</title><content type='html'>&lt;h1&gt;Continuous Integration Tool Comparisons&lt;/h1&gt;&lt;h2&gt;Version Control&lt;/h2&gt;&lt;table summary="This table provides a comparison of version control tools."&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;caption&gt;Comparison of version control tools&lt;/caption&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;th&gt;&lt;/th&gt;   &lt;th&gt;TFS&lt;/th&gt;   &lt;th&gt;Subversion&lt;/th&gt;   &lt;th&gt;Mercurial&lt;/th&gt;   &lt;th&gt;SourceSafe&lt;/th&gt;  &lt;/tr&gt; &lt;/thead&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;tbody&gt;  &lt;tr&gt;   &lt;th&gt;Pros&lt;/th&gt;   &lt;td&gt;Industry standard. Works very well. No learning curve from SS.&lt;/td&gt;   &lt;td&gt;Works very well, easy learning curve from SS. Faster than TFS. Integrates well with most issue trackers.&lt;/td&gt;   &lt;td&gt;Very fast. Designed for geographically dispersed teams. Superior branching merging and conflict resolution.&lt;/td&gt;   &lt;td&gt;None. It is capable of destroying a dev teams best efforts, eats babies and causes cancer.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;th&gt;Cons&lt;/th&gt;   &lt;td&gt;Bandwidth hungry on each developer commit and when getting latest versions. Can be slow if the connection isn’t great. Merging conflicts can be painful.&lt;/td&gt;   &lt;td&gt;Merging conflicts is less than optimal.&lt;/td&gt;   &lt;td&gt;Steeper learning curve for devs who’ve never used it. Some training required. This is bleeding edge.&lt;/td&gt;   &lt;td&gt;It’s a turd in every way. Microsoft never used it internally for dev work and are still embarassed by its existence.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;Issue Tracking&lt;/h2&gt;&lt;table summary="This table provides a comparison of issue tracking tools."&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;caption&gt;Comparison of issue tracking tools&lt;/caption&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;th&gt;&lt;/th&gt;   &lt;th&gt;TFS&lt;/th&gt;   &lt;th&gt;Bugzilla&lt;/th&gt;   &lt;th&gt;Jira&lt;/th&gt;  &lt;/tr&gt; &lt;/thead&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;tbody&gt;  &lt;tr&gt;   &lt;th&gt;Pros&lt;/th&gt;   &lt;td&gt;Industry standard. Works very well. Integrates by default with VS IDE.&lt;/td&gt;   &lt;td&gt;Industry standard. Works very well.&lt;/td&gt;   &lt;td&gt;Works very well. Easy web interface.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;th&gt;Cons&lt;/th&gt;   &lt;td&gt;The web interface (for testers, BA’s and other non-developers) takes a little while to get used to.&lt;/td&gt;   &lt;td&gt;The web interface (for everyone) takes a little while to get used to.&lt;/td&gt;   &lt;td&gt;Commercial product. There is a license cost.&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;Build, Test and Publish Automation&lt;/h2&gt;&lt;table summary="This table provides a comparison of build, test and publish automation tools."&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;caption&gt;Comparison of build, test and publish automation tools&lt;/caption&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;th&gt;&lt;/th&gt;   &lt;th&gt;TFS&lt;/th&gt;   &lt;th&gt;CruiseControl.Net&lt;/th&gt;   &lt;th&gt;TeamCity&lt;/th&gt;  &lt;/tr&gt; &lt;/thead&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;tbody&gt;  &lt;tr&gt;   &lt;th&gt;Pros&lt;/th&gt;   &lt;td&gt;Industry standard. Works very well.&lt;/td&gt;   &lt;td&gt;Industry standard. Works very well. Open Source and free.&lt;/td&gt;   &lt;td&gt;Easy to configure. Easy to maintain. Uses developer machines to produce builds and can be hosted on a shared server.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;th&gt;Cons&lt;/th&gt;   &lt;td&gt;Resource hungry. Needs 2 dedicated servers. One for TFS, one for its database. Commercial product. Costs a kings ransom.&lt;/td&gt;   &lt;td&gt;Configuration is done in XML files and is quite complex. Needs a dedicated (perhaps virtual) server as it does its own builds.&lt;/td&gt;   &lt;td&gt;Commercial product. Costs $2,000 (USD).&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-8222070280492012595?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/8222070280492012595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=8222070280492012595' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8222070280492012595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8222070280492012595'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2010/09/lets-compare-tools.html' title='Lets compare tools!'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-8918302664102974234</id><published>2010-07-20T09:05:00.002+01:00</published><updated>2010-07-20T12:03:06.376+01:00</updated><title type='text'>A walk in the swiss park</title><content type='html'>So, I've been here a little over a week now. I have a little better picture of life in the land-locked island and I've had some conversations that have profoundly affected my outlook. Mostly my experiences are reinforcing the hope that Jo, Ken and Selena will join me out here when they can. This is a place where wholesome living inspires people and families in fundamental ways. More on that later, but I want to describe the experiences and interactions that are influencing my thoughts.&lt;br /&gt;&lt;br /&gt;My first Monday here began with my last hotel breakfast, dressing convincingly (I thought) for my new job, an 8 am checkout and then waiting around outside the office so that I could turn up spot on 10 minutes before the agreed 9 am start. You only get one shot at a first impression and for the first time in a while, this one was important to me. If my new boss was impressed with the tie and my clumsy impression of an ironed shirt, then he didn't show it. He is one of those no-bullshit, straight to the point kind of people and after introducing me to everyone we went out onto the balcony where he launched into the informal part of the interview that we hadn't had opportunity to deal with over the phone. I assume he chose the balcony so that if he needed to dispose of me quickly, it would be easy to make it look like an accident. The questions came thick and fast but weren't technical. Why do you have a yank accent, stupid hair, dark skin and an English passport? Why are you in Switzerland? Do you know what you're doing? Those weren't his actual words but you get the idea. In the event, he postponed judgment and while the balcony is always there, I haven't become acquainted with its function.&lt;br /&gt;&lt;br /&gt;The company builds tools that help manufacturer’s measure efficiency. More to the point, the company was initially a boutique development shop built single handedly by my new boss. It became so successful that he was inevitably given an offer too good to refuse, to sell it to its new American owners. He's justifiably proud of the achievement but explains the history in a way that is matter-of-fact and there is no hint of arrogance. The clients are the biggest international household brands and the stakes are high. The customers buy our products because they want efficiency improvements and my boss understands efficiency better than anyone I've met. So here I am in the land of efficiency, working for clients who want efficiency more than anything and working with a team of efficiency experts. I wonder what single quality will impress this crowd. I can guarantee you that bullshit will not go far in this environment. Those who know me know I've got a challenge ahead. The upshot is that I left England to get away from bullshit so in some ways, the opportunity is tailor-made. I don't want to talk about the job anymore, so suffice it to say that I'm happy with it, my technical skills are appropriate and in my first week I have delivered value that justifies my remuneration. Oh and I haven't been scraped off the pavement under the bosses balcony - yet. One practical discovery I have made about the Swiss work environment is that the dress code is smart casual. Stylish jeans and a comfortable but professional shirt seem to be the norm. My tie only proved that I have never worked here before.&lt;br /&gt;&lt;br /&gt;The other goings-on are that I have met someone who has taken it upon himself to find suitable long term employment prospects for me here in Switzerland. You might have noticed that I'm not naming names here and that's simply because I haven't asked anyone if they mind being written about. I'm just writing about my experiences and I'll leave the significant people anonymous. In the case of this particular guy (we'll call him Val for simplicity), though we've only met a couple of times, I'm convinced he knows what he's doing. Val has had his share (and then some) of life's ups and downs and his personality shows both his strength and his hard-knocks derived wisdom. We celebrated his birthday on Saturday which involved all of the things Val takes seriously. In his words "I take very seriously wine, women and war". The evening began with a few drinks in one of Fribourgs terrace cafes. We were joined by Val's daughter, his closest friends and their children. We were entertained by a group of lads, and their cow who claimed to be able to sing in any language so our request for Portuguese was unwise as the resulting jibberish was impossible (for us) to identify and we were obliged to hand over princely sums to fund their continued festivities. We were rewarded with a condom for each adult and a raunchy cartoon for Val and co's wives and teenage daughters. I don't know if any part of either the cow, the singing, the condoms or the cartoons are a Swiss tradition or if we were just witness to the randomness of the universe but the important thing is that we were entertained and in a way that I have never experienced before. Fribourg is where the Swiss come for Raclette and the restaurant most renowned for serving it is where we ate. Everyone under 20 left the restaurant seconds after entering because the smell of the cheese did not agree with their refined palette. They recovered by eating a few doors down at a fine American establishment where meals are of the happy variety. We, on the other hand, were treated to something called Steak au Paris which translates exactly as "buttery sex on a silver platter". It was delicious and I cried. Val's friend demonstrated the seriousness the Swiss employ when choosing wine and it is difficult to say whether it was me or the restaurants bank manager who was more delighted by his expert approach and our reckless abandon with the waiters favourite phrase: "one more please". The barmaid was no match for Val's charms and he completed his 3 W's when a neighbouring table roused the warrior with an insult directed at someone Val describes as his very best friend. The man is clearly as good as his word and I look forward to working with him when my current contract expires.&lt;br /&gt;&lt;br /&gt;It seemed like a good idea when I agreed to it but I misunderstood what is meant by "going for a walk" when the phrase is used in Switzerland. Four hours of sleeping off the evening’s festivities, I tossed an apple given to me by the landlady, what was left of a day old loaf of bread, a block of gruyere and a stack of cured, sliced meat of unidentified but presumably animal origin into the hiking rucksack I found in Bern on Saturday. I neglected to add a jacket because the heat wave here has exceeded 30 degrees pretty consistently every day. I laced up some proper hiking boots (which turned out to be the smartest thing I did all day) and joined the whole of the rest of Switzerland on a 7 am train to the Alps. I was met in Bern by a collection of ex-pats who were about to open a whole new can of whoop-ass-crazy for me to enjoy. The train delivered us to the foot of the beautiful but imposing mountains at Frutigen. A succession of busses wound us up the mountain roads to Adelboden and a cable car completed the "you should have brought more than a t-shirt" message by hauling us through the atmosphere and dropping us at the foot of an ancient glacier. We trundled through the clouds and bullied big Swiss cows out of our path until we reached a farmers hut where an old man who quite literally has his head in the clouds all the time was grinning from ear to ear while he redirected us from the obvious path we had taken to the little rut behind his house that left the plateau and disappeared into the mist above us. I was suspicious immediately but our guide seemed to trust the grinning patriarch and our new course was set. What followed was what I hope will become the first of many challenging adventures in these mountains. We hauled-ass up steep, rocky inclines traversing muddy slopes, streams and snow-covered ledges. We climbed for several hours and passed through layers of mist and clouds. Every now and then the wind would blow a cloud off of you and you would see either a spectacular plateau or canyon below or occasionally a glimpse of the white rock tops hundreds of metres above. Every scene was epic but the truth is that this is the most exercise I have had since that time years ago when I had to go to the shop without the car. My breathing resembled a hyper-ventilating donkey, giving birth to a breached hippo whilst overcoming one of those laughing fits you get when your mate delivers the punch line on a filthy joke and you've just filled your mouth with spicy kebab and beer. Pretty picture, innit? In spite of it all, I was motivated by the fact that to every one else we were literally out for a stroll. Some others had moments where an obstacle proved challenging but overall the Swiss hiking tradition sees walks like this as a fortnightly excursion and an opportunity to take in the views while getting some of that fresh air and exercise that give this country the decade and a half of extra life expectancy it enjoys. Sixteen hours after setting out, I took my boots off, drank a glass of Chianti and sank into the deepest sleep I've had in forever.&lt;br /&gt;&lt;br /&gt;Perhaps you can see from my first week of Swiss experiences that I am happy to be faced with some new challenges. That the accomplishments are as rewarding as they are genuinely difficult to achieve. That as a person, I needed to be presented with non-routine obstacles, a job that will push me out of apathy and a lifestyle that involves physical challenges. I guess we'll see. I find myself telling all my new friends and acquaintances about my family and about how much I'll enjoy their company if they get out here. I know they'd love it too. Jo has her own reasons to have an affection for Switzerland as she lived here and already knows most of what I'm discovering. Kenny was born just down the road from Fribourg town in Riaz. I think it would be a big deal for him to move here but honestly, I can see a vibrancy and a joie de vivre in the young people here that I know he would connect with. Bean loves adventure and discovery, I couldn't help but think that if she were looking at the rocky vistas I saw yesterday, she'd see a playground full of climbing frames. She woulda breezed that walk where I had a hippo too.&lt;br /&gt;&lt;br /&gt;&lt;table style="width:194px;"&gt;&lt;tr&gt;&lt;td align="center" style="height:194px;background:url(http://picasaweb.google.com/s/c/transparent_album_background.gif) no-repeat left"&gt;&lt;a href="http://picasaweb.google.com/rthijssen/AdelbodenToKandersteg?feat=embedwebsite"&gt;&lt;img src="http://lh3.ggpht.com/_Psti3TsSy9w/TEQvKGln3mE/AAAAAAAARVA/dmqp__lSpfk/s160-c/AdelbodenToKandersteg.jpg" width="160" height="160" style="margin:1px 0 0 4px;"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align:center;font-family:arial,sans-serif;font-size:11px"&gt;&lt;a href="http://picasaweb.google.com/rthijssen/AdelbodenToKandersteg?feat=embedwebsite" style="color:#4D4D4D;font-weight:bold;text-decoration:none;"&gt;Adelboden to Kandersteg&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-8918302664102974234?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/8918302664102974234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=8918302664102974234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8918302664102974234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8918302664102974234'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2010/07/walk-in-swiss-park.html' title='A walk in the swiss park'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_Psti3TsSy9w/TEQvKGln3mE/AAAAAAAARVA/dmqp__lSpfk/s72-c/AdelbodenToKandersteg.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-2576533597634799478</id><published>2010-07-11T23:17:00.004+01:00</published><updated>2010-07-11T23:40:21.202+01:00</updated><title type='text'>Day 2 - Spainzerland</title><content type='html'>Sunday's here in Fribourg are quiet. Everything is closed except for the 50% of establishments that serve beer or ice cream. If you need shampoo and don't want to use sherbet, you're out of luck. I alternated between taking long walks and sleeping off yesterdays boozing instead. I also wandered into the ravine that the town overlooks. At the bottom I find that everyone has stripped off and jumped into the river. It's a striking scene. Next time you're sipping your Evian you can picture the town of Fribourg playing in your bottle.&lt;br /&gt;&lt;br /&gt;I confirmed yesterday's discovery that the signs outside of cafes that read "Sandwich 5FR" are just a ruse to get you sat down and ordering beer. It is in fact impossible to get a sandwich or find a cafe with a working kitchen after 1pm and before evening. I ended up spending a kings ransom on some fois grois because I was ravenous and it is the only thing a chef can be motivated to produce when he has already begun his afternoon of smoking, drinking and eating ice cream. One or all of these activities seem to preoccupy the town till nightfall when food is back on the menu and Spain has started to destroy the dreams of Dutchmen everywhere.&lt;br /&gt;&lt;br /&gt;When their brothers in South Africa complete the task every Spaniard in Fribourg gets into a car, turns on the horn and hazards, drapes their wives and daughters out the windows and drives like a Pamplona Bull through the high street. Charming. I suspect they're doing the same back in Reading and everywhere else. I guess they deserve it being new to winning and all that.&lt;br /&gt;&lt;br /&gt;I found the building where my new employer is based so that makes arriving on time for my first day of work tomorrow more likely. I'm anticipatorily excited about it all. The office entrance looks a little depressing but I'll read the intro before judging the book by it's cover. If my suspicions are correct, I'll spend most of my time with clients and at their offices so who cares what our office looks like right? I'm more concerned with the business culture, decision making processes and especially what sort of team I'll be working with. Bring on the morning!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-2576533597634799478?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/2576533597634799478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=2576533597634799478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/2576533597634799478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/2576533597634799478'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2010/07/day-2-spainzerland.html' title='Day 2 - Spainzerland'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-1215316122786149435</id><published>2010-07-11T07:53:00.007+01:00</published><updated>2010-07-11T23:17:55.425+01:00</updated><title type='text'>Switzerland - Impressions from day one</title><content type='html'>There's a new chapter in my life with a move to Switzerland and a new job. It's my first time here and I arrived with some misconceptions. For the most part, I'm a blank slate and just want to see what this place is all about.&lt;br /&gt;&lt;br /&gt;I've had conflicting reports about what to expect. Some friends tell me that I'll get bored quickly because it's a country of rules and fines where everything is done by the book. Others have said there's real depravity here?!&lt;br /&gt;&lt;br /&gt;The flight out of Heathrow was scheduled for 6:45 am but left at 8:15 after the BA engineers fixed the steering. I suggested that we could have just flown in a straight line and to hell with the steering but the pilot said his training didn't cover that. - Shame. Arriving in Geneva the Swiss put on a much better show, laying on an entire double decker train in honour of my arrival. Within 20 minutes of landing, I was speeding effortlessly alongside lake Geneva which has (as you probably know) an impossibly impressive, alpine backdrop. The view is so perfect, it seems fake.&lt;br /&gt;&lt;br /&gt;I spent a few minutes trying to find 2nd class accomodation to match my ticket but there isn't any. Some carriages are blue and some are red but all the seats are bigger than English first class. The red carriages cost twice as much as the blue and so far as I can see, the only diference is that in red carriages, you don't have to share space with the likes of me. Not that you'd have to in blue either, if you want a whole carriage to yourself, you can have that too. Apparently, the Swiss don't share the British obsession of making passengers envy the luxury enjoyed by a tinned sardine.&lt;br /&gt;&lt;br /&gt;I could spend a lot of time describing the difference in trains here and there but suffice it to say, the Swiss have ruined Southwest Trains for me forever. I suggest that all British rail executives should be allowed a single journey on a Swiss train before commiting compulsory mass Hare Kare.&lt;br /&gt;&lt;br /&gt;No-one here is impressed by the English language. So it feels like I've just confessed to being dim when communicating with the locals. It goes something like this:&lt;br /&gt;(me) Bonjour!&lt;br /&gt;(local) Bonjour, bla di bla ti da la bla (&lt;- this is real french)&lt;br /&gt;(me) argh!&lt;br /&gt;(local) Ahh, Sie sind deutscher.&lt;br /&gt;(me) no&lt;br /&gt;(local) Le mie scuse Signore, tu sei italiano. (&lt;- they sing and gesticulate this bit)&lt;br /&gt;I make no sound, stare at the floor and sweat a little&lt;br /&gt;(local, looking agitated) No recibimos muchos españoles aquí.&lt;br /&gt;(me) I'm sorry. Do you speak English?&lt;br /&gt;(local) Ohhhhh, I see, you are an idiot. Yes, never mind, I speak idiot too! I once went to idiot island, they had strange ideas about what a train is.&lt;br /&gt;(me) at least we drive on the right side... oh... no you're right... we are idiots. I forget what I wanted to ask you.&lt;br /&gt;(local) Whatever, can I buy you a beer?&lt;br /&gt;&lt;br /&gt;I haven't even been here 24 hours and I've already eaten at a table for 8 new friends, been to a Jazz festival, got roaring drunk and I'm looking forward to the next 24.&lt;br /&gt;&lt;br /&gt;&lt;table style="width:194px;"&gt;&lt;tr&gt;&lt;td align="center" style="height:194px;background:url(http://picasaweb.google.com/s/c/transparent_album_background.gif) no-repeat left"&gt;&lt;a href="http://picasaweb.google.com/rthijssen/Fribourg?feat=embedwebsite"&gt;&lt;img src="http://lh4.ggpht.com/_Psti3TsSy9w/TDmVqYPyvCE/AAAAAAAARJE/mmzTFQmDy9A/s160-c/Fribourg.jpg" width="160" height="160" style="margin:1px 0 0 4px;"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align:center;font-family:arial,sans-serif;font-size:11px"&gt;&lt;a href="http://picasaweb.google.com/rthijssen/Fribourg?feat=embedwebsite" style="color:#4D4D4D;font-weight:bold;text-decoration:none;"&gt;Fribourg&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-1215316122786149435?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/1215316122786149435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=1215316122786149435' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1215316122786149435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1215316122786149435'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2010/07/switzerland-impressions-from-day-one.html' title='Switzerland - Impressions from day one'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_Psti3TsSy9w/TDmVqYPyvCE/AAAAAAAARJE/mmzTFQmDy9A/s72-c/Fribourg.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-5816182409069030803</id><published>2010-02-02T00:11:00.009Z</published><updated>2010-02-02T00:54:21.849Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='System.Random'/><title type='text'>When random is too consistent...</title><content type='html'>A while back I posted &lt;a href="http://thegrenade.blogspot.com/2009/08/shuffle-extension-method-of-random.html"&gt;an extension method for shuffling Lists&lt;/a&gt; in C# using the &lt;a href="http://en.wikipedia.org/wiki/Fisher-Yates_shuffle"&gt;Fisher Yates Shuffle&lt;/a&gt;. The algorithm is valid but my implementation relied on the default random number generator in .Net (System.Random) which is flawed since it generates a predictable sort of random.&lt;br /&gt;&lt;br /&gt;Here's a correction that uses a more random sort of random from &lt;a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.rngcryptoserviceprovider.aspx"&gt;System.Security.Cryptography&lt;/a&gt;:&lt;br /&gt;&lt;pre class="c#" name="code"&gt;public static void Shuffle&amp;lt;T&amp;gt;(this IList&amp;lt;T&amp;gt; list)&lt;br /&gt;{&lt;br /&gt;    var provider = new RNGCryptoServiceProvider();&lt;br /&gt;    int n = list.Count;&lt;br /&gt;    while (n &gt; 1)&lt;br /&gt;    {&lt;br /&gt;        var box = new byte[1];&lt;br /&gt;        do provider.GetBytes(box);&lt;br /&gt;        while (!(box[0] &lt; n * (Byte.MaxValue / n)));&lt;br /&gt;        var k = (box[0] % n);&lt;br /&gt;        n--;&lt;br /&gt;        var value = list[k];&lt;br /&gt;        list[k] = list[n];&lt;br /&gt;        list[n] = value;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here's a simple test you can run to demonstrate the difference in the algorithms:&lt;br /&gt;&lt;pre class="c#" name="code"&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Security.Cryptography;&lt;br /&gt;&lt;br /&gt;namespace AlphabetSoup&lt;br /&gt;{&lt;br /&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main()&lt;br /&gt;        {&lt;br /&gt;            var alphabet = GetAlphabet();&lt;br /&gt;            foreach (var c in alphabet)&lt;br /&gt;                Console.Write(c);&lt;br /&gt;            Console.Write('\n');&lt;br /&gt;            Console.Write('\n');&lt;br /&gt;&lt;br /&gt;            Console.WriteLine("System.Random:");&lt;br /&gt;            for (int i = 0; i &lt; 10; i++)&lt;br /&gt;            {&lt;br /&gt;                alphabet = GetAlphabet();&lt;br /&gt;                alphabet.QuickShuffle();&lt;br /&gt;                foreach (var c in alphabet)&lt;br /&gt;                    Console.Write(c);&lt;br /&gt;                Console.Write('\n');&lt;br /&gt;            }&lt;br /&gt;            Console.Write('\n');&lt;br /&gt;            Console.Write('\n');&lt;br /&gt;&lt;br /&gt;            Console.WriteLine("System.Security.Cryptography:");&lt;br /&gt;            for (int i = 0; i &lt; 10; i++)&lt;br /&gt;            {&lt;br /&gt;                alphabet = GetAlphabet();&lt;br /&gt;                alphabet.Shuffle();&lt;br /&gt;                foreach (var c in alphabet)&lt;br /&gt;                    Console.Write(c);&lt;br /&gt;                Console.Write('\n');&lt;br /&gt;            }&lt;br /&gt;            Console.Write('\n');&lt;br /&gt;            Console.Write('\n');&lt;br /&gt;&lt;br /&gt;            Console.ReadKey();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        static List&amp;lt;char&amp;gt; GetAlphabet()&lt;br /&gt;        {&lt;br /&gt;            var alphabet = new List&amp;lt;char&amp;gt;();&lt;br /&gt;            for (int c = 65; c &lt; 91; c++)&lt;br /&gt;                alphabet.Add((char)c);&lt;br /&gt;            return alphabet;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    static class Ext&lt;br /&gt;    {&lt;br /&gt;        public static void Shuffle&amp;lt;T&amp;gt;(this IList&amp;lt;T&amp;gt; list)&lt;br /&gt;        {&lt;br /&gt;            var provider = new RNGCryptoServiceProvider();&lt;br /&gt;            int n = list.Count;&lt;br /&gt;            while (n &gt; 1)&lt;br /&gt;            {&lt;br /&gt;                var box = new byte[1];&lt;br /&gt;                do provider.GetBytes(box);&lt;br /&gt;                while (!(box[0] &lt; n * (Byte.MaxValue / n)));&lt;br /&gt;                var k = (box[0] % n);&lt;br /&gt;                n--;&lt;br /&gt;                var value = list[k];&lt;br /&gt;                list[k] = list[n];&lt;br /&gt;                list[n] = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        public static void QuickShuffle&amp;lt;T&amp;gt;(this IList&amp;lt;T&amp;gt; list)&lt;br /&gt;        {&lt;br /&gt;            var rng = new Random();&lt;br /&gt;            var n = list.Count;&lt;br /&gt;            while (n &gt; 1)&lt;br /&gt;            {&lt;br /&gt;                n--;&lt;br /&gt;                var k = rng.Next(n + 1);&lt;br /&gt;                var value = list[k];&lt;br /&gt;                list[k] = list[n];&lt;br /&gt;                list[n] = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here's the output on my machine:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Psti3TsSy9w/S2dztmSEZqI/AAAAAAAAQaE/nhM0OGTvMsY/s1600-h/shuffle.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 160px;" src="http://4.bp.blogspot.com/_Psti3TsSy9w/S2dztmSEZqI/AAAAAAAAQaE/nhM0OGTvMsY/s320/shuffle.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5433438702653433506" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-5816182409069030803?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/5816182409069030803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=5816182409069030803' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5816182409069030803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5816182409069030803'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2010/02/when-random-is-too-consistent.html' title='When random is too consistent...'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Psti3TsSy9w/S2dztmSEZqI/AAAAAAAAQaE/nhM0OGTvMsY/s72-c/shuffle.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-669845147857614367</id><published>2010-01-20T00:33:00.004Z</published><updated>2010-01-20T00:38:11.234Z</updated><title type='text'>What can I do for Haiti?</title><content type='html'>I want a way to help someone in Haiti. How can I, as an individual help another individual, in that tragedy. I don't want to contribute money to some organisation that will deliver a band-aid to some injured person. I want a way to contribute to the healing of the human spirit in Haiti. Should I go there? Is there someone there who I can help in a meaningful way?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-669845147857614367?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/669845147857614367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=669845147857614367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/669845147857614367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/669845147857614367'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2010/01/what-can-i-do-for-haiti.html' title='What can I do for Haiti?'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-8209453672764490601</id><published>2009-12-17T20:09:00.028Z</published><updated>2009-12-18T00:18:26.681Z</updated><title type='text'>My Cars</title><content type='html'>&lt;p style="clear: both; margin: 0;"&gt;Tonight, I was thinking about all the cars I've gotten through over the years and I thought it might make an interesting project to find pictures of all of 'em. So, for fun, I'm gonna do it here on my blog. I might have to revisit and edit the post a few times to complete the whole story.&lt;/p&gt;&lt;br /&gt;&lt;p style="clear: both; margin: 0;"&gt;Here they are in the order that I had 'em:&lt;/p&gt;&lt;br /&gt;&lt;h4 style="clear: both; margin-top: 0; margin-bottom: 0 !important; padding-top: 0; padding-bottom: 0;"&gt;Ireland&lt;/h4&gt;&lt;br /&gt;&lt;ul style="clear: both; margin-top: 0 !important; margin-bottom: 0; padding-top: 0 !important; padding-bottom: 0;"&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/66/FiestaFestival01.JPG/144px-FiestaFestival01.JPG" align="left" style="margin: 4px;" /&gt; '81 Ford Fiesta - In '93, I was hitch-hiking in Ireland and after standing in the rain for what felt like hours, I bought an old red, rusty Fiesta for £80. It had been staring at me from across the road. I was 17 and didn't even have a driving license.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;a href="http://picasaweb.google.co.uk/lh/photo/eq7Isz1H7DhgYiV88x1nIg?authkey=Gv1sRgCM-ele6GlIquxgE&amp;feat=embedwebsite"&gt;&lt;img src="http://lh5.ggpht.com/_Psti3TsSy9w/RdzFkqP220I/AAAAAAAAAEA/5ogR0irP_m4/s144/001.jpg" align="left" style="margin: 4px;" /&gt;&lt;/a&gt; '81 Landcruiser BJ40, 3.0 D SWB - I wanted a Landcruiser since I was 7. When I found this one on a beach in Wicklow, I promptly swapped the Fiesta, my camera and £490 which was £10 short of all the money I had to my name.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Triumph_Acclaim"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Becky3.jpg/144px-Becky3.jpg" align="left" style="margin: 4px;" /&gt;&lt;/a&gt; Triumph Acclaim - £25 Scrapyard special, complete with wobbly gear stick (not the one in the pic, though it was red). I bought this because I needed to collect a replacement engine for the BJ40 from a breaker who was on the other side of Ireland. It survived the trip and I was relieved to drop it back at the scrapyard.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h4 style="clear: both; margin-top: 0; margin-bottom: 0 !important; padding-top: 0; padding-bottom: 0;"&gt;Canada&lt;/h4&gt;&lt;br /&gt;&lt;ul style="clear: both; margin-top: 0 !important; margin-bottom: 0; padding-top: 0 !important; padding-bottom: 0;"&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/%2794_Pontiac_Firefly_Hatchback.jpg/144px-%2794_Pontiac_Firefly_Hatchback.jpg" align="left" style="margin: 4px;" /&gt; Pontiac Firefly - Generously given to me by Jo's brother in Montreal although it was a sorry little car and I ran it right into the ground. Cost me $20 to get rid of it when I was done.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://lh4.ggpht.com/_Psti3TsSy9w/Syq4VSiw7CI/AAAAAAAAQKs/efMwEuTU6hA/s144/AETV48001845_1.jpg" align="left" style="margin: 4px;" /&gt; Isuzu 4wd King cab pickup - Big black monster. Bought on finance when I couldn't really afford it. Missed a few payments and had to give it back when we moved to Ontario. Shame.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://lh5.ggpht.com/_Psti3TsSy9w/Syq5BuUodNI/AAAAAAAAQK0/lES0dbESd1k/s144/chevy_s10_pickup.jpg" align="left" style="margin: 4px;" /&gt; Chevrolet S10 pickup - Also given to me by Jo's brother. This one had belonged to a boy racer and had fat corvette racing alloys with slick tyres, a noisy muffler and tinted windows. The truck bed was useful though as I was a painter and tradesman at the time.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/%2780-%2784_Volkswagen_Jetta_Sedan.jpg/144px-%2780-%2784_Volkswagen_Jetta_Sedan.jpg" align="left" style="margin: 4px;" /&gt; 2 VW Jetta's which I swapped the chevy for. Both nice little cars. The wife crashed one and I forgot where I parked the other. Never found it.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h4 style="clear: both; margin-top: 0; margin-bottom: 0 !important; padding-top: 0; padding-bottom: 0;"&gt;UK&lt;/h4&gt;&lt;br /&gt;&lt;ul style="clear: both; margin-top: 0 !important; margin-bottom: 0; padding-top: 0 !important; padding-bottom: 0;"&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Ford_Fiesta_2_XR2_1984.jpg/144px-Ford_Fiesta_2_XR2_1984.jpg" align="left" style="margin: 4px;" /&gt; '83 Ford Fiesta - Total heap bought for £160 on arriving back in Cornwall. Lots of rust. Lasted 6 months tops.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Fiat_Uno_SX_red_hl.jpg/144px-Fiat_Uno_SX_red_hl.jpg" align="left" style="margin: 4px;" /&gt; Fiat Uno - Suprisingly fun. Bought cheap from a friend. Jo ran this one into the ground.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/48/VW_Golf_II_front_20080102.jpg/144px-VW_Golf_II_front_20080102.jpg" align="left" style="margin: 4px;" /&gt; VW Golf - Made several trips across France. Lot's of fun, till it fell apart from abuse and accidents.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/Vento_Jetta_3.jpg/144px-Vento_Jetta_3.jpg" align="left" style="margin: 4px;" /&gt; VW Jetta, 1.8 - Expensive car. Crashed &amp; scrapped on the first day I had it.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Rover_400_first_series.JPG/144px-Rover_400_first_series.JPG" align="left" style="margin: 4px;" /&gt; Rover hatchback - Ugly and complete rubbish. Had to go to the garage for fixin' every week.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Audi_Typ89.jpg/144px-Audi_Typ89.jpg" align="left" style="margin: 4px;" /&gt; Audi 80, 2.0 - Nice car but the 3 speed auto transmission was not ideal for my long journeys. Eventually, the head cracked and the car was toast.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Peugeot_505_Wagon_%28Rear%29.JPG/144px-Peugeot_505_Wagon_%28Rear%29.JPG" align="left" style="margin: 4px;" /&gt; Peugeot Estate - No idea what model this was. It was diesel, had 200,000 miles on the clock and cost £100. I bought it instead of a train ticket because I was far from home. I got a couple long journeys out of it and gave it to my brother who abandoned it in the heathrow car park. I got letters for a few months afterwards asking me to come get it, then one more saying not to bother as it had been destroyed.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;img src="http://lh5.ggpht.com/_Psti3TsSy9w/Syq8CSlVIiI/AAAAAAAAQLo/N1ps3DyHssw/s144/mondeo.jpg" align="left" style="margin: 4px;" /&gt; Ford Mondeo, 2.0 TD - Motorway cruiser. One of my friends said it made me look like the scummy man from the Arctic Monkeys song. I lost many points driving this up and down the M5. When I eventually lost my license I gave it to my brother. He crashed it and it was no more.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;a href="http://picasaweb.google.co.uk/lh/photo/PVj9xKjZgt2uYpL0UZ2igQ?authkey=Gv1sRgCP3RhYqStZHbuQE&amp;feat=embedwebsite"&gt;&lt;img src="http://lh6.ggpht.com/_Psti3TsSy9w/SKf8p_4nnGI/AAAAAAAAGtk/7aWAi0oXQ0I/s144/DSC_0001.jpg" align="left" style="margin: 4px;" /&gt;&lt;/a&gt; '97 Rover 416i - Quick, but fussy when wet. Got broadsided by an old Volvo on the Basingstoke bypass. Then got left for 3 months in the airport carpark while I was in Costa Rica. When I got back, I paid someone to take it away.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;a href="http://picasaweb.google.co.uk/lh/photo/TFtO2-9-fToh64SklOU7OA?feat=embedwebsite"&gt;&lt;img src="http://lh3.ggpht.com/_Psti3TsSy9w/SXhKRJdO3jI/AAAAAAAAK20/iKr2d9w0c80/s144/BJ40%20033.jpg" align="left" style="margin: 4px;" /&gt;&lt;/a&gt; '02 Skoda Octavia Estate, 2.0. Newest car I ever owned. Very comfortable but abused by previous owners. After I spent loads fixing everything and got it running like clockwork, I got it stuck whilst towing a heavy load in an awkward steep driveway. A friend tried to help but burned out the clutch. Then a mad Irish woman towed me 100 miles with a rope wrapped round the bumper. The series of unfortunate events distorted the shape of the car and I lost interest in it.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;a href="http://picasaweb.google.co.uk/lh/photo/eqMUcQf8WC3l4d9xmLe4LQ?feat=embedwebsite"&gt;&lt;img src="http://lh3.ggpht.com/_Psti3TsSy9w/SZQPpip0pOI/AAAAAAAALmU/J0J0M-v3dFY/s144/IMG_7661.JPG" align="left" style="margin: 4px;" /&gt;&lt;/a&gt; '79 Landcruiser BJ40, 3.0 D SWB - Attempting to rekindle a dream, I bought this unfinished project which doubled as the heavy load I spoke of earlier. I also failed to finish the project and it is now sitting in someone else's pile of unfinished projects.&lt;/li&gt;&lt;br /&gt; &lt;li style="clear: both;"&gt;&lt;a href="http://picasaweb.google.co.uk/lh/photo/3h0xgAUhTvA28MN1NzFZhA?feat=embedwebsite"&gt;&lt;img src="http://lh6.ggpht.com/_Psti3TsSy9w/SgtHYI46N5I/AAAAAAAAMGM/Fe-xzMRlUXI/s144/Salisbury%20Plains%20005.jpg" align="left" style="margin: 4px;" /&gt;&lt;/a&gt; '97 Landcruiser KZJ90, 3.0 TD SWB - Fuel guzzling beast which I now bomb up and down the M4 with.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-8209453672764490601?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/8209453672764490601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=8209453672764490601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8209453672764490601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8209453672764490601'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/12/my-cars.html' title='My Cars'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_Psti3TsSy9w/RdzFkqP220I/AAAAAAAAAEA/5ogR0irP_m4/s72-c/001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-380418925954091603</id><published>2009-12-03T13:44:00.004Z</published><updated>2009-12-03T14:54:29.959Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Why Google is incapable of "Do no evil"</title><content type='html'>I like Google services. From a productivity perspective, there is an endless river of tools and services raging out of the Mountain View Chocolate Factory. I consume most of these services and for the most part, recommend them to others. But today, I am taking a new stance because Google has gone too far. Picture this scene:&lt;br /&gt;&lt;br /&gt;Joe Bloggs has a GMail account that contains every email he has sent or received since the "Gmail is different. Here's what you need to know" mail he received in 2003. It includes order confirmations for everything he has bought online since then. We won't even think about the scope of how much can be understood about Joe from the travel reservations, book, film and music titles he has bought, gifts he has sent to friends and family and the plethora of personal information from all those receipts. His mail account also includes memories of personal moments like intimate letters expressing love, anger, depression and stress. It includes job applications and correspondence with business associates. It's a treasure trove of the communications that have affected his life for the last 6 years.&lt;br /&gt;&lt;br /&gt;As well as the email account, Joe uses &lt;a href="http://www.google.com/reader/"&gt;Google Reader&lt;/a&gt; to keep abreast of his personal and professional interests. - Feeds that link him to the people and sources he respects. He stores his credit and debit card information in &lt;a href="http://checkout.google.com/"&gt;Google Checkout&lt;/a&gt;. Joe keeps important and collaborative records in his &lt;a href="http://docs.google.com/"&gt;Google Docs&lt;/a&gt; account. His appointments are all organised under &lt;a href="http://www.google.com/calendar/"&gt;Google Calendar&lt;/a&gt;. Everyone he knows is catalogued under &lt;a href="http://www.google.com/contacts"&gt;Google Contacts&lt;/a&gt;. His &lt;a href="http://groups.google.com/"&gt;Google Groups&lt;/a&gt; account provides more insight into the communities and interests that make him tick. Joe's YouTube account keeps a history of the sort of entertainment that he enjoys. His &lt;a href="http://picasaweb.google.com/"&gt;Picasa web albums&lt;/a&gt; contain photographs of him, his friends and his family. His &lt;a href="http://www.google.com/history/"&gt;Google Web History&lt;/a&gt; profile can remember every word he ever typed into the only search engine he ever uses.&lt;br /&gt;&lt;br /&gt;If you are not already terrified by the picture painted above, add to the mental catalogue that next year Joe is going to get &lt;a href="http://technology.timesonline.co.uk/tol/news/tech_and_web/personal_tech/article6924233.ece"&gt;a new Google Android powered phone&lt;/a&gt;. His phone will use Google Maps and Latitude to communicate his every geographical move to Mountain View. His phone features &lt;a href="http://www.google.com/googlevoice/about.html"&gt;Google Voice&lt;/a&gt; which will transcribe every telephone call and voicemail into a communication log. The smart phone links his other social networking accounts to his Google account and imports the private profiles of all of his contacts.&lt;br /&gt;&lt;br /&gt;At some point I realised that the information I entrust to the Oompa-Loompa search empire is considerably more than I would entrust to any individual. It's time to do something about this. As much as I enjoy the convenience and price of Google services, I simply cannot stomach the potential for privacy violation that they have created.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-380418925954091603?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/380418925954091603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=380418925954091603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/380418925954091603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/380418925954091603'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/12/why-google-is-incapable-of-do-no-evil.html' title='Why Google is incapable of &quot;Do no evil&quot;'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-547691426632591990</id><published>2009-11-12T14:46:00.002Z</published><updated>2009-12-03T14:27:50.067Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='data'/><title type='text'>Some fascinating graphs of World Bank Data</title><content type='html'>&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=en_atm_co2e_pc&amp;idim=country:GBR" style="font-weight:bold;"&gt;CO2 emissions per capita&lt;/a&gt;: Carbon dioxide emissions in metric tons per capita.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=eg_use_pcap_kg_oe&amp;idim=country:GBR" style="font-weight:bold;"&gt;Energy use per capita&lt;/a&gt;: Primary energy use (before transformation to other end-use fuels) in kilograms of oil equivalent, per capita.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=eg_use_elec_kh_pc&amp;idim=country:GBR" style="font-weight:bold;"&gt;Electricity consumption per capita&lt;/a&gt;: Electricity consumption in kilowatt-hours per capita.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=ne_exp_gnfs_zs&amp;idim=country:GBR" style="font-weight:bold;"&gt;Exports as percentage of GDP&lt;/a&gt;: Value of exported goods and services as percentage of GDP.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=sp_dyn_tfrt_in&amp;idim=country:GBR" style="font-weight:bold;"&gt;Fertility rate&lt;/a&gt;: The average number of births per woman.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=ny_gnp_pcap_pp_cd&amp;idim=country:GBR" style="font-weight:bold;"&gt;GNI per capita in PPP dollars&lt;/a&gt;: Gross National Income per capita, expressed in purchasing power parity dollars to adjust for price level differences across countries. Not adjusted for inflation.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=ny_gdp_mktp_cd&amp;idim=country:GBR" style="font-weight:bold;"&gt;Gross Domestic Product&lt;/a&gt;: GDP in current U.S. dollars. Not adjusted for inflation.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=ny_gnp_mktp_pp_cd&amp;idim=country:GBR" style="font-weight:bold;"&gt;Gross National Income in PPP dollars&lt;/a&gt;: Gross National Income, expressed in purchasing power parity dollars to adjust for price level differences across countries. Not adjusted for inflation.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=ny_gdp_defl_kd_zg&amp;idim=country:GBR" style="font-weight:bold;"&gt;GDP deflator change&lt;/a&gt;: Annual change of the implicit GDP deflator shows the rate of price change in the economy as a whole.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=ny_gdp_mktp_kd_zg&amp;idim=country:GBR" style="font-weight:bold;"&gt;GDP growth rate&lt;/a&gt;: Percentage change of real GDP compared to previous year. Real GDP is adjusted for inflation.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=ne_imp_gnfs_zs&amp;idim=country:GBR" style="font-weight:bold;"&gt;Imports as percentage of GDP&lt;/a&gt;: Value of imported goods and services as percentage of GDP.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=it_net_user_p2&amp;idim=country:GBR" style="font-weight:bold;"&gt;Internet users as percent of population&lt;/a&gt;: People with access to the Internet per 100 inhabitants.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=sp_dyn_le00_in&amp;idim=country:GBR" style="font-weight:bold;"&gt;Life expectancy&lt;/a&gt;: The average number of years a newborn is expected to live with current mortality patterns remaing the same.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=ms_mil_xpnd_gd_zs&amp;idim=country:GBR" style="font-weight:bold;"&gt;Military expenditure as percentage of GDP&lt;/a&gt;: Military expenditure as percentage of Gross Domestic Product.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=sh_dyn_mort&amp;idim=country:GBR" style="font-weight:bold;"&gt;Mortality rate, under 5&lt;/a&gt;: The probability per 1,000 that a newborn baby will die before reaching age 5.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=uspopulation&amp;met=population&amp;idim=country:GBR" style="font-weight:bold;"&gt;Population&lt;/a&gt;: Estimates of the resident population.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.com/publicdata?ds=wb-wdi&amp;met=sp_pop_grow&amp;idim=country:GBR" style="font-weight:bold;"&gt;Population growth rate&lt;/a&gt;: Percentage change of resident population compared to previous year.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;Source: &lt;a href="http://googleblog.blogspot.com/2009/11/world-bank-public-data-now-in-search.html"&gt;Official Google Blog: World Bank public data, now in search&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-547691426632591990?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/547691426632591990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=547691426632591990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/547691426632591990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/547691426632591990'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/11/some-fascinating-graphs-of-world-bank.html' title='Some fascinating graphs of World Bank Data'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-1137387698857070298</id><published>2009-09-23T16:33:00.004+01:00</published><updated>2009-12-03T14:28:56.123Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Deep cloning without serialization.</title><content type='html'>&lt;p&gt;A client asked me to write an object cloning implementation today that did not use serialization. Sometimes you cannot mark the types you need to clone as serializable.&lt;br /&gt;&lt;br /&gt;I ended up with the code below. In the future, I'll modify it to use IL or something to lose the reflection performance hit.&lt;br /&gt;&lt;br /&gt;It's implemented as an extension method so that it should work for any object. Enjoy!&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="c#" name="code"&gt;using System;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Reflection;&lt;br /&gt;&lt;br /&gt;public static class Extensions&lt;br /&gt;{&lt;br /&gt;   /// &lt;summary&gt;&lt;br /&gt;   /// Clones the specified object.&lt;br /&gt;   /// &lt;/summary&gt;&lt;br /&gt;   /// &lt;typeparam name="T"&gt;&lt;/typeparam&gt;&lt;br /&gt;   /// &lt;param name="obj"&gt;The object.&lt;br /&gt;   /// &lt;returns&gt;&lt;/returns&gt;&lt;br /&gt;   public static T Clone&lt;T&gt;(this T obj)&lt;br /&gt;   {&lt;br /&gt;       var type = obj.GetType();&lt;br /&gt;       var clone = Activator.CreateInstance(type);&lt;br /&gt;       var fields = clone.GetType().GetFields();&lt;br /&gt;       int fieldIndex = 0;&lt;br /&gt;       foreach (FieldInfo fieldInfo in type.GetFields())&lt;br /&gt;       {&lt;br /&gt;           fields[fieldIndex].SetValue(clone, fieldInfo.FieldType.Implements("ICloneable") ? ((ICloneable)fieldInfo.GetValue(obj)).Clone() : fieldInfo.GetValue(obj).Clone());&lt;br /&gt;           if (fieldInfo.FieldType.Implements("IEnumerable"))&lt;br /&gt;           {&lt;br /&gt;               var enumerable = (IEnumerable)fieldInfo.GetValue(obj);&lt;br /&gt;               if (fields[fieldIndex].FieldType.Implements("IList"))&lt;br /&gt;               {&lt;br /&gt;                   int i = 0;&lt;br /&gt;                   IList list = (IList)fields[fieldIndex].GetValue(clone);&lt;br /&gt;                   foreach (var item in enumerable)&lt;br /&gt;                       list[i++] = item.Clone();&lt;br /&gt;               }&lt;br /&gt;               else if (fields[fieldIndex].FieldType.Implements("IDictionary"))&lt;br /&gt;               {&lt;br /&gt;                   IDictionary dictionary = (IDictionary)fields[fieldIndex].GetValue(clone);&lt;br /&gt;                   foreach (DictionaryEntry entry in enumerable)&lt;br /&gt;                       dictionary[entry.Key] = entry.Value.Clone();&lt;br /&gt;               }&lt;br /&gt;           }&lt;br /&gt;           fieldIndex++;&lt;br /&gt;       }&lt;br /&gt;       return (T)clone;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   /// &lt;summary&gt;&lt;br /&gt;   /// Returns true if the type implements the specified interface, otherwise false.&lt;br /&gt;   /// &lt;/summary&gt;&lt;br /&gt;   /// &lt;param name="type"&gt;The type.&lt;br /&gt;   /// &lt;param name="interfaceName"&gt;Name of the interface.&lt;br /&gt;   /// &lt;returns&gt;&lt;/returns&gt;&lt;br /&gt;   public static bool Implements(this Type type, string interfaceName)&lt;br /&gt;   {&lt;br /&gt;       return type.GetInterface(interfaceName, true) != null;&lt;br /&gt;   }&lt;br /&gt;}&lt;/t&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-1137387698857070298?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/1137387698857070298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=1137387698857070298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1137387698857070298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1137387698857070298'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/09/deep-cloning-without-serialization.html' title='Deep cloning without serialization.'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-9111225742828740198</id><published>2009-08-21T09:20:00.002+01:00</published><updated>2009-12-03T14:28:56.123Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Hosting multiple WCF Services under a single Windows Service</title><content type='html'>I am often asked how to host multiple services under a single windows service and through trial and error have been streamlining this process for clients.&lt;br /&gt;&lt;br /&gt;I thought I'd blog an example here for reference:&lt;br /&gt;&lt;br /&gt;&lt;pre class="c#" name="code"&gt;class Program {&lt;br /&gt;    static void Main() {&lt;br /&gt;        if (Environment.UserInteractive) {&lt;br /&gt;            ServiceManager serviceManager = new ServiceManager();&lt;br /&gt;            serviceManager.OpenAll();&lt;br /&gt;            Console.ReadKey();&lt;br /&gt;            serviceManager.CloseAll();&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;            ServiceBase.Run(new WindowsService());&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class WindowsService : ServiceBase&lt;br /&gt;{&lt;br /&gt;    public static string WindowsServiceName = "Windows Service Name";&lt;br /&gt;    public static string WindowsServiceDescription = "Windows Service Description";&lt;br /&gt;    public static string WindowsServiceUsername = @".\username";&lt;br /&gt;    public static string WindowsServicePassword = "password";&lt;br /&gt;&lt;br /&gt;    private readonly ServiceManager serviceManager = new ServiceManager();&lt;br /&gt;&lt;br /&gt;    private readonly IContainer components = new Container();&lt;br /&gt;&lt;br /&gt;    protected override void Dispose(bool disposing) {&lt;br /&gt;        if (serviceManager != null) serviceManager.CloseAll();&lt;br /&gt;        if (disposing &amp;&amp; (components != null)) components.Dispose();&lt;br /&gt;        base.Dispose(disposing);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public WindowsService() {&lt;br /&gt;        ServiceName = WindowsServiceName;&lt;br /&gt;        CanStop = true;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    protected override void OnStart(string[] args) {&lt;br /&gt;        base.OnStart(args);&lt;br /&gt;        serviceManager.OpenAll();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    protected override void OnStop() {&lt;br /&gt;        serviceManager.CloseAll();&lt;br /&gt;        base.OnStop();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class ServiceManager {&lt;br /&gt;    readonly List&lt;ServiceHost&gt; serviceHosts = new List&lt;ServiceHost&gt;();&lt;br /&gt;&lt;br /&gt;    public void OpenAll() {&lt;br /&gt;        OpenHost&lt;Service1&gt;();&lt;br /&gt;        OpenHost&lt;Service2&gt;();&lt;br /&gt;        ...&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void CloseAll() {&lt;br /&gt;        foreach (ServiceHost serviceHost in serviceHosts)&lt;br /&gt;            serviceHost.Close();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private void OpenHost&lt;T&gt;() {&lt;br /&gt;        Type type = typeof(T);&lt;br /&gt;        ServiceHost serviceHost = new ServiceHost(type);&lt;br /&gt;        serviceHost.Open();&lt;br /&gt;        serviceHosts.Add(serviceHost);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/// &lt;remarks&gt;&lt;br /&gt;/// Enables application to be installed as a Windows Service by running InstallUtil&lt;br /&gt;/// &lt;/remarks&gt;&lt;br /&gt;[RunInstaller(true)]&lt;br /&gt;public class WcfServiceHostInstaller : Installer {&lt;br /&gt;    public WcfServiceHostInstaller() {&lt;br /&gt;        Installers.Add(new ServiceInstaller&lt;br /&gt;                           {&lt;br /&gt;                               StartType = ServiceStartMode.Automatic,&lt;br /&gt;                               ServiceName = WindowsService.WindowsServiceName,&lt;br /&gt;                               Description = WindowsService.WindowsServiceDescription&lt;br /&gt;                           });&lt;br /&gt;        Installers.Add(new ServiceProcessInstaller { Account = ServiceAccount.User, Username = WindowsService.WindowsServiceUsername, Password = WindowsService.WindowsServicePassword });&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And some configuration:&lt;br /&gt;&lt;br /&gt;- Here, the binding &amp; behaviour configuration is shared across services but you may need different configurations for different types of services.&lt;br /&gt;- I use different ports for different services, but you don't have to.&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;system.serviceModel&amp;gt;&lt;br /&gt;  &amp;lt;services&amp;gt;&lt;br /&gt;    &amp;lt;service behaviorConfiguration="DefaultBehavior" name="Namespace.Service1"&amp;gt;&lt;br /&gt;      &amp;lt;endpoint address="" binding="netTcpBinding" bindingConfiguration="TCPBindingConfig" name="TCPEndpoint" contract="Namespace.IService1" /&amp;gt;&lt;br /&gt;      &amp;lt;endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="TcpMetaData" contract="IMetadataExchange" /&amp;gt;&lt;br /&gt;      &amp;lt;host&amp;gt;&lt;br /&gt;        &amp;lt;baseAddresses&amp;gt;&lt;br /&gt;          &amp;lt;add baseAddress="net.tcp://localhost:8001/Namespace/Service1" /&amp;gt;&lt;br /&gt;        &amp;lt;/baseAddresses&amp;gt;&lt;br /&gt;      &amp;lt;/host&amp;gt;&lt;br /&gt;    &amp;lt;/service&amp;gt;&lt;br /&gt;    &amp;lt;service behaviorConfiguration="DefaultBehavior" name="Namespace.Service2"&amp;gt;&lt;br /&gt;      &amp;lt;endpoint address="" binding="netTcpBinding" bindingConfiguration="TCPBindingConfig" name="TCPEndpoint" contract="Namespace.IService2" /&amp;gt;&lt;br /&gt;      &amp;lt;endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="TcpMetaData" contract="IMetadataExchange" /&amp;gt;&lt;br /&gt;      &amp;lt;host&amp;gt;&lt;br /&gt;        &amp;lt;baseAddresses&amp;gt;&lt;br /&gt;          &amp;lt;add baseAddress="net.tcp://localhost:8002/Namespace/Service2" /&amp;gt;&lt;br /&gt;        &amp;lt;/baseAddresses&amp;gt;&lt;br /&gt;      &amp;lt;/host&amp;gt;&lt;br /&gt;    &amp;lt;/service&amp;gt;&lt;br /&gt;    ...&lt;br /&gt;  &amp;lt;/services&amp;gt;&lt;br /&gt;  &amp;lt;bindings&amp;gt;&lt;br /&gt;    &amp;lt;netTcpBinding&amp;gt;&lt;br /&gt;      &amp;lt;binding name="TCPBindingConfig" maxBufferSize="5242880" maxReceivedMessageSize="5242880"&amp;gt;&lt;br /&gt;        &amp;lt;readerQuotas maxStringContentLength="5242880" /&amp;gt;&lt;br /&gt;        &amp;lt;security mode="None" /&amp;gt;&lt;br /&gt;      &amp;lt;/binding&amp;gt;&lt;br /&gt;    &amp;lt;/netTcpBinding&amp;gt;&lt;br /&gt;  &amp;lt;/bindings&amp;gt;&lt;br /&gt;  &amp;lt;behaviors&amp;gt;&lt;br /&gt;    &amp;lt;serviceBehaviors&amp;gt;&lt;br /&gt;      &amp;lt;behavior name="DefaultBehavior"&amp;gt;&lt;br /&gt;        &amp;lt;serviceMetadata httpGetEnabled="false" /&amp;gt;&lt;br /&gt;        &amp;lt;serviceDebug includeExceptionDetailInFaults="true" /&amp;gt;&lt;br /&gt;        &amp;lt;serviceThrottling maxConcurrentCalls="21" maxConcurrentSessions="50" /&amp;gt;&lt;br /&gt;      &amp;lt;/behavior&amp;gt;&lt;br /&gt;    &amp;lt;/serviceBehaviors&amp;gt;&lt;br /&gt;  &amp;lt;/behaviors&amp;gt;&lt;br /&gt;&amp;lt;/system.serviceModel&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-9111225742828740198?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/9111225742828740198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=9111225742828740198' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/9111225742828740198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/9111225742828740198'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/08/hosting-multiple-wcf-services-under.html' title='Hosting multiple WCF Services under a single Windows Service'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-1041304320054581463</id><published>2009-08-10T11:58:00.007+01:00</published><updated>2010-02-02T00:49:33.123Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Shuffle: an extension method of random uselessfulness</title><content type='html'>UPDATE: I have updated this method here: &lt;a href="http://thegrenade.blogspot.com/2010/02/when-random-is-too-consistent.html"&gt;http://thegrenade.blogspot.com/2010/02/when-random-is-too-consistent.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have you ever needed to randomly sort a list in C#? Add this to your nifty extensions library:&lt;br /&gt;&lt;br /&gt;&lt;pre class="c#" name="code"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// Shuffles the specified list (Extension Method for any IList&amp;lt;T&amp;gt;).&lt;br /&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;/// &amp;lt;remarks&amp;gt;&lt;br /&gt;/// Algorithm described at: http://en.wikipedia.org/wiki/Fisher-Yates_shuffle&lt;br /&gt;/// &amp;lt;/remarks&amp;gt;&lt;br /&gt;/// &amp;lt;example&amp;gt;list.Shuffle();&amp;lt;/example&amp;gt;&lt;br /&gt;public static void Shuffle&amp;lt;T&amp;gt;(this IList&amp;lt;T&amp;gt; list)&lt;br /&gt;{&lt;br /&gt;    Random rng = new Random();&lt;br /&gt;    int n = list.Count;&lt;br /&gt;    while (n &gt; 1) {&lt;br /&gt;        n--;&lt;br /&gt;        int k = rng.Next(n + 1);&lt;br /&gt;        T value = list[k];&lt;br /&gt;        list[k] = list[n];&lt;br /&gt;        list[n] = value;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-1041304320054581463?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/1041304320054581463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=1041304320054581463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1041304320054581463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1041304320054581463'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/08/shuffle-extension-method-of-random.html' title='Shuffle: an extension method of random uselessfulness'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-4539960946336396980</id><published>2009-08-07T14:17:00.007+01:00</published><updated>2009-08-07T14:42:27.675+01:00</updated><title type='text'>Akamai Download Manager Sucks!</title><content type='html'>I wasted a lot of time today trying to download Windows 7 from MSDN using the pile of rubbish that is the "alternate download site" for "top downloads" at MSDN.&lt;br /&gt;&lt;br /&gt;The regular download mechanism using Microsoft File Transfer Manager is disabled today while everyone tries to download Windows 7. For me the process was to get a javascript error when clicking on the Windows 7 download link.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Psti3TsSy9w/Snwrg5gFueI/AAAAAAAAOlE/gxW2c9qrfTI/s1600-h/jserror.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 260px;" src="http://3.bp.blogspot.com/_Psti3TsSy9w/Snwrg5gFueI/AAAAAAAAOlE/gxW2c9qrfTI/s320/jserror.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367212700110010850" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If I manually change the URL in the linked page to use HTTPS I can get further (if I accept that MSDN is using an invalid security certificate).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Psti3TsSy9w/SnwrwE91YhI/AAAAAAAAOlM/sBb1QdseH24/s1600-h/certerror.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 260px;" src="http://4.bp.blogspot.com/_Psti3TsSy9w/SnwrwE91YhI/AAAAAAAAOlM/sBb1QdseH24/s320/certerror.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367212960885596690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And when Akamai Download Manager finally loads and I am prompted to accept another invalid certificate, It just errors out without giving an explanation.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Psti3TsSy9w/SnwvCVwo76I/AAAAAAAAOlc/BijWF7CVhqQ/s1600-h/certerror2.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 133px;" src="http://4.bp.blogspot.com/_Psti3TsSy9w/SnwvCVwo76I/AAAAAAAAOlc/BijWF7CVhqQ/s320/certerror2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367216573166186402" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Psti3TsSy9w/SnwvChaeJ5I/AAAAAAAAOlk/V9zCP0SQiyU/s1600-h/certificate.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 271px; height: 320px;" src="http://3.bp.blogspot.com/_Psti3TsSy9w/SnwvChaeJ5I/AAAAAAAAOlk/V9zCP0SQiyU/s320/certificate.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367216576294430610" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Psti3TsSy9w/Snwrwaa1alI/AAAAAAAAOlU/oeMrXJ4mq0w/s1600-h/dmerror.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 78px;" src="http://1.bp.blogspot.com/_Psti3TsSy9w/Snwrwaa1alI/AAAAAAAAOlU/oeMrXJ4mq0w/s320/dmerror.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367212966644378194" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In summary: Akamai, you suck. And Microsoft, seriously, we expect better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-4539960946336396980?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/4539960946336396980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=4539960946336396980' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4539960946336396980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4539960946336396980'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/08/akamai-download-manager-sucks.html' title='Akamai Download Manager Sucks!'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Psti3TsSy9w/Snwrg5gFueI/AAAAAAAAOlE/gxW2c9qrfTI/s72-c/jserror.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-6174373117227111771</id><published>2009-07-29T13:16:00.003+01:00</published><updated>2009-07-29T14:27:05.277+01:00</updated><title type='text'>Source control shootout</title><content type='html'>I like to think that I keep up with changes in the continuous integration space but somehow I missed  an important shift in source control thats been taking place over the last year and a half. While I was busy promoting subversion and TFS as SourceSafe replacements, the community has abandoned centralised source control alltogether in favour of distibuted variants. Mercurial, like Git and Bazaar is a distributed version control system and needs no central server control. If a server wants revisions of a project it simply clones or pulls revisions from clients it is interested in.&lt;br /&gt;&lt;br /&gt;Large open source projects have used the model for many years with notable successes like the linux kernel but a recent &lt;a href="https://developer.mozilla.org/en/Mercurial"&gt;shift&lt;/a&gt; by Mozilla to Mercurial as well as Google Code's &lt;a href="http://google-code-updates.blogspot.com/2009/04/mercurial-support-for-project-hosting.html"&gt;adoption&lt;/a&gt; of Mercurial was what caught my attention. Having now caught up on my research of the subject, I feel like I've arrived late to the party. I'm not going to say too much about what I've learned but the long and short of it is this:&lt;br /&gt;&lt;br /&gt;If you're still using centralised source control, stop it. At the time of writing, you have two options: Git or Mercurial. I leave it as an exercise for the reader to understand why if you don't already know...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-6174373117227111771?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/6174373117227111771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=6174373117227111771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/6174373117227111771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/6174373117227111771'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/07/source-control-and-new-kid-on-block.html' title='Source control shootout'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-6510762504649548776</id><published>2009-07-01T13:04:00.004+01:00</published><updated>2009-12-03T14:28:56.124Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Using expression trees for more elegant code</title><content type='html'>Caching WCF responses without making a mess in the code base is often problematic due to connection pooling limitations and the requirement to close connections after use.&lt;br /&gt;&lt;br /&gt;Many implementations end up something like: attempt to retrieve entity from cache &gt; if absent, instantiate client proxy &gt; retrieve entity from service &gt; close connection &gt; add entity to cache.&lt;br /&gt;&lt;br /&gt;Problems arise because it is possible that entities for a single solution may need to be supplied by numerous services and the service method signatures may differ for various entities or collections of entities. This makes it difficult to create a generic wrapper capable of populating any number of varying entity types let alone the associated CRUD calls for entity persistence, etc. Entity identifiers may differ in type between services or even within a service. When a client side caching mechanism is required, the code becomes cluttered with the numerous caching calls and connection instantiations and tear-downs.&lt;br /&gt;&lt;br /&gt;Any one who has worked on large WCF driven apps knows that this kind of clutter is butt-ugly and a pain to maintain or add features to.&lt;br /&gt;&lt;br /&gt;Expression Trees to the rescue:&lt;br /&gt;&lt;br /&gt;&lt;pre class="c#" name="code"&gt;public static class Services&lt;br /&gt;{&lt;br /&gt;  /// &amp;lt;summary&amp;gt;Gets the item.&amp;lt;/summary&amp;gt;&lt;br /&gt;  /// &amp;lt;typeparam name="TProxy"&amp;gt;The type of the proxy.&amp;lt;/typeparam&amp;gt;&lt;br /&gt;  /// &amp;lt;typeparam name="TEntity"&amp;gt;The type of the entity.&amp;lt;/typeparam&amp;gt;&lt;br /&gt;  /// &amp;lt;typeparam name="TIdentity"&amp;gt;The type of the identity.&amp;lt;/typeparam&amp;gt;&lt;br /&gt;  /// &amp;lt;param name="expression"&amp;gt;The expression.&amp;lt;/param&amp;gt;&lt;br /&gt;  /// &amp;lt;param name="proxy"&amp;gt;The proxy.&amp;lt;/param&amp;gt;&lt;br /&gt;  /// &amp;lt;param name="id"&amp;gt;The id.&amp;lt;/param&amp;gt;&lt;br /&gt;  /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;  /// &amp;lt;remarks&amp;gt;Method first checks the cache for an entity with a matching id, if found, it is returned.&lt;br /&gt;  /// If the cache does not contain the entity, the wcf service method in the supplied expression tree&lt;br /&gt;  /// is used to obtain the entity which is then added to the cache.&amp;lt;/remarks&amp;gt;&lt;br /&gt;  /// &amp;lt;example&amp;gt;Product p = GetItem((client, identifier) =&amp;gt; client.GetProduct(identifier), new CatalogServiceClient(), 123);&amp;lt;/example&amp;gt;&lt;br /&gt;  private static TEntity GetItem&amp;lt;TProxy, TEntity, TIdentity&amp;gt;(Expression&amp;lt;Func&amp;lt;TProxy, TIdentity, TEntity&amp;gt;&amp;gt; expression, TProxy proxy, TIdentity id)&lt;br /&gt;    where TEntity : class&lt;br /&gt;    where TProxy : ICommunicationObject&lt;br /&gt;  {&lt;br /&gt;    TEntity item = Cache.GetItem&amp;lt;TEntity, TIdentity&amp;gt;(id);&lt;br /&gt;    if (item == null)&lt;br /&gt;    {&lt;br /&gt;      try&lt;br /&gt;      {&lt;br /&gt;        var originalDelegate = expression.Compile();&lt;br /&gt;        item = originalDelegate.Invoke(proxy, id);&lt;br /&gt;      }&lt;br /&gt;      finally { proxy.Close(); }&lt;br /&gt;      Cache.AddItem&amp;lt;TEntity, TIdentity&amp;gt;(item);&lt;br /&gt;    }&lt;br /&gt;    return item;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-6510762504649548776?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/6510762504649548776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=6510762504649548776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/6510762504649548776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/6510762504649548776'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/07/using-expression-trees-for-more-elegant.html' title='Using expression trees for more elegant code'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-4987500426797284252</id><published>2009-06-04T11:26:00.002+01:00</published><updated>2009-12-03T14:29:07.793Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Running .Net 2 web applications alongside .Net 4</title><content type='html'>I recently installed the Visual Studio 2010 RC on an XP dev machine and found that it reconfigured IIS to default to ASP.Net v4. That's not terrible, but it did stop me being able to debug my .Net 2 &amp; 3 applications under IIS and I started getting the old "Unable to start debugging on the web server" error message.&lt;br /&gt;&lt;br /&gt;It's simple enough to fix however. Just run the following command for each virtual directory that needs to run under .Net 2:&lt;br /&gt;&lt;code&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis /s W3SVC/1/ROOT/&amp;lt;YourVirtualDirectoryName&amp;gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-4987500426797284252?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/4987500426797284252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=4987500426797284252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4987500426797284252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4987500426797284252'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/06/running-net-2-web-applications.html' title='Running .Net 2 web applications alongside .Net 4'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-5035598791699852882</id><published>2009-04-22T16:44:00.003+01:00</published><updated>2009-04-22T16:57:48.895+01:00</updated><title type='text'>Quirky psexec behaviour when run from MSBuild.</title><content type='html'>Part of a deployment process I have been working on requires that our build server deploy some WCF services to a remote host. This is accomplished by hosting the WCF services within a Windows service that listens for TCP connections.&lt;br /&gt;&lt;br /&gt;We ran into some quirky behaviour with psexec hanging during the execution of InstallUTil on the remote host. I presume that installutil was prompting for some sort of confirmation and not getting it. I added the -d switch to the psexec command and then noticed that psexec started returning inconsistent exit codes. It turns out that -d causes the PID of the remote process to be returned as the exit code as well as suppressing any interactivity. I can see this being useful in many psexec scenarios but it makes msbuild think something has gone wrong and this means that I also needed to add an IgnoreExitCode attribute to my exec tag like so:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;Exec Command="psexec -d /accepteula \\RemoteHostName C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /i /LogFile=D:\Logs\ServiceInstallation.log D:\Services\WcfServiceGroupHost.exe" IgnoreExitCode="true" /&amp;gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-5035598791699852882?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/5035598791699852882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=5035598791699852882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5035598791699852882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5035598791699852882'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/04/quirky-psexec-behaviour-when-run-from.html' title='Quirky psexec behaviour when run from MSBuild.'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-4144104876610337924</id><published>2009-03-03T08:08:00.004Z</published><updated>2009-12-03T14:30:04.261Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Running Visio SaveAsWeb in a web application or service</title><content type='html'>&lt;p&gt;There are many &lt;a href="http://support.microsoft.com/kb/257757/"&gt;reasons why you should not run Microsoft Office applications from inside a web application&lt;/a&gt; or service. But if you really want to do it anyway, here's what you need to know to use Visio SaveAsWeb on Windows Server 2003.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Create a new windows user. The Application Pool that your web application runs under will be using the Network Service account in its identity settings by default. Change this so that your Application Pool uses a custom identity account that you have created.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Add your new user to the local IIS_WPG group. Verify that Local Security Policy &gt; Local Policies &gt; User Rights Assignment &gt; Log on as a service grants this role to IIS_WPG.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Run DCOMCNFG and navigate to Component Services &gt; Computers &gt; My Computer &gt; DCOM Config &gt; Microsoft Office Visio Drawing &gt; Properties &gt; Security &gt; Launch and Activation Permissions &gt; Customize &gt; Edit. Add the IIS_WPG group and allow Local Launch &amp; Local Activation rights.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Add the following code to somewhere appropriate in your application:&lt;/p&gt;&lt;br /&gt;&lt;pre class="c#" name="code"&gt;using System;&lt;br /&gt;using Microsoft.Office.Interop.Visio;&lt;br /&gt;using Microsoft.Office.Interop.Visio.SaveAsWeb;&lt;br /&gt;&lt;br /&gt;public static class Visio&lt;br /&gt;{&lt;br /&gt;  public static bool Convert(string pathToVsd, string pathToHtml, string pageTitle)&lt;br /&gt;  {&lt;br /&gt;    bool result;&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;      InvisibleAppClass visio = new InvisibleAppClass();&lt;br /&gt;      VisSaveAsWeb saveAsWeb = (VisSaveAsWeb)visio.Application.SaveAsWebObject;&lt;br /&gt;      saveAsWeb.AttachToVisioDoc(visio.Documents.Open(pathToVsd));&lt;br /&gt;      VisWebPageSettings webPageSettings = (VisWebPageSettings)saveAsWeb.WebPageSettings;&lt;br /&gt;      webPageSettings.TargetPath = pathToHtml;&lt;br /&gt;      webPageSettings.PageTitle = pageTitle;&lt;br /&gt;      webPageSettings.DispScreenRes = VISWEB_DISP_RES.res768x1024;&lt;br /&gt;      webPageSettings.QuietMode = 1;&lt;br /&gt;      webPageSettings.SilentMode = 1;&lt;br /&gt;      webPageSettings.NavBar = 0;&lt;br /&gt;      webPageSettings.PanAndZoom = 0;&lt;br /&gt;      webPageSettings.Search = 0;&lt;br /&gt;      webPageSettings.OpenBrowser = 0;&lt;br /&gt;      webPageSettings.PropControl = 0;&lt;br /&gt;      saveAsWeb.CreatePages();&lt;br /&gt;      visio.Quit();&lt;br /&gt;      result = true;&lt;br /&gt;    }&lt;br /&gt;    catch (Exception ex)&lt;br /&gt;    {&lt;br /&gt;      //Put your error logging code here:&lt;br /&gt;      //Log.WriteEntry(string.Format("Failed to convert {0} to {1}.", pathToVsd, pathToHtml), ex);&lt;br /&gt;      result = false;&lt;br /&gt;    }&lt;br /&gt;    return result;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Following is a usage example:&lt;/p&gt;&lt;br /&gt;&lt;pre class="c#" name="code"&gt;protected void UploadButton_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;  if (FileUpload1.HasFile &amp;&amp; FileUpload1.FileName.ToLower().EndsWith(".vsd"))&lt;br /&gt;  {&lt;br /&gt;    string documentName = FileUpload1.FileName.Substring(0, FileUpload1.FileName.Length - 4);&lt;br /&gt;    string newFilename = string.Format("{0}-{1:yyyyMMddHHmmss}", documentName, DateTime.Now);&lt;br /&gt;    string uploadFolder = Server.MapPath("Diagrams");&lt;br /&gt;    string pathToVsd = uploadFolder + "\\" + newFilename + ".vsd";&lt;br /&gt;    string pathToHtml = uploadFolder + "\\" + newFilename + ".htm";&lt;br /&gt;    FileUpload1.SaveAs(pathToVsd);&lt;br /&gt;    if(Visio.Convert(pathToVsd, pathToHtml, documentName))&lt;br /&gt;      Response.Redirect("Diagrams/" + newFilename + ".htm", true);&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-4144104876610337924?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/4144104876610337924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=4144104876610337924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4144104876610337924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4144104876610337924'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/03/running-visio-saveasweb-in-web.html' title='Running Visio SaveAsWeb in a web application or service'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-8377893454517603779</id><published>2009-02-24T10:15:00.005Z</published><updated>2009-12-03T14:30:04.261Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>LINQ vs Lambda vs loop - A performance test</title><content type='html'>&lt;p&gt;I was wondering about the benefits of using Linq over Lambda or vice versa for data filtering. I noticed that some of Scott Gu's recent MVC posts contain examples like:&lt;p&gt;&lt;br /&gt;&lt;pre&gt;var products = from p in northwind.Products where p.Category.CategoryName == "Beverages" select p;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Personally, I prefer the Lambda construct:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;var products = northwind.Products.Where(p =&gt; p.Category.CategoryName == "Beverages");&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;This is largely a personal preference issue, but being regularly involved in architectural discussion you often get asked to justify your personal preferences. So I checked the interweb for some metrics and came across an older post about LINQ over loops.&lt;p&gt;&lt;br /&gt;&lt;p&gt;Back in 2007, Håvard Stranden posted some &lt;a href="http://ox.no/posts/linq-vs-loop-a-performance-test/trackback"&gt;performance metrics for LINQ vs Loop&lt;/a&gt; using a Visual Studio 2008 beta. His test concluded that there was a performance hit in using LINQ over loops but that it was within acceptable ranges. Anders Hejlsberg and others pointed out that the test would benefit from removing some unnecessary casting.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I have modified the tests to remove the unnecessary casting, include metrics for using Lambda, and take advantage of the improvements to the framework in Visual Studio 2008 SP1. I experimented with several different approaches because the various methods have dependencies and return constraints. LINQ and looping depend on IEnumerable collections (IEnumerable&lt;T&gt;) and return the same, Lamda depends on Genercic Lists (IList&lt;T&gt;) and returns the same. To account for this, I decided that the methods could have their test data provided in the format they need it in before the stopwatch starts. This decision favours Lambda but real world scenarios where Lambda expressions are used also rely on this constraint. For the same reason, I removed the List&lt;int&gt; instantiation in Stranden's loop test because this handicaps the loop implementation since a real world looping example doesn't need to instantiate a List in order to filter on some property data.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The test results show that the framework is now seriously biased in favour of Lambda implementations. Presumably, because of changes to Generic internals.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The test code as well as the results on my PC are shown below.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Test:&lt;/p&gt;&lt;br /&gt;&lt;pre class="c#" name="code"&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Diagnostics;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Linq;&lt;br /&gt;&lt;br /&gt;namespace IterationPerformanceTest&lt;br /&gt;{&lt;br /&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        public static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            Trace.Listeners.Add(new TextWriterTraceListener(File.CreateText("Output.txt")));&lt;br /&gt;            RunTests();&lt;br /&gt;            Trace.Flush();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        static void RunTests()&lt;br /&gt;        {&lt;br /&gt;            const int SIZE = 10000;&lt;br /&gt;            const int RUNS = 1000;&lt;br /&gt;            Stopwatch stopwatch = new Stopwatch();&lt;br /&gt;            Random r = new Random();&lt;br /&gt;            int[] ints = new int[SIZE];&lt;br /&gt;            for (int i = 0; i &lt; SIZE; i++)&lt;br /&gt;                ints[i] = r.Next(int.MinValue, int.MaxValue);&lt;br /&gt;            List&lt;int&gt; intList = new List&lt;int&gt;(ints);&lt;br /&gt;&lt;br /&gt;            //LINQ&lt;br /&gt;            stopwatch.Start();&lt;br /&gt;            for (int t = 0; t &lt; RUNS; ++t)&lt;br /&gt;            {&lt;br /&gt;                IEnumerable&lt;int&gt; result = (from int i in ints where i &lt; 10 select i);&lt;br /&gt;            }&lt;br /&gt;            stopwatch.Stop();&lt;br /&gt;            Trace.WriteLine(string.Format("LINQ:   {0}, avg. {1}", stopwatch.Elapsed, new TimeSpan(stopwatch.ElapsedTicks / RUNS)));&lt;br /&gt;            stopwatch.Reset();&lt;br /&gt;&lt;br /&gt;            //LAMBDA&lt;br /&gt;            stopwatch.Start();&lt;br /&gt;            for (int t = 0; t &lt; RUNS; ++t)&lt;br /&gt;            {&lt;br /&gt;                IEnumerable&lt;int&gt; result = (intList.Where(i =&gt; i &lt; 10));&lt;br /&gt;            }&lt;br /&gt;            stopwatch.Stop();&lt;br /&gt;            Trace.WriteLine(string.Format("LAMBDA: {0}, avg. {1}", stopwatch.Elapsed, new TimeSpan(stopwatch.ElapsedTicks / RUNS)));&lt;br /&gt;            stopwatch.Reset();&lt;br /&gt;&lt;br /&gt;            //LOOP&lt;br /&gt;            stopwatch.Start();&lt;br /&gt;            for (int t = 0; t &lt; RUNS; ++t)&lt;br /&gt;            {&lt;br /&gt;                foreach (var i in ints)&lt;br /&gt;                {&lt;br /&gt;                    bool match = (i &lt; 10);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            stopwatch.Stop();&lt;br /&gt;            Trace.WriteLine(string.Format("Loop:   {0}, avg. {1}", stopwatch.Elapsed, new TimeSpan(stopwatch.ElapsedTicks / RUNS)));&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Results:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;LINQ:   00:00:00.0019557, avg. 00:00:00.0004552&lt;br /&gt;LAMBDA: 00:00:00.0000574, avg. 00:00:00.0000133&lt;br /&gt;Loop:   00:00:00.0601094, avg. 00:00:00.0139906&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-8377893454517603779?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/8377893454517603779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=8377893454517603779' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8377893454517603779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8377893454517603779'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/02/linq-vs-lambda-vs-loop-performance-test.html' title='LINQ vs Lambda vs loop - A performance test'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-6878292849168883117</id><published>2009-02-19T12:40:00.002Z</published><updated>2009-12-03T14:31:35.614Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Running your .Net Web Application under a custom user account on Windows Server 2003</title><content type='html'>&lt;p&gt;Some web applications will benefit from running under a different user account to the default 'Network Service' account. I had to set this up today to support some server side Visio COM execution.&lt;p&gt;&lt;br /&gt;&lt;p&gt;The user account is specified under the Identity tab for the Application Pool properties and whatever user you use will need access to the following resources &amp; groups:&lt;p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Add to group: IIS_WPG&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Run %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -ga domain\username&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Local Security Policy &gt; Local Policies &gt; User Rights Assignment &gt; Log on as a service&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-6878292849168883117?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/6878292849168883117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=6878292849168883117' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/6878292849168883117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/6878292849168883117'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/02/running-your-net-web-application-under.html' title='Running your .Net Web Application under a custom user account on Windows Server 2003'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-3838126590518770427</id><published>2009-01-30T14:49:00.003Z</published><updated>2009-12-03T14:30:04.262Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Static methods and classes are always evil</title><content type='html'>So, I'm looking for a new gig and I take a call from an agency that represents a prestigious .Net development team that's paying well and using all the latest toys. Fantastic! The agent reckons I'm suited to the role and sends me a copy of the "perfume test". It's a technical test with an interesting twist. The constraints are rather few and far between and the test description is really just a description of a business problem. "Write your own solution to the problem and make sure you use good design practice." I'm told that I have 48 hours to write my solution but I finish in 4 and send it back. It's a complete TDD solution with all the required unit tests and even goes the extra mile with a few extra bells and whistles to spruce it up. I was feeling pretty confident and gave them a couple days to respond.&lt;br /&gt;&lt;br /&gt;No news... I call them and am told "Your solution was great but you made use of a static class, we don't like that. It's hard to test. You're out of the running."&lt;br /&gt;&lt;br /&gt;Uh oh. Well, if ever anyone wanted a good reason why you should never use static classes, the definitive answer is: It makes you unemployable. Q.E.D.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-3838126590518770427?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/3838126590518770427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=3838126590518770427' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/3838126590518770427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/3838126590518770427'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2009/01/static-methods-and-classes-are-always.html' title='Static methods and classes are always evil'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-1092329062808706674</id><published>2008-11-28T11:17:00.007Z</published><updated>2009-12-03T14:31:04.456Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mono'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Apache, Mono and Virtual Hosts</title><content type='html'>&lt;p&gt;I run some ASP.Net applications under mono on a Debian host. Mono has come a long way in the last few years and is now making progress in support for C# 3.0 and even WCF. This adds appeal to the platform and increases the scope of it's usefullness.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;One thing I had trouble finding documentation for and ended up accomplishing through trial and error was setting up my Mono applications to run in an Apache (2) Virtual Host. The most difficult bit turned out to be the configuration of my sites-available file in /etc/apache2/sites-available. So I've decided to share it here:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;VirtualHost *&amp;gt;&lt;br /&gt;   ServerName example.com&lt;br /&gt;   ServerAlias www.example.com example.net www.example.net example.co.uk www.example.co.uk&lt;br /&gt;   DocumentRoot /var/www/example.com&lt;br /&gt;   ServerAdmin serveradmin@example.com&lt;br /&gt;   ErrorLog /var/log/apache2/example.com-error_log&lt;br /&gt;   #RewriteEngine on&lt;br /&gt;   #RewriteRule ^/([A-Za-z]*)/?$ /?Page=$1 [PT]&lt;br /&gt;   AddMonoApplications example "/:/var/www/example.com"&lt;br /&gt;   MonoUnixSocket example /tmp/.example_mod_mono_server2&lt;br /&gt;   MonoServerPath example /usr/lib/mono/2.0/mod-mono-server2.exe&lt;br /&gt;   AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx .svc&lt;br /&gt;   MonoApplicationsConfigDir example /etc/mono-server2&lt;br /&gt;   MonoPath example /usr/lib/mono/2.0:/usr/lib:/usr/lib/mono/2.0&lt;br /&gt;   &amp;lt;Directory "/var/www/example.com"&amp;gt;&lt;br /&gt;       MonoSetServerAlias example&lt;br /&gt;       SetHandler mono&lt;br /&gt;       Options Indexes FollowSymLinks&lt;br /&gt;       AllowOverride None&lt;br /&gt;       Order allow,deny&lt;br /&gt;       Allow from all&lt;br /&gt;   &amp;lt;/Directory&amp;gt;&lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;As you can see, I have commented out the RewriteEngine and RewriteRule directives but there is enough there for you to see what new tricks we .Net devs have to play with when we write code for a Mono deployment...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-1092329062808706674?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/1092329062808706674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=1092329062808706674' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1092329062808706674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1092329062808706674'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2008/11/apache-mono-and-virtual-hosts.html' title='Apache, Mono and Virtual Hosts'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-6379486296577031959</id><published>2008-11-13T14:10:00.004Z</published><updated>2008-11-13T14:27:47.893Z</updated><title type='text'>Help find Philip McNeil</title><content type='html'>The last few days have been an emotional roller coaster. We heard on Monday that Jo's brother has not been heard from or seen since early October when he disappeared from Yellowknife.&lt;br /&gt;&lt;br /&gt;There are good indications that he is alive but piecing together the facts from an overwhelmingly large selection of tiny clues has been exhausting.&lt;br /&gt;&lt;br /&gt;I have learned so much this week about human nature that my head feels like it's going to explode. Listening to second and third hand reports is useful but you can't beat going straight to the source to get the facts. It seems that when someone relates an incident or a conversation to you, they can't help but include their own interpretation or understanding of an event and when the relay has already passed through more than one chinese whisper the facts can get seriously twisted.&lt;br /&gt;&lt;br /&gt;The whole week has been spent speaking to everyone we can find who has spoken to or seen Phil in the weeks leading up to his disapearance and organising the effort to find him.&lt;br /&gt;&lt;br /&gt;We put up a simple website to colate some of the information gathered so far at: &lt;a href="http://www.philipmcneil.com/"&gt;www.philipmcneil.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Jo left for Yellowknife this morning. She's due to meet up with Julie when she arrives and start interviewing people face to face as well as recruiting a team to help her search for Phil.&lt;br /&gt;&lt;br /&gt;I love you Jo. Good luck! Find him quickly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-6379486296577031959?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/6379486296577031959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=6379486296577031959' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/6379486296577031959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/6379486296577031959'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2008/11/help-find-philip-mcneil.html' title='Help find Philip McNeil'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-5246369302980224953</id><published>2008-05-26T00:20:00.002+01:00</published><updated>2008-05-26T00:57:38.449+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='driving'/><title type='text'>Driving in Tico Country</title><content type='html'>Driving in Costa Rica is pretty awesome. The landscapes are varied and breathtaking. Making a wrong turn almost always results in some kind of adventure whether it's discovering the capabilities of your offroader or finding a great place to eat and taste foods you've never tried. I ended up on a rope bridge a couple weeks back that came complete with two sets of wooden planks spaced roughly the distance that a set of car wheels have between them apart and all the thrills and wobbles of riding a rollercoaster that you can steer.&lt;br /&gt;&lt;br /&gt;Today, however, I discovered that it doesn't matter what your driving skills are when I managed to execute an emergency stop on a wet highway to avoid colliding with cars ahead of me that had somehow become stationary in a very short distance. I had all of 2 or 3 seconds to enjoy my near miss before seeing in the rear view mirror that the 2 wheel drive Hyundai behind me didn't have a prayer of stopping without using his bonnet and my boot as his crumple zone. I made a vague effort to remove my car from the road but the combination of the rain soaked tarmac and old Kumho tires on the doomed car to my rear proved a versatile adversary and the inevitable crunching and screeching ensued. Everyone was ok and aside from being jolted into a new level of awareness all six of the Hyundai's passengers emerged a little shaken and embarrassed but good spirited enough to know that it could have been a lot worse. The Costa Rican police were on the scene quickly and had everything documented before I could say pura vida.&lt;br /&gt;&lt;br /&gt;Needless to say the Hyundai was a write off while my trusty Terios only lost its  cosmetic bumper cover and right indicators. In future I'll be reaching for the hazards a bit quicker and relaxing a little slower when I've just avoided an accident. And I'm enjoying the convenience and disposability of rental cars a little more today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-5246369302980224953?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/5246369302980224953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=5246369302980224953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5246369302980224953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5246369302980224953'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2008/05/driving-in-tico-country.html' title='Driving in Tico Country'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-4102129832090204954</id><published>2007-12-26T16:28:00.000Z</published><updated>2007-12-26T16:43:39.355Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><title type='text'>Recession? --Bah, humbug!</title><content type='html'>My take on the conversation about Britain following the US into recession is that ours is a very different economic situation to that of our cousins on the other side of the pond.&lt;br /&gt;&lt;br /&gt;American house prices fell because the American housing market had more houses for sale than house buyers with money were creating demand for. Building and planning laws in the US are a lot different to those in the UK so when people over extended themselves to buy houses they couldn't afford and were unable to make the mortgage payments the market became saturated and prices dropped and the whole vicious cycle of bankruptcies ensued.&lt;br /&gt;&lt;br /&gt;In the UK, our situation is more of a correction. We too had lots of people buying houses they couldn't afford, so that when interest rates rose, a few camel's backs were broken. The difference here is that when these properties were returned to the market, they were snapped up by investors who still had deep pockets.&lt;br /&gt;&lt;br /&gt;UK house prices are not about to drop, they are going to continue rising. We still don't have enough housing on the market and that isn't about to change quickly. As long as that's true (and I predict it will remain true for a few decades still), home owners can rest assured that their investment is safe. Meanwhile all those folks who fell off the ladder are about to get some hard knocks schooling about buying a house they can afford.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-4102129832090204954?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/4102129832090204954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=4102129832090204954' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4102129832090204954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4102129832090204954'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/12/recession-bah-humbug.html' title='Recession? --Bah, humbug!'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-1944768487390069277</id><published>2007-12-21T10:15:00.000Z</published><updated>2007-12-21T10:22:43.614Z</updated><title type='text'>Self certifying your IIS 6 website for SSL</title><content type='html'>Every time I need to enable https / ssl for a development or staging server I spend 30 minutes googling for instructions. Now I'm blogging just to remind myself how it's done:&lt;br /&gt;&lt;br /&gt;Install the IIS 6 Resource Kit referenced at:&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/840671"&gt;http://support.microsoft.com/kb/840671&lt;/a&gt; from:&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Obtain the site Id of the website you want to install the certificate for by clicking on the Web Sites major heading in the left hand side of the IIS admin tool and view the "Identifier" on the right hand side for whichever site you need. This is the site ID. further instructions at: &lt;a href="http://weblogs.asp.net/owscott/archive/2005/07/29/421058.aspx"&gt;http://weblogs.asp.net/owscott/archive/2005/07/29/421058.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Run the following command replacing &lt;em&gt;www.example.com&lt;/em&gt; with the host header of your site and &lt;em&gt;123456&lt;/em&gt; with the site id obtained in the previous step (the /V:365 indicates that the certificate should be valid for 365 days, adjust accordingly):&lt;br /&gt;&lt;pre&gt;"C:\Program Files\IIS Resources\SelfSSL\selfssl.exe" /T&lt;br /&gt;/N:CN=www.example.com /V:365 /S:123456&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-1944768487390069277?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/1944768487390069277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=1944768487390069277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1944768487390069277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/1944768487390069277'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/12/install-iis-6-resource-kit-referenced.html' title='Self certifying your IIS 6 website for SSL'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-5870705394414236889</id><published>2007-07-12T12:24:00.000+01:00</published><updated>2007-07-12T13:13:36.749+01:00</updated><title type='text'>Postcode Validation Regex</title><content type='html'>Validating postcodes in .Net has a couple gotcha's. The default behaviour for the RegularExpressionValidator is to perform case sensitive validation so I've modified a regex by &lt;a href="http://www.qwghlm.co.uk/blog/2005/09/08/a-better-postcode-regexp"&gt;Chris Applegate&lt;/a&gt; to suit my needs.&lt;br /&gt;&lt;pre&gt;([Gg][Ii][Rr] 0[Aa][Aa]&lt;br /&gt;|[A-Pa-pR-Ur-uWwYyZz][A-Ha-hK-Yk-y0-9][A-Ha-hJjKkSsTtUuWw0-9]?&lt;br /&gt;[AaBbEeHhMmNnPpRrVvWwXxYy0-9]? &lt;br /&gt;\s[0-9][AaBbD-Hd-hJjLlN-Un-uW-Zw-z]{2})&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-5870705394414236889?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/5870705394414236889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=5870705394414236889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5870705394414236889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/5870705394414236889'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/07/postcode-validation-regex.html' title='Postcode Validation Regex'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-2673784416673392202</id><published>2007-06-09T10:11:00.000+01:00</published><updated>2009-12-03T14:31:04.456Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mono'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Mono is maturing!</title><content type='html'>I have a simple .Net 2.0 project on the go at the moment that uses a web application project, a web service application project, the MySql connector and some C# class libraries that take advantage of generics. I decided to give MonoDevelop another whirl and have been pleasantly surprised with the results.&lt;br /&gt;&lt;br /&gt;Importing the sln and csproj files works but you lose the debug automation. It's just a case of some missing lines in the project files but I opted to create a blank mds solution and associated mdp projects using the MonoDevelop templates. The result is that running a debug fires up xsp2 so that you can see your web and web service output.&lt;br /&gt;&lt;br /&gt;There's a minor glitch in mono-xsp2 for Debian and Ubuntu where the preinstall script run by the package manager barfs on a syntax error. I had to open up the deb and fix the script, repackage and reinstall with dpkg. I would upload my fixed deb, but I reckon it'll be fixed upstream before anyone else notices. I found the information to do this at these url's: &lt;a href="http://maebmij.org/~jim/computerhints.html"&gt;maebmij.org/~jim/&lt;/a&gt; &lt;a href="http://synthesize.us/HOWTO_make_a_deb_archive_without_dpkg"&gt;synthesize.us&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The result of this bit of phaffing is that it's rather simple to create multi platform web projects in .Net without a great deal of dependency installs. Yay for mono!&lt;br /&gt;&lt;br /&gt;The code and solutions I've mentioned here are available at: &lt;a href="http://code.google.com/p/nimble/"&gt;http://code.google.com/p/nimble/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-2673784416673392202?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/2673784416673392202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=2673784416673392202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/2673784416673392202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/2673784416673392202'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/06/mono-is-maturing.html' title='Mono is maturing!'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-2682429650505190043</id><published>2007-05-05T08:41:00.000+01:00</published><updated>2009-12-03T14:30:04.262Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>camelCase in C# and the CLR</title><content type='html'>I want to address the issue of differentiating private fields from public properties using case alone. Everyone knows that the subject is a matter of preference and everyone has a strong argument to support their preference. &lt;br /&gt;&lt;br /&gt;My favourite comment on this debate comes from an observer of Brad's series on the Framework Design Guidelines at  &lt;a href="http://blogs.msdn.com/brada/archive/2005/10/28/486215.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;http://blogs.msdn.com/brada&lt;wbr&gt;/archive/2005/10/28/486215.aspx &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"&gt;Ahh, I had gone almost a week without a good Case Sensitivity Holy War. I do love to watch the monkeys fling poo. I feel supporting case insensitive languages is important because it helps give this whole debate even more room to blaze. -Shawn Oster&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;On a more serious note,&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The point of differentiating by more than case is CLR compliance.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;CLR compliance provides interoperability between programming languages within the framework.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;The rule is that publicly accessible properties must differ by more than case in order to disambiguate references or calls between assemblies on accessible API's. &lt;/li&gt;&lt;/ul&gt;A private field cannot be accessed by another CLR language. There is therefore no requirement to disambiguate by more than case because no language that would be confused by case sensitivity can access the field in question.&lt;br /&gt;&lt;br /&gt;It is my experience that the issue of adding an underscore before private fields usually comes about after a rule in a default code analysis policy file is violated and it barfs an error about CLR compliance. The policy file is at fault, not the code. The policy should first have examined the accessibility of the field in question.&lt;br /&gt;&lt;br /&gt;Microsoft's standard internal policy is to use camelCase for private fields and PascalCase for publicly accessible properties (&lt;script&gt;&lt;!-- D(["mb","\u003ca href\u003d\"http://blogs.msdn.com/brada/articles/361363.aspx\" target\u003d\"_blank\" onclick\u003d\"return top.js.OpenExtLink(window,event,this)\"\&gt;http://blogs.msdn.com/brada\u003cWBR\&gt;/articles/361363.aspx\n\u003c/a\&gt; - 2.6 Naming). This is not a violation of the CLR. Furthermore, it makes for far more elegant code.  \u003cbr\&gt;Consider the following comparison. Underscores are just butt ugly:\u003cbr\&gt;\u003cbr\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;\n\u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;private string\u003c/span\&gt; myString;  \u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;public string\n\u003c/span\&gt; MyString  \u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;{\u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;\n     \u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;get \u003c/span\&gt;{ \u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;return \u003c/span\&gt;myString; }  \u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;\n     \u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;set \u003c/span\&gt;{ myString \u003d \u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;value\u003c/span\&gt;; }  \u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;\n}  \u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;------\u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;\nprivate string\u003c/span\&gt; _MyString;  \u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;public string\u003c/span\&gt; MyString\u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\n\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;{\u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;     \u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;get \u003c/span\&gt;{ \u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;",1] );  //--&gt;&lt;/script&gt;&lt;a href="http://blogs.msdn.com/brada/articles/361363.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;http://blogs.msdn.com/brada&lt;wbr&gt;/articles/361363.aspx &lt;/a&gt; - 2.6 Naming). This is not a violation of the CLR. Furthermore, it makes for far more elegant code.&lt;br /&gt;Consider the following comparison. Underscores are just butt ugly:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt; &lt;span style="color: rgb(51, 102, 255);"&gt;private string&lt;/span&gt; myString;  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;public string &lt;/span&gt; MyString  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;      &lt;span style="color: rgb(51, 102, 255);"&gt;get &lt;/span&gt;{ &lt;span style="color: rgb(51, 102, 255);"&gt;return &lt;/span&gt;myString; }  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;      &lt;span style="color: rgb(51, 102, 255);"&gt;set &lt;/span&gt;{ myString = &lt;span style="color: rgb(51, 102, 255);"&gt;value&lt;/span&gt;; }  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt; }  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; private string&lt;/span&gt; _MyString;  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;public string&lt;/span&gt; MyString&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;     &lt;span style="color: rgb(51, 102, 255);"&gt;get &lt;/span&gt;{ &lt;span style="color: rgb(51, 102, 255);"&gt;&lt;script&gt;&lt;!-- D(["mb","\nreturn \u003c/span\&gt;_MyString; }\u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;     \u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;set \u003c/span\&gt;{ _MyString \u003d \u003cspan style\u003d\"color:rgb(51, 102, 255)\"\&gt;\nvalue\u003c/span\&gt;; }\u003c/span\&gt;\u003cbr style\u003d\"font-family:courier new,monospace\"\&gt;\u003cspan style\u003d\"font-family:courier new,monospace\"\&gt;}\u003c/span\&gt;\u003cbr\&gt;\u003cbr\&gt;Please don&amp;#39;t make me use underscores...\u003cbr\&gt;",1] ); D(["mb","\u003cspan class\u003dsg\&gt;\u003cbr\&gt;-- \u003cbr\&gt;Rob Thijssen\u003cbr\&gt;\u003ca href\u003d\"http://www.thijssen.co.uk\" target\u003d\"_blank\" onclick\u003d\"return top.js.OpenExtLink(window,event,this)\"\&gt;\nwww.thijssen.co.uk\u003c/a\&gt;, \u003ca href\u003d\"http://www.linkedin.com/in/thijssen\" target\u003d\"_blank\" onclick\u003d\"return top.js.OpenExtLink(window,event,this)\"\&gt;www.linkedin.com/in/thijssen\u003c/a\&gt;\u003cbr\&gt;+44 (0)7856 535344, +44(0)7983 485889, +44 (0)1752 774338\u003cbr\&gt;\n\u003c/span\&gt;",0] ); D(["ce"]);  //--&gt;&lt;/script&gt; return &lt;/span&gt;_MyString; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;     &lt;span style="color: rgb(51, 102, 255);"&gt;set &lt;/span&gt;{ _MyString = &lt;span style="color: rgb(51, 102, 255);"&gt; value&lt;/span&gt;; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new,monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Please don't make me use underscores...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-2682429650505190043?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/2682429650505190043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=2682429650505190043' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/2682429650505190043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/2682429650505190043'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/05/camelcase-in-c-and-clr.html' title='camelCase in C# and the CLR'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-3737115092766934924</id><published>2007-05-03T11:24:00.000+01:00</published><updated>2007-05-03T11:50:47.880+01:00</updated><title type='text'>Do recursive things from the command line</title><content type='html'>Ever wanted to recursively delete all files of a particular type from the command line or a script? Linux gives you lots of options for this and it turns out so does the cmd prompt. Try this for removing html files from a folder tree on Windows:&lt;br /&gt;&lt;blockquote&gt;C:\&gt;for /d /r "C:\My Clutter\And Chaos" %v IN (*) DO del "%v\*.html"&lt;/blockquote&gt;You've probably noticed that you can amend this line to run any command your mischievous mind can conjure.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The &lt;span style="font-style: italic;"&gt;for&lt;/span&gt; obviously gives you your recursion&lt;/li&gt;&lt;li&gt;The /d gives you a directory listing&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The &lt;span style="font-style: italic;"&gt;"C:\My Clutter\And Chaos"&lt;/span&gt; is your working directory&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;%v&lt;/span&gt; is the variable that will capture the output of your directory listing&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Everything after &lt;span style="font-style: italic;"&gt;DO&lt;/span&gt; is the command that gets run for each variant of &lt;span style="font-style: italic;"&gt;%v&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Enjoy your new power...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-3737115092766934924?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/3737115092766934924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=3737115092766934924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/3737115092766934924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/3737115092766934924'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/05/do-recursive-things-from-command-line.html' title='Do recursive things from the command line'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-7888406042983939813</id><published>2007-05-01T16:05:00.000+01:00</published><updated>2009-12-03T14:30:04.262Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>ASP.Net Generic Recursive FindControl</title><content type='html'>I was attempting to find a nested control on my page today and realised that the built in FindControl is useless for this. A bit of googling turned up &lt;a href="http://weblogs.asp.net/eporter/archive/2007/02/24/asp-net-findcontrol-recursive-with-generics.aspx"&gt;a post&lt;/a&gt; by Eric Porter and a neat little function he'd written to solve the problem.&lt;br /&gt;&lt;br /&gt;Mine has the same signature but actually works. :P&lt;br /&gt;&lt;pre&gt;public static T FindControl&lt;t&gt;(ControlCollection controls, string controlId) where T : class&lt;br /&gt;{&lt;br /&gt;   T found = default(T);&lt;br /&gt;   int i = -1;&lt;br /&gt;   while ((controls != null) &amp;&amp;amp;amp; (found == null) &amp;&amp;amp; (++i &lt; found =" ((controls[i]" id ="=""&gt;(controls[i].Controls, controlId);&lt;br /&gt;   }&lt;br /&gt;   return found;&lt;br /&gt;}&lt;/t&gt;&lt;/t&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-7888406042983939813?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/7888406042983939813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=7888406042983939813' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/7888406042983939813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/7888406042983939813'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/05/aspnet-generic-recursive-findcontrol.html' title='ASP.Net Generic Recursive FindControl'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-4994466685063437662</id><published>2007-04-29T09:04:00.000+01:00</published><updated>2009-12-03T14:31:04.457Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='MonoDevelop'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Mono'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>MonoDevelop</title><content type='html'>I want to use mono for a hobby CMS project I'm working on because I intend to open source the product and I'd like for it to be compatible with Linux hosting. &lt;a href="http://www.monodevelop.org/"&gt;MonoDevelop&lt;/a&gt; has made slow but steady progress over the couple of years I've been downloading it and abandoning the projects I create with it. But the 0.13.1 release has actually made the platform useable for me. The ASP.Net implementation can handle Web Application Projects with Generics, Serialization, Web Services and lots of the other tricks VS 2005 users take for granted.&lt;br /&gt;&lt;br /&gt;I shall update this post as OpenShowCase evolves and highlight the adequacies and inadequacies of the Mono platform for a developer thats used to having all the toys.&lt;br /&gt;&lt;br /&gt;I work off several development machines depending on whether I'm on my lunch hour, at home or in a hotel so I need both the IDE and source to be available wherever I am. My laptop runs Ubuntu and my PC at home runs Debian so I just added &lt;a href="http://pkg-mono.alioth.debian.org/"&gt;Mirco Bauers Debian repository&lt;/a&gt; to both apt sources (deb http://debian.meebey.net/ ./).&lt;br /&gt;&lt;br /&gt;As it's a non-standard repository you also need Mirco's PGP key:&lt;br /&gt;&lt;pre&gt;gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 0x7127E5ABEEF946C8&lt;br /&gt;gpg --export -a 0x7127E5ABEEF946C8 | apt-key add -&lt;br /&gt;apt-get update &amp;&amp;amp; apt-get install monodevelop monodevelop-versioncontrol kdesvn&lt;/pre&gt;I haven't tried to get MonoDevelop working on Windows yet but I'll update this when I have.&lt;br /&gt;&lt;br /&gt;For source control I've used subversion and taken advantage of Google's code and project hosting. The version control plugin for MonoDevelop works well but has a problem with adding a newly created solution to an existing repository. The same problem appears to affect kdesvn so the simplest thing to do is just create the code.google.com repository and use the command line client to make the first commit. From the console change to the directory that you keep all your projects in and enter the command below:&lt;br /&gt;&lt;pre&gt;svn checkout https://&lt;projectname&gt;.googlecode.com/svn/trunk/ openshowcase --username &lt;username&gt;&lt;/pre&gt;Afterwards the plugin seems to work fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-4994466685063437662?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/4994466685063437662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=4994466685063437662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4994466685063437662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4994466685063437662'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/04/monodevelop.html' title='MonoDevelop'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-8765810514514660353</id><published>2007-04-27T14:22:00.000+01:00</published><updated>2007-04-27T14:38:01.410+01:00</updated><title type='text'>Localisation in .Net</title><content type='html'>I'm all fired up at the moment about integrating localisation for a major on-line retailer in the UK. Implementation seems to be &lt;a href="http://forums.asp.net/1/688906/ShowThread.aspx"&gt;another religious debate&lt;/a&gt; among those who have an opinion but the business constraints of our clients can sometimes simplify our options.&lt;br /&gt;&lt;br /&gt;My choices were to use the built-in functionality in framework 2.0 or go find another job. So now, I'm working hard on moving the resource repository into SQL server and rolling a custom ResourceProviderFactory that uses the database (instead of resx files) to store my localised strings.&lt;br /&gt;&lt;br /&gt;The first bit was pretty straight-forward. Google is my friend and I found some &lt;a href="http://msdn2.microsoft.com/en-us/library/aa905797.aspx"&gt;great resources&lt;/a&gt; and &lt;a href="http://www.leftslipper.com/ShowFaq.aspx?FaqId=9"&gt;examples on the web&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You would think that the technology is old enough now that it would be simple to roll a robust solution but I can't seem to find any examples that implement IDesignTimeResourceWriter and DesignTimeResourceProviderFactory. My research leads me to believe that these classes are the key to making Visual Studio's "Generate Local Resource" tool work it's magic on my string repository instead of its native resx repository. So I'm rolling my own. It's a work in progress and I don't have any reason to believe it works but the code is &lt;a href="http://code.google.com/p/localisationprovider/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-8765810514514660353?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/8765810514514660353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=8765810514514660353' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8765810514514660353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/8765810514514660353'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/04/localisation-in-net.html' title='Localisation in .Net'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-3394219537934198526</id><published>2007-03-27T11:08:00.000+01:00</published><updated>2007-03-27T11:13:33.789+01:00</updated><title type='text'>Google Account Security</title><content type='html'>I think that everyone who makes heavy use of Google services would agree that losing control of their Google account would constitute a serious breach of privacy. I came within a click of losing my account to an opportunist.&lt;br /&gt;&lt;br /&gt;Recently another gmail user with a similar name attempted (and failed) to reset the password of my gmail account. He then attempted to add my email address as a secondary address for his account. At this point Google sent me an email in Dutch prompting me to click a link which would have given this other user complete access to my email and Google account. I don't speak Dutch so I used an online translator to check the message from Google. If I had been feeling tired or lazy, I might have clicked some of the links in the message to try and work out what it was about.&lt;br /&gt;&lt;br /&gt;Surely, correspondence from Google to its users should be in the language of the account holder, not the language of the account hijacker!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-3394219537934198526?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/3394219537934198526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=3394219537934198526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/3394219537934198526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/3394219537934198526'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/03/google-account-security.html' title='Google Account Security'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-2683195081627455025</id><published>2007-01-18T12:38:00.000Z</published><updated>2007-05-02T17:01:03.038+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>What the hell is a "Field Class"</title><content type='html'>So, I've been plotting the great escape from England since, well, about 10 minutes after I got here. Someone emailed me about a Job in Singapore with an investment bank and I got all excited. Earlier in the week I had a telephone interview at rise-and-shine 7 o'clock in the morning with the development manager of said investment bank and his big dot net question was "explain what a field class is". ?@!!!. I've never heard of it and I went with an admission of the same while suppressing the urge to try and sell a bag of blag.&lt;br /&gt;&lt;br /&gt;He was a friendly bloke and said that it was "a class that could not be inherited". I just mumbled a bit and we moved on. Today I got the dreaded we'll-keep-your-cv-on-file letter and decided to do some research on this bastard "field class" that actually is a type of goo that prevents you from leaving England as opposed to an uninheritable code block.&lt;br /&gt;&lt;br /&gt;The font of all knowledge that is Google, says a field class is many things but no reference to uninheritable code could I find. And since you've arrived at this post as a result of a Google search for the meaning of "field class" let me definitively explain, once and for all, that a field class is a very sticky goo that keeps you in England. Q.E.D.&lt;br /&gt;&lt;br /&gt;Update: thanks smartass, I now realise he was talking about a sealed class...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-2683195081627455025?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/2683195081627455025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=2683195081627455025' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/2683195081627455025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/2683195081627455025'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/01/what-hell-is-field-class.html' title='What the hell is a &quot;Field Class&quot;'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5845506119057732736.post-4165010525763802549</id><published>2007-01-17T15:54:00.000Z</published><updated>2007-01-17T16:40:45.256Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Esporta'/><category scheme='http://www.blogger.com/atom/ns#' term='sports clubs'/><category scheme='http://www.blogger.com/atom/ns#' term='Borg'/><category scheme='http://www.blogger.com/atom/ns#' term='assimilation'/><title type='text'>Contracts and Commitment</title><content type='html'>Are blogs places where you rant about your pet hates? No? Well, you know what really grinds my gears? I know you don't really want to know but I'll tell you anyway. Contracts. Long term commitments to pay money for something I don't really know if I'll want in a couple months time. I'm an impulsive character by nature and sooner or later any commitment I've made comes back to bite me in the rear.&lt;br /&gt;&lt;br /&gt;My mobile is pay and go. I don't want to be paying 35 quid a month to shout into an outdated brick that has the battery life of a celebrity marriage.&lt;br /&gt;&lt;br /&gt;In the UK there are some things you just can't have for love or money, without a contract. And at the top of the list is gym membership. Now who wants to be committed to that beyond January 5th? Nobody, that's who. Oh, and fit people. But I'm not nobody and I'm certainly not fit. So when my wife's sister said she'd take over my membership contract I was laughing all the way to the bank. I mean telephone. Only there are some contracts you can't get out of and you guessed it, my gym membership is one of those. I've decided that corporations who don't let me do what I want are victims of Borg assimilation. And since there's no recourse for someone who's put there name on a Borg contract, I resort to the last refuge of the consumer who screwed himself. Yes, complaining online, as &lt;a href="http://esportasucks.googlepages.com/"&gt;noisily as possible&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5845506119057732736-4165010525763802549?l=blog.thijssen.ch' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.thijssen.ch/feeds/4165010525763802549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5845506119057732736&amp;postID=4165010525763802549' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4165010525763802549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5845506119057732736/posts/default/4165010525763802549'/><link rel='alternate' type='text/html' href='http://blog.thijssen.ch/2007/01/contracts-and-commitment.html' title='Contracts and Commitment'/><author><name>Grenade</name><uri>http://www.blogger.com/profile/01929486695860749052</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/_Psti3TsSy9w/SR4QB66kyxI/AAAAAAAAGyA/7NBN3AuhCqM/S220/DSC_1755.JPG'/></author><thr:total>1</thr:total></entry></feed>
