<?xml version="1.0" encoding="UTF-8"?><feed
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:thr="http://purl.org/syndication/thread/1.0"
  xml:lang="en-US"
  xml:base="http://amadiere.com/blog/wp-atom.php"
   >
	<title type="text">Amadiere.com</title>
	<subtitle type="text">Blogging while collapsing through Meat Pie induced coding-fests...</subtitle>

	<updated>2011-08-30T21:42:45Z</updated>

	<link rel="alternate" type="text/html" href="http://amadiere.com/blog" />
	<id>http://amadiere.com/blog/feed/atom/</id>
	<link rel="self" type="application/atom+xml" href="http://amadiere.com/blog/feed/atom/" />

	<generator uri="http://wordpress.org/" version="3.8.1">WordPress</generator>
	<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[ASP.NET MVC 3: Drop Down Lists / SelectLists]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2011/08/asp-net-mvc-3-drop-down-lists-selectlists/" />
		<id>http://amadiere.com/blog/?p=354</id>
		<updated>2011-08-30T21:42:45Z</updated>
		<published>2011-08-30T21:42:45Z</published>
		<category scheme="http://amadiere.com/blog" term="JQuery" /><category scheme="http://amadiere.com/blog" term="MVC" /><category scheme="http://amadiere.com/blog" term="ASP.NET MVC" />		<summary type="html"><![CDATA[Some ASP.NET MVC 3 guidelines on how to use the SelectList with the Html.DropDownListFor(). Including an extra part on theming it using JQuery.UI.SelectMenu<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2011/06/unobtrusive-javascript-in-asp-net-mvc3-with-jquery/' rel='bookmark' title='Unobtrusive JavaScript in ASP.NET MVC3 with JQuery'>Unobtrusive JavaScript in ASP.NET MVC3 with JQuery</a> <small>I've recently experimented a little bit with some of the...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2011/08/asp-net-mvc-3-drop-down-lists-selectlists/"><![CDATA[<p>There are a number of very useful helpers that come as default with the ASP.NET MVC framework, but one that always seems to get people confused is the Html.DropDownListFor() helper method. So in this post, I&#8217;ll quickly go over the steps I use to populate the list, as well as some of the more funky features once it&#8217;s up and running!</p>
<p>In our example, there will simply be a single drop down list on a form that shows a list of countries, from which you can select and submit.</p>
<p>First, we need to build a view model that is going to be the contract that determines the data that the view can display.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> IndexViewModel
<span style="color: #008000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">// Stores the selected value from the drop down box.</span>
    <span style="color: #008000;">&#91;</span>Required<span style="color: #008000;">&#93;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">int</span> CountryID <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">get</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">set</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// Contains the list of countries.</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> SelectList Countries <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">get</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">set</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Once we&#8217;ve sorted that, we can create the action result methods for our index page.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> HomeController <span style="color: #008000;">:</span> Controller
<span style="color: #008000;">&#123;</span>
    <span style="color: #008000;">&#91;</span>HttpGet<span style="color: #008000;">&#93;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Index<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        IndexViewModel viewModel <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> IndexViewModel<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        viewModel<span style="color: #008000;">.</span><span style="color: #0000FF;">Countries</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SelectList<span style="color: #008000;">&#40;</span>GetCountries<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>, <span style="color: #666666;">&quot;ID&quot;</span>, <span style="color: #666666;">&quot;Name&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span>viewModel<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #008000;">&#91;</span>HttpPost<span style="color: #008000;">&#93;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Index<span style="color: #008000;">&#40;</span>IndexViewModel viewModel<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        viewModel<span style="color: #008000;">.</span><span style="color: #0000FF;">Countries</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SelectList<span style="color: #008000;">&#40;</span>GetCountries<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>, <span style="color: #666666;">&quot;ID&quot;</span>, <span style="color: #666666;">&quot;Name&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">!</span>ModelState<span style="color: #008000;">.</span><span style="color: #0000FF;">IsValid</span><span style="color: #008000;">&#41;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span>viewModel<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">//TODO: Do something with the selected country...</span>
        CMSService<span style="color: #008000;">.</span><span style="color: #0000FF;">UpdateCurrentLocation</span><span style="color: #008000;">&#40;</span>viewModel<span style="color: #008000;">.</span><span style="color: #0000FF;">CountryID</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span>viewModel<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>You&#8217;ll notice there are two instances where we populate the Countries property on the viewModel, one in the HttpGet method and the other in the HttpPost. We do this so that the list of countries is available throughout our process. You see, unlike the CountryID which is submitted as part of the Request object (it&#8217;s part of the form collection), our list is never stored &#8211; it&#8217;s lost as soon as the user navigates away from that page. So we need to repopulate it. In reality, you may only need to repopulate it when the validation fails an you have to redraw the screen in the HttpPost method, so that could be moved.</p>
<p>Then, it&#8217;s just a simple case of adding this to my view:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">@Html<span style="color: #008000;">.</span><span style="color: #0000FF;">DropDownListFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">CountryID</span>, Model<span style="color: #008000;">.</span><span style="color: #0000FF;">Countries</span><span style="color: #008000;">&#41;</span></pre></td></tr></table></div>

<p>Or you could forcably add a blank value to the top with some &#8220;please select me, pretty please&#8221;-type text. e.g.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">@Html<span style="color: #008000;">.</span><span style="color: #0000FF;">DropDownListFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">CountryID</span>, Model<span style="color: #008000;">.</span><span style="color: #0000FF;">Countries</span>, <span style="color: #666666;">&quot;- please select -&quot;</span><span style="color: #008000;">&#41;</span></pre></td></tr></table></div>

<p>And there you have it! A working drop down box using MVC 3 and Razor views.<br />
Now for some more fancy stuff. If you&#8217;re interested in styling your menu, then you can&#8217;t really go far wrong with<a href="http://github.com/fnagel/jquery-ui"> jQuery UI SelectMenu</a> (of which there are <a href="http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/">a few demos available, as well as a separate tutorial</a>). To set up, you only need to do a few things:</p>
<ul>
<li>Download JQuery &#038; JQueryUI and add to your solution. You can now do this step through NuGet, or manually by &#8220;Add Existing Item&#8221; and downloading from the respective site.</li>
<li>Add a reference to the .js and .css files to the header of your html header, often set by the _Layout.cshtml file. Something like the following:</li>
</ul>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html4strict" style="font-family:monospace;">   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>~<span style="color: #66cc66;">/</span><span style="color: #000066;">Content</span><span style="color: #66cc66;">/</span>themes<span style="color: #66cc66;">/</span>base<span style="color: #66cc66;">/</span>jquery.ui.all.css<span style="color: #ff0000;">&quot;)&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<ul>
<li>Download and add the SelectMenu .js and .css files in much the same way.</li>
</ul>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>~<span style="color: #66cc66;">/</span><span style="color: #000066;">Content</span><span style="color: #66cc66;">/</span>selectmenu.css<span style="color: #ff0000;">&quot;)&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>~<span style="color: #66cc66;">/</span>Scripts<span style="color: #66cc66;">/</span>selectmenu.js<span style="color: #ff0000;">&quot;)&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<ul>
<li>Then all that lies to do is to set it off going:</li>
</ul>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
   $('select').selectmenu();
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<p>The last bit we added there simply makes this apply for every single select box that is on the page. As an aside, when doing AJAX or JQuery where you may potentially add an additional drop down list, you will need to call <code>.selectmenu()</code> to ensure that your new box appears like the others. It&#8217;s also worth noting that you may find if your page isn&#8217;t a fast loader, the standard drop down box (unstyled) will appear for a brief period.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2011/06/unobtrusive-javascript-in-asp-net-mvc3-with-jquery/' rel='bookmark' title='Unobtrusive JavaScript in ASP.NET MVC3 with JQuery'>Unobtrusive JavaScript in ASP.NET MVC3 with JQuery</a> <small>I've recently experimented a little bit with some of the...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2011/08/asp-net-mvc-3-drop-down-lists-selectlists/#comments" thr:count="1"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2011/08/asp-net-mvc-3-drop-down-lists-selectlists/feed/atom/" thr:count="1"/>
		<thr:total>1</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Unobtrusive JavaScript in ASP.NET MVC3 with JQuery]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2011/06/unobtrusive-javascript-in-asp-net-mvc3-with-jquery/" />
		<id>http://amadiere.com/blog/?p=343</id>
		<updated>2011-06-20T20:45:10Z</updated>
		<published>2011-06-20T20:45:10Z</published>
		<category scheme="http://amadiere.com/blog" term="ASP.NET" /><category scheme="http://amadiere.com/blog" term="C#" /><category scheme="http://amadiere.com/blog" term="HTML" /><category scheme="http://amadiere.com/blog" term="JQuery" /><category scheme="http://amadiere.com/blog" term="MVC" /><category scheme="http://amadiere.com/blog" term="Ajax" /><category scheme="http://amadiere.com/blog" term="ASP.NET MVC" /><category scheme="http://amadiere.com/blog" term="JavaScript" /><category scheme="http://amadiere.com/blog" term="Unobtrusive" /><category scheme="http://amadiere.com/blog" term="Validate" />		<summary type="html"><![CDATA[I've recently experimented a little bit with some of the new unobtrusive JavaScript stuff that is now included as part of the default ASP.NET MVC 3 project template. While not an overly complex subject, it's been one of them plugins I wanted to have a dabble with, but I didn't quite find the time until now. And I must say, it was a lot easier to sort out than I thought it might be! <div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2011/08/asp-net-mvc-3-drop-down-lists-selectlists/' rel='bookmark' title='ASP.NET MVC 3: Drop Down Lists / SelectLists'>ASP.NET MVC 3: Drop Down Lists / SelectLists</a> <small>Some ASP.NET MVC 3 guidelines on how to use the...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2011/06/unobtrusive-javascript-in-asp-net-mvc3-with-jquery/"><![CDATA[<p>I&#8217;ve recently experimented a little bit with some of the new unobtrusive JavaScript stuff that is now included as part of the default ASP.NET MVC 3 project template. While not an overly complex subject, it&#8217;s been one of them plugins I wanted to have a dabble with, but I didn&#8217;t quite find the time until now. And I must say, it was a lot easier to sort out than I thought it might be! I should point out that although this is an ASP.NET MVC 3 example, the concepts and the fact that this is mostly just JQuery means that it&#8217;s not limited to that, earlier versions of ASP.NET MVC can use happily, as can WebForms, PHP, Ruby and even Classic ASP!</p>
<p>Some things we&#8217;ll try and do in this blog post:</p>
<ul>
<li>Setup a simple form with server-side validation of input fields which redirects to a &#8216;Success&#8217; page or re-renders the form depending on whether it was successful or not.</li>
<li>Add JQuery validation for simple client side validation to the form.</li>
<li>Add Unobtrusive JavaScript support which will submit the form via AJAX.</li>
</ul>
<p>Creating a basic application:</p>
<p>Firstly, I created a ASP.NET MVC 3 Web Application (Empty) in VS2010 and got to work updating the JavaScript libraries that were in it. This can be done via the NuGet Console, or by right clicking &#8220;References&#8221; in the Solution Explorer, &#8220;Add Library Reference&#8221; and then clicking the update side-tab. From there you can update all the default stuff.</p>
<p>Done that? Good. Next we&#8217;ll add a default controller, a view model to pass the data around &amp; two views (one for allowing us to edit the form and the other as a success page). It&#8217;s worth noting that I&#8217;m doing nothing that special on these and that I&#8217;m using the default _Layout.cshtml to apply the header and footer as it sees fit.</p>
<p>/Controllers/BlackCoffeeController.cs</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Web.Mvc</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">UnobtrusiveAjaxExample.ViewModels.BlackCoffee</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> UnobtrusiveAjaxExample<span style="color: #008000;">.</span><span style="color: #0000FF;">Controllers</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> BlackCoffeeController <span style="color: #008000;">:</span> Controller
    <span style="color: #008000;">&#123;</span>
        <span style="color: #008000;">&#91;</span>HttpGet<span style="color: #008000;">&#93;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Rocks<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            RocksViewModel viewModel <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RocksViewModel<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span>viewModel<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #008000;">&#91;</span>HttpPost<span style="color: #008000;">&#93;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Rocks<span style="color: #008000;">&#40;</span>RocksViewModel viewModel<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">!</span>ModelState<span style="color: #008000;">.</span><span style="color: #0000FF;">IsValid</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span>viewModel<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008080; font-style: italic;">// Do something Database-y here.</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Success&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>/ViewModels/BlackCoffee/RocksViewModel.cs</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.ComponentModel.DataAnnotations</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> UnobtrusiveAjaxExample<span style="color: #008000;">.</span><span style="color: #0000FF;">ViewModels</span><span style="color: #008000;">.</span><span style="color: #0000FF;">BlackCoffee</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> RocksViewModel
    <span style="color: #008000;">&#123;</span>
        <span style="color: #008000;">&#91;</span>Required<span style="color: #008000;">&#93;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Forename <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">get</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">set</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #008000;">&#91;</span>Required<span style="color: #008000;">&#93;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Surname <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">get</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">set</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #008000;">&#91;</span>Required<span style="color: #008000;">&#93;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Message <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">get</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">set</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Then the two views, firstly: /Views/BlackCoffee/Rocks.cshtml</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">@model UnobtrusiveAjaxExample<span style="color: #008000;">.</span><span style="color: #0000FF;">ViewModels</span><span style="color: #008000;">.</span><span style="color: #0000FF;">BlackCoffee</span><span style="color: #008000;">.</span><span style="color: #0000FF;">RocksViewModel</span>
&nbsp;
@<span style="color: #008000;">&#123;</span>
    ViewBag<span style="color: #008000;">.</span><span style="color: #0000FF;">Title</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Rocks&quot;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&lt;</span>h2<span style="color: #008000;">&gt;</span>Black Coffee Rocks<span style="color: #008000;">?&lt;/</span>h2<span style="color: #008000;">&gt;</span>
<span style="color: #008000;">&lt;</span>div id<span style="color: #008000;">=</span><span style="color: #666666;">&quot;content&quot;</span><span style="color: #008000;">&gt;</span>
@Html<span style="color: #008000;">.</span><span style="color: #0000FF;">ValidationSummary</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
@<span style="color: #0600FF; font-weight: bold;">using</span><span style="color: #008000;">&#40;</span>Html<span style="color: #008000;">.</span><span style="color: #0000FF;">BeginForm</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #008000;">&lt;</span>ul<span style="color: #008000;">&gt;</span>
	<span style="color: #008000;">&lt;</span>li<span style="color: #008000;">&gt;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">LabelFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Forename</span><span style="color: #008000;">&#41;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">EditorFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Forename</span><span style="color: #008000;">&#41;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">ValidationMessageFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Forename</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&lt;/</span>li<span style="color: #008000;">&gt;</span>
	<span style="color: #008000;">&lt;</span>li<span style="color: #008000;">&gt;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">LabelFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Surname</span><span style="color: #008000;">&#41;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">EditorFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Surname</span><span style="color: #008000;">&#41;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">ValidationMessageFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Surname</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&lt;/</span>li<span style="color: #008000;">&gt;</span>
	<span style="color: #008000;">&lt;</span>li<span style="color: #008000;">&gt;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">LabelFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">&#41;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">EditorFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">&#41;</span>
            @Html<span style="color: #008000;">.</span><span style="color: #0000FF;">ValidationMessageFor</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&lt;/</span>li<span style="color: #008000;">&gt;</span>
<span style="color: #008000;">&lt;/</span>ul<span style="color: #008000;">&gt;</span>
<span style="color: #008000;">&lt;</span>div<span style="color: #008000;">&gt;&lt;</span>input name<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Continue&quot;</span> type<span style="color: #008000;">=</span><span style="color: #666666;">&quot;submit&quot;</span> <span style="color: #0600FF; font-weight: bold;">value</span><span style="color: #008000;">=</span><span style="color: #666666;">&quot;Continue&quot;</span> <span style="color: #008000;">/&gt;&lt;/</span>div<span style="color: #008000;">&gt;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&lt;/</span>div<span style="color: #008000;">&gt;</span></pre></td></tr></table></div>

<p>And then /Views/BlackCoffee/Success.cshtml</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">@<span style="color: #008000;">&#123;</span>
    ViewBag<span style="color: #008000;">.</span><span style="color: #0000FF;">Title</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Success&quot;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&lt;</span>h2<span style="color: #008000;">&gt;</span>Success<span style="color: #008000;">&lt;/</span>h2<span style="color: #008000;">&gt;</span>
<span style="color: #008000;">&lt;</span>p<span style="color: #008000;">&gt;</span>Congratulations<span style="color: #008000;">!</span> You<span style="color: #666666;">'ve successfully declared BLack Coffee as being totally rockin'</span><span style="color: #008000;">!&lt;/</span>p<span style="color: #008000;">&gt;</span></pre></td></tr></table></div>

<p>At this point now, you should be able to build and run your application and navigate to /BlackCoffee/Rocks and verify that the page redraws the form unless all boxes are filled in. If you do fill them all in, you should get the success page.</p>
<p>Adding JQuery Validation with barely any effort for standard Data Annotations.</p>
<p>With certain DataAnnotations such as the [Required] attribute and [StringLength], you should be able to get simple JQuery client side checks, which while not a replacement for server side checks, add some speedy feedback which will be especially welcomed by users who find themselves struggling over long distance or slow connections. The key point to note here is that the checks are performed both sides (client and server) &#8211; so it doesn&#8217;t matter if the user has JavaScript disabled or is using a browser not capable of running it &#8211; the checks will still get done. It&#8217;s just an added bonus.</p>
<p>To do, simply add references to the JavaScript files to your html&#8217;s &lt;head&gt; tag. In this case, I&#8217;m going to add them directly to the _Layout.cshtml file.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>6
7
8
9
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">    &lt;script src=&quot;@Url.Content(&quot;~/Scripts/jquery-1.6.1.min.js&quot;)&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;@Url.Content(&quot;~/Scripts/jquery.validate.min.js&quot;)&quot; type=&quot;text/javascript&quot;&gt;&gt;&lt;/script&gt;
    &lt;script src=&quot;@Url.Content(&quot;~/Scripts/jquery.validate.unobtrusive.min.js&quot;)&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;@Url.Content(&quot;~/Scripts/jquery.unobtrusive-ajax.min.js&quot;)&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<p>You&#8217;ll spot that there are 4 included files there &#8211; the last one (the JQuery.unobtrusive-ajax.min.js) is for the next part &#8211; but we&#8217;ll put it in now in preparation.</p>
<p>You should find that the Web.Config file already has the following lines in already (specifically lines 10 &amp; 11), but have a gander for the following and if it doesn&#8217;t exist or is set different to this, update the file appropriately.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>8
9
10
11
12
</pre></td><td class="code"><pre class="cshtml" style="font-family:monospace;">&lt;appSettings&gt;
    &lt;add key=&quot;webpages:Version&quot; value=&quot;1.0.0.0&quot;/&gt;
    &lt;add key=&quot;ClientValidationEnabled&quot; value=&quot;true&quot;/&gt;
    &lt;add key=&quot;UnobtrusiveJavaScriptEnabled&quot; value=&quot;true&quot;/&gt;
&lt;/appSettings&gt;</pre></td></tr></table></div>

<p>We&#8217;re now cooking with gas! Save, Build and try out your application. You should be able to spot that when clicking your submit button, the page doesn&#8217;t go away to the server at all to check the field validates, it&#8217;s doing it on the client. Good stuff!</p>
<p>Adding Unobtrusive AJAX into the mix.</p>
<p>This should be a relatively easy process, but there are a few things we need to consider sorting out before we continue too much further:</p>
<ul>
<li>Update the views to make the Form work via AJAX (without breaking non-JavaScript/AJAX support)</li>
<li>Update the controller to detect whether the request is an AJAX request and if so, avoid sending the header / footer / other stuff back with it.</li>
</ul>
<p>The first part is quite simple. Within the Rocks.cshtml we created earlier which is our edit form view, we used the HtmlHelper class to create the form tag. All we need to do now is change that to use the AjaxHelper class and pass in some options and we&#8217;re off to a winner!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>10
</pre></td><td class="code"><pre class="cshtml" style="font-family:monospace;">@using(Ajax.BeginForm(new AjaxOptions() { HttpMethod = &quot;Post&quot;, UpdateTargetId = &quot;content&quot; }))</pre></td></tr></table></div>

<p>You should be able to see there that there is AjaxOptions class &#8220;newed up&#8221; directly in the view. If you&#8217;re uncomfortable with doing this, you could create it directly in the view model and pass it in from there. There are a ton of options that you can go into, most of which are touched upon <a href="http://bradwilson.typepad.com/blog/2010/10/mvc3-unobtrusive-ajax.html">on Brad Wilson&#8217;s blog post</a> on this subject (if you haven&#8217;t read <a href="http://bradwilson.typepad.com/blog/">Brad Wilson&#8217;s blog</a>, you probably should add it to your reader &#8211; it&#8217;s exceptional and includes a good chuck of stuff relating to ASP.NET MVC and related topics). You&#8217;ll also spot we provide a UpdateTargetId &#8211; this represents the HTML element into which all the view result is going to get dumped into. In this case, our DIV on our Rocks.cshtml page &#8211; but this could be anything and in fact nothing, if you don&#8217;t want to spew out content back to the user for whatever reason.</p>
<p>If you ran the application now, you&#8217;d find that all the AJAX and the JQuery would work great, but as part of the Ajax Request, the header and footer would be returned and very soon you&#8217;d end up with a webpage that looks like it&#8217;s been designed by someone who&#8217;s been watching Inception too much. This thankfully (or more specifically thanks to the ASP.NET team), isn&#8217;t a problem as we can do a little check before returning the view while in the appropriate controller method. Using the example above, you&#8217;d be able to change it to something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">        <span style="color: #008000;">&#91;</span>HttpPost<span style="color: #008000;">&#93;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Rocks<span style="color: #008000;">&#40;</span>RocksViewModel viewModel<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">!</span>ModelState<span style="color: #008000;">.</span><span style="color: #0000FF;">IsValid</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span>viewModel<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008080; font-style: italic;">// Do something Database-y here.</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>Request<span style="color: #008000;">.</span><span style="color: #0000FF;">IsAjaxRequest</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">return</span> PartialView<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Success&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Success&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>You&#8217;ll spot with this example we are returning exactly the same view. However, by returning it as a Partial view, we are ensuring it does not get rendered as part of a bigger page, so all of the headers / footers and other things included via layout pages are ignored.</p>
<p>Other things you can do to improve stuff:</p>
<p>There are a plenty of other very easy things you can add too, such as:</p>
<ul>
<li>Loading image: Simply provide it with a content div to display while loading (and a timeout if you want) and in will show() that while that particular AJAX call is made. Meaning that if you want to, you can lock the UI or provide visual feedback that the users request is currently in progress.</li>
<li>There are four callback methods you can set for OnBegin, OnSuccess, OnFailure and OnCompleted which will trigger as appropriate. This allows you to add all sorts of extra functionality to the application in those instances you want to do more than simply &#8220;add some HTML to a div&#8221;. However, two things to note regarding these function calls:
<ul>
<li>The functions you declare should <strong>not</strong> live inside of the JQuery document.ready() method or other shorthand notation for that. Just plain functions in a .js file is fine (though, you can of course, still use JQuery &#8211; that&#8217;s not a problem).</li>
<li>You might find that the $(this) object within the JavaScript is not populated by the time you get to the methods. You can solve this to some degree by changing the following line from:

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>244
</pre></td><td class="code"><pre class="js" style="font-family:monospace;">        options.data.push({ name: &quot;X-Requested-With&quot;, value: &quot;XMLHttpRequest&quot; });</pre></td></tr></table></div>

<p>to:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>244
245
</pre></td><td class="code"><pre class="js" style="font-family:monospace;">        options.data.push({ name: &quot;X-Requested-With&quot;, value: &quot;XMLHttpRequest&quot; });
        options.context = element;</pre></td></tr></table></div>

<p>If I&#8217;m honest, I don&#8217;t know why this line is missing from the file in the first place. I can&#8217;t imagine it&#8217;s just been forgotten as it seems like such a key thing to be able to trigger events based on the click events (especially on pages where there are lots of controls which may call the AJAX request). I suspect there is a good reason &#8211; but I don&#8217;t know it yet.</li>
</ul>
</li>
<li>You can use this on more than just &lt;form&gt; tags. For example, it&#8217;s just as easy to use the Ajax.ActionLink method which works in a very similar way and has some of your favourite overloads still available!</li>
<li>As mentioned at the top, this is mostly just JavaScript. If you wanted to do this with any other server side technology, all you&#8217;d need to do is replace the AjaxHelper methods with your own way of outputting the specific HTML &#8220;data-&#8221; based attributes and you&#8217;re up and running!</li>
</ul>
<p>The <a href="amadiere.com/downloads/UnobtrusiveAjaxExample.7z">full source code is available in a zip file here</a> &#8211; though, as you can see above &#8211; it&#8217;s not a great deal different to the bog standard project!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2011/08/asp-net-mvc-3-drop-down-lists-selectlists/' rel='bookmark' title='ASP.NET MVC 3: Drop Down Lists / SelectLists'>ASP.NET MVC 3: Drop Down Lists / SelectLists</a> <small>Some ASP.NET MVC 3 guidelines on how to use the...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2011/06/unobtrusive-javascript-in-asp-net-mvc3-with-jquery/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2011/06/unobtrusive-javascript-in-asp-net-mvc3-with-jquery/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[The 10 Best YouTube Video&#8217;s (Even Better Than That Other List You Read)]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2011/03/the-10-best-youtube-videos-even-better-than-that-other-list-you-read/" />
		<id>http://amadiere.com/blog/?p=339</id>
		<updated>2011-03-04T21:48:26Z</updated>
		<published>2011-03-04T21:48:26Z</published>
		<category scheme="http://amadiere.com/blog" term="Internet" /><category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[Right, I know you read about all these other lists of "top 10 videos ever" blah-blah! But seriously. They never seem to satisfy me. They always leave out the ones that I think were freakin' amazing. So, in true "OMG! Sum1 on the Intert00bs is wong!!one!"... here is my subtle attempt at bashing them.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2011/03/the-10-best-youtube-videos-even-better-than-that-other-list-you-read/"><![CDATA[<p>Right, I know you read about all these other lists of &#8220;top 10 videos ever&#8221; blah-blah! But seriously. They never seem to satisfy me. They always leave out the ones that I think were freakin&#8217; amazing. So, in true &#8220;OMG! Sum1 on the Intert00bs is wong!!one!&#8221;&#8230; here is my subtle attempt at bashing them.</p>
<p>Firstly, an honorable mention for <a href="http://www.youtube.com/watch?v=KmtzQCSh6xk">Numa Numa</a> &#8211;  a classic bizarre video from long before the realms of YouTube! Additionally &#8211; <a href="http://www.youtube.com/watch?v=_OBlgSz8sSM">Charlie</a> and <a href="http://www.youtube.com/watch?v=RxPZh4AnWyk">Susan Boyle</a> (both of the YouTube era), although not my favourites &#8211; do get a hat tip for being interesting for a watch at least once.</p>
<p>But now, in reverse order &#8211; the top 10!</p>
<h2>10 &#8211; <a href="http://www.youtube.com/watch?v=YQ4j-MBnLQo">Ring, Ring, Ring, Ring, Ring, Ring, Ring: Banana Phone!</a></h2>
<p>This is truely, truely the most frusting song on the internet. Once you&#8217;ve heard it, you cannot get it out of your head for the rest of the day.</p>
<h2>9 &#8211; <a href="http://www.youtube.com/watch?v=xFTT01Symx4">Mario A Capella</a></h2>
<p>A group effort showing a bunch of people singing the Super Mario tune, providing all the parts and the entertainment &#8211; with none of the expensive woodwind section</p>
<h2>8 &#8211; <a href="http://www.youtube.com/watch?v=LkCNJRfSZBU">Leeeeeeeroy Jeeeeenkins</a>!</h2>
<p>Ask any World Of Warcraft player if they have heard of Leeroy Jenkins and 99% will say yes. So utterly famous he appeared in a recent update and you can now get an in-game achievement with his name.</p>
<h2>7 &#8211; <a href="http://www.youtube.com/watch?v=EK2tWVj6lXw">Rick Rolling</a>!</h2>
<p>A meme of the most annoying type. Used normally to trick people into listening to it &#8211; I&#8217;m offering it to you this time with a warning: This video contains Rick Astley.</p>
<h2>6 &#8211; <a href="http://www.youtube.com/watch?v=5P6UU6m3cqk">Boo. Hahahahahaha! Baby</a></h2>
<p>This quite simply makes you smile and is one of the rare videos on the internet that doesn&#8217;t involve laughing at someone else&#8217;s expense.</p>
<h2>5 &#8211; <a href="http://www.youtube.com/watch?v=HPPj6viIBmU">Star Wars Kid</a></h2>
<p>The original is amazing! But then <a href="http://www.youtube.com/results?search_query=star+wars+kid&amp;aq=f">there are loads of follow ups</a> (particularly good is the <a href="http://www.youtube.com/watch?v=3GJOVPjhXMY">light saber adaption</a>). He became so famous that the Internet bought him a Macbook and Lucas Arts gave him a role in one of the Star Wars films. Epic!</p>
<h2>4 &#8211; <a href="http://www.youtube.com/watch?v=tgbNymZ7vqY">The Muppets: Bohemian Rhapsody</a></h2>
<p>If I&#8217;m not mistaken, the first full 1080P YouTube video (be sure to set it to HD before you watch!) &#8211; and it&#8217;s awesome. I&#8217;m a fan of the Muppet&#8217;s and Queen separately, so when this came out &#8211; my head exploded.</p>
<h2>3 &#8211; <a href="http://www.youtube.com/watch?v=4WgT9gy4zQA">The Ultimate Showdown (of Ultimate Destiny)</a></h2>
<p>From the era of Flash comes this bizarre storyline accompaniment to what appears to be a celebrity-apocalypse. Very fun and very tongue in cheek.</p>
<h2>2 &#8211; <a href="http://www.youtube.com/watch?v=RzToNo7A-94">Terry Tate: Office Quarterback</a></h2>
<p>Sensationally funny! I have long since campaigned to get a guy like this into every workplace. Up to yet, I&#8217;ve been 100% unsuccessful &#8211; but I have not given up hope!</p>
<h2><strong>1 &#8211; <a href="http://www.youtube.com/watch?v=dMH0bHeiRNg">The Evolution of Dance</a></strong></h2>
<p>This guy can SERIOUSLY dance. I don&#8217;t mean in a crappy Britain&#8217;s Got Talent kinda way! The best few minutes of your day &#8211; watch it! It&#8217;s the best video in the entire interwebs!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2011/03/the-10-best-youtube-videos-even-better-than-that-other-list-you-read/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2011/03/the-10-best-youtube-videos-even-better-than-that-other-list-you-read/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[C#.NET &amp; Classic ASP Password Hashing]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2011/02/c-net-classic-asp-password-hashing/" />
		<id>http://amadiere.com/blog/?p=327</id>
		<updated>2011-02-10T22:34:46Z</updated>
		<published>2011-02-10T21:02:25Z</published>
		<category scheme="http://amadiere.com/blog" term="ASP.NET" /><category scheme="http://amadiere.com/blog" term="C#" /><category scheme="http://amadiere.com/blog" term="Classic ASP" /><category scheme="http://amadiere.com/blog" term="Cryptography" /><category scheme="http://amadiere.com/blog" term="Security" /><category scheme="http://amadiere.com/blog" term="VBScript" />		<summary type="html"><![CDATA[One of the things I've recently been working on is a solution to allow both a .NET application and a legacy VBScript / Classic ASP to be able to validate a specific username / password combination, comparing two hashed passwords. In the process, I discovered (with the help of Google and StackOverflow) that accessing .NET objects from Classic ASP isn't really all that hard!<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2011/02/c-net-classic-asp-password-hashing/"><![CDATA[<p>One of the things I&#8217;ve recently been working on is a solution to allow both a .NET application and a legacy VBScript / Classic ASP to be able to validate a specific username / password combination, comparing two hashed passwords. In the process, I discovered (with the help of Google and StackOverflow) that accessing .NET objects from Classic ASP isn&#8217;t really all that hard! But to the issue at hand: Password Hashing! Sorting this out from the .NET side was relatively easy. For the purpose of this post, here is roughly what I have at the moment.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Security.Cryptography</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> Amadiere<span style="color: #008000;">.</span><span style="color: #0000FF;">Com</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Utilities</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">class</span> Cryptography
    <span style="color: #008000;">&#123;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// Encrypts a password based on the passed in Encryption method (SHA512Managed is a good starting</span>
        <span style="color: #008080; font-style: italic;">/// point if you don't know which to use).</span>
        <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;remarks&gt;</span>
        <span style="color: #008080; font-style: italic;">/// The passwordSalt parameter is required to ensure that rainbow tables cannot be used to</span>
        <span style="color: #008080; font-style: italic;">/// lookup all usernames if the salt is discovered. This salt is OK to store in the database,</span>
        <span style="color: #008080; font-style: italic;">/// along with the hashedPassword generated by this function.</span>
        <span style="color: #008080; font-style: italic;">/// &lt;/remarks&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;password&quot;&gt;The password to be encrypted.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;passwordSalt&quot;&gt;The individual grain of salt for that password.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;method&quot;&gt;The method by which to encrypt.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;returns&gt;An string representing the hashed password (88 characters long).&lt;/returns&gt;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">string</span> Hash<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> password, <span style="color: #6666cc; font-weight: bold;">string</span> passwordSalt, HashMethods method<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> siteWideSalt <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;THIS IS A SITE WIDE SALT, BUT COULD BE A GUID&quot;</span><span style="color: #008000;">;</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> encryptedPassword<span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">switch</span> <span style="color: #008000;">&#40;</span>method<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">default</span><span style="color: #008000;">:</span>
                    encryptedPassword <span style="color: #008000;">=</span> HashSHA512Managed<span style="color: #008000;">&#40;</span>siteWideSalt <span style="color: #008000;">+</span> password <span style="color: #008000;">+</span> passwordSalt<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    <span style="color: #0600FF; font-weight: bold;">break</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> encryptedPassword<span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// One-way encrypts the password into oblivion. If the same password and salt are provided, the</span>
        <span style="color: #008080; font-style: italic;">/// same end string will be churned out the other end of this sausage machine.</span>
        <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;see cref=&quot;http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha512managed.aspx&quot;/&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;example&gt;HashSHA512Managed(&quot;bobsYourUncle_SALT-GOES-HERE&quot;);&lt;/example&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;password&quot;&gt;Unencoded pre-salted password.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;returns&gt;An 88 character string, representing the originally encoded password.&lt;/returns&gt;</span>
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">string</span> HashSHA512Managed<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> saltedPassword<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            UnicodeEncoding uniEncode <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> UnicodeEncoding<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            SHA512Managed sha <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SHA512Managed<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #6666cc; font-weight: bold;">byte</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> bytePassword <span style="color: #008000;">=</span> uniEncode<span style="color: #008000;">.</span><span style="color: #0000FF;">GetBytes</span><span style="color: #008000;">&#40;</span>saltedPassword<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #6666cc; font-weight: bold;">byte</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> hash <span style="color: #008000;">=</span> sha<span style="color: #008000;">.</span><span style="color: #0000FF;">ComputeHash</span><span style="color: #008000;">&#40;</span>bytePassword<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> Convert<span style="color: #008000;">.</span><span style="color: #0000FF;">ToBase64String</span><span style="color: #008000;">&#40;</span>hash<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">enum</span> HashMethods
    <span style="color: #008000;">&#123;</span>
        SHA512
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>The Classic ASP side of things wasn&#8217;t as easy. There are no built in libraries for SHA512 (or in fact, many other password hashing algorithms). So I had a few options on how I was to proceed:</p>
<ul>
<li>Abandon my choice of SHA512 and go with MD5 where there seemed to be a bit more usage in the community. I was reluctant to do this because it isn&#8217;t as good as SHA512.</li>
<li>Copy some code sample that has been created by someone else, that I either have to accept is OK, or spend a good deal of time understanding it and breaking it down bit by bit.</li>
<li>Create a custom COM object in .NET, register it in the GAC and reference that via Classic ASP.</li>
<li>Access the .NET functions directly from Classic ASP.</li>
</ul>
<p>The last option won &#8211; because it worked, and because it meant a lot less maintenance and praying for things to keep working. This is the code that pretty much does the same as the above .NET code, but in VBScript.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #E56717; font-weight: bold;">Function</span> Hash(strPassword, strIndividualSalt)
&nbsp;
  Const strSiteWideSalt = <span style="color: #800000;">&quot;THIS IS A SITE WIDE SALT, BUT COULD BE A GUID&quot;</span>
  Hash = HashSHA512Managed(strSiteWideSalt &amp; strPassword &amp; strIndividualSalt)
&nbsp;
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Function</span>
&nbsp;
<span style="color: #E56717; font-weight: bold;">Function</span> HashSHA512Managed(saltedPassword)
&nbsp;
  <span style="color: #151B8D; font-weight: bold;">Dim</span> objMD5, objUTF8
  <span style="color: #151B8D; font-weight: bold;">Dim</span> arrByte
  <span style="color: #151B8D; font-weight: bold;">Dim</span> strHash
  <span style="color: #151B8D; font-weight: bold;">Set</span> objUnicode = <span style="color: #E56717; font-weight: bold;">CreateObject</span>(<span style="color: #800000;">&quot;System.Text.UnicodeEncoding&quot;</span>)
  <span style="color: #151B8D; font-weight: bold;">Set</span> objSHA512 = Server.<span style="color: #E56717; font-weight: bold;">CreateObject</span>(<span style="color: #800000;">&quot;System.Security.Cryptography.SHA512Managed&quot;</span>)
&nbsp;
  arrByte = objUnicode.GetBytes_4(saltedPassword)
  strHash = objSHA512.ComputeHash_2((arrByte))
&nbsp;
  HashSHA512Managed = ToBase64String(strHash)
&nbsp;
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Function</span>
&nbsp;
<span style="color: #E56717; font-weight: bold;">Function</span> ToBase64String(rabyt)
&nbsp;
  <span style="color: #008000;">'Ref: http://stackoverflow.com/questions/1118947/converting-binary-file-to-base64-string
</span>  <span style="color: #151B8D; font-weight: bold;">Dim</span> xml: <span style="color: #151B8D; font-weight: bold;">Set</span> xml = <span style="color: #E56717; font-weight: bold;">CreateObject</span>(<span style="color: #800000;">&quot;MSXML2.DOMDocument.3.0&quot;</span>)
  xml.LoadXml <span style="color: #800000;">&quot;&quot;</span>
  xml.documentElement.dataType = <span style="color: #800000;">&quot;bin.base64&quot;</span>
  xml.documentElement.nodeTypedValue = rabyt
  ToBase64String = Replace(xml.documentElement.Text,VbLf, <span style="color: #800000;">&quot;&quot;</span>)
&nbsp;
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Function</span></pre></td></tr></table></div>

<p>As you can see in the VBScript example, I can create the .NET objects as I would any other type of object in VBScript, the difference comes in how I use them. Normally, in C#, you&#8217;d simply use ComputeHash() and there would be a number of overloads for you to choose from. As VBScript doesn&#8217;t have the concept of overloading, you have to use a crazy-mad way of accessing the specific overload you want &#8211; using an underscore. I&#8217;ve not really come up with a full-proof way of working out which is which (though, if I&#8217;m honest, I didn&#8217;t try much). I did however find out that they started ComputeHash(), ComputeHash_1() and ComputeHash_2() &#8211; I assume the numbers resemble the order they appear in Visual Studio when using intellisense for C# &#8211; but trial and error is normally good enough.</p>
<p>Hope this is of use to someone else! If anything, I&#8217;m sure I&#8217;ll find a need to do this again someday and I&#8217;m sure it&#8217;ll be useful for then! All this hashing has made me hungry!</p>
<div style="width: 410px" class="wp-caption alignright"><a href="http://desarapen.blogspot.com/2008/07/frugal-fridays-corned-beef-hash.html"><img class="alignright" style="float: right; align: right; margin: 10px;" title="Corned Beef Hash" src="http://amadiere.com/images/blog/CornedBeefHash.jpg" alt="Hashing passwords is hard! Let's eat!" width="400" height="266" /></a><p class="wp-caption-text">Hashing passwords is hard! Let&#39;s eat!</p></div>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2011/02/c-net-classic-asp-password-hashing/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2011/02/c-net-classic-asp-password-hashing/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[OpenID is NOT an ex-parrot!]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/11/openid-is-not-an-ex-parrot/" />
		<id>http://amadiere.com/blog/?p=319</id>
		<updated>2010-11-20T14:13:14Z</updated>
		<published>2010-11-20T14:01:59Z</published>
		<category scheme="http://amadiere.com/blog" term="Human Factors" /><category scheme="http://amadiere.com/blog" term="Usability" /><category scheme="http://amadiere.com/blog" term="Websites" /><category scheme="http://amadiere.com/blog" term="Authentication" /><category scheme="http://amadiere.com/blog" term="OpenID" />		<summary type="html"><![CDATA[I&#8217;ve read a few Tweets recently that OpenID might be dead. Poppycock! OpenID is alive and kicking and as strong, if not stronger, than ever before. What is OpenID? OpenID is a means of identifying that someone who&#8217;s visiting your site is the same person as someone who&#8217;s already been here. The was traditionally with [&#8230;]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/11/openid-is-not-an-ex-parrot/"><![CDATA[<p>I&#8217;ve read a few Tweets recently that OpenID might be dead. Poppycock! OpenID is alive and kicking and as strong, if not stronger, than ever before.</p>
<p><img class="alignright" style="margin: 10px; float: right;" title="An ex-parrot." src="/images/blog/deadparrot.jpg" alt="An ex-parrot" width="299" height="213" /></p>
<p>What is OpenID? OpenID is a means of identifying that someone who&#8217;s visiting your site is the same person as someone who&#8217;s already been here. The was traditionally with Usernames and Passwords. If you successfully signed in, we assumed you were the same person. OpenID provides that level of authentication. It basically sends back a little message from the provider (e.g. Google) saying &#8220;Yo dude, not spoken in a while, but this customer you asked me about? Well it&#8217;s &lt;INSERTGUIDHERE&gt;. Just go ahead and log them straight in or create them a new account&#8221;. I now don&#8217;t need to store passwords as a website &#8211; this is great news!</p>
<p><a href="http://twitter.com/robconory">Rob Conory</a> (of <a href="http://www.tekpub.com">Tekpub</a>) recently wrote a very excellent article &#8220;<a title="Rob Conory's Open ID article" href="http://blog.wekeroad.com/thoughts/open-id-is-a-party-that-happened">Open ID Is A Nightmare</a>&#8221; in which he proceeds to outline his case for why OpenID is turning into a nightmare for him. It&#8217;s an entertainingly written article in Rob&#8217;s quirky style that outlines his viewpoints as both a developer <strong>and as a business owner</strong>. The latter point, as he goes on to say, is the key criteria in why he&#8217;s reached the point he&#8217;s at at the moment.</p>
<blockquote><p>A friend of mine was offering a ton of solutions to my Open ID woes over Skype the other day &#8211; insisting that it&#8217;s worth &#8220;investing in for the long run &#8211; the kinks will get worked out&#8221;. I sort of agree as a dev &#8211; as a business owner I couldn&#8217;t give a rat&#8217;s ass.</p></blockquote>
<p>He is smart guy and has a number of very relevant points that anyone considering using OpenID should be thinking about. He had a number of OpenID unrelated issues (<a href="https://rpxnow.com/">RPXNow</a> downtime), but they all contributed to the main gripe he had about things: <strong>customers were unable to get into his site, a site they&#8217;ve paid to get access to</strong>. This is a key point. People are PAYING to watch the content over at Tekpub and through no fault of his own, they were unable to get in. The problem is easily wafted away, waving your hands in the air and saying &#8220;this is a user problem!&#8221;. The user created an account and then forgot which provider they logged in with in the first place! What fools! Let us all gather around a camp fire, eat sausages and laugh at their pathetic attempts at life. Except &#8211; lets not forget Tekpub&#8217;s audience. It&#8217;s techies. It&#8217;s developers. It&#8217;s people like us. If WE are capable of getting confused and lost as to what is going on &#8211; then the anecdotal &#8221;mum&#8221; is going to struggle a hell of a lot more.</p>
<p>The bonus and one of the driving forces behind OpenID is the supposed &#8220;reduced friction&#8221; when creating an account with a site. As Rob points out, there is the issue because we can effectively get so little back from the OpenID Provider, that we&#8217;d be unable to dig out the account from the mass of other accounts with no additional data. The users account is effectively orphaned until they remember the provider they signed up with. Locked out and angry.</p>
<p>This debate took a whole other level of LOL when <a href="http://twitter.com/shanselman">Scott Hanselman</a> tweeted:</p>
<blockquote><p>Is OpenID dead? Poor usability to blame?</p></blockquote>
<p>For some bizarre reason, the Twittersphere decided that that was neither a question, but an official announcement from Microsoft that OpenID was about to fail. When in reality, it was in relation to Rob&#8217;s above post. Humourous to those unaffected, but I can imagine quite irritating and stressful to Scott.</p>
<p><strong>What is wrong with OpenID?</strong></p>
<p>OpenID is fantastic at doing what it&#8217;s does, but there is definitely room for improvement. Maybe not in OpenID itself, but in the way it is implemented. Some of the key things that I personally think developers need to consider when designing a login system that uses OpenID are:</p>
<ul>
<li><strong>Each Account should be able to have more than one Login method attached to it</strong>.<br />
This is something I think people have inherited from years gone by. Traditionally, an account has a Username and a password, and nowadays maybe an OpenID field too. In reality, the user should have the ability to add whatever authentication methods your site allows, to their account. A one-to-many relationship from Accounts to Logins. E.g. I might sign up with my Google account, then decide later that I want to create a Username and Password for whatever reason. Then a bit later, I spot you have Facebook Connect as an option &#8211; cool, I&#8217;ll attach my Facebook account to this site too. Now where am I? I have 3 ways of getting into my account. That&#8217;s great news &#8211; that&#8217;s a lot easier for me as as long as I guess one of them randomly when I&#8217;m prompted &#8211; I&#8217;m sorted.</li>
<li><strong>Upgraded accounts require more information.</strong><br />
The low barrier to entry should be set for standard users, but the minute you decide you want to upgrade them (make them a moderator or take payment for a service from them), you should require more information to make sure you can trace things when issues arise. Requiring this would have given Rob the facility to offer a &#8220;forgotten your password?&#8221; function on his login page that would solve the issue that paying customers couldn&#8217;t get in.</li>
<li><strong>The ability to merge accounts.<br />
</strong>Unfortunately, people have lots of different accounts around the internet. They will probably, as Rob did when trying to access StackOverflow, get into your site using the wrong one and in the process, create a brand new account. In theory, what they wanted to do was log in as the correct one and then maybe add this new provider to their list of available logins. This is a tricky problem to solve, but it&#8217;s doable. You want to offer the option for a user to merge their two accounts, copying whatever appropriate data to their primary account. If you can achieve this, then you&#8217;re giving the users the ability to solve their own problems &#8211; great! And even if they don&#8217;t, you have a nice UI for doing it on their behalf.</li>
<li><strong>&#8220;WTF does OpenID mean?&#8221;<br />
</strong>Seriously. I&#8217;m have no ready solution for this problem &#8211; but people don&#8217;t know what OpenID is and that&#8217;s because it&#8217;s techie. We probably need to drop the OpenID words from headings to merely part of the description for clarification, when displaying our Authentication Options. People should just be offered the choice of which site they want to authenticate via: Google, Yahoo!, Facebook or whatever. The issue still remains that people don&#8217;t exactly understand still what it means that they are being &#8220;authenticated by Facebook&#8221;. Half of them won&#8217;t care that they don&#8217;t know, but for the other half, you probably want to re-assure them of what it is that they are allowing you to do. I don&#8217;t want some random site I&#8217;ve just stumbled upon telling everyone on Facebook that I&#8217;ve done XYZ on website ABC. I think the OpenID selector is good &#8211; but is it perfect? Not really &#8211; it works for me and is very simple to use &#8211; but it doesn&#8217;t answer any questions you might have as a customer. As a developer, you need to do that. You need to ease their fears.</li>
</ul>
<p>If I was creating a site now, would I use OpenID? <strong>ABSO-FRICKIN&#8217;-LUTELY! </strong>It&#8217;s great and makes it so easy to actually log into to a site. If I can transfer that ease-of-access to the customer, while not freaking them out &#8211; then I&#8217;m onto a winner! Is OpenID an ex-parrot? Not at all &#8211; it&#8217;s here for the foreseeable future in my opinion. And that is a great thing!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/11/openid-is-not-an-ex-parrot/#comments" thr:count="2"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/11/openid-is-not-an-ex-parrot/feed/atom/" thr:count="2"/>
		<thr:total>2</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/11/htc-hd7-windows-phone-7-vs-apple-iphone-4-ios-4/" />
		<id>http://amadiere.com/blog/?p=312</id>
		<updated>2010-11-04T22:08:57Z</updated>
		<published>2010-11-04T22:08:57Z</published>
		<category scheme="http://amadiere.com/blog" term="Reviews" /><category scheme="http://amadiere.com/blog" term="Windows Phone 7" /><category scheme="http://amadiere.com/blog" term="HTC HD7" /><category scheme="http://amadiere.com/blog" term="iPhone" />		<summary type="html"><![CDATA[...when Microsoft announced that they would be launching themselves into the mobile phone operating systems market (and Windows Mobile 6.5 doesn't count as "being in the market - I'm sorry) and that I'd be able to write apps written in Silverlight and C# - I was sold. I had to get one of the devices. I whittled down the time to launch by drinking coffee and occasionally leaving the house. Eventually, I managed to get hold of a device and begin to use it. I thought I'd write my observations down for anyone interested to know how they both compare.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2010/08/windows-phone-7-getting-started-link-dump/' rel='bookmark' title='Windows Phone 7: Getting Started Link-dump'>Windows Phone 7: Getting Started Link-dump</a> <small>One of the things Microsoft will be hoping on is...</small></li>
<li><a href='http://amadiere.com/blog/2010/09/isolated-storage-on-windows-phone-7/' rel='bookmark' title='Isolated Storage on Windows Phone 7'>Isolated Storage on Windows Phone 7</a> <small>As Windows Phone 7 doesn't have an SQL Server edition...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/11/htc-hd7-windows-phone-7-vs-apple-iphone-4-ios-4/"><![CDATA[<p><img class="alignright" style="float: right;" title="HTC HD7" src="http://amadiere.com/images/blog/HTCHD7.jpg" alt="4.3inches of beauty" width="384" height="289" />I&#8217;ve been a fan of the iPhone since the 3G came out and it&#8217;s been the first phone that I&#8217;ve actually enjoyed using throughout its entire lifespan. Upgrading to the iPhone 4 was something of a massive upgrade at the time as well &#8211; the speed difference alone is outstanding when compared to the 2 year old 3G! However, the one thing that&#8217;s always bugged me was the fact I needed an MacBook to develop on it. I can&#8217;t afford one basically, so that means I can&#8217;t develop on their platform. Fair enough, it&#8217;s their call and I&#8217;m not overly worried about it for now. However, when Microsoft announced that they would be launching themselves into the mobile phone operating systems market (and Windows Mobile 6.5 doesn&#8217;t count as &#8220;being in the market &#8211; I&#8217;m sorry) and that I&#8217;d be able to write apps written in Silverlight and C# &#8211; I was sold. I had to get one of the devices. I whittled down the time to launch by drinking coffee and occasionally leaving the house. Eventually, I managed to get hold of a device and begin to use it. I thought I&#8217;d write my observations down for anyone interested to know how they both compare.</p>
<p><strong>Why did I get the HTC HD7:</strong></p>
<p>There were a number of reasons. Primarily because the 4.3inch screen is great (it still fits in my pocket just fine) and more importantly, it had 16Gb of space. With none of the WP7 devices offering SD Card readers at launch (in the same way iPhone&#8217;s do not), space was at a premium. Having been limited by the iPhone 3G 8Gb before, I wasn&#8217;t going to make the same mistake again quite so lightly. All the reviews I&#8217;d read had given the device good reviews and it seemed like one of the best devices that I could have got at launch time.</p>
<p><strong>How did they compare?</strong></p>
<p><strong>Screen Quality: </strong>You know, I really can&#8217;t find any differences between the two devices. Maybe it&#8217;s my untrained eyes, but the WP7 is definitely in the league with the iPhone 4 and it&#8217;s retina display. Touch wise, they both behave remarkably well and are extremely responsive. I haven&#8217;t found myself pressing harder because my gestures weren&#8217;t detected correctly.</p>
<p><strong>Sound Quality: </strong>I was surprised about this one and I never actually thought about it too much in the run up to buying it, but the quality of the audio produced by the HD7 far outstrips that of the iPhone 4. I listed to a bunch of my songs, including Bat Out Of Hell (which I&#8217;ve listed to on countless different formats) and the richness of the sound is amazing. Coupled with the good use of surround sound, the HD7 made for a great listening experience. I didn&#8217;t particularly like the earphones that came with it though, but then, the same can be said about the iPhone ones&#8230; so Meh.</p>
<p><strong>Maps: </strong>I think unfortunately, this might something odd with my location, but the HD7 picks up my location as 12 miles from where I&#8217;m actually sat. A touch inconvenient for a &#8220;where&#8217;s my nearest&#8221; feature. The Windows Phone 7 devices all use Bing maps and the iPhone uses Google maps. For the most part, they behave exactly as you&#8217;d expect them too and they are good for what they do. The iPhone really begins to excel again with it&#8217;s built-in street view.</p>
<p><strong>App Store: </strong>Unsurprising I guess that iPhone would win this battle &#8211; it&#8217;s had almost 2 years of a headstart on the Windows Phone 7 market and in that time has amassed a horde of really amazing apps. As for the Marketplace itself, I think neither really excels at helping users find the applications that they might like. Genius in the Apple AppStore has never really given me much luck, and while the Microsoft version is currently an easily navigated setup, I fear that once content begins to flood in, some of the ease-of-use will quickly wash away.</p>
<p><strong>App Development</strong><strong>: </strong>As an ASP.NET and C# developer I&#8217;m going to be bias on this one. But I do consider the platform to be a much more simplistic way to develop. The pain of Objective-C is that the developers must delve quite low to the OS, performing their own garbage collection and other similar tasks. Silverlight, which is used by Windows Phone 7, is a very different experience indeed and you can spend the time concentrating on your App. Visual Studio 2010 &#8211; it really is awesome and to be able to have a truly awesome free development environment cannot be under estimated. And while Microsoft is untested in this water, it&#8217;s Application Acceptance Guidelines appear to be a lot more black and white than Apple&#8217;s which are a notorious issue.</p>
<p><strong>Camera: </strong>To be honest, I&#8217;ve not really exausted the tests on the camera yet, but from what I can tell &#8211; the iPhone wins this battle. It&#8217;s HDR function is actually pretty nifty and as a result, the pictures seem to be some of the best I&#8217;ve seen from camera phones. The HD7 isn&#8217;t quite as good. Sure the pictures are ok, but inside, I&#8217;ve found things are a little grainier than the iPhone which has been frustrating.</p>
<p><strong>Web Browsing: </strong>The experience is quite similar between the two browsers. Certainly both are able to pinch and zoom and scroll and throw themselves around the pages without too much hassle. But I have found that currently, a lot of websites (including Google Reader for example) treat the HD7 as a primitive mobile browser and show it a very reduced and scaled down browser experience. This isn&#8217;t an issue with the phone and given time, I&#8217;m sure that Google will update their detection mechanisms and there will be fully fledged Smart Phone RSS reading. Other than that, I would say that I&#8217;m a little disappointed with the limitation of the favourites (there appears to be no way of organising the list) and more specifically at O2 for making Yahoo! the default search engine when typing into the browser address bar (an horrific pain in the posterior given that Yahoo! don&#8217;t detect that it&#8217;s a decent phone either!).</p>
<p><strong>Other things I&#8217;ve noticed about the HTC7:</strong></p>
<ul>
<li>The Calendar is great. In additon to putting things in your diary with alerts to remind you when they are about to happen &#8211; your events in general appear on your home screen, showing you today and tomorrow&#8217;s events. Giving me a fighting chance of remembering the cat&#8217;s vet appointment more than 15 minutes beforehand!</li>
<li>The ringtone&#8217;s couldn&#8217;t be changed, or at least, not that I could spot.</li>
<li>No iTunes means no stupid updates pestering me to install Safari or Mobile Me or other Apple products which I have absolutely no desire to use. iTunes is like the modern day equivalent of Real Player from a few years ago. Zune is a nice enough experience. I found being about to sync my phone with the music I wanted was a lot easier and less hassle than iTunes. The same with my Podcasts and Videos &#8211; a great step forward from the alternatives.</li>
<li>Facebook integrated with my contacts is fantastic &#8211; it makes the whole experience seemless. While I don&#8217;t frequent Facebook overly often, I have a good number of friends and with all this merged into my phone book, I can on a whim simply write on their wall as easily as sending them a text. You can of course, take the alternative route and only import Facebook contact information for the people you already have Contacts for &#8211; which might tickle the fancy of more people.</li>
<li>The context search is useful. One of the three touch buttons at the foot of the phone (&#8220;Back&#8221; and &#8220;Home&#8221; being the other two) is for search and depending on what you are doing at the time, it searches different things. E.g. when in your People Hub (phone book) is searches for a contact, or when in the browser, it searches the web. Useful.</li>
</ul>
<p><strong>Summary</strong>:</p>
<p>The bottom line is that currently, I&#8217;m missing all the Apps that I had on my iPhone. Plain and simple. For that reason alone, the Windows Phone 7 is second favourite at the moment. But as this is something that I imagine will change in time, I do think that the phone will get better and better. And I for one, am really looking forward to seeing if Microsoft can whip Android into a real challenge to the iPhone and more importantly, challenge the iPhone itself! More competition in a marketplace is often a great thing &#8211; and I that&#8217;ll be true here.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2010/08/windows-phone-7-getting-started-link-dump/' rel='bookmark' title='Windows Phone 7: Getting Started Link-dump'>Windows Phone 7: Getting Started Link-dump</a> <small>One of the things Microsoft will be hoping on is...</small></li>
<li><a href='http://amadiere.com/blog/2010/09/isolated-storage-on-windows-phone-7/' rel='bookmark' title='Isolated Storage on Windows Phone 7'>Isolated Storage on Windows Phone 7</a> <small>As Windows Phone 7 doesn't have an SQL Server edition...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/11/htc-hd7-windows-phone-7-vs-apple-iphone-4-ios-4/#comments" thr:count="3"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/11/htc-hd7-windows-phone-7-vs-apple-iphone-4-ios-4/feed/atom/" thr:count="3"/>
		<thr:total>3</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[The Anti-Phonetic Alphabet]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/10/non-phonetic-alphabet/" />
		<id>http://amadiere.com/blog/?p=286</id>
		<updated>2010-10-15T20:50:35Z</updated>
		<published>2010-10-15T20:45:44Z</published>
		<category scheme="http://amadiere.com/blog" term="Random Topics" />		<summary type="html"><![CDATA[Long has the phonetic alphabet enjoyed dominance over the 'can you spell that for me' market! Well, no more! The following is my suggestion to make telephone operators lives complete hell...!<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/10/non-phonetic-alphabet/"><![CDATA[<p>This is my first post since a change of job for me, but it&#8217;s one that&#8217;s been brewing for a while.</p>
<p>Long has the phonetic alphabet enjoyed dominance over the &#8216;can you spell that for me&#8217; market! Well, no more! The following is my suggestion to make telephone operators lives complete hell&#8230;! If you&#8217;re not paying for the bill and you don&#8217;t fancy being nice to the operator on the phone for whatever reason, then consider making the conversation very complicated and interesting with the new Anti-Phonetic alphabet.</p>
<p>Before we dive right in, I&#8217;d like to make two points:</p>
<p>1) Phonetic is an silly word as it&#8217;s not spelt the way it&#8217;s spoken and could quite easily have been in this list. The person who came up with the spelling had as much of a sense of humour as the person who decided to put an S in &#8220;Lisp&#8221;.</p>
<p>2) Not all letters in this list are idea. I&#8217;ve marked with an asterisk (*) the ones I feel could be improved and I&#8217;ve filled them with example words which are probably adequate for causing confusion.</p>
<ul>
<li><strong>A</strong>ubergine</li>
<li><strong>B</strong>dellium</li>
<li><strong>C</strong>ygnet</li>
<li><strong>D</strong>jinn</li>
<li><strong>E</strong>we</li>
<li><strong>F</strong>ort *</li>
<li><strong>G</strong>nome</li>
<li><strong>H</strong>onour</li>
<li><strong>I</strong>gor</li>
<li><strong>J</strong>alapeno</li>
<li><strong>K</strong>not</li>
<li><strong>L</strong>landudno</li>
<li><strong>M</strong>nemonic</li>
<li><strong>N</strong>guyen</li>
<li><strong>O</strong>uija</li>
<li><strong>P</strong>terodactyl</li>
<li><strong>Q</strong>uay</li>
<li><strong>R</strong>ight *</li>
<li><strong>S</strong>ee</li>
<li><strong>T</strong>sunami</li>
<li><strong>U</strong>rn</li>
<li><strong>V</strong>entripotent *</li>
<li><strong>W</strong>hy</li>
<li><strong>X</strong>enophobia</li>
<li><strong>Y</strong>ou</li>
<li><strong>Z</strong>enzizenzizenzic</li>
</ul>
<p>Make sure you have a nosey at the words if you don&#8217;t know what they mean, or even, how to pronounce them. Go forth and cause chaos! Muhahahaha!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/10/non-phonetic-alphabet/#comments" thr:count="1"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/10/non-phonetic-alphabet/feed/atom/" thr:count="1"/>
		<thr:total>1</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Isolated Storage on Windows Phone 7]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/09/isolated-storage-on-windows-phone-7/" />
		<id>http://amadiere.com/blog/?p=302</id>
		<updated>2010-09-10T20:30:09Z</updated>
		<published>2010-09-10T20:30:09Z</published>
		<category scheme="http://amadiere.com/blog" term="C#" /><category scheme="http://amadiere.com/blog" term="Databases" /><category scheme="http://amadiere.com/blog" term="Windows Phone 7" /><category scheme="http://amadiere.com/blog" term="Mobiles" />		<summary type="html"><![CDATA[As Windows Phone 7 doesn't have an SQL Server edition available for use, and that some of the community libraries are quite big for most scenarios, I set about creating my own simplistic class that would allow me to persist data to the on-device Isolated Storage...<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2010/08/windows-phone-7-getting-started-link-dump/' rel='bookmark' title='Windows Phone 7: Getting Started Link-dump'>Windows Phone 7: Getting Started Link-dump</a> <small>One of the things Microsoft will be hoping on is...</small></li>
<li><a href='http://amadiere.com/blog/2010/11/htc-hd7-windows-phone-7-vs-apple-iphone-4-ios-4/' rel='bookmark' title='HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)'>HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)</a> <small>...when Microsoft announced that they would be launching themselves into...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/09/isolated-storage-on-windows-phone-7/"><![CDATA[<p>One of the most amazing omissions from the Windows Phone 7 OS is an SQL Server of some description that applications can use (I think there is a SQL Server Compact edition baked into the build, but it&#8217;s only exposed to the native apps). This leaves anyone familiar with doing all their storage via relational databases in a bit of a lurch.</p>
<p>Having a look around, there were a few work-arounds, namely third party libraries such as Perst &amp; Sterling. These act as a layer of abstraction that allow you to use LINQ to access your objects and could be of benefit for some of the more complex applications. I found both of them to have their drawbacks.</p>
<p><strong><a title="Perst" href="http://www.mcobject.com/perst">Perst</a></strong><strong>: </strong>From McObject is one alternative, but if you plan on doing a commercial application, you should bare in mind their licensing, of which, their FAQ says:</p>
<blockquote><p>No, Perst is not free. McObject Perst is available under a dual license. Under the GPL, you may evaluate the source code free of charge and you may use Perst free of charge in an application for which the source code is also freely available. If you wish to use a Perst in an application but do not or cannot redistribute your application source code, you can use Perst under a commercial license.</p></blockquote>
<p><strong><a href="http://sterling.codeplex.com/documentation">Sterling</a></strong><strong>: </strong>This seemed promising, but I had a number of issues getting the code to work (it was late, in fairness) I decided to give up.</p>
<p>In reality though, most applications that are going to be made don&#8217;t need any complicated database structure behind them. Database implementations are most likely going to be overkill. This is where I decided to do what probably the majority of WP7 developers have decided to do, and &#8220;Roll-Their-Own&#8221; database solution. Mine is based on a general accepted practice, using XML Serialisation to store my POCOs. While it might have limitations and performance issues later down the line, for now &#8211; it&#8217;s performing very admirably and there seemed no point in premature optimisation just yet.</p>
<p><strong>My Solution</strong></p>
<p>The main class I created (<strong>MyDataContext.cs</strong>) contains the functions for both saving and loading the data, as well as the &#8216;schema&#8217; for the entire database.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">IsolatedExampleApp.Data.Models</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.IO.IsolatedStorage</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.IO</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Xml.Serialization</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> IsolatedExampleApp<span style="color: #008000;">.</span><span style="color: #0000FF;">Data</span>
<span style="color: #008000;">&#123;</span>
  <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> IsolatedDatabase
  <span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> IsolatedDatabase<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
      <span style="color: #008080; font-style: italic;">// For each model that is a list item, you need to add a initialising statement to the Constructor</span>
      Albums <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
      Artists <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// These properties effectively form the publicly viewable schema of the database.</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> List Albums <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">get</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">set</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> List Artists <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">get</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">set</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> Options Options <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">get</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">set</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> Load<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
      <span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008000;">&#40;</span>IsolatedStorageFile store <span style="color: #008000;">=</span> IsolatedStorageFile<span style="color: #008000;">.</span><span style="color: #0000FF;">GetUserStoreForApplication</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
      <span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008000;">&#40;</span>IsolatedStorageFileStream stream <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> IsolatedStorageFileStream<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;IsolatedExampleApp.txt&quot;</span>, FileMode<span style="color: #008000;">.</span><span style="color: #0000FF;">OpenOrCreate</span>, FileAccess<span style="color: #008000;">.</span><span style="color: #0000FF;">Read</span>, store<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
      <span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008000;">&#40;</span>StreamReader reader <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> StreamReader<span style="color: #008000;">&#40;</span>stream<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
        XmlSerializer serializer <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> XmlSerializer<span style="color: #008000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>IsolatedDatabase<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">var</span> unserialized <span style="color: #008000;">=</span> reader<span style="color: #008000;">.</span><span style="color: #0000FF;">EndOfStream</span> <span style="color: #008000;">?</span> <span style="color: #008000;">new</span> IsolatedDatabase<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">:</span> <span style="color: #008000;">&#40;</span>IsolatedDatabase<span style="color: #008000;">&#41;</span>serializer<span style="color: #008000;">.</span><span style="color: #0000FF;">Deserialize</span><span style="color: #008000;">&#40;</span>reader<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">// Each schema is repopulated with information when the app is loaded.</span>
        Albums <span style="color: #008000;">=</span> unserialized<span style="color: #008000;">.</span><span style="color: #0000FF;">Albums</span><span style="color: #008000;">;</span>
        Artists <span style="color: #008000;">=</span> unserialized<span style="color: #008000;">.</span><span style="color: #0000FF;">Artists</span><span style="color: #008000;">;</span>
        Options <span style="color: #008000;">=</span> unserialized<span style="color: #008000;">.</span><span style="color: #0000FF;">Options</span><span style="color: #008000;">;</span>
      <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">bool</span> Save<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
      <span style="color: #0600FF; font-weight: bold;">try</span>
      <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008000;">&#40;</span>IsolatedStorageFile store <span style="color: #008000;">=</span> IsolatedStorageFile<span style="color: #008000;">.</span><span style="color: #0000FF;">GetUserStoreForApplication</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008000;">&#40;</span>IsolatedStorageFileStream stream <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> IsolatedStorageFileStream<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;IsolatedExampleApp.txt&quot;</span>, FileMode<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span>, FileAccess<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span>, store<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
          XmlSerializer serializer <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> XmlSerializer<span style="color: #008000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>IsolatedDatabase<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
          serializer<span style="color: #008000;">.</span><span style="color: #0000FF;">Serialize</span><span style="color: #008000;">&#40;</span>stream, <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span>
      <span style="color: #008000;">&#125;</span>
      <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span>Exception ex<span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span>
      <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
  <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>As you can see from the code above, as you develop more data stores, the code needs updating in multiple locations.</p>
<ul>
<li>Properties need setting for each one (they are the publicly available access points for the data).</li>
<li>Any LISTS&lt;&gt; require their lists initialised by the Constructor method.</li>
<li>When the data is &#8216;Load()&#8217;ed, each property must have it&#8217;s values manually set.</li>
<li>All the Models still need defining elsewhere in your application (in my example above, they are in the IsolatedExampleApp.Data.Models namespace.</li>
</ul>
<p>If you can overlook this repeated typing, then this seems to be a good starting point for persisting data in your Windows Phone 7 Application. To use it should then be fairly straight forward.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">_db <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> IsolatedDatabase<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
_db<span style="color: #008000;">.</span><span style="color: #0000FF;">Load</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Adding an album...</span>
_db<span style="color: #008000;">.</span><span style="color: #0000FF;">Albums</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Add</span><span style="color: #008000;">&#40;</span>newAlbum<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
_db<span style="color: #008000;">.</span><span style="color: #0000FF;">Save</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Deleting an album...</span>
_db<span style="color: #008000;">.</span><span style="color: #0000FF;">Albums</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Remove</span><span style="color: #008000;">&#40;</span>deleteAlbum<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
_db<span style="color: #008000;">.</span><span style="color: #0000FF;">Save</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Add or Update an album...</span>
Album existingAlbum <span style="color: #008000;">=</span> _db<span style="color: #008000;">.</span><span style="color: #0000FF;">Albums</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Where</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">ID</span> <span style="color: #008000;">==</span> album<span style="color: #008000;">.</span><span style="color: #0000FF;">ID</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FirstOrDefault</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>existingAlbum <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
  Delete<span style="color: #008000;">&#40;</span>existingAlbum<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #0600FF; font-weight: bold;">Add</span><span style="color: #008000;">&#40;</span>album<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
_db<span style="color: #008000;">.</span><span style="color: #0000FF;">Save</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Or just getting a specific album...</span>
IEnumerable albums <span style="color: #008000;">=</span> _db<span style="color: #008000;">.</span><span style="color: #0000FF;">Albums</span> <span style="color: #0600FF; font-weight: bold;">as</span> IEnumerable<span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">return</span> albums<span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Where</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">ID</span> <span style="color: #008000;">==</span> id<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FirstOrDefault</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>Any feedback, thoughts, options and optimisations for the above code will be well received. Happy isolating!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2010/08/windows-phone-7-getting-started-link-dump/' rel='bookmark' title='Windows Phone 7: Getting Started Link-dump'>Windows Phone 7: Getting Started Link-dump</a> <small>One of the things Microsoft will be hoping on is...</small></li>
<li><a href='http://amadiere.com/blog/2010/11/htc-hd7-windows-phone-7-vs-apple-iphone-4-ios-4/' rel='bookmark' title='HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)'>HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)</a> <small>...when Microsoft announced that they would be launching themselves into...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/09/isolated-storage-on-windows-phone-7/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/09/isolated-storage-on-windows-phone-7/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Windows Phone 7: Getting Started Link-dump]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/08/windows-phone-7-getting-started-link-dump/" />
		<id>http://amadiere.com/blog/?p=294</id>
		<updated>2010-08-30T16:25:23Z</updated>
		<published>2010-08-30T16:25:23Z</published>
		<category scheme="http://amadiere.com/blog" term="Windows Phone 7" />		<summary type="html"><![CDATA[One of the things Microsoft will be hoping on is a massive uptake of application developers, and to try and encourage that they've released and helped circulate a bunch of things to the community! This post hopes to point to some of the articles, videos, blogs and other sites by both Microsoft and others to help you learn and get started with WP7.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2010/11/htc-hd7-windows-phone-7-vs-apple-iphone-4-ios-4/' rel='bookmark' title='HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)'>HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)</a> <small>...when Microsoft announced that they would be launching themselves into...</small></li>
<li><a href='http://amadiere.com/blog/2010/09/isolated-storage-on-windows-phone-7/' rel='bookmark' title='Isolated Storage on Windows Phone 7'>Isolated Storage on Windows Phone 7</a> <small>As Windows Phone 7 doesn't have an SQL Server edition...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/08/windows-phone-7-getting-started-link-dump/"><![CDATA[<p><img class="alignright" title="Windows Phone 7" src="http://amadiere.com/images/blog/windows-phone-7.jpg" alt="Windows Phone 7" width="200" />As you&#8217;re probably aware, Microsoft is finally going to attempt to enter the Smart Phone OS market with it&#8217;s new Windows Phone 7 operating system /platform / ecosystem. It&#8217;s going to have a hard time getting started (Android and particularly the iPhone OS have a gigantic lead and devoted user-base), but I think it has a good chance. Looking at some of the reviews of the hardware and it&#8217;s performance with the new OS, things are looking promising for the big M, if that is, they can pull off the marketing and get enough hardware vendors on-board.</p>
<p>One of the things Microsoft will be hoping on is a massive uptake of application developers, and to try and encourage that they&#8217;ve released and helped circulate a bunch of things to the community! This post hopes to point to some of the articles, videos, blogs and other sites by both Microsoft and others to help you learn and get started with WP7.</p>
<p>Obviously, before you get started, you want to download the various <strong>developer tools</strong>. They are currently in <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c8496c2a-54d9-4b11-9491-a1bfaf32f2e3&amp;displaylang=en">Beta and downloadable here</a>. It&#8217;s been announced that the full non-Beta set of tools on the <strong>16 September 2010</strong>. The tools are free &#8211; the only bit you pay for is a subscription that allows you to post applications to the Marketplace. That&#8217;s currently being listed as £67 GBP</p>
<p><strong>Links:</strong></p>
<ul>
<li><a href="http://windowsteamblog.com/windows_phone/b/wpdev/">Windows Phone 7 Developer Blog</a> &#8211; very useful for keeping up to date with the releases and anything other major happening for the platform.</li>
<li><a href="http://developer.windowsphone.com/">Windows Phone 7 Developer Portal</a> (<a href="http://developer.windowsphone.com/">developer.windowsphone.com</a>) &#8211; another good site for finding videos and other related training materials.</li>
<li>Promotional website for consumers appears to be at <a href="http://www.microsoft.com/windowsmobile/en-gb/default.mspx">Microsoft/WindowsPhone</a>.</li>
<li>Scott Hanselman&#8217;s &#8220;<a href="http://vimeo.com/13727802">Walkthrough of the Developer Phone</a>&#8221; shows some of features of the phone after getting one of the preview devices.</li>
<li>Detailed <a href="http://www.engadget.com/2010/07/19/windows-phone-7-in-depth-preview/">review from Engadget.com on a Samsung device using Windows Phone 7</a> &#8211; very promising outcome, marred only by a few minor let downs (basically, the absence of Multi-tasking and Cut-and-Paste).</li>
</ul>
<p><strong>Videos &amp; Labs</strong></p>
<ul>
<li><a href="http://channel9.msdn.com/learn/courses/WP7TrainingKit/WP7GettingStarted/HelloPhoneWP7Lab/">Hello Windows Phone 7</a>! the obligatory &#8220;Hello World!&#8221; application.</li>
<li>Microsoft&#8217;s Channel 9 has a great series hosted by Andy Wigley and <a href="http://www.robmiles.com">Rob Miles</a> called &#8220;<a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-1-of-12-Introduction/">Jump Start</a>&#8220;. If you like video tutorials and talk through&#8217;s, this is a great starting point. There are som<a href="http://borntolearn.mslearn.net/wp7/m/classresources/default.aspx">e resources available for download</a> as well to help you along the way. As far as things go, I can&#8217;t recommend this enough. It&#8217;s a great set of tutorials that seems to cover a wide area of the platform without going into great amounts of detail about each bit, choosing (wisely) to only wiz along the surface. All the videos are downloadable in a number of formats, including the useful MP4 for sticking on your iPhone (until such a time as you can get your mits on a Windows Phone 7 device of course!):
<ol>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-1-of-12-Introduction/">Introduction</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-2-of-12-Building-a-Silverlight-Application-Part-1/">Building a Silverlight Application (Part 1)</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-3-of-12-Building-a-Silverlight-Application-Part-2/">Building a Silverlight Application (Part 2)</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-4-of-12-Building-Games-for-the-Windows-Phone-7-Platform/">Building Games for the Windows Phone 7 Platform</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-5-of-12-Building-XNA-Games-for-the-Windows-Phone-7-Platform-Part-/">Building XNA Games for the Windows Phone 7 Platform (Part 1)</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-6-of-12-Building-XNA-Games-for-the-Windows-Phone-7-Platform-Part-/">Building XNA Games for the Windows Phone 7 Platform (Part 2)</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-7-of-12-Advanced-Application-Development-Part-1/">Advanced Application Development (Part 1)</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-8-of-12-Advanced-Application-Development-Part-2/">Advanced Application Development (Part 2)</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-9-of-12-Advanced-Application-Development-Part-3/">Advanced Application Development (Part 3)</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-10-of-12-Marketing-Your-Windows-Phone-7-Application/">Marketing Your Windows Phone 7 Application</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-11-of-12-Working-with-Media/">Working With Media</a></li>
<li><a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-12-of-12-Final-Silverlight-Topics-and-Wrap-Up/">Final Silverlight Topics and Wrap-up</a></li>
</ol>
</li>
<li><a href="http://channel9.msdn.com/learn/courses/WP7TrainingKit/">Windows Phone 7 Developer Training Kit</a> &#8211; a bunch of labs and tutorials, maybe not as good as the Jump Start stuff, but still good and varied enough to give you a nice overview of all the features <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </li>
<li>Coding 4 Fun: <a href="http://blogs.msdn.com/b/coding4fun/archive/2010/06/15/10025512.aspx">Building a &#8220;Shuffleboard&#8221; application using Silverlight</a></li>
<li>MSDev.com has a bucket full of bitesize videos in a collection named &#8220;<a href="http://www.msdev.com/Directory/SeriesDescription.aspx?CourseId=158">Windows Phone 7 in 7 Minutes</a>&#8220;</li>
</ul>
<p>More resources:</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=3a8636bf-185f-449a-a0ce-83502b9ec0ec">Creating High Performance Silverlight Applications for Windows Phone</a></li>
<li><a href="http://www.microsoft.com/downloads/info.aspx?na=47&amp;p=1&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=3a8636bf-185f-449a-a0ce-83502b9ec0ec&amp;u=details.aspx%3ffamilyid%3d369B20F7-9D30-4CFF-8A1B-F80901B2DA93%26displaylang%3den">Application Bar Icons for Windows Phone 7</a> &#8211; a bunch of useful icon&#8217;s that you may want to use in your application.</li>
<li><a href="http://www.microsoft.com/downloads/info.aspx?na=40&amp;p=2&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=369b20f7-9d30-4cff-8a1b-f80901b2da93&amp;u=http%3a%2f%2fgo.microsoft.com%2f%3flinkid%3d9713252">UI Design and Interaction Guide</a></li>
<li>Again, Scott Hanselman, this time on his great Hanselminute&#8217;s Podcast he covers <a href="http://www.hanselman.com/blog/HanselminutesPodcast228PerformanceOfSilverlightOnWindowsPhone7.aspx">Silverlight performance on Windows Phone 7</a></li>
<li><a href="http://www.jeff.wilcox.name/2010/08/looking-ahead-at-panorama-and-pivot/">Panorama &amp; Pivot are coming soon</a>, more information is available from Jeff Wilcox.</li>
<li>With the absence of SQL on the Windows Phone 7 (at least initially), there is a market for some free libraries to make relational data management considerably easier. So far, two of the better ones are <a href="http://sterling.codeplex.com/documentation">Sterling</a> and <a href="http://mobileworld.appamundi.com/blogs/andywigley/archive/2010/06/07/perst-a-database-for-windows-phone-7-silverlight.aspx">Perst</a></li>
</ul>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2010/11/htc-hd7-windows-phone-7-vs-apple-iphone-4-ios-4/' rel='bookmark' title='HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)'>HTC HD7 (Windows Phone 7) vs Apple iPhone 4 (iOS 4)</a> <small>...when Microsoft announced that they would be launching themselves into...</small></li>
<li><a href='http://amadiere.com/blog/2010/09/isolated-storage-on-windows-phone-7/' rel='bookmark' title='Isolated Storage on Windows Phone 7'>Isolated Storage on Windows Phone 7</a> <small>As Windows Phone 7 doesn't have an SQL Server edition...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/08/windows-phone-7-getting-started-link-dump/#comments" thr:count="2"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/08/windows-phone-7-getting-started-link-dump/feed/atom/" thr:count="2"/>
		<thr:total>2</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Development SMTP Servers for IIS7.5 on Windows 7]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/04/development-smtp-servers-for-iis7-5-on-windows-7/" />
		<id>http://amadiere.com/blog/?p=288</id>
		<updated>2010-04-06T14:43:59Z</updated>
		<published>2010-04-06T14:43:59Z</published>
		<category scheme="http://amadiere.com/blog" term="ASP.NET" /><category scheme="http://amadiere.com/blog" term="C#" /><category scheme="http://amadiere.com/blog" term="IIS" /><category scheme="http://amadiere.com/blog" term="SMTP" /><category scheme="http://amadiere.com/blog" term="Smtp4Dev" /><category scheme="http://amadiere.com/blog" term="Windows7" />		<summary type="html"><![CDATA[For some reason, Microsoft decided they didn't want to include the SMTP Server in Windows 7 anymore (even 'Ultimate' - it might also be the case for Windows Vista). So, I had to find an alternative.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/04/development-smtp-servers-for-iis7-5-on-windows-7/"><![CDATA[<p>I&#8217;ve had one of them days. You know? That &#8220;simple task&#8221; that spiralled out of control and resulted in me losing half a day to it&#8217;s tricks! That task? It was sending an email from an ASP.NET (MVC2) application. Previously, I&#8217;ve always done this via setting up IIS and the SMTP server in there, but for some reason, Microsoft decided they didn&#8217;t want to include the SMTP Server in Windows 7 anymore (even &#8216;Ultimate&#8217; &#8211; it might also be the case for Windows Vista). So, I had to find an alternative.</p>
<p>There were a few options available to me:</p>
<ul>
<li><strong>SMTP Server on Localhost: </strong>This was the obvious choice, but after trying Mercury Mail and it&#8217;s quarter of a million settings as it installed (I&#8217;m no Email Admin, so didn&#8217;t know the answer to all of them). It didn&#8217;t work and I&#8217;m not sure why. To rub salt into the would, there was no uninstall either &#8211; it proper irritated me and I gave up using it out of principal.</li>
<li><strong>SMTP Server on Localhost that is really just a Relay. </strong>Well, sounded good &#8211; but again, it was designed by people with bigger brains than me and it failed to send to what I thought was a correctly configured IIS7.5 config pointing to my GMail account.</li>
<li><strong>Fake Server: </strong>Something that doesn&#8217;t actually send emails, but pretends to.</li>
</ul>
<p>The last one is the one I eventually choose and boy am I glad I did! I downloaded the excellent <a href="http://smtp4dev.codeplex.com/">SMTP 4 DEV from Codeplex</a></p>
<ol>
<li>I don&#8217;t have 100&#8242;s of emails cluttering up my email box for starters. <strong>Win!</strong></li>
<li>It was so easy to set-up and it worked perfectly without a change to my code. <strong>Win!</strong></li>
<li>It&#8217;s free. <strong>Win!</strong></li>
</ol>
<p>Here is some fake code that should send an email to the <em>localhost</em>.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">MailMessage emailMessage <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> MailMessage<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #6666cc; font-weight: bold;">string</span> messageBody <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;This is the content of the email will be awesome!&quot;</span><span style="color: #008000;">;</span>
&nbsp;
emailMessage<span style="color: #008000;">.</span><span style="color: #0000FF;">Body</span> <span style="color: #008000;">=</span> messageBody<span style="color: #008000;">;</span>
emailMessage<span style="color: #008000;">.</span><span style="color: #0000FF;">Priority</span> <span style="color: #008000;">=</span> MailPriority<span style="color: #008000;">.</span><span style="color: #0000FF;">Normal</span><span style="color: #008000;">;</span>
emailMessage<span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">From</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> MailAddress<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;no-reply@amadiere.com&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// obviously, this email address doesn't exist :)</span>
emailMessage<span style="color: #008000;">.</span><span style="color: #0000FF;">Subject</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;The answer is 42&quot;</span><span style="color: #008000;">;</span>
emailMessage<span style="color: #008000;">.</span><span style="color: #0000FF;">IsBodyHtml</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span>
&nbsp;
SmtpClient mSmtpClient <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SmtpClient<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
mSmtpClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Host</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;127.0.0.1&quot;</span><span style="color: #008000;">;</span>  <span style="color: #008080; font-style: italic;">// localhost</span>
mSmtpClient<span style="color: #008000;">.</span><span style="color: #0000FF;">DeliveryMethod</span> <span style="color: #008000;">=</span> SmtpDeliveryMethod<span style="color: #008000;">.</span><span style="color: #0000FF;">Network</span><span style="color: #008000;">;</span>
&nbsp;
mSmtpClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Send</span><span style="color: #008000;">&#40;</span>emailMessage<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/04/development-smtp-servers-for-iis7-5-on-windows-7/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/04/development-smtp-servers-for-iis7-5-on-windows-7/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Good Quality Image Resizing in C#]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/03/good-quality-image-resizing-in-c/" />
		<id>http://amadiere.com/blog/?p=283</id>
		<updated>2010-04-12T18:35:44Z</updated>
		<published>2010-03-15T20:40:58Z</published>
		<category scheme="http://amadiere.com/blog" term="C#" /><category scheme="http://amadiere.com/blog" term="ASP.NET" /><category scheme="http://amadiere.com/blog" term="Image Resizing" /><category scheme="http://amadiere.com/blog" term="MVC" />		<summary type="html"><![CDATA[While GetThumbnailImage() is fine for small thumbnail images (the clue I guess, was in the name), it somewhat struggled on the larger versions. To fix the issue, I had to convert the image to a bitmap, faff about with it like that, then export it back to a Jpeg once I was done.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/03/good-quality-image-resizing-in-c/"><![CDATA[<p>I encountered a little bit of a problem the other day with some image resizing code from within an ASP.NET MVC application that was misbehaving. The issue was just a general C# and ASP.NET one, not related to MVC or Webforms, but it was that for some reason the images were losing a significant amount of quality when resizing. I&#8217;m talking a pixel sharp 2000 x 2000 picture that when resized to 300 x 300, was woefully blurry. Initially, the code was simply using the GetThumbnailImage() method to produce it&#8217;s resizes, this turned out to be the mistake!</p>
<p>While GetThumbnailImage() is fine for small thumbnail images (the clue I guess, was in the name), it somewhat struggled on the larger versions. To fix the issue, I had to convert the image to a bitmap, faff about with it like that, then export it back to a Jpeg once I was done.</p>
<p>For future me (and anyone else this might help), here is the code I eventually settled on:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">EncoderParameters encodingParameters <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> EncoderParameters<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
encodingParameters<span style="color: #008000;">.</span><span style="color: #0000FF;">Param</span><span style="color: #008000;">&#91;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> EncoderParameter<span style="color: #008000;">&#40;</span>Encoder<span style="color: #008000;">.</span><span style="color: #0000FF;">Quality</span>, 90L<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Set the JPG Quality percentage to 90%.</span>
&nbsp;
ImageCodecInfo jpgEncoder <span style="color: #008000;">=</span> GetEncoderInfo<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;image/jpeg&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Incoming! This is the original image. This line can effectively be anything, but in this example it's coming from a stream.</span>
<span style="color: #0600FF; font-weight: bold;">var</span> image <span style="color: #008000;">=</span> Image<span style="color: #008000;">.</span><span style="color: #0000FF;">FromStream</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> <span style="color: #000000;">System.<span style="color: #0000FF;">IO</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">MemoryStream</span><span style="color: #008000;">&#40;</span>Picture<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Creating two blank canvas. One that the original image is placed into, the other for the resized version.</span>
Bitmap originalImage <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Bitmap<span style="color: #008000;">&#40;</span>image<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
Bitmap newImage <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Bitmap<span style="color: #008000;">&#40;</span>originalImage, <span style="color: #FF0000;">300</span>, <span style="color: #008000;">&#40;</span>image<span style="color: #008000;">.</span><span style="color: #0000FF;">Height</span> <span style="color: #008000;">*</span> <span style="color: #FF0000;">300</span> <span style="color: #008000;">/</span> image<span style="color: #008000;">.</span><span style="color: #0000FF;">Width</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>  <span style="color: #008080; font-style: italic;">// Width of 300 &amp; maintain aspect ratio (let it be as high as it needs to be).</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// We then do some funky voodoo with the newImage. Changing it to a graphic to allow us to set the HighQualityBilinear property and resize nicely.</span>
Graphics g <span style="color: #008000;">=</span> Graphics<span style="color: #008000;">.</span><span style="color: #0000FF;">FromImage</span><span style="color: #008000;">&#40;</span>newImage<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
g<span style="color: #008000;">.</span><span style="color: #0000FF;">InterpolationMode</span> <span style="color: #008000;">=</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Drawing</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Drawing2D</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">InterpolationMode</span><span style="color: #008000;">.</span><span style="color: #0000FF;">HighQualityBilinear</span><span style="color: #008000;">;</span>
g<span style="color: #008000;">.</span><span style="color: #0000FF;">DrawImage</span><span style="color: #008000;">&#40;</span>originalImage, <span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">0</span>, newImage<span style="color: #008000;">.</span><span style="color: #0000FF;">Width</span>, newImage<span style="color: #008000;">.</span><span style="color: #0000FF;">Height</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">var</span> streamLarge <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> <span style="color: #000000;">System.<span style="color: #0000FF;">IO</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">MemoryStream</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
newImage<span style="color: #008000;">.</span><span style="color: #0000FF;">Save</span><span style="color: #008000;">&#40;</span>streamLarge, jpgEncoder, encodingParameters<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// This is the line that returns the picture to the relevant part of the model.</span>
_event<span style="color: #008000;">.</span><span style="color: #0000FF;">Picture</span> <span style="color: #008000;">=</span> streamLarge<span style="color: #008000;">.</span><span style="color: #0000FF;">ToArray</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// No need for all that drama for the thumbnail, the loss of quality isn't noticable.</span>
<span style="color: #0600FF; font-weight: bold;">var</span> thumbnail <span style="color: #008000;">=</span> image<span style="color: #008000;">.</span><span style="color: #0000FF;">GetThumbnailImage</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">80</span>, <span style="color: #008000;">&#40;</span>image<span style="color: #008000;">.</span><span style="color: #0000FF;">Height</span><span style="color: #008000;">*</span><span style="color: #FF0000;">80</span><span style="color: #008000;">/</span>image<span style="color: #008000;">.</span><span style="color: #0000FF;">Width</span><span style="color: #008000;">&#41;</span>, <span style="color: #0600FF; font-weight: bold;">null</span>, <span style="color: #008000;">new</span> IntPtr<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">var</span> streamThumbnail <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> <span style="color: #000000;">System.<span style="color: #0000FF;">IO</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">MemoryStream</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
thumbnail<span style="color: #008000;">.</span><span style="color: #0000FF;">Save</span><span style="color: #008000;">&#40;</span>streamThumbnail, jpgEncoder, encodingParameters<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
 _event<span style="color: #008000;">.</span><span style="color: #0000FF;">ThumbnailPicture</span> <span style="color: #008000;">=</span> streamThumbnail<span style="color: #008000;">.</span><span style="color: #0000FF;">ToArray</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Good boy's tidy-up after themselves! :O</span>
originalImage<span style="color: #008000;">.</span><span style="color: #0000FF;">Dispose</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
newImage<span style="color: #008000;">.</span><span style="color: #0000FF;">Dispose</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
thumbnail<span style="color: #008000;">.</span><span style="color: #0000FF;">Dispose</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
streamLarge<span style="color: #008000;">.</span><span style="color: #0000FF;">Dispose</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
streamThumbnail<span style="color: #008000;">.</span><span style="color: #0000FF;">Dispose</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/03/good-quality-image-resizing-in-c/#comments" thr:count="6"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/03/good-quality-image-resizing-in-c/feed/atom/" thr:count="6"/>
		<thr:total>6</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[4 Top Tips for portable ASP.NET MVC Apps]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/03/4-top-tips-for-portable-asp-net-mvc-apps/" />
		<id>http://amadiere.com/blog/?p=273</id>
		<updated>2010-03-01T22:22:53Z</updated>
		<published>2010-03-01T22:22:53Z</published>
		<category scheme="http://amadiere.com/blog" term="ASP.NET" /><category scheme="http://amadiere.com/blog" term="CSS" /><category scheme="http://amadiere.com/blog" term="HTML" /><category scheme="http://amadiere.com/blog" term="MVC" /><category scheme="http://amadiere.com/blog" term="HTTPS" />		<summary type="html"><![CDATA[ASP.NET MVC is awesome and allows for some great applications to be made, quickly, while at the same time offering a high degree of maintainability over the code that is written. The danger with being able to do things too fast, is simple mistakes are made. These hopefully are nothing major, but can become an irritation at some point doing the line. One of the things that occasionally gets left behind is the portability of code - and this can be a bit of a pickle!<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/03/4-top-tips-for-portable-asp-net-mvc-apps/"><![CDATA[<p><a href="http://knowyourmeme.com/memes/longcat" target="_blank"><img style="float: right;" title="Loooong cat! :O" src="http://amadiere.com/images/blog/longcat.jpg" alt="Loooong cat! :O" width="300" height="543" /></a></p>
<p>ASP.NET MVC is awesome (<a href="http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx">find out how awesome it is over dinner</a>) and allows for some great applications to be made, quickly, while at the same time offering a high degree of maintainability over the code that is written. The danger with being able to do things too fast is that simple mistakes are sometimes made. These hopefully are nothing major, but can become an irritation at various points down the line. One of the things that occasionally gets left behind is the portability of code &#8211; and this can be a bit of a &#8216;damn I wish I&#8217;d done it like that to start with&#8217; moment.</p>
<p>Below are a few hints that may (or may not) help you as you develop the next great slice of awesomeness.</p>
<p>Disclaimer: These tips are displayed as ASP.NET MVC tips, but in reality, some of them progress to general ASP.NET Websites and Applications &#8211; or just websites in general.</p>
<ol>
<li><strong>Don&#8217;t Assume You Know Your Root</strong><br />
Before I get started, let me give some background on this point. I have recently been doing some final tweaks to an otherwise great MVC application. However, one of the tweaks I did was to make sure that part of the system was securely done via HTTPS. When looking around the net, this appeared to be a lot trickier than I thought. After all, could all these people be wrong?:</p>
<ul>
<li>Dan Wahlin&#8217;s blog on: <a href="http://weblogs.asp.net/dwahlin/archive/2009/08/25/requiring-ssl-for-asp-net-mvc-controllers.aspx">Requiring SSL for ASP.NET MVC Controllers</a></li>
<li>Adam Salvo on: <a href="http://blog.salvoz.com/2009/03/14/PartialSSLAndAuthorizationWithAspNetMVC.aspx">Partial SSL and Authorization with ASP.NET MVC</a></li>
<li>Troy Goode&#8217;s article on: <a href="http://www.squaredroot.com/post/2008/06/11/MVC-and-SSL.aspx">SSL Links/URLS in MVC</a></li>
</ul>
<p>Basically, yes they can, but only because their articles are dated, not because they are fools (it should also be noted that although their articles may be dated, there are some good techniques and ideas in them, so worth a nosey). <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" />  <a href="http://bartwullems.blogspot.com/2010/01/using-ssl-with-aspnet-mvc-2.html">Bart Wullems does a good job of explaining the amazing simplicity</a> of this new attribute that was added in MVC 2 Preview 2. I&#8217;m a little surprised as to how this maybe wasn&#8217;t given a little bit more publicity &#8211; its a useful tool that was sorely missing before. Behold, ye <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.requirehttpsattribute%28VS.100%29.aspx">[RequiresHttps]</a> attribute!</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"> <span style="color: #008000;">&#91;</span>RequireHttps<span style="color: #008000;">&#93;</span>
 <span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Login<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
 <span style="color: #008000;">&#123;</span>
 <span style="color: #0600FF; font-weight: bold;">return</span> View<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
 <span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>This addition of SSL feather to my MVC Application&#8217;s bow was to prove too much for Visual Studio&#8217;s Cassini and I was forced onto my local IIS. This in itself wasn&#8217;t a great issue, but it highlighted some issues with the way the application had been developed. It had been assumed from the start that the application would live at the root of its own domain. This is true for the production version of the system and was for the large part true of the development system. When moving to IIS however, the project was set to run as a Virtual Directory &#8211; meaning the website root was no longer the same as the application root. Which lead me to trawl through the entire application tweaking things here and there, just to make it work no matter where it lived. Don&#8217;t assume you know were your application will live! It might be any number of little requirement changes that could cause you to have to rethink how you are building your application.</li>
<li><strong>Use ActionLinks for linking within your application<br />
<span style="font-weight: normal;">Doing this will save you a bunch of time and is one of the core supported features of ASP.NET MVC, so why not use it when it&#8217;s so simple? There are so many good articles and posts on this, a great starting point is (as always) ScottGu&#8217;s, which part way down talks about <a href="http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx">Constructing Outgoing URLs from the Routing System</a></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;%=</span>Html<span style="color: #008000;">.</span><span style="color: #0000FF;">ActionLink</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;View more details&quot;</span>, <span style="color: #008000;">new</span> <span style="color: #008000;">&#123;</span> Controller <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Products&quot;</span>, Action <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Details&quot;</span>, Id<span style="color: #008000;">=</span><span style="color: #FF0000;">42</span> <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">%&gt;</span></pre></td></tr></table></div>

<p></span></strong></li>
<li><strong>Url.Content for content that is URLs.<br />
<span style="font-weight: normal;">Url.Content is to static content, what ActionLink is to your dynamic pages. If you have any Images, CSS, Script files or basically anything else that isn&#8217;t an MVC page, then this little beaut&#8217; is for you! This allows you to negate any issues with website roots and application roots changing &#8211; without having to monitor and check any links!</p>
<p>Before, you may simply have done:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span>img src<span style="color: #008000;">=</span><span style="color: #666666;">&quot;/lolcats/longcat.png&quot;</span> alt<span style="color: #008000;">=</span><span style="color: #666666;">&quot;To scale&quot;</span> <span style="color: #008000;">/&gt;</span></pre></td></tr></table></div>

<p>This would have worked until your application was moved from the webroot (Cassini) to a virtual directory (e.g. &#8220;/MVCApp&#8221; in IIS). If you do the following however, all is solved as it works out the URL and writes that out accordingly:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span>img src<span style="color: #008000;">=</span><span style="color: #666666;">&quot;&lt;%=Url.Content(&quot;</span>~<span style="color: #008000;">/</span>lolcats<span style="color: #008000;">/</span>longcat<span style="color: #008000;">.</span><span style="color: #0000FF;">png</span><span style="color: #666666;">&quot;)%&gt;&quot;</span> alt<span style="color: #008000;">=</span><span style="color: #666666;">&quot;To scale&quot;</span> <span style="color: #008000;">/&gt;</span></pre></td></tr></table></div>

<p>Would appear as the below, automagically:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span>img src<span style="color: #008000;">=</span><span style="color: #666666;">&quot;/MVCApp/lolcats/longcat.png&quot;</span> alt<span style="color: #008000;">=</span><span style="color: #666666;">&quot;To scale&quot;</span> <span style="color: #008000;">/&gt;</span></pre></td></tr></table></div>

<p></span></strong></li>
<li><strong>Relative links within your CSS</strong><br />
This is something that isn&#8217;t specifically unique to MVC applications or ASP.NET in general. It&#8217;s more a good practice / make sure you are aware of guideline.<br />
When coding stylesheets, you&#8217;re often faced with wanted to add background-image&#8217;s to them. Without the server-side jiggery pokery that ASP.NET (and the like) allows, you are left with limited choices how to do this. But in reality, the solution is fairly simple. You need to fix two things: The location of your Images and the location of your CSS. It doesn&#8217;t really matter where they are, but just that they are fixed (or you have the patience to correct your links should you wish to restructure).</p>
<p>Images from a CSS can be HTTP, absolute to the web-root or, as is awesome, <strong>relative to the CSS itself</strong>. This means that as long as all your styles are entirely located within your stylesheet&#8217;s and not intermingled with your code, you&#8217;re on to a winner. It doesn&#8217;t matter which page calls the CSS, whether it be your homepage or one that is 42 levels deep &#8211; the links are only ever relative to the CSS page (which you included via Url.Content, right, eh? yeah!?).</p>
<p>In the following example, the CSS is located within a &#8216;Styles&#8217; directory directly at the project root.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.longCat</span>
<span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'../lolcats/longcat.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

</li>
</ol>
<p>Hopefully these pointers will help someone else, if not, they will hopefully protect against my own stupidity and making similar mistakes again. Feel free to comment below if there are any more thoughts and portability ideas you think I could do with including.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/03/4-top-tips-for-portable-asp-net-mvc-apps/#comments" thr:count="2"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/03/4-top-tips-for-portable-asp-net-mvc-apps/feed/atom/" thr:count="2"/>
		<thr:total>2</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[eBook Readers Thoughts (by a developer)]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/02/ebook-readers-thoughts-by-a-developer/" />
		<id>http://amadiere.com/blog/?p=268</id>
		<updated>2010-02-14T22:26:47Z</updated>
		<published>2010-02-14T22:26:47Z</published>
		<category scheme="http://amadiere.com/blog" term="Reviews" /><category scheme="http://amadiere.com/blog" term="Amazon Kindle" /><category scheme="http://amadiere.com/blog" term="Apple iPad" /><category scheme="http://amadiere.com/blog" term="eBook Reader" /><category scheme="http://amadiere.com/blog" term="eInk" />		<summary type="html"><![CDATA[I've had a few discussions lately about eBook Readers with a number of people, with most people having a strong opinion either way. As a developer, a significant portion of my reading material is textbooks and other technical documents, but at the same time, this doesn't stop me wanting to read the greatest book of our time.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/02/ebook-readers-thoughts-by-a-developer/"><![CDATA[<p><a href="http://www.amazon.com/kindle"><img class="alignright" title="Amazon Kindle DX" src="/images/blog/AmazonKindleDX.jpg" alt="Amazon Kindle DX" width="400" height="400" /></a>I&#8217;ve had a few discussions lately about eBook Readers with a number of people, with most people having a strong opinion either way. As a developer, a significant portion of my reading material is textbooks and other technical documents, but at the same time, this doesn&#8217;t stop me wanting to read <a href="http://www.amazon.co.uk/gp/product/0330492047?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0330492047">the greatest book of our time</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0330492047" border="0" alt="" width="1" height="1" />.</p>
<p>In the blue corner, weighing in about 500g we have Mr Electronic!</p>
<ul>
<li>You can carry hundreds, if not thousands of books around with you at any time.</li>
<li>Smaller and more compact than a single book in some instances.</li>
<li>Can provide it&#8217;s own light source and you don&#8217;t need to find a lamp.</li>
<li>You can change the font size for the book you are reading if it&#8217;s too small to comfortably read.</li>
<li>You can take notes without defacing it.</li>
</ul>
<p>In the red corner, weighing in at a massively varying rate: Mr Paper Copy!</p>
<ul>
<li>Has the &#8220;touch factor&#8221;. The intangible benefit of purchasing something solid every time you buy a book. Its smell, its feel and the excitement that can bring.</li>
<li>Significantly easier to skip to certain points in a book.</li>
<li>Harder to accidentally break or ruin.</li>
</ul>
<p>I think the story of the book will go the way of the CD (and the Vinyl record before that). I think it is inevitable that in 10 years or so, as many people that have have MP3 players now, will have an electronic book reader then. But, in just the same way that people still buy CDs, I don&#8217;t think they will ever be able to stop making books as they offer a great deal that eBooks never will. So is now the time to start on the eReader bandwagon? Hmmm, I&#8217;d say not personally &#8211; at least, for my potential reading library it&#8217;s not.</p>
<p>You see, good as some of them are, eReaders are burden somewhat with a number technological problems they must tackle firstly. In general, eReaders can be broken into two categories: those with eInk &amp; those without. Those with include the two heavy hitters of <a href="http://www.amazon.co.uk/gp/redirect.html/ref=amb_link_18843727_3?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2FB0015TG12Q%3Famp%253Brw%255Fabsolute%3Dy&amp;token=3A0F170E7CEFE27BDC730D3D7344512BC1296B83&amp;pf_rd_m=A3P5ROKL5A1OLE&amp;pf_rd_s=auto-sparkle&amp;pf_rd_r=1BR0V8TK5F671GX5HPHY&amp;pf_rd_t=301&amp;pf_rd_p=48712567&amp;pf_rd_i=kindle">Amazon Kindle</a> and the <a href="http://www.amazon.co.uk/gp/product/B001DCJI6Q?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B001DCJI6Q">Sony Reader eBook</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=B001DCJI6Q" border="0" alt="" width="1" height="1" />, while two of the main other rivals would be a <a href="http://www1.euro.dell.com/content/products/productdetails.aspx/laptop-inspiron-10?c=uk&amp;l=en&amp;s=dhs&amp;cs=ukdhs1">netbook</a> (a standard laptop or PC would be ok, though less portable) and the <a href="http://www.apple.com/uk/ipad/">Apple iPad</a> (with the <a href="http://www.engadget.com/2010/01/06/the-hp-slate/">HP Slate coming soon</a> it seems).</p>
<p>eInk is an absolutely fantastic technology which is very early in its lifespan and I imagine we haven&#8217;t seen the end of it and its children &#8211; nor will me for a number of years yet. eInk is significant because it gets around a problem that has plagued electronic devices for a long time: Battery Life. When used within eReaders, eInk only consumes battery power when the page is changed (or the display changes). This means that the device can hold its power for not just days, but weeks of usage! The other advantage of the eInk is that it causes around and about the same amount of eye strain as a standard book. Because the screen technology is not based on the intensely fast flickering of pixels, the screens appear to be paper and lack the issues of glare from other bright light sources. The <a href="http://www.eink.com/technology/howitworks.html">article over on the manufacturers website</a>, it works like:</p>
<blockquote><p>The principal components of electronic ink are millions of tiny microcapsules, about the diameter of a human hair. In one incarnation, each microcapsule contains positively charged white particles and negatively charged black particles suspended in a clear fluid. When a negative electric field is applied, the white particles move to the top of the microcapsule to become visible to the reader. This makes the surface appear white at that location. At the same time, an opposite electric field pulls the black particles to the bottom of the microcapsules where they are hidden. By reversing this process, the black particles appear at the top of the capsule, which now makes the surface appear dark at that location.</p></blockquote>
<p><a href="http://www.apple.com/uk/ipad"><img class="alignright" title="Apple iPad" src="/images/blog/AppleiPad.png" alt="Apple iPad" width="285" height="345" /></a>For about a year, another &#8220;Format War&#8221; raged between the ePub format and the standard PDF. While each format has it&#8217;s pro&#8217;s and con&#8217;s &#8211; the big thing that has become an issue is the failure of PDF to scale well with the eInk. While the Sony device does a better job, the Amazon Kindle plain old can&#8217;t be bothered to try and limits the text scalability and in some cases offers almost illegible text to it&#8217;s reader. When you way all this together, the eInk devices have a really big failing, and that is the displaying of Images and Diagrams. <strong>They just plain suck at offering zoom-able content</strong>. The quick amongst you may have realised that books also don&#8217;t offer this feature &#8211; however, this is generally less of an issue because the dimensions of the images on printed copies are within the publishers control. They can control what size their image is being viewed at, which is not true with the different sized eReader screens (the Kindle alone offers a 6&#8243; and 9.7&#8243; version). As a side note, as printed copies have a significantly higher DPI ratio, a magnifying class would aid in the instances that the text became too small to read on a diagram &#8211; this isn&#8217;t likely to be often true of the eReaders). This problem is where my issue with eReaders lies. I can&#8217;t read my copy of <a href="http://www.amazon.co.uk/gp/product/0735619670?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0735619670">Code Complete</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0735619670" border="0" alt="" width="1" height="1" /> on an eReader because I wouldn&#8217;t necessarily be able to see the diagrams that accompany the text &#8211; a potential disastrous flaw.</p>
<p>This problem is solved though! Along with the potential issue that eInk can only currently display grey-scale. Hurrah! The Apple iPad will allow you to zoom and otherwise get bigger versions of these diagrams and providing the document was prepared by a sane person who knows what they are doing, you&#8217;ll have absolutely no problem. Let&#8217;s all go buy an iPad! All hail Steve Jobs!&#8230; Not quite just yet, you see, they implemented a flaw. Battery life is back and although not <a href="http://www.theregister.co.uk/2009/09/21/apple_seeks_battery_data/">crippling like the iPhone&#8217;s</a> can be at times, 10 hours compared with longer than 10 days is a massive difference! The argument is that no one reads for 10 hours straight, maybe not, but people could easily use 10 hours of the device without having the chance to charge it.</p>
<p>A bonus however, is that with the iPad you get a plethora of other features (iPod, usable Internet, picture gallery, email, pretty much what you&#8217;d expect a low end PC to be able to achieve without too much hassle). Is this something you&#8217;d want &#8211; it would depend what you already have I guess.</p>
<p>So overall &#8211; what&#8217;s the bottom line? Well, I guess that the market doesn&#8217;t have a great product at the moment. If you are going to read mainly novels and you would benefit from being able to carry around a number of books around with you rather than just one or two (frequent long train journeys or other travelling), then maybe the Amazon Kindle or Sony Reader would be a great choice. However, if you prefer a device that is capable of displaying images and photographs in full colour and to the detail that they were intended, as well as offering the benefit of other multimedia functions, then the Apple iPad, HP Slate (when it arrives) or just a standard netbook (if you can cope with the discomfort and less than ideal user experience) would be the choices for you.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/02/ebook-readers-thoughts-by-a-developer/#comments" thr:count="2"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/02/ebook-readers-thoughts-by-a-developer/feed/atom/" thr:count="2"/>
		<thr:total>2</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[The Biggest Bits Are The Little Bits]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/02/the-biggest-bits-are-the-little-bits/" />
		<id>http://amadiere.com/blog/?p=259</id>
		<updated>2010-02-12T21:56:10Z</updated>
		<published>2010-02-12T21:56:10Z</published>
		<category scheme="http://amadiere.com/blog" term="Human Factors" /><category scheme="http://amadiere.com/blog" term="Usability" /><category scheme="http://amadiere.com/blog" term="Development" /><category scheme="http://amadiere.com/blog" term="Perfection" /><category scheme="http://amadiere.com/blog" term="Timescales" />		<summary type="html"><![CDATA[There is the excellently accurate sentence attributed to Tom Cargill that goes: The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. This (fairly humorous) statement is a dig at all those projects that are [&#8230;]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/02/the-biggest-bits-are-the-little-bits/"><![CDATA[<p>There is the excellently accurate sentence attributed to Tom Cargill that goes:</p>
<blockquote><p>The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.</p></blockquote>
<p>This (fairly humorous) statement is a dig at all those projects that <a href="http://www.3drealms.com/duke4/">are developed and that overrun</a>, but with a more than significant amount of truth in it. There can be a number of reasons why the project may not appear on time. Often, it&#8217;s because someone is trying really hard to avoid accepting the fact that the <a href="http://en.wikipedia.org/wiki/Project_triangle">Project Triangle</a> exists for their solution. The triangle states that there are always three options: Do it Fast, Do it Cheap &#038; Do it Good &#8211; but of the three options, you can only have two. You as project manager have to negotiate with your stakeholders, which of the three are the two most important ones &#8211; because there is flying-pig chance that you&#8217;ll be able to get all three of them. They aren&#8217;t mutually exclusive &#8211; but achieving all three is certainly something that is seldom heard of for a project.</p>
<p>I believe these two things are linked. I think that projects overrun because the project early on was &#8220;Do it fast &#038; do it cheap&#8221;, but near the end and as people start to inspect the system, people (whether it be the Stakeholders, End users or development team) decide that they need to do it well at the sacrifice of doing it fast. This could be argued as bad project management &#8211; but in reality, it&#8217;s bad Stakeholders. I believe they were <strong>correct</strong> to concentrate on quality However, they were grossly wrong to have considered leaving it as the third priority in the first place &#8211; it should have always been first! Take your pick as to which of the other two is important to you, but unless your project is technically fantastic and the attention to detail is there &#8211; then you might not have bothered doing it at all!</p>
<p><a href="http://www.codinghorror.com">Jeff Atwood</a> has eluded to this in the past in response to comments that <a href="http://www.stackoverflow.com">Stack Overflow</a> would be an easy system to build. He implies that yes, while the functionality would be really simple to replicate, all the little details would be missing, all the little improvements for both technical speed boosts / efficiency savings and for ascetics and intuitiveness for the user. You can spend your time doing 90% of Stack Overflow in 1 week, but then you&#8217;ll spend the remaining 90% of time faffing with the little details that will make your site stand out.</p>
<p>These little things can totally ruin your project / website / company, if you do not spend the time bowing before them in homage. There are plenty of website&#8217;s out there which don&#8217;t do justice to their potential. Websites that for some reason, got to the 90% of the way into their project and implement 90% of the features and functions &#8211; but then were put off by the long hard slog of the home straight which is the last 90%. The details beat them into submission! I&#8217;m not saying you have to be a designer to produce a good looking site, (it helps and I&#8217;d recommend that people get someone on board who specialises in functional website UI design), but if you don&#8217;t set your sights too high, then patience and an understanding of CSS will normally do. If you spend this time sorting out all the little things (the font size, the position of your error messages, your link positioning etc), your project will find its <a href="http://en.wikipedia.org/wiki/Bounce_rate">bounce-rate</a> significantly reduced (a good thing!) and the general happiness of frequent users will be improved as they don&#8217;t have to work as hard to get the same amount of work done as your system is more intuitive.</p>
<p><strong>Strive for perfection, excellence will be tolerated</strong>. If you are passionate about your project and you feel that you want to produce the best &#8220;whatever&#8221; in the world &#8211; then make sure you spend your time on the details! It&#8217;s sometimes a long hard slog, but it is invariably worth it in the end.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/02/the-biggest-bits-are-the-little-bits/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/02/the-biggest-bits-are-the-little-bits/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Blog posts redirecting to homepage]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2010/01/blog-posts-redirecting-to-homepage/" />
		<id>http://amadiere.com/blog/?p=242</id>
		<updated>2010-01-24T15:37:12Z</updated>
		<published>2010-01-24T15:30:12Z</published>
		<category scheme="http://amadiere.com/blog" term="Hosting" /><category scheme="http://amadiere.com/blog" term="Wordpress" /><category scheme="http://amadiere.com/blog" term="Permalinks" /><category scheme="http://amadiere.com/blog" term="URL Rewriting" />		<summary type="html"><![CDATA[Over the last week or two, I hadn&#8217;t spotted but my blog posts were all redirecting to my homepage. This is due to my stupidity. Plain and simple. I didn&#8217;t check once the website had completed its move across hosting providers and the URL redirecting had failed. However, it was fairly simple. When I visited [&#8230;]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2010/01/blog-posts-redirecting-to-homepage/"><![CDATA[<p>Over the last week or two, I hadn&#8217;t spotted but my blog posts were all redirecting to my homepage. This is due to my stupidity. Plain and simple. I didn&#8217;t check once the website had completed its move across hosting providers and the URL redirecting had failed.</p>
<p>However, it was fairly simple. When I visited the Permalink settings within WordPress, it came up with the following warning:</p>
<blockquote><p>If your .htaccess file were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.</p></blockquote>
<p>To fix it, it was just as easy &#8211; do exactly as it says. I updated my .htaccess file to include the following text.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span>IfModule mod_rewrite<span style="color: #008000;">.</span><span style="color: #0000FF;">c</span><span style="color: #008000;">&gt;</span>
  RewriteEngine On
  RewriteBase <span style="color: #008000;">/</span>blog<span style="color: #008000;">/</span>
  RewriteCond <span style="color: #008000;">%</span><span style="color: #008000;">&#123;</span>REQUEST_FILENAME<span style="color: #008000;">&#125;</span> <span style="color: #008000;">!-</span>f
  RewriteCond <span style="color: #008000;">%</span><span style="color: #008000;">&#123;</span>REQUEST_FILENAME<span style="color: #008000;">&#125;</span> <span style="color: #008000;">!-</span>d
  RewriteRule <span style="color: #008000;">.</span> <span style="color: #008000;">/</span>blog<span style="color: #008000;">/</span>index<span style="color: #008000;">.</span><span style="color: #0000FF;">php</span> <span style="color: #008000;">&#91;</span>L<span style="color: #008000;">&#93;</span>
<span style="color: #008000;">&lt;/</span>IfModule<span style="color: #008000;">&gt;</span></pre></td></tr></table></div>

<p>This probably wouldn&#8217;t have been such an issue, but the change of hosting provider (from <a title="GoDaddy" href="http://www.godaddy.com">GoDaddy</a> to <a title="NearlyFreeSpeech.net" href="http://www.NearlyFreeSpeech.net">NearlyFreeSpeech.net</a>) was basically going from a Windows box to a Unix box.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2010/01/blog-posts-redirecting-to-homepage/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2010/01/blog-posts-redirecting-to-homepage/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 18/18: Attack of the Killer Box!]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1818-attack-of-the-killer-box/" />
		<id>http://www.amadiere.com/blog/?p=239</id>
		<updated>2009-12-28T18:41:31Z</updated>
		<published>2009-12-24T15:38:23Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[Late last Saturday night; a young chap was walking home from a club...<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/' rel='bookmark' title='Joke 7/18: Nelson Mandela'>Joke 7/18: Nelson Mandela</a> <small>Nelson Mandela is at home putting up his Christmas tree...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1818-attack-of-the-killer-box/"><![CDATA[<p>Hope you all have (or have had, by the time you read this) a fantastic Christmas! All the best for 2010! J Enjoy!</p>
<blockquote><p>Late last Saturday night; a young chap was walking home from a club. It was a cold, wet, windy evening, and he was tired and freezing. Most of the streetlights in the area were broken, and the silence was only broken by the occasional sound of a stray cat sifting through a dustbin. Then suddenly he heard a strange noise&#8230;&#8230;.</p>
<p>BUMP&#8230;&#8230;..</p>
<p>BUMP&#8230;&#8230;..</p>
<p>BUMP&#8230;&#8230;..</p>
<p>Startled by this, he turned, and to his amazement, through the driving rain, he saw the faint outline of a large box turning into his road.</p>
<p>BUMP&#8230;&#8230;..</p>
<p>BUMP&#8230;&#8230;..</p>
<p>BUMP&#8230;&#8230;..</p>
<p>He froze to the spot, he couldn&#8217; t believe his eyes, as the box approached from the shadows, he was able to make out its shape more clearly&#8230;.It was a coffin. Not wanting anything to do with this, he put his head down and started walking briskly home. &#8230;&#8230;.</p>
<p>BUMP&#8230;&#8230;..</p>
<p>BUMP&#8230;&#8230;..</p>
<p>BUMP&#8230;&#8230;..</p>
<p>He could feel the coffin gaining on him, he started walking faster&#8230;&#8230;&#8230;</p>
<p>BUMP&#8230;&#8230;..BUMP&#8230;&#8230;</p>
<p>BUMP&#8230;&#8230;..BUMP..</p>
<p>BUMP&#8230;&#8230;..BUMP&#8230;&#8230;</p>
<p>The coffin was closing with his every step, he started to jog, but he heard the coffin speed up after him&#8230;&#8230;</p>
<p>BUMP&#8230;&#8230;..BUMP&#8230;BUMP&#8230;</p>
<p>BUMP&#8230;&#8230;..BUMP&#8230;BUMP&#8230;</p>
<p>BUMP&#8230;&#8230;..BUMP&#8230;BUMP&#8230;</p>
<p>He started to sprint, but so did the coffin &#8230;&#8230;</p>
<p>BUMP&#8230;BUMP&#8230;BUMP&#8230;BUMP.</p>
<p>BUMP&#8230;BUMP&#8230;BUMP&#8230;BUMP&#8230;..</p>
<p>BUMP&#8230;BUMP&#8230;BUMP&#8230;BUMP.</p>
<p>Eventually he made it to his front door, but he knew the coffin was only seconds behind. Fumbling around in his pocket, he pulled out his keys, His hand trembling, he managed to open the lock, he dived inside slamming the front door behind him. He shot into his front room, and slumped into his comfy chair. Suddenly there was a loud crash, as the coffin smashed its way through the front door. The force of the impact broke the lock off the coffin allowing the lid to swing freely on its rusty hinges as it continued its chase&#8230;..</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP&#8230;SCREECH&#8230;</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP&#8230;SCREECH&#8230;</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP&#8230;SCREECH&#8230;</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP&#8230;SCREECH&#8230;</p>
<p>In horror the young lad fled again, as fast as his shaking legs could take him he bolted upstairs to the bathroom locked the door&#8230;&#8230;..</p>
<p>BUMP&#8230;SCREECH&#8230;HOP..BUMP&#8230;SCREECH&#8230;HOP&#8230;</p>
<p>BUMP&#8230;SCREECH&#8230;HOP&#8230;BUMP&#8230;SCREECH&#8230;HOP..</p>
<p>BUMP&#8230;SCREECH&#8230;HOP&#8230;BUMP&#8230;SCREECH&#8230;HOP..</p>
<p>The coffin again gave chase up the stairs, across the landing and launched itself at the bathroom door. With an almighty smash, the bathroom door flew off its hinges&#8230;.. The coffin stood in the doorway, then started to approach the young terrified lad.</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP&#8230;SCREECH&#8230;</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP.SCREECH&#8230;</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP&#8230;SCREECH&#8230;</p>
<p>In a last ditch attempt to save his skin, he reached for his bathroom cabinet&#8230;&#8230; He grabbed a bar of Imperial Leather soap and threw it at the coffin&#8230;&#8230;.still it came &#8230;&#8230;..</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP&#8230;SCREECH&#8230;</p>
<p>He grabbed his can of Lynx deodorant and threw it &#8230;.still it came&#8230;&#8230;</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP.SCREECH&#8230;</p>
<p>He grabbed his first aid kit and threw it &#8230;..still it came&#8230;&#8230;</p>
<p>BUMP&#8230;SCREECH&#8230;BUMP&#8230;SCREECH..</p>
<p>He grabbed some Benelyn cough mixture and threw it&#8230;&#8230;..</p>
<p>The coffin stopped.</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/' rel='bookmark' title='Joke 7/18: Nelson Mandela'>Joke 7/18: Nelson Mandela</a> <small>Nelson Mandela is at home putting up his Christmas tree...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1818-attack-of-the-killer-box/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1818-attack-of-the-killer-box/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 17/18: The Son Without A Torso]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1718-the-son-without-a-torso/" />
		<id>http://www.amadiere.com/blog/?p=237</id>
		<updated>2009-12-28T18:38:08Z</updated>
		<published>2009-12-23T12:15:25Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[A man is waiting for wife to give birth on Christmas Eve. The doctor comes in and informs the dad that his son was born without torso, arms or legs...<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-618-singing-simon/' rel='bookmark' title='Joke 6/18: Singing Simon'>Joke 6/18: Singing Simon</a> <small>A young man walks onto the stage of the Christmas...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1718-the-son-without-a-torso/"><![CDATA[<p>A man is waiting for wife to give birth on Christmas Eve. The doctor comes in and informs the dad that his son was born without torso, arms or legs. The son is just a head!</p>
<p>But the father loves his son and raises him as well as he can, with love and compassion. After 21 years, the son is old enough for his first drink. Dad takes him to the bar and tearfully tells the son he is proud of him.</p>
<p>Dad orders up the biggest, strongest drink for his boy. With all the bar patrons looking on curiously and the bartender shaking his head in disbelief, the boy takes his first sip of alcohol. Swoooop! A torso pops out!</p>
<p>The bar is dead silent; then bursts into a whoop of joy. The father, shocked, begs his son to drink again. The patrons chant &#8220;Take another drink!&#8221;</p>
<p>The bartender still shakes his head in dismay. Swoooop! Two arms pops out.</p>
<p>The bar goes wild, but the bartender is clearly disapproving.</p>
<p>The father, crying and wailing, begs his son to drink again. The patrons chant &#8220;Take another drink!&#8221; The bartender ignores the whole affair.</p>
<p>By now the boy is getting tipsy, and with his new hands he reaches down, grabs his drink and guzzles the last of it. Swoooop! Two legs pop out. The bar is in chaos. The father falls to his knees and tearfully thanks God.</p>
<p>The boy stands up on his new legs and stumbles to the left&#8230; then to the right&#8230; right through the front door, into the street, where a truck runs over him and kills him instantly. The bar falls silent. The father moans in grief. The bartender sighs and says, &#8220;That boy should have quit while he was a head.&#8221;</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-618-singing-simon/' rel='bookmark' title='Joke 6/18: Singing Simon'>Joke 6/18: Singing Simon</a> <small>A young man walks onto the stage of the Christmas...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1718-the-son-without-a-torso/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1718-the-son-without-a-torso/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 16/18: English Cats vs French Cats]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1618-english-cats-vs-french-cats/" />
		<id>http://www.amadiere.com/blog/?p=235</id>
		<updated>2009-12-28T18:36:12Z</updated>
		<published>2009-12-22T19:00:16Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[There are these two cats swimming across the river late one Christmas eve...<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1618-english-cats-vs-french-cats/"><![CDATA[<p>There are these two cats swimming across the river late one Christmas eve. One was called &#8220;OneTwoThree&#8221;, and the other called &#8220;UnDeuxTrois&#8221;.</p>
<p>Which one got across the river first?</p>
<p>&#8220;OneTwoThree&#8221; of course, because the UnDeuxTrois cat sank.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1618-english-cats-vs-french-cats/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1618-english-cats-vs-french-cats/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 15/18: Celebrity Death Match: Queen Liz vs Dolly P!]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1518-celebrity-death-match-queen-liz-vs-dolly-p/" />
		<id>http://www.amadiere.com/blog/?p=233</id>
		<updated>2009-12-28T18:33:42Z</updated>
		<published>2009-12-21T10:32:12Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[Queen Elizabeth and Dolly Parton die on Christmas day and they both go before an Angel to find out if they'll be admitted to Heaven.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/' rel='bookmark' title='Joke 7/18: Nelson Mandela'>Joke 7/18: Nelson Mandela</a> <small>Nelson Mandela is at home putting up his Christmas tree...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1518-celebrity-death-match-queen-liz-vs-dolly-p/"><![CDATA[<p>Queen Elizabeth and Dolly Parton die on Christmas day and they both go before an Angel to find out if they&#8217;ll be admitted to Heaven. Unfortunately, there&#8217;s only one space left that day, so the Angel must decide which of them gets in. The Angel asks Dolly if there&#8217;s some particular reason why she should go to Heaven.</p>
<p>Interesting fact by the way, that both Queen Elizabeth and Dolly Parton were afraid of Santa! It&#8217;s true apparently, they were Claustrophobic!</p>
<p>Anyway, to continue, Dolly takes off her top and says, &#8220;Look at these, they&#8217;re the most perfect breasts God ever created, and I&#8217;m sure it will please God to be able to see them every day, for eternity.&#8221; </p>
<p>The Angel thanks Dolly, and asks Her Majesty the same question. The Queen takes a bottle of Perrier out of her purse, shakes it up, and gargles. Then, she spits into a toilet and pulls the lever. </p>
<p>The Angel says, &#8220;OK, your Majesty, you may go in.&#8221; </p>
<p>Dolly is outraged and asks, &#8220;What was that all about? I show you two of God&#8217;s own perfect creations and you turn me down. She spits into a commode and she gets in! Would you explain that to me?&#8221; </p>
<p>&#8220;Sorry, Dolly,&#8221; says the Angel, &#8220;but even in Heaven, a royal flush beats an ace pair.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/' rel='bookmark' title='Joke 7/18: Nelson Mandela'>Joke 7/18: Nelson Mandela</a> <small>Nelson Mandela is at home putting up his Christmas tree...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1518-celebrity-death-match-queen-liz-vs-dolly-p/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1518-celebrity-death-match-queen-liz-vs-dolly-p/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 14/18: The Lady with the Glass Eye]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1418-the-lady-with-the-glass-eye/" />
		<id>http://www.amadiere.com/blog/?p=231</id>
		<updated>2009-12-28T18:31:42Z</updated>
		<published>2009-12-18T12:30:18Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[A man is dining in a fancy restaurant on Christmas Eve and there is a gorgeous redhead sitting at the next table just in front of a gorgeous Christmas tree decked out in purple, silver and white...<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1418-the-lady-with-the-glass-eye/"><![CDATA[<p>A man is dining in a fancy restaurant on Christmas Eve and there is a gorgeous redhead sitting at the next table just in front of a gorgeous Christmas tree decked out in purple, silver and white. He has been checking her out since he sat down, but lacks the nerve to talk with her. Suddenly, she sneezes and her glass eye comes flying out of its socket towards the man. He reflexively reaches out, grabs it out of the air, and hands it back.</p>
<p>&#8220;Oh my, I am so sorry,&#8221; the woman says as she pops her eye back in place. &#8220;Let me buy your dinner to make it up to you,&#8221; she says. </p>
<p>They enjoy a wonderful dinner together, and afterwards the theatre followed by drinks. They talk, they laugh, she shares her deepest dreams and he shares his. She listens. After paying for everything, she asks him if he would like to come to her place and stay for breakfast.</p>
<p>The next morning, she cooks a gourmet meal with all the trimmings. The guy is amazed!! Everything had been SO incredible!!!! &#8220;You know,&#8221; he said, &#8220;you are the perfect woman. Are you this nice to every guy you meet?&#8221;.</p>
<p>&#8220;No,&#8221; she replies, &#8220;You just happened to catch my eye.&#8221;</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1418-the-lady-with-the-glass-eye/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1418-the-lady-with-the-glass-eye/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/" />
		<id>http://www.amadiere.com/blog/?p=229</id>
		<updated>2009-12-28T18:30:06Z</updated>
		<published>2009-12-17T18:28:14Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[On Christmas Eve Santa Claus was getting ready for his annual trip.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/' rel='bookmark' title='Joke 7/18: Nelson Mandela'>Joke 7/18: Nelson Mandela</a> <small>Nelson Mandela is at home putting up his Christmas tree...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1018-christmas-tip/' rel='bookmark' title='Joke 10/18: Christmas Tip'>Joke 10/18: Christmas Tip</a> <small>A small tip to start this shorter than normal joke......</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-118-aviation-authorities/' rel='bookmark' title='Joke 1/18: Aviation Authorities'>Joke 1/18: Aviation Authorities</a> <small>Ho, ho, ho! Merry Christmas! For those that don't know...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/"><![CDATA[<p>On Christmas Eve Santa Claus was getting ready for his annual trip.  As he pulled his favorite pair of red pants on, they ripped.  So, he had to take them off and put on another pair, which was a bit too tight.  He then went to check on the rest of the preparations.  The elves were on strike.  The reindeer had shin-splints.  At this point, Santa was pissed off.  He went into the kitchen to take a calming drink, and the bottle was EMPTY.  Now he was really mad.  All of sudden, there was a knock at the door.  Santa, in his angry state, ignored it.  There was another knock.  Santa was in no mood for all of this. When the knock came again, Santa&#8211;filled with rage&#8211;threw open the door.  Standing there was a little angel who said, &#8220;Hi Santa!  What do you want me to do with this Christmas Tree?&#8221;</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/' rel='bookmark' title='Joke 7/18: Nelson Mandela'>Joke 7/18: Nelson Mandela</a> <small>Nelson Mandela is at home putting up his Christmas tree...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1018-christmas-tip/' rel='bookmark' title='Joke 10/18: Christmas Tip'>Joke 10/18: Christmas Tip</a> <small>A small tip to start this shorter than normal joke......</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-118-aviation-authorities/' rel='bookmark' title='Joke 1/18: Aviation Authorities'>Joke 1/18: Aviation Authorities</a> <small>Ho, ho, ho! Merry Christmas! For those that don't know...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 12/18: The Three Balloons]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1218-the-three-balloons/" />
		<id>http://www.amadiere.com/blog/?p=227</id>
		<updated>2009-12-28T18:27:52Z</updated>
		<published>2009-12-16T18:27:59Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[Three balloons are getting ready to go to sleep after a wonderful Christmas Day. Daddy balloon, mummy balloon and baby balloon.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1218-the-three-balloons/"><![CDATA[<p>Three balloons are getting ready to go to sleep after a wonderful Christmas Day. Daddy balloon, mummy balloon and baby balloon.</p>
<p>Daddy balloon says to baby balloon: &#8220;Look son, you are much too old to sleep with Mummy and Daddy; you will have to sleep in your own bed&#8221;. </p>
<p>Baby balloon protests: &#8220;I like sleeping with you and mummy&#8221;.<br />
&#8220;No you are not sleeping with us and that&#8217;s final!&#8221;<br />
&#8220;Ok&#8221;, says baby balloon sadly. </p>
<p>Two in the morning baby balloon wakes up and decides to climb into bed with Mummy and Daddy. He finds there is no room, so he unties his dads knot and lets out some air, and ties him up again. Still no room, so he unties his mummy&#8217;s knot, also lets some air out and ties her up again. He still can&#8217;t get in, so he unties his own knot, lets out some air, and ties himself up again, he finally has room, and snuggles down with mummy and daddy.</p>
<p>It&#8217;s Boxing Day and they all awake. Daddy balloon is really angry. He said: &#8220;Son! I am really disappointed with you! I said you can&#8217;t sleep with us! You&#8217;ve let me down, you&#8217;ve let your mummy down, and you&#8217;ve let yourself down to!&#8221;</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1218-the-three-balloons/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1218-the-three-balloons/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 11/18: Flight 13]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1118-flight-13/" />
		<id>http://www.amadiere.com/blog/?p=224</id>
		<updated>2009-12-28T18:25:50Z</updated>
		<published>2009-12-15T18:24:56Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[The captain comes on the PA on a flight across the pond on the 24th: "Ladies and Gentlemen, we've lost engine number one..."<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1118-flight-13/"><![CDATA[<p>What goes &#8220;Ho, Ho, Swoosh! Ho, Ho, Swoosh!&#8221;? Santa stuck in revolving doors <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_razz.gif" alt=":P" class="wp-smiley" /> </p>
<p>The captain comes on the PA on a flight across the pond on the 24th: &#8220;Ladies and Gentlemen, we&#8217;ve lost engine number one so we will be arriving 15 minutes late in New York.&#8221; A few minutes later, he announces they&#8217;ve lost number two engine and that they are looking at an hourlong delay before their arrival. Wouldn&#8217;t you know, they lose engine number three too! Two hours late! One of the passengers chirps up, &#8220;I hope we don&#8217;t lose that last engine! We&#8217;ll be up here all ruddy night!&#8221;</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1118-flight-13/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1118-flight-13/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 10/18: Christmas Tip]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1018-christmas-tip/" />
		<id>http://www.amadiere.com/blog/?p=221</id>
		<updated>2009-12-28T18:24:38Z</updated>
		<published>2009-12-14T18:23:06Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[A small tip to start this shorter than normal joke...<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1418-the-lady-with-the-glass-eye/' rel='bookmark' title='Joke 14/18: The Lady with the Glass Eye'>Joke 14/18: The Lady with the Glass Eye</a> <small>A man is dining in a fancy restaurant on Christmas...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-1018-christmas-tip/"><![CDATA[<p>A small tip to start this shorter than normal email: Never catch snowflakes with your tongue until your absolutely, positively, 100% sure that all the birds have gone south for the winter&#8230;.</p>
<p>Who sings &#8220;White Christmas&#8221; and explodes?<br />
Bang Crosby.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1418-the-lady-with-the-glass-eye/' rel='bookmark' title='Joke 14/18: The Lady with the Glass Eye'>Joke 14/18: The Lady with the Glass Eye</a> <small>A man is dining in a fancy restaurant on Christmas...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-1018-christmas-tip/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-1018-christmas-tip/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 9/18: Three Wise Men&#8230;]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-918-three-wise-men/" />
		<id>http://www.amadiere.com/blog/?p=218</id>
		<updated>2009-12-28T18:22:48Z</updated>
		<published>2009-12-11T18:22:22Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" />		<summary type="html"><![CDATA[In a small southern town in Texas there was a nativity scene that showed great skill and talent had gone into creating it.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-918-three-wise-men/"><![CDATA[<div><span style="color: #000000;">Firstly, apologies for the slow jokes. It&#8217;s poor I  know. <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_sad.gif" alt=":(" class="wp-smiley" /> </span></div>
<div><span style="color: #000000;"><br />
</span></div>
<div>In a small southern town in Texas there was a nativity scene that showed  great skill and talent had gone into creating it. One small feature stood out.  The three wise men were wearing firemen&#8217;s helmets. Totally unable to come up  with a reason or explanation, a visitor decided to ask a local what it meant. At  a shop on the edge of town, he asked the lady behind the counter about the  helments. She exploded into rage: &#8220;People these days never do read the  Bible!&#8221;</div>
<div>The visitor assured her that he did, but simply couldn&#8217;t recall anything  about Firemen in the Bible. She jerked her Bible from behind the counter and  ruffled through some pages, and finally jabbed her finger at a passage. Sticking  it in his face she said, &#8220;See, it says right here, &#8216;The three wise men came from  afar&#8217;&#8221;&#8230;.</div>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-918-three-wise-men/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-918-three-wise-men/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 8/18: Top 10 Things Not To Say When Opening Presents]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-818-top-10-things-not-to-say-when-opening-presents/" />
		<id>http://www.amadiere.com/blog/?p=214</id>
		<updated>2009-12-10T12:52:47Z</updated>
		<published>2009-12-10T12:46:48Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" /><category scheme="http://amadiere.com/blog" term="Humour" />		<summary type="html"><![CDATA[Do you know what I love doing more than anything? Trying to pack myself into a small suitcase, I can hardly contain myself! However, a close second is writing these posts.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-518-three-strings/' rel='bookmark' title='Joke 5/18: Three Strings'>Joke 5/18: Three Strings</a> <small>One Christmas Eve, when all the presents had been wrapped,...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/' rel='bookmark' title='Joke 4/18: May The Force Be With You'>Joke 4/18: May The Force Be With You</a> <small>Apologies for the lateness of Friday's joke (being as it...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-818-top-10-things-not-to-say-when-opening-presents/"><![CDATA[<p><img class="alignright" title="Snowman nose picking" src="/images/blog/SnowmanNosePicking.jpg" alt="Snowman picking his nose" width="350" height="270" /></p>
<p>Do you know what I love doing more than anything? Trying to pack myself into a small suitcase, I can hardly contain myself! However, a close second is writing these posts.</p>
<p>You&#8217;ll be glad to know that I&#8217;ve sorted out my new years resolutions by the way. I&#8217;m gonna start becoming a gymnast, true. I phoned up the Gym instructor yesterday and I said &#8220;Can you teach me to do the splits?&#8221; He said &#8220;How flexible are you?&#8221;. I said &#8220;I can&#8217;t make Tuesdays or Thursdays&#8221;.</p>
<p>Did I tell you about my mate? He&#8217;s fallen in love with two school bags. He&#8217;s bi-satchel.</p>
<p>Reminds me of the present I got my girlfriend last Christmas. I sent her a huge pile of snow. I rang her up Christmas day and said &#8220;Did you get my drift?&#8221; Her present she got me was good too, it was a pepper pot. I took that as a condiment. I was really after a good ol’ fashioned broken drum! You can’t beat ‘em!</p>
<p>I seem to meet lots of barmy people in my life, for example: my next door neighbour worships exhaust pipes, he&#8217;s a catholic converter! Then there was that guy at the zoo, chatting up a cheetah! (personally, I think he was just trying to pull a fast one). Another friend of mine phoned me just yesterday to tell me she was stuck in a hole full of water. (it&#8217;s ok, I know she means well).</p>
<p>Finally finished my Christmas shopping. Went into Waterstones to get “Karate For Beginners” by Flora Mugga and there was a trouser leg on one of the shelves. I thought, that&#8217;s a turn up for the books…</p>
<p>After that frantic intro, I’ll leave you with my <strong>Top 10 Things Not To Say When Opening Presents</strong>:</p>
<ol>
<li>Hey! There&#8217;s a gift!</li>
<li>Well, well, well &#8230;</li>
<li>Boy, if I had not recently shot up 4 sizes that would&#8217;ve fit.</li>
<li>This is perfect for wearing around the basement.</li>
<li>Gosh. I hope this never catches fire! It is fire season though. There are lots of unexplained fires.</li>
<li>If the dog buries it, I&#8217;ll be furious!</li>
<li>I love it &#8212; but I fear the jealousy it will inspire.</li>
<li>Sadly, tomorrow I enter the Federal Witness Protection Program.</li>
<li>To think &#8211; I got this the year I vowed to give all my gifts to charity.</li>
<li>&#8220;I really don&#8217;t deserve this.&#8221;</li>
</ol>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-518-three-strings/' rel='bookmark' title='Joke 5/18: Three Strings'>Joke 5/18: Three Strings</a> <small>One Christmas Eve, when all the presents had been wrapped,...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/' rel='bookmark' title='Joke 4/18: May The Force Be With You'>Joke 4/18: May The Force Be With You</a> <small>Apologies for the lateness of Friday's joke (being as it...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-818-top-10-things-not-to-say-when-opening-presents/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-818-top-10-things-not-to-say-when-opening-presents/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 7/18: Nelson Mandela]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/" />
		<id>http://www.amadiere.com/blog/?p=212</id>
		<updated>2009-12-09T12:14:55Z</updated>
		<published>2009-12-09T12:14:55Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" /><category scheme="http://amadiere.com/blog" term="Humour" />		<summary type="html"><![CDATA[Nelson Mandela is at home putting up his Christmas tree when he hears a knock at the door...<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-818-top-10-things-not-to-say-when-opening-presents/' rel='bookmark' title='Joke 8/18: Top 10 Things Not To Say When Opening Presents'>Joke 8/18: Top 10 Things Not To Say When Opening Presents</a> <small>Do you know what I love doing more than anything?...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1818-attack-of-the-killer-box/' rel='bookmark' title='Joke 18/18: Attack of the Killer Box!'>Joke 18/18: Attack of the Killer Box!</a> <small>Late last Saturday night; a young chap was walking home...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/"><![CDATA[<p>As some of you may know, had I not become a programmer, I’d probably have been a doctor. But, alas, I didn’t have the patients. I did make a few discoveries while working in the field of medicine though! It seems that eating too many Christmas decorations can cause Tinselitis! While another marked achievement was spotting that similar to the ways that Athlete’s get Athletes foot – it seems that Astronauts get Missiletoe.</p>
<blockquote><p>Nelson Mandela is at home putting up his Christmas tree when he hears a knock at the door, so he bobs off to answer it. He answers to a delivery guy who asks him to sign for a parcel.<br />
&#8220;What is in the parcel?&#8221; asks Mr Mandela.<br />
&#8220;10 car steering wheels&#8221; replies the guy.<br />
&#8220;I&#8217;m not signing for these, I didn&#8217;t order them&#8221; returns Mandela, closing the door to the delivery guy and going back to enjoy his bauble arranging.</p>
<p>The next day, the door rings again and its the same guy but this time with a different parcel, interrupting what was up to then, a fantastic Christmas dinner.<br />
&#8220;Hi, would you sign for these please?&#8221; asks the guy.<br />
&#8220;Well, it depends what they are?&#8221; says Mandela.<br />
&#8220;15 car exhausts&#8221; replies the guy.<br />
&#8220;Again, I didn&#8217;t order these, go away and check your order&#8221; says Mandela closing the door again in the delivery guys face.</p>
<p>Two days later, the same guy knocks at the door again.<br />
&#8220;Hi, another parcel&#8221; says the guy.<br />
&#8220;Look, I don&#8217;t know what sends you here, but I&#8217;ve not ordered anything you guys appear to be delivering &#8211; so can just stop coming here&#8221; says Mandela &#8211; slightly irritated at the apparent lack of listening ability from the delivery guy.<br />
&#8220;But, it has your name on the parcel! Here, see!&#8221; as the delivery guy hands him the parcel.<br />
&#8220;You fool! That&#8217;s not my name! It says it&#8217;s for Nissan Main Dealer!&#8221;</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-818-top-10-things-not-to-say-when-opening-presents/' rel='bookmark' title='Joke 8/18: Top 10 Things Not To Say When Opening Presents'>Joke 8/18: Top 10 Things Not To Say When Opening Presents</a> <small>Do you know what I love doing more than anything?...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1818-attack-of-the-killer-box/' rel='bookmark' title='Joke 18/18: Attack of the Killer Box!'>Joke 18/18: Attack of the Killer Box!</a> <small>Late last Saturday night; a young chap was walking home...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 6/18: Singing Simon]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-618-singing-simon/" />
		<id>http://www.amadiere.com/blog/?p=209</id>
		<updated>2009-12-08T12:27:47Z</updated>
		<published>2009-12-08T12:27:47Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" /><category scheme="http://amadiere.com/blog" term="Humour" />		<summary type="html"><![CDATA[A young man walks onto the stage of the Christmas Eve "Stars In Their Eyes" Special, using crutches, with a plaster cast from his feet to his hips.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1718-the-son-without-a-torso/' rel='bookmark' title='Joke 17/18: The Son Without A Torso'>Joke 17/18: The Son Without A Torso</a> <small>A man is waiting for wife to give birth on...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-618-singing-simon/"><![CDATA[<p>The awesomeness keeps coming! Are you really sure that you can manage to cope with another 12 of these side splitting funnies? In fact, while I remember, someone asked me a question the other day, &#8220;What&#8217;s red and doesn&#8217;t exist?&#8221;&#8230; I replied, &#8220;No tomatoes&#8221; <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<p>Ok, ok! A true classic Christmas Cracker!</p>
<blockquote><p>A young man walks onto the stage of the Christmas Eve &#8220;Stars In Their Eyes&#8221; Special, using crutches, with a plaster cast from his feet to his hips.</p>
<p>Matthew Kelly introduces him as Simon. &#8216;It&#8217;s very brave of you to come out here,&#8217; says Matthew. &#8216;Please tell the audience what happened?&#8217;</p>
<p>&#8216;Well&#8217; replies Simon &#8216;about a year ago, I was driving with my uncle when we had a really bad accident.</p>
<p>&#8216;Unfortunately my uncle was killed outright but I survived. I was trapped in the car for six hours before I was eventually cut free. The Doctors had me in surgery for 12 hours but they couldn&#8217;t save my legs.&#8217;</p>
<p>&#8216;That&#8217;s terrible. But I see you have legs now. Are they artificial?&#8217; asks Matthew.</p>
<p>&#8216;No Matthew, while I was in hospital the doctors informed me that my uncle had in fact died, but that his legs were fine and with all the advances in medical science, they could graft the bottom half of his body onto mine. As you can see the operation was successful. I have been having physiotherapy for six months and hope to be walking fully again by the end of the year. A huge round of applause erupts from the audience.</p>
<p>Kelly responds with: &#8216;That&#8217;s an unbelievable story. So tonight, who are you going to be?&#8217;</p>
<p>Tonight, Matthew, I am going to be… Simon and Halfuncle&#8217;</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1718-the-son-without-a-torso/' rel='bookmark' title='Joke 17/18: The Son Without A Torso'>Joke 17/18: The Son Without A Torso</a> <small>A man is waiting for wife to give birth on...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-618-singing-simon/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-618-singing-simon/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 5/18: Three Strings]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-518-three-strings/" />
		<id>http://www.amadiere.com/blog/?p=207</id>
		<updated>2009-12-07T12:27:27Z</updated>
		<published>2009-12-07T12:27:27Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" /><category scheme="http://amadiere.com/blog" term="Humour" />		<summary type="html"><![CDATA[One Christmas Eve, when all the presents had been wrapped, there were just three pieces of string left...<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-218-karpov-v-kasparov/' rel='bookmark' title='Joke 2/18: Jockey For Position'>Joke 2/18: Jockey For Position</a> <small>Riding the favourite at Cheltenham, a jockey was well ahead...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/' rel='bookmark' title='Joke 4/18: May The Force Be With You'>Joke 4/18: May The Force Be With You</a> <small>Apologies for the lateness of Friday's joke (being as it...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-518-three-strings/"><![CDATA[<p>One Christmas Eve, when all the presents had been wrapped, there were just three pieces of string left.</p>
<p>&#8216;You know, we&#8217;ll probably just be thrown on the fire,&#8217; String No.1 said.<br />
&#8216;Or in the bin!&#8217; String No 2 moaned.<br />
&#8216;We can&#8217;t have that!&#8217; String No 3 cried.<br />
&#8216;So what can we do?&#8217; the other two pieces asked.<br />
&#8216;Let&#8217;s go out for a meal!&#8217; String No 3 suggested.<br />
And off they went down to the &#8216;Greasy Penguin Cafe. It was packed with Christmas revellers. String No 1 said, &#8216;Right, lads, what&#8217;ll we eat?&#8217;<br />
&#8216;I&#8217;d like some tomato soup,&#8217; said String No 2.<br />
&#8216;And how about stuffed turkey to follow&#8230;and we could have Christmas pudding for afters,&#8217; said String No 3.</p>
<p>String No 1 went to the counter and said, &#8216;Three tomato soups, three stuffed turkeys and three Christmas puddings, my good man!&#8217;</p>
<p>The waiter took one look at him and said, &#8216;push off, shorty. I don&#8217;t serve pieces of string&#8230;.and you&#8217;re just a piece of string!&#8217;</p>
<p>String No 1 went back to the others. &#8216;He refused to serve me!&#8217;<br />
String No 2 asked, &#8216;Did you say &#8216;please&#8217;?&#8217;<br />
&#8216;No&#8217; admitted String No 1.<br />
&#8216;Then let me try!&#8217;<br />
String No 2 went to the bar and said, &#8216;Three tomato soups, three stuffed turkeys and three Christmas puddings, please.&#8217;</p>
<p>But the waiter replied, &#8216;push off, shorty. I don&#8217;t serve pieces of string&#8230;..and you&#8217;re just a piece of string!&#8217;</p>
<p>String No 2 went back to the others to report his failure. &#8216;Here, lads, let me try,&#8217; String No 3 offered. But, before he went to the bar he tied a knot in the top of his head and fluffed the end out till he looked like a piece of punk string.</p>
<p>He went up to the bar. &#8216;Three tomato soups, three stuffed turkeys and three Christmas puddings, please!&#8217;</p>
<p>The waiter looked at him and sighed. &#8216;Push off shorty. I don&#8217;t serve pieces of string&#8230;.and you&#8217;re just a piece of string!&#8217;</p>
<p>And string no 3 replied &#8216;No. I&#8217;m a frayed knot!&#8217;</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-218-karpov-v-kasparov/' rel='bookmark' title='Joke 2/18: Jockey For Position'>Joke 2/18: Jockey For Position</a> <small>Riding the favourite at Cheltenham, a jockey was well ahead...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/' rel='bookmark' title='Joke 4/18: May The Force Be With You'>Joke 4/18: May The Force Be With You</a> <small>Apologies for the lateness of Friday's joke (being as it...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-518-three-strings/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-518-three-strings/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 4/18: May The Force Be With You]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/" />
		<id>http://www.amadiere.com/blog/?p=204</id>
		<updated>2009-12-07T12:17:38Z</updated>
		<published>2009-12-07T12:17:38Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" /><category scheme="http://amadiere.com/blog" term="Humour" />		<summary type="html"><![CDATA[Apologies for the lateness of Friday's joke (being as it is now Monday - I feel you have just reason to be upset!). So I shall not delay, here today is Friday's fantastic funny - followed shortly by todays.. :)<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-518-three-strings/' rel='bookmark' title='Joke 5/18: Three Strings'>Joke 5/18: Three Strings</a> <small>One Christmas Eve, when all the presents had been wrapped,...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/"><![CDATA[<p>Apologies for the lateness of Friday&#8217;s joke (being as it is now Monday &#8211; I feel you have just reason to be upset!). So I shall not delay, here today is Friday&#8217;s fantastic funny &#8211; followed shortly by today&#8217;s.. <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<blockquote><p>Darth Vader and Luke Skywalker were having one of their little father and son chats&#8230; lightsabres drawn and sparks flying. Vader pinned Luke against a bulkhead and glared into his face, &#8220;I know what you&#8217;re getting for Christmas, Luke,&#8221; he said, &#8220;Ohhh, yes! I know!&#8221;.</p>
<p>Luke fought himself free and jumped to a higher platform just out of Vader&#8217;s reach, &#8220;How do you know!?&#8221; Luke yelled at him, &#8220;How do you know what I&#8217;m getting for Christmas!?&#8221;</p>
<p>Darth Vader shot Luke an icy glare, &#8220;The force is with me&#8230; I felt your presents.&#8221;</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-518-three-strings/' rel='bookmark' title='Joke 5/18: Three Strings'>Joke 5/18: Three Strings</a> <small>One Christmas Eve, when all the presents had been wrapped,...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 3/18: Gary Kasparov comes for tea]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-318-gary-kasparov-comes-for-te/" />
		<id>http://www.amadiere.com/blog/?p=201</id>
		<updated>2009-12-03T12:57:24Z</updated>
		<published>2009-12-03T12:57:24Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" /><category scheme="http://amadiere.com/blog" term="Humour" />		<summary type="html"><![CDATA[Gary Kasparov comes around for tea.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-318-gary-kasparov-comes-for-te/"><![CDATA[<p>Last year, I invited Gary Kasparov, master Chess player to my house for tea. I made the silly mistake of laying the table with a checkered cloth &#8211; it took him 45 minutes to pass the salt. I&#8217;m quite a fan of chess, but my computer beat me at it the other day. Fortunately, my PC isn&#8217;t as good at kick boxing. I think it&#8217;ll have to forfit the deciding round&#8230;</p>
<blockquote><p>During the recent Karpov-Kasparov world chess championships they came to an adjournment and left for their hotel. In the lobby of the hotel several chess enthusiasts could be heard bragging, &#8220;I could beat Karpov with no problem&#8221;.</p>
<p>&#8220;Oh yeah, I could beat both of them at the same time.&#8221;</p>
<p>&#8220;That&#8217;s nothing, I could beat both of them blindfolded!&#8221;</p>
<p>Finally, the hotel manager had had enough and threw them all out of the hotel.</p>
<p>&#8220;But why?&#8221; a bystander asked.</p>
<p>&#8220;Because,&#8221; the manager replied &#8220;I hate &#8230;chess nuts boasting by an open foyer!&#8221;</p></blockquote>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-318-gary-kasparov-comes-for-te/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-318-gary-kasparov-comes-for-te/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 2/18: Jockey For Position]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-218-karpov-v-kasparov/" />
		<id>http://www.amadiere.com/blog/?p=196</id>
		<updated>2009-12-03T12:44:03Z</updated>
		<published>2009-12-02T12:50:22Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" /><category scheme="http://amadiere.com/blog" term="Humour" />		<summary type="html"><![CDATA[Riding the favourite at Cheltenham, a jockey was well ahead of the field...<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-518-three-strings/' rel='bookmark' title='Joke 5/18: Three Strings'>Joke 5/18: Three Strings</a> <small>One Christmas Eve, when all the presents had been wrapped,...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1718-the-son-without-a-torso/' rel='bookmark' title='Joke 17/18: The Son Without A Torso'>Joke 17/18: The Son Without A Torso</a> <small>A man is waiting for wife to give birth on...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/' rel='bookmark' title='Joke 7/18: Nelson Mandela'>Joke 7/18: Nelson Mandela</a> <small>Nelson Mandela is at home putting up his Christmas tree...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-218-karpov-v-kasparov/"><![CDATA[<p><img class="alignright" title="Nativity Scene" src="/images/blog/nativity.jpg" alt="" />I&#8217;m just back in the office after a trip out into the town centre. I walked past a toyshop window to see what this years &#8220;must have children&#8217;s toy&#8221; is. My word they have some rubbish! One I saw was a &#8220;Neurotic Doll&#8221; &#8211; it comes already wound up. Another was &#8220;Divorced Barbie&#8221; &#8211; apparently comes with all Ken&#8217;s stuff. <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<p>On with the joke&#8230;</p>
<blockquote><p>Riding the favourite at Cheltenham, a jockey was well ahead of the field. Suddenly he was hit on the head by a turkey and a string of sausages.</p>
<p>He managed to keep control of his mount and pulled back into the lead, only to be struck by a box of Christmas crackers and a dozen mince pies as he went over the last fence.</p>
<p>With great skill he managed to steer the horse to the front of the field once more when, on the run in, he was struck on the head by a bottle of sherry and a Christmas pudding.</p>
<p>Thus distracted, he succeeded in coming only second.</p>
<p>He immediately went to the stewards to complain that he had been&#8230; seriously hampered!</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-518-three-strings/' rel='bookmark' title='Joke 5/18: Three Strings'>Joke 5/18: Three Strings</a> <small>One Christmas Eve, when all the presents had been wrapped,...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-1718-the-son-without-a-torso/' rel='bookmark' title='Joke 17/18: The Son Without A Torso'>Joke 17/18: The Son Without A Torso</a> <small>A man is waiting for wife to give birth on...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-718-nelson-mandela/' rel='bookmark' title='Joke 7/18: Nelson Mandela'>Joke 7/18: Nelson Mandela</a> <small>Nelson Mandela is at home putting up his Christmas tree...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-218-karpov-v-kasparov/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-218-karpov-v-kasparov/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Joke 1/18: Aviation Authorities]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/12/joke-118-aviation-authorities/" />
		<id>http://www.amadiere.com/blog/?p=192</id>
		<updated>2009-12-01T13:21:14Z</updated>
		<published>2009-12-01T13:21:14Z</published>
		<category scheme="http://amadiere.com/blog" term="Jokes" /><category scheme="http://amadiere.com/blog" term="Humour" />		<summary type="html"><![CDATA[Ho, ho, ho! Merry Christmas! For those that don't know of the great tradition that has existed since 2005, this is the start of my Joke Advent! A joke for every working day before Christmas in December! This year, the luck has fallen so that you get 18 delicious morsels to much upon!<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/' rel='bookmark' title='Joke 4/18: May The Force Be With You'>Joke 4/18: May The Force Be With You</a> <small>Apologies for the lateness of Friday's joke (being as it...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-218-karpov-v-kasparov/' rel='bookmark' title='Joke 2/18: Jockey For Position'>Joke 2/18: Jockey For Position</a> <small>Riding the favourite at Cheltenham, a jockey was well ahead...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/12/joke-118-aviation-authorities/"><![CDATA[<p>Ho, ho, ho! Merry Christmas! For those that don&#8217;t know of the great tradition that has existed since 2005, this is the start of my Joke Advent! A joke for every working day before Christmas in December! This year, the luck has fallen so that you get 18 delicious morsels to much upon!</p>
<p>I&#8217;ve also decided to go World Wide! You can now get Joke Advent 2.0 by a wealth of different options!</p>
<ul>
<li>Browse my personal blog  (the newest one will always be on the homepage) at <a href="http://www.amadiere.com/">Amadiere.com</a></li>
<li>You can subscribe to the <a href="http://www.amadiere.com/blog/feed/">RSS feed from my blog</a> if that floats yer boat&#8230;</li>
<li>Do you tweet? Then you can follow me on Twitter <a href="http://twitter.com/Amadiere">@Amadiere</a></li>
<li>Are you <a href="http://www.facebook.com/Amadiere">my friend on Facebook</a>? Links will be posted there daily too!</li>
<li>Or.. if you prefer Vanilla &#8211; if you work with me, you can asked to be included (or excluded) from the email I send around!</li>
</ul>
<p>So &#8211; here it is, the very first Christmas Joke of the 2009 season!</p>
<blockquote><p>Santa Claus, like all pilots, gets regular visits from the Federal Aviation Administration (FAA).  It was shortly before Christmas when the FAA examiner arrived.</p>
<p>In preparation, Santa had the elves wash the sled and bathe all the reindeer.   Santa got his logbook out and made sure all his paperwork was in order.</p>
<p>The examiner walked slowly around the sled.  He checked the reindeer harnesses, the landing gear and Rudolph&#8217;s nose.  He painstakingly reviewed Santa&#8217;s weight and balance calculations for the sled&#8217;s enormous payload.</p>
<p>Finally, they were ready for the checkride.</p>
<p>Santa got in and fastened his seat belt and shoulder harness and checked the compass.  Then the examiner hopped in carrying, to Santa&#8217;s surprise, a shotgun.</p>
<p>&#8220;What&#8217;s that for?&#8221; asked Santa incredulously.</p>
<p>The examiner winked and said, &#8220;I&#8217;m not supposed to tell you this, but you&#8217;re gonna lose an engine on takeoff.&#8221;</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/12/joke-1318-how-the-fairy-came-to-be-atop-the-christmas-tree/' rel='bookmark' title='Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree'>Joke 13/18: How The Fairy Came To Be Atop The Christmas Tree</a> <small>On Christmas Eve Santa Claus was getting ready for his...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-418-may-the-force-be-with-you/' rel='bookmark' title='Joke 4/18: May The Force Be With You'>Joke 4/18: May The Force Be With You</a> <small>Apologies for the lateness of Friday's joke (being as it...</small></li>
<li><a href='http://amadiere.com/blog/2009/12/joke-218-karpov-v-kasparov/' rel='bookmark' title='Joke 2/18: Jockey For Position'>Joke 2/18: Jockey For Position</a> <small>Riding the favourite at Cheltenham, a jockey was well ahead...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/12/joke-118-aviation-authorities/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/12/joke-118-aviation-authorities/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[BEHOLD! The coming of ASP.NET 4.0!]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/11/behold-the-coming-of-aspnet4-0/" />
		<id>http://www.amadiere.com/blog/?p=185</id>
		<updated>2009-11-07T21:41:40Z</updated>
		<published>2009-11-09T20:30:52Z</published>
		<category scheme="http://amadiere.com/blog" term="ASP.NET" /><category scheme="http://amadiere.com/blog" term="C#" /><category scheme="http://amadiere.com/blog" term="MVC" />		<summary type="html"><![CDATA['Tis a day of reconing upon us! The mighty that hath enjoyed the fruits of our labour shall become our lesser kin. ASP.NET#3.5 is being bumped up A WHOLE HALF VERSION! When you've regained your breath (have a cup of tea, if it helps) - read on for a breakdown of the glory that shall shine bright in all that is sparky, shiny and new!<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/07/nerd-dinner/' rel='bookmark' title='Nerd Dinner'>Nerd Dinner</a> <small>I was going to write a review on a great...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/11/behold-the-coming-of-aspnet4-0/"><![CDATA[<p>&#8216;Tis a day of reconing upon us! The mighty that hath enjoyed the fruits of our labour shall become our lesser kin. <a href="http://asp.net">ASP.NET#3.5</a> is being bumped up A WHOLE HALF VERSION! When you&#8217;ve regained your breath (have a cup of tea, if it helps) &#8211; read on for a breakdown of the glory that shall shine bright in all that is sparky, shiny and new!</p>
<p>First, for me, the major feature has to be something that is already available: <strong><a href="http://asp.net/mvc">ASP.NET MVC</a></strong> &#8211; now part of the &#8216;Out Of The Box&#8217; experience and no longer required to be a separate download (though, still will be for ASP.NET 3.5). This in itself is worthy of a good cold shower, but get this&#8230; it&#8217;s <strong>version 2</strong>! Oh yeah, sweetness itself.</p>
<p>MVC 2.0 isn&#8217;t actually available as a release version at the moment and is in fact just <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=d3f06bb9-5f5f-4f46-91e9-813b3fce2db1&amp;displaylang=en">a preview version</a>. However, well worthy of look if you are at all interested in the original MVC. If you&#8217;ve been unable to see the new features in 2.0, then I seriously do not understand how you can sleep at night. In my bid to cure your insomnia, here are a few of the highlights, though, I could go on!</p>
<ul>
<li><strong><a href="http://haacked.com/archive/2009/07/31/single-project-areas.aspx">Areas</a></strong><strong> </strong>are being introduced to allow you to easily spread your code apart into logical parts. E.g. You can have an area for your User / Account management stuff, and an area for your Product Listings. This allows you to keep the MVC pattern but in segmented way. Your User Area would have a directory for Controllers, Models and Views, and your Product Area would have separate areas too.</li>
<li><strong><a href="http://weblogs.asp.net/scottgu/archive/2009/07/31/asp-net-mvc-v2-preview-1-released.aspx">DataAnnotation Validation</a></strong><strong> </strong>is voodoo. A black magic that makes you sit back and go: &#8220;WTF, is that it&#8221;? It allows you to declare the requirements of a field in a single place within your application, then any time something attempts to update it, the validation must be passed.</li>
<li><strong>Default Values </strong>are easier to declare now.

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// something old</span>
<span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Browse<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> category, <span style="color: #008000;">&#91;</span>DefaultValue<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #6666cc; font-weight: bold;">int</span> page<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #008080; font-style: italic;">// something new</span>
<span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Browse<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> category, <span style="color: #6666cc; font-weight: bold;">int</span> page <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</li>
<li>They have shortened the attribute <strong>[HttpPost] </strong>. I know, I saved the best until last!

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// out with the old</span>
<span style="color: #008000;">&#91;</span>AcceptVerbs<span style="color: #008000;">&#40;</span>HttpVerbs<span style="color: #008000;">.</span><span style="color: #0000FF;">Post</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Create<span style="color: #008000;">&#40;</span>Product product<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #008080; font-style: italic;">// in with the new!</span>
<span style="color: #008000;">&#91;</span>HttpPost<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Create<span style="color: #008000;">&#40;</span>Product product<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</li>
</ul>
<p>As for the rest of <strong>ASP.NET 4.0</strong>, what can you look forward to? Well!</p>
<ul>
<li>The superbly sweet&#8230;

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;%:</span>productDescription<span style="color: #008000;">%&gt;</span></pre></td></tr></table></div>

<p>Did you see it? The shorthand response.write alternative which was the equals sign has a rival. But not a dark nemesis with fire-breathing tentacles, nope, a bright white halo-toting angel rival. Simply replace the equal sign with a colon and you have a<strong> </strong><strong><a href="http://haacked.com/archive/2009/09/25/html-encoding-code-nuggets.aspx">HTML Encoded Response.Write alternative</a></strong>. Finally, what seems to be a simple solution to reduce considerably, the risk of XSS attacks.</li>
<li><strong><a href="http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx">URL Routing</a></strong> (or of course, URL Rowwting if you are from the US) in much the same way that MVC has it. If you&#8217;re familiar with MVC 1, you&#8217;ll know the awesomeness that is the friendly URLs that they can produce. With ASP.NET4, this gesture is extended to the general Webforms environment.</li>
<li><strong><a href="http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx">Auto-Starting Web Applications</a></strong> are here! No longer do you need to set up a cron job to make sure that a random visitor doesn&#8217;t have to wait for 20 seconds while your application reloads itself into memory. A few tweaks and bliss is yours (and your customers).</li>
<li><strong><a href="http://weblogs.asp.net/scottgu/archive/2009/08/25/clean-web-config-files-vs-2010-and-net-4-0-series.aspx">Web.config</a></strong><strong><a href="http://weblogs.asp.net/scottgu/archive/2009/08/25/clean-web-config-files-vs-2010-and-net-4-0-series.aspx"> has been on a diet</a></strong>. It&#8217;s shredded almost all of its weight. The only things that need to appear within this now are config settings that you actually want to change from their default. Genius!

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;system.web<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compilation</span> <span style="color: #000066;">debug</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">targetFramework</span>=<span style="color: #ff0000;">&quot;4.0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/system.web<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;system.webServer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modules</span> <span style="color: #000066;">runAllManagedModulesForAllRequests</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/system.webServer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

</li>
<li>The <strong>Entity Framework </strong>has become so awesome, it&#8217;s skipped a version or two to become <a href="http://blogs.msdn.com/adonet/archive/2009/06/22/announcing-entity-framework-feature-ctp-1.aspx">EF4.0</a>, and some of the upgrades make it strong and compelling contender for your model structuring! It contains considerably less suck than the first version.</li>
</ul>
<p>All this &#8216;win&#8217; makes you nervous? How can the world not implode? That my friend, I do not know &#8211; I think it may be like the Y2K Doomsday predictions &#8211; its the .NET4 DOOM! Either way, it&#8217;s looking good in the ASP.NET world at the moment and I can&#8217;t wait for it to land on my desktop!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/07/nerd-dinner/' rel='bookmark' title='Nerd Dinner'>Nerd Dinner</a> <small>I was going to write a review on a great...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/11/behold-the-coming-of-aspnet4-0/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/11/behold-the-coming-of-aspnet4-0/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Quick Start Guide to Theming WordPress]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/11/quick-start-guide-to-theming-wordpress/" />
		<id>http://www.amadiere.com/blog/?p=180</id>
		<updated>2009-11-05T20:01:41Z</updated>
		<published>2009-11-05T20:01:41Z</published>
		<category scheme="http://amadiere.com/blog" term="Web Design" /><category scheme="http://amadiere.com/blog" term="Wordpress" /><category scheme="http://amadiere.com/blog" term="CSS" /><category scheme="http://amadiere.com/blog" term="PHP" />		<summary type="html"><![CDATA[There a number of good WordPress theming guides out there (the one at WPDesigner.com is especially excellent) , so I don't intend to replace them and their great detail. This post is merely some simple pointers for those that already know how to create HTML and understand enough about PHP to get by.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/11/quick-start-guide-to-theming-wordpress/"><![CDATA[<p>It&#8217;s taken a while, but I finally revamped the look of my site. Part of the problem, as always, is coming up with a design I can put up with for a while. I think that this red attempt should be OK for a while.</p>
<p>There a number of good WordPress theming guides out there (<a href="http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/">the one at WPDesigner.com is especially excellent</a>) , so I don&#8217;t intend to replace them and their great detail. This post is merely some simple pointers for those that already know how to create HTML and understand enough about PHP to get by.</p>
<p><strong>Create yourself a design</strong>! I&#8217;m totally gonna gloss over this part, despite being the major time consuming bit. I&#8217;m a big advocate of the multiple stage design process (Image -&gt; HTML -&gt; System Template). Basically &#8211; once you have a HTML / CSS version of what you want to achieve, its then time to work on how to get that into your WordPress Blog.</p>
<p><strong>Create yourself a theme directory</strong> &#8211; this is within your /wp-content/themes directory and should make your theme sound totally awesome. Something like &#8220;Totally Rockin&#8217; Monkey Burgers&#8221; should be sufficient.</p>
<p><strong>Create your CSS file &#8211; </strong>Just copy your CSS file to your theme directory and make sure its named stylesheet.css You should also make sure you have something like the following in the top of it:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/*
Theme Name: Totally Rockin' Monkey Burgers
Theme URI: http://www.amadiere.com/blog/2009/11/quick-start-guide-to-theming-wordpress/
Description: Theme creation example.
Author: Alex Holt
Author URI: http://www.amadiere.com
Version: 1.0
Tags: red,white,fluid-fixed-width,two-columns
*/</span></pre></td></tr></table></div>

<p><strong>Copy the PHP files from the Default theme &#8211; </strong>these act as a great starting point for your adaptations. You can now adapt these to pull together to create your style. They are split into 5 easy to comprehend areas by default. You don&#8217;t need to follow this however, you can simply put everything in one big file &#8211; though I find code becomes a lot more manageable when split over a few pages:</p>
<p style="padding-left: 30px;"><strong>Index &#8211; </strong>the glue of the page, it calls the other templates where required. The key lines are:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
comments_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p style="padding-left: 30px;"><strong>Header &#8211; </strong>has the top part of your blog that is repeated throughout your site.</p>
<p style="padding-left: 30px;"><strong>Footer &#8211; </strong>similar to the header, the code that appears at the foot of every page.</p>
<p style="padding-left: 30px;"><strong>Sidebar &#8211; </strong>your navigation bar. For this, you effectively only need a small bit of code. The &#8216;dynamic_sidebar&#8217; function calls all the Widgets that are enabled. This then basically generates a load of &lt;li&gt;&#8217;s, one for each Widget (these sometimes have nested UL&#8217;s and LI&#8217;s themselves):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div id=&quot;navigation&quot;&gt;
  &lt;ul&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> 	<span style="color: #666666; font-style: italic;">/* Widgetized sidebar, if you have the plugin installed. */</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;/ul&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p style="padding-left: 30px;">It is however worth mentioning that in circumstances that there are no Widgets &#8211; the above would output nothing but an empty unordered list.</p>
<p style="padding-left: 30px;"><strong>Comments &#8211; </strong>Just displays the comments (if set to show), below each post. While there are a lot of bits in here, the main bit can be a touch hidden and is signified by a foreach loop within an Ordered List &#8220;commentlist&#8221;.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;ol id=&quot;commentlist&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">80</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;div class=&quot;commentmeta&quot;&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_type<span style="color: #009900;">&#40;</span>_x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'noun'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Trackback'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Pingback'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'by'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_author_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> — <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        @ &lt;a href=&quot;#comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_time<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_comment_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Edit This&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' |'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;/div&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_text<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/li&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ol&gt;</pre></td></tr></table></div>

<p><strong>Create yourself a screenshot</strong> &#8211; it&#8217;ll make you feel good and will help you recognise the awesomeness that is your style when you are browsing through the hundreds you downloaded that are all tosh when compared with yours!</p>
<p><strong>And that&#8217;s your lot.</strong></p>
<p>As I mentioned, I don&#8217;t want to replace what is already out there on the web with this guide. In fact, I don&#8217;t the word &#8216;guide&#8217; as it gets me quite excited and I expect something more dramatic than I&#8217;ve delivered. I think maybe prefixed with &#8216;Quick Start&#8217; however, it might become acceptable&#8230; Yes. Yes, that seems not to have got my blood pumping!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/11/quick-start-guide-to-theming-wordpress/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/11/quick-start-guide-to-theming-wordpress/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[PHP Connections to MSSQL &amp; ntwdblib.dll]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/07/php-connections-to-mssql-ntwdblib-dll/" />
		<id>http://www.amadiere.com/blog/?p=137</id>
		<updated>2009-11-01T09:50:25Z</updated>
		<published>2009-07-29T11:40:55Z</published>
		<category scheme="http://amadiere.com/blog" term="Microsoft SQL" /><category scheme="http://amadiere.com/blog" term="PHP" />		<summary type="html"><![CDATA[Having problems connecting to an MSSQL instance from PHP / Apache on a Windows box? Is it timing out after 5 seconds and giving you the old one-finger-salute while shouting in an outrageous accent: "connection failed" as if it can't find the server? Have no fear - its the new version of ntwdblib.dll!<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/07/php-connections-to-mssql-ntwdblib-dll/"><![CDATA[<p>One of the systems within my workplace is a PHP5 application (via Apache on Windows) that uses MySQL5.0 as its main database. However, in addition to this, it has a requirement to an old Microsoft SQL7 Server which was running Windows NT. This machine gave up the ghost and was restored to a SQL2000 machine and it began to work again.</p>
<p>Except from the blasted PHP application mentioned above ! The swine!</p>
<p>So, after digging around and debugging and limiting down the dependencies that it could be, we established that:</p>
<ul>
<li>It wasn&#8217;t MDB2 which we are using to abstract the DB connections, as mssql_connect would fail also.</li>
<li>It wasn&#8217;t a change in DB name, Server name, user, password or permissions as we could connect with identical criteria from elsewhere.</li>
<li>It wasn&#8217;t a networking error, as Query Express was able to connect when ran from the web-server itself.</li>
<li>It wasn&#8217;t remembering anything about the old server as we reset the Apache instances and rebooted the entire box to see if it would help.</li>
<li>It wasn&#8217;t the code, as we had EXACTLY the same code running against the live system from our development server and it didn&#8217;t even bat an eyelid.</li>
</ul>
<p>Eventually, we happened across a few posts that eluded to the fact that PHP5 ships with a DLL of suckiness.</p>
<p>The difference between the live Apache web server, compared with the development machine was that MSSQL2000 was actually installed on the development one (along with a bunch of other crap). Because this install is in place, it meant that in C:\Windows\System32 was a working and newer copy of ntwdblib.dll .</p>
<p>The bottom line is that the fix is simply to replace the old version of ntwdblib.dll (which comes with PHP5, noted as version: 2000.8.2.0) and replace it with version 2000.80.194.0  Once we started the Apache instances again &#8211; BOOM! Amazingness reborn! Our web-servers could see SQL 2000 instances again! Fantastic!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/07/php-connections-to-mssql-ntwdblib-dll/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/07/php-connections-to-mssql-ntwdblib-dll/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Nerd Dinner]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/07/nerd-dinner/" />
		<id>http://www.amadiere.com/blog/?p=126</id>
		<updated>2009-11-01T09:44:51Z</updated>
		<published>2009-07-12T11:30:35Z</published>
		<category scheme="http://amadiere.com/blog" term="C#" /><category scheme="http://amadiere.com/blog" term="MVC" /><category scheme="http://amadiere.com/blog" term="Reviews" /><category scheme="http://amadiere.com/blog" term="ASP.NET" /><category scheme="http://amadiere.com/blog" term="Visual Studio 2008" />		<summary type="html"><![CDATA[I was going to write a review on a great book I read over the last month or two called ASP.NET MVC 1.0 which is written collaboratively by Scott Hanselman, Scott Guthrie, Phil Haack and Rob Conery. Then I decided that one of the main things I really liked about the book was the first chapter which is a great tutorial on ASP.NET MVC 1.0.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/11/behold-the-coming-of-aspnet4-0/' rel='bookmark' title='BEHOLD! The coming of ASP.NET 4.0!'>BEHOLD! The coming of ASP.NET 4.0!</a> <small>'Tis a day of reconing upon us! The mighty that...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/07/nerd-dinner/"><![CDATA[<p><a href="http://www.amazon.co.uk/gp/product/0470384611?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0470384611"><img class="alignright" src="/blog/wp-content/uploads/2009/06/41vsFoLZq9L._SL160_.jpg" border="0" alt="" /></a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0470384611" border="0" alt="" width="1" height="1" />I was going to write a review on a great book I read over the last month or two called <a href="http://www.amazon.co.uk/gp/product/0470384611?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0470384611">Professional ASP.NET MVC 1.0</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0470384611" border="0" alt="" width="1" height="1" /> which is published by <a href="http://www.wrox.com/">Wrox</a> and written collaboratively by <a href="http://www.hanselman.com/blog/">Scott Hanselman</a>, <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a>, <a href="http://haacked.com/">Phil Haack</a> and <a href="http://blog.wekeroad.com/">Rob Conery</a>. Then I decided that one of the main things I really liked about the book was the first chapter <a href="http://www.nerddinner.com/">&#8220;NerdDinner&#8221;</a> which is a great tutorial on <a href="http://www.asp.net/mvc/">ASP.NET MVC 1.0</a>.</p>
<p>I will first of all prefix this review with the very relevant disclaimer that I am (at this moment) a novice when it comes to MVC, which my background strongly in Classic ASP and PHP. I have a fair understanding and beginners comprehension of a lot of the core elements &#8211; but I&#8217;m still almost always looking up answers to very simple and run-of-the-mill problems.</p>
<p>The chapter is <a href="http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx">available online</a>, free of charge, from<a href="http://weblogs.asp.net/scottgu/archive/2009/04/01/asp-net-mvc-1-0.aspx"> ScottGu&#8217;s blog</a> and the entire project has been added to version control at <a href="http://nerddinner.codeplex.com/">NerdDinner @ Codeplex</a> (a useful tool when typing large amounts of text!).</p>
<p>The chapter covers a number of topics in addition to the core functionality of MVC, this includes things such as LINQ, Unit Testing, AJAX, Memberships &amp; Roles and mapping software. Starting off with an empty Visual Studio, you can have a fully working NerdDinner website within an afternoons worth of work (or if you are me, a couple of nights worth).</p>
<p>I would highly recommend making some time to do this chapter if you are a ASP.NET developer. It will help show you the benefits and disadvantages of MVC. However, there are a few pitfalls as you are progressing through the chapter and I feel that the testing of the chapter could have been improved as there were errors and omissions scattered around as I was trying to complete it. There weren&#8217;t lots and errors were mostly ones which could be guessed and fixed without too much stress. Even in instances where you are unable to find the mistake, a look through the CodePlex site would give you a good indication as to what you were doing wrong.</p>
<p>I found the most frequent errors were that of ensuring the using statements were made, or a variable named differently on one page to the pages preceding. It takes me back to the good ol&#8217; days of copying BASIC code from the back of computer magazines to make a spider walk across the screen and go up on a string from its web. Ahh, that&#8217;s classy stuff.</p>
<p>The book and the chapter do a great job of letting you know the key advantages and disadvantages of using MVC, outlining some of the core differences and changes to the ways in which applications are designed/developed. I particularly liked the way the application was grown and improved, simulating actual software development. Instead of the application being coded to the full application, it is initially built very basic and as the chapter goes on, layers of complexity are added bit by bit. This served for a greater understanding of how you might approach such development.</p>
<p>Overall, it&#8217;s one of my favourite and relevant tutorials and I highly advise finding the time to have a go at it. I&#8217;d also go so far as to say it&#8217;s very much worth spending the pennies and <a href="http://www.amazon.co.uk/gp/product/0470384611?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0470384611">getting yourself a copy of the book</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0470384611" border="0" alt="" width="1" height="1" /> too. It&#8217;s even sticks to the age old tradition of having funny pictures of developers on the cover and that alone is worth the dosh! <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/11/behold-the-coming-of-aspnet4-0/' rel='bookmark' title='BEHOLD! The coming of ASP.NET 4.0!'>BEHOLD! The coming of ASP.NET 4.0!</a> <small>'Tis a day of reconing upon us! The mighty that...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/07/nerd-dinner/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/07/nerd-dinner/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Changing Hosting Providers &amp; IIS WordPress]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/06/changing-hosting-providers-and-iis-wordpress/" />
		<id>http://www.amadiere.com/blog/?p=123</id>
		<updated>2009-11-01T09:55:15Z</updated>
		<published>2009-06-28T09:08:53Z</published>
		<category scheme="http://amadiere.com/blog" term="Hosting" /><category scheme="http://amadiere.com/blog" term="Domains" /><category scheme="http://amadiere.com/blog" term="Permalinks" /><category scheme="http://amadiere.com/blog" term="Wordpress" />		<summary type="html"><![CDATA[There has been half a reason for the absense of articles of late, a change in hosting providers! I appreciate, that's lousy and actually you're not interested, nor did you probably even notice I'd been gone - but what the heck, I'm back :)<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/05/changing-wordpress-permalinks/' rel='bookmark' title='Changing WordPress Permalinks'>Changing WordPress Permalinks</a> <small>I set up my blog and just had a little...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/06/changing-hosting-providers-and-iis-wordpress/"><![CDATA[<p>There has been half a reason for the absence of articles of late, a change in hosting providers! I appreciate, that&#8217;s lousy and actually you&#8217;re not interested, nor did you probably even notice I&#8217;d been gone &#8211; but what the heck, I&#8217;m back <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<p>For years, probably 6, I&#8217;ve been with <a href="http://www.powweb.com">PowWeb</a> who were OK, but as renewal time came around &#8211; I was starting to think twice about paying the 2 years up front, when I could limit the period down a little bit. With the credit crunch and all this recession lark &#8211; it seemed a logical idea to control my cash flow. So I took a day off work, did a bunch of research and eventually concluded that <a href="http://www.godaddy.com/gdshop/hosting/grid.asp?ci=13729">GoDaddy&#8217;s Grid hosting</a>, currently in beta, looked like a good alternative. So I prepared for the move.</p>
<p>I&#8217;ve never moved a website before without the support of people who know DNS way better than I do, so this was going to be a bumpy ride. However, making sure that I did as much as I could, I dumped the database, got a zipped up backup of the filesystem and did an extract straight from WordPress and prepared for the inevitable feeling of foreboding.</p>
<p>Things were messy when I realised that to move a domain name, it has to have been at the current provider for more than 60 days. I think when my hosting ran out it was about 55 days. I&#8217;m not sure why, nor am I altogether worried by it &#8211; but my email stayed working for almost all that five day period, though my website (unpaid) continued for maybe a day (probably due to it expiring on a Sunday). I thought about re-pointing my name-servers for Amadiere.com to GoDaddy&#8217;s, but the FAQs weren&#8217;t as helpful as they might be &#8211; so I gave up pretty promptish and decided I&#8217;d have a period of deadness.</p>
<p>The period of inactivity proved useful, as the hosting package I chose included IIS7, PHP5, ASP.NET 3.5, MySQL and MSSQL &#8211; so stuff to play around with while I waited. Eventually, everything went well and my site was up and running with my email being down for about 2-3 hours (all said and done, a minor miracle actually). I had a pickle with the Name-Servers on the way, but a quick call to GoDaddy tech support (which I expected to be tosh &#8211; but were actually fab, helpful and friendly), that was quickly resolved.</p>
<p>So the move went perfectly?&#8230; not quite.</p>
<p>GoDaddy&#8217;s hosting isn&#8217;t perfect for my liking. You have access only to your webroot, not a folder directly up from your webroot. When I tried to create blog.amadiere.com, this meant I had to create a directory within my webroot for the blog too &#8211; something that wasn&#8217;t the case at PowWeb. However, the big pickle came when I tried setting up Permalinks on IIS7 and PHP5 for WordPress. Jeez Louise! That&#8217;s a mother of a bitch! Basically, saying Permalinks, IIS and GoDaddy Subdomains don&#8217;t see eye-to-eye is somewhat an understatement. There is <a href="http://tech.einaregilsson.com/2007/07/30/pretty-wordpress-permalinks-on-iis/">an excellent solution that works for most cases</a>, but it assumes you can set the 404 page for each of your domains &#8211; another flaw in the GoDaddy subdomain implementation means your hosting account only has one 404 page &#8211; irregardless of the number of (sub) domains you have. I literally couldn&#8217;t find an ideal way around this, other than to use my main domain name and drop the blog prefix and add it as a suffix instead.</p>
<p>This means that all my URLs are goosed. Again. I almost feel ashamed that I&#8217;ve <a href="http://www.amadiere.com/blog/2009/05/changing-wordpress-permalinks/">been here before</a> and yet here I am again. None-the-less, it&#8217;s not totally bad. The <a href="http://blog.amadiere.com">blog subdomain homepage</a> does still work, but all the links now point to their www counterpart but don&#8217;t exist on blog.</p>
<p>The pain suffered through this process is exhausting, but there is light and I&#8217;m happy. Hopefully I&#8217;ll like GoDaddy and won&#8217;t have to do that for at least long enough for me to forget how painful it actually was!&#8230;</p>
<p>I think I&#8217;m gonna bill the new domain name as a strategic re-branding to harness the dynamic synergy of Web 2.0: <a href="http://www.amadiere.com/blog/">http://www.amadiere.com/blog/</a> <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" />  I guess it&#8217;s time for me to actually brand the site somehow, instead of using all the downloadable themes&#8230;</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/05/changing-wordpress-permalinks/' rel='bookmark' title='Changing WordPress Permalinks'>Changing WordPress Permalinks</a> <small>I set up my blog and just had a little...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/06/changing-hosting-providers-and-iis-wordpress/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/06/changing-hosting-providers-and-iis-wordpress/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Multiple Subversion Projects in one Visual Studio Solution using svn:externals]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/06/multiple-subversion-projects-in-one-visual-studio-solution-using-svnexternals/" />
		<id>http://blog.amadiere.com/?p=117</id>
		<updated>2010-01-24T15:40:04Z</updated>
		<published>2009-06-05T18:05:19Z</published>
		<category scheme="http://amadiere.com/blog" term="Subversion" /><category scheme="http://amadiere.com/blog" term="Visual Studio" /><category scheme="http://amadiere.com/blog" term="Repository" /><category scheme="http://amadiere.com/blog" term="Visual Studio 2008" /><category scheme="http://amadiere.com/blog" term="VisualSVN" />		<summary type="html"><![CDATA[I have a Visual Studio solution with two projects in it: Project01 which is an MVC Web Application and the associated Project01.Tests project for testing. As I want to apply to DRY principles, I created another solution with a Class Library project (and associated test project) for putting any code that might be used again outside of the scope of the current project.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/04/the-layout-of-a-subversion-repository/' rel='bookmark' title='The Layout of a Subversion Repository'>The Layout of a Subversion Repository</a> <small>How I'm suggesting we layout or works Subversion repository and...</small></li>
<li><a href='http://amadiere.com/blog/2008/10/visual-studio-2008-sql-2005/' rel='bookmark' title='Visual Studio 2008 &amp; SQL 2005'>Visual Studio 2008 &amp; SQL 2005</a> <small>I&#8217;ve had a bit of a problem of late, namely:...</small></li>
<li><a href='http://amadiere.com/blog/2009/04/configuring-subversion-clients/' rel='bookmark' title='Configuring Subversion Clients'>Configuring Subversion Clients</a> <small>There are a number of things in the TortoiseSVN settings...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/06/multiple-subversion-projects-in-one-visual-studio-solution-using-svnexternals/"><![CDATA[<p>Cake mix:</p>
<p>400g of Visual Studio 2008<br />
100g of fresh Subversion<br />
1tsp of VisualSVN (1tsp of AnkhSVN subsitutes if you can&#8217;t get hold of any).<br />
Instructions: Put into a large bowl and beat the living-poop out of it with a spike covered hammer.</p>
<p>Or alternatively&#8230;.</p>
<p>I&#8217;ve been quite frustrated that no matter where I looked on the web, what I searched for, which search engine I used &#8211; all the articles I found on <strong>opening multiple projects in Visual Studio (while still using Subversion)</strong>, all seemed to explain only a portion of what was needed and never the full tale. So being frustrated, I decided it&#8217;s the exact type of thing I needed to note here &#8211; even if it&#8217;s just me that ever reads it!</p>
<p><strong>The Scenario:</strong></p>
<p>I have a Visual Studio solution with two projects in it: <strong>Project01</strong> which is an MVC Web Application and the associated Project01.Tests project for testing. As I want to apply to DRY principles, I created<strong> another solution</strong> with a Class <strong>Library</strong> project (and associated test project) for putting any code that might be used again outside of the scope of the current project. This causes a couple of pickles:</p>
<ul>
<li>Visual Studio doesn&#8217;t let you open more than one solution, so I&#8217;m forced to chose between Project01 and Libraries (which is hardly perfect).</li>
<li>Moving the Libraries projects within the Project01 Solution causes Subversion to get confused and causes a coupling of the code that would be difficult when Project02 came along.</li>
</ul>
<p>I read that svn:externals was the way to go &#8211; but I didn&#8217;t understand how exactly to go about this. Sometimes the guides weren&#8217;t clear on how to apply the svn:externals but almost always, they weren&#8217;t specifically detailing how to get the setup I wanted within Visual Studio.</p>
<p><strong>The Solution:</strong></p>
<p>People were right! svn:externals is definitely the way forward, but there are a few things that need to be done to get the (seemingly) perfect setup.</p>
<p>A few notes before we start:</p>
<ul>
<li>My example below includes Tests projects, these are of great value but not needed as far as this example goes (obviously).</li>
<li>The Screenshots are for AnkhSVN, but the scenario works with VisualSVN. Where the stage differs, I&#8217;ll endevour to explain the differences where appropriate.</li>
<li>This is my current setup and I haven&#8217;t run into any issues with it. However, by following this guide you are aware that I&#8217;m occasionally wrong and that gremlins may eat your data if you don&#8217;t ensure that everything is working as it should. <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </li>
<li>My working setups are Visual Studio 2008, VisualSVN Server 1.7.2 (which includes Subversion 1.6.2),TortoiseSVN and VisualSVN or AnkhSVN. Tested on Windows 7 and Windows XP.</li>
<li>I&#8217;m going to suggest using the standard trunk, tags and branches layout within a repository &#8211; but you&#8217;d prefer not to it should be easy to customise.</li>
</ul>
<p><strong>The Steps</strong></p>
<ol>
<li>You may already have this step done if you are working from an existing code base, but I started with two seperate solutions; Project01 (my application) and Libraries (my shared resource).</li>
<li>Add both solutions to Subversion however you normally do it. For example, in AnkhSVN you right-click the <strong>solution </strong>and select &#8220;Add Solution To Subversion&#8221; and fill in the following pop-up box similar to below.�
<p><div id="attachment_118" style="width: 568px" class="wp-caption alignnone"><img class="size-full wp-image-118" title="Add Solution to Subversion (AnkhSVN)" src="http://amadiere.com/blog/wp-content/uploads/2009/06/svnexternals_addsolutiontosvn.png" alt="Add both solutions to your SVN repository however you want." width="558" height="600" /><p class="wp-caption-text">Add both solutions to your SVN repository however you want.</p></div></li>
<li>After adding each of the solutions, you should make sure that you &#8220;Commit&#8221; to update the server&#8217;s version of the files.</li>
<li> Your repository should look something like the following:

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">/</span>svnrepository
  <span style="color: #008000;">/</span>Project01
    <span style="color: #008000;">/</span>trunk
      <span style="color: #008000;">/</span>Project01
      <span style="color: #008000;">/</span>Project01<span style="color: #008000;">.</span><span style="color: #0000FF;">Tests</span>
  <span style="color: #008000;">/</span>Libraries
    <span style="color: #008000;">/</span>trunk
      <span style="color: #008000;">/</span>Libraries
      <span style="color: #008000;">/</span>Libraries<span style="color: #008000;">.</span><span style="color: #0000FF;">Tests</span></pre></td></tr></table></div>

</li>
<li> Ok, you can close Visual Studio 2008 (not sure if you need to, but I feel safer doing so).</li>
<li> Open your repository browser. (e.g, right clicking on a file in Windows Explorer -&gt; TortoiseSVN -&gt; repo-browser.�
<p><div id="attachment_119" style="width: 706px" class="wp-caption alignnone"><img class="size-full wp-image-119" title="Repository Browser" src="http://amadiere.com/blog/wp-content/uploads/2009/06/svnexternals_repositorybrowser.png" alt="Your repository should look something like this now." width="696" height="490" /><p class="wp-caption-text">Your repository should look something like this now.</p></div></li>
<li>Right click on the trunk of Project01 and click &#8220;Show Properties&#8221;.</li>
<li>A list of properties (possibly including svn:ignore are shown. Click &#8220;New&#8221;<br />
<img class="alignnone size-full wp-image-120" title="SVN Properties" src="http://amadiere.com/blog/wp-content/uploads/2009/06/svnexternals_properties.png" alt="SVN Properties" width="582" height="296" /></li>
<li>Within the &#8220;New Properties&#8221; window, you want to add &#8220;svn:externals&#8221; to the top right drop down box (this may not already be in the list &#8211; don&#8217;t be detered). Within the main box, you want to put the name of the directory within your Project01 you want to create, followed by the URL to the repository with the code you want to fill it with : e.g:
<pre>Libraries        http://svn.codespaces.com/amadiere/aspnet/Libraries/trunk/Libraries/
Libraries.Tests  http://svn.codespaces.com/amadiere/aspnet/Libraries/trunk/Libraries.Tests/

<div id="attachment_121" style="width: 587px" class="wp-caption alignnone"><img class="size-full wp-image-121" title="Add new property" src="http://amadiere.com/blog/wp-content/uploads/2009/06/svnexternals_addproperties.png" alt="Don't forget to type &quot;svn:externals&quot; into the top right hand box." width="577" height="314" /><p class="wp-caption-text">Don&#39;t forget to type &quot;svn:externals&quot; into the top right hand box.</p></div></pre>
</li>
<li>Reopen Visual Studio and your Project01 Solution.</li>
<li>Right click the Solution name and &#8220;Update&#8221; to the latest version. You should see it add the External Library project in the text that flies past. This is basically the main part finished, but you&#8217;ll spot the two Libraries projects are not visible within our solution still&#8230;</li>
<li> Right click again on the Solution name and add an &#8220;Existing Project&#8221;. Navigate to your Project01 directory and you should spot there are now 4 project directories with two of them being your Libraries projects! Simply go into them and add them one at a time.�
<p><div id="attachment_122" style="width: 651px" class="wp-caption alignnone"><img class="size-full wp-image-122" title="Add Existing Project" src="http://amadiere.com/blog/wp-content/uploads/2009/06/svnexternals_addexistingproject.png" alt="Adding an existing project in Visual Studio" width="641" height="514" /><p class="wp-caption-text">Adding an existing project in Visual Studio</p></div></li>
<li>Commit your changes and you&#8217;re done!</li>
</ol>
<p><strong>Testing Your Setup</strong></p>
<p>You should be able to test your project by making changes etc to both sets of project files and committing them to your database. What should happen is your Project01 files will go to the Project01 directory in your repository and the Libraries files will still (dispite being in your Project01 solution on your development machine) be committed to the Libraries solution directory in your repository.</p>
<p>This setup should work for Project02 as well. Just repeat the appopriate steps and bang! &#8211; you have a fully working second project using the same Libraries!</p>
<p>If anyone runs into any dramatic side effects or knows of any issues with this methodology, I&#8217;d be very interested in hearing them as I&#8217;m currently on Cloud 9 with it!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/04/the-layout-of-a-subversion-repository/' rel='bookmark' title='The Layout of a Subversion Repository'>The Layout of a Subversion Repository</a> <small>How I'm suggesting we layout or works Subversion repository and...</small></li>
<li><a href='http://amadiere.com/blog/2008/10/visual-studio-2008-sql-2005/' rel='bookmark' title='Visual Studio 2008 &amp; SQL 2005'>Visual Studio 2008 &amp; SQL 2005</a> <small>I&#8217;ve had a bit of a problem of late, namely:...</small></li>
<li><a href='http://amadiere.com/blog/2009/04/configuring-subversion-clients/' rel='bookmark' title='Configuring Subversion Clients'>Configuring Subversion Clients</a> <small>There are a number of things in the TortoiseSVN settings...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/06/multiple-subversion-projects-in-one-visual-studio-solution-using-svnexternals/#comments" thr:count="4"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/06/multiple-subversion-projects-in-one-visual-studio-solution-using-svnexternals/feed/atom/" thr:count="4"/>
		<thr:total>4</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[How To Become A Better Programmer]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/05/how_to_become_a_better_programmer/" />
		<id>http://blog.amadiere.com/?p=115</id>
		<updated>2009-11-01T09:56:45Z</updated>
		<published>2009-05-31T18:23:54Z</published>
		<category scheme="http://amadiere.com/blog" term="Blogging" /><category scheme="http://amadiere.com/blog" term="Programming" /><category scheme="http://amadiere.com/blog" term="Blog" /><category scheme="http://amadiere.com/blog" term="Programmer" />		<summary type="html"><![CDATA[One of the things that I've really begun to do in the last few years is pick up the trail in an attempt to become a great programmer. So here are my top tips for becoming a better programmer!<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/05/how_to_become_a_better_programmer/"><![CDATA[<p>One of the things that I&#8217;ve really begun to do in the last few years is pick up the trail in an attempt to become a great programmer. I am obviously not there, nor do I think I&#8217;ll ever get there &#8211; but I believe I&#8217;m on the right path! Previously to my changing my goals / gaining focus on what I wanted to do, I only got better and more knowledgeable at things that were needed for my job. Now, I&#8217;m starting to gain momentum &#8211; I can almost *feel* my brain bulging!!</p>
<p>So here are my top tips for becoming a better programmer!</p>
<p><strong>Do Some Homework!</strong></p>
<p>A lot of people are very content with programming for a living, but through sheer code exposure logic &#8211; if you do programming at home you are exposed to more code and will therefore become better over a shorter period of time. It&#8217;s kinda simple when you think about it. There are a few different ways to do this as far as I see it:</p>
<ul>
<li>Take home some work and refactor that ugly function you created. A task that is too big and time-consuming for too little benefit to warrant a redesign in &#8220;works time&#8221; &#8211; but is pecking at your soul, screaming &#8220;I&#8217;m your dirty secret!&#8221;.</li>
<li>Create your own project to work on. Establishing a really good, motivating idea can be a great way to spur you on. It could be something for your own devouring or for a wider market (though, check to see whats out there if the latter).</li>
<li>Contribute to Open Source &#8211; this is probably one of the better, most light weight solutions you can go for. You&#8217;re under no obligation to contribute and at worst you get to look around another persons code that you wouldn&#8217;t normally and potentially pick up some interesting methods of achieving something you&#8217;ve not thought of.</li>
</ul>
<p><strong>Syndication, Syndication, Syndication!</strong></p>
<p>Find some good blogs &amp; podcasts and subscribe to them! If you can dig out some of the best bloggers for the technology stack that you&#8217;re interested in, you can sometimes get some excellent articles to read on the way into work. It&#8217;s important to avoid subscribing to too many blogs &#8211; you need to be able to actually read them. Too many would be unproductive and you would not get chance to read them and give them the concentration that they deserve.</p>
<p>As it stands at the moment, the blogs I can recommend are: <a href="http://www.codinghorror.com/blog/index.xml">Coding Horror</a>, <a href="http://www.joelonsoftware.com/rss.xml">Joel On Software</a>, <a href="http://blog.stackoverflow.com/index.php/feed/">Stack Overflow</a>, <a href="http://feeds2.feedburner.com/ScottHanselman">Scott Hanselman&#8217;s Computer Zen</a>, <a href="http://feeds2.feedburner.com/JonSkeetCodingBlog">Jon Skeet Coding Blog</a>, <a href="http://weblogs.asp.net/scottgu/rss.aspx">ScottGu&#8217;s Blog</a>, <a href="http://feeds.haacked.com/haacked">you&#8217;ve been HAACKED</a>, <a href="http://feeds.feedburner.com/ElegantCode">Elegant Code</a> and of course, shameless plug to mine <a href="http://feeds2.feedburner.com/amadiere">Blog @ Amadiere.com</a></p>
<p>I&#8217;d also highly recommend listening to a few podcasts when you can, the <a href="http://blog.stackoverflow.com/index.php?feed=podcast">Stack Overflow podcast</a> is particularly good, but there are plenty of others. So scout around for the ones which focus on your development environment (or are to a degree, fairly generic like the Stack Overflow one).</p>
<p><strong>Care About Your Craft</strong></p>
<p>I&#8217;m not saying you have to start hyper-ventalating when someone shows you a demo of some of the stuff in ASP.NET 4, but you should at least be interested in what opportunities it might have to offer you (exclusion, of course, for those that do not use .NET). The mere fact you are reading online blogs about improving your craft implies that you already care enough to read and work out of hours. It&#8217;s important I believe to feel for your projects, they should be like children to you. You look after them, care for them, make sure they wash behind their ears and when they are finally of age, you can help them leave home and go and live with their users.</p>
<p><strong>Keep Updated With Changes To Your Development Stack</strong></p>
<p>Things change. Don&#8217;t be as they say, a &#8220;COBOL Dinosaur&#8221;.  You should be subscribed to whatever feeds you can that tell you when software and development languages are updated. If the updates aren&#8217;t detrimental to your development, go ahead and install them and have a play around with any of the new features that took your fancy. Ride the wave of the future!</p>
<p><strong>Have A Book To Read</strong></p>
<p>It doesn&#8217;t have to be a dead tree, but having something you can just work your way through will do no harm. There are a number of <a href="http://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read">great books that people recommend</a> with the top ones being <a href="http://www.amazon.co.uk/gp/product/0735619670?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0735619670">Code Complete</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0735619670" border="0" alt="" width="1" height="1" /> and the <a href="http://www.amazon.co.uk/gp/product/020161622X?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=020161622X">The Pragmatic Programmer</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=020161622X" border="0" alt="" width="1" height="1" />. I quite enjoy language and environment specific books too, such as <a href="http://www.amazon.co.uk/gp/product/0470187573?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0470187573">Professional ASP.NET 3.5</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0470187573" border="0" alt="" width="1" height="1" />, <a href="http://www.amazon.co.uk/gp/product/0470384611?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0470384611">Professional ASP.NET MVC 1.0</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0470384611" border="0" alt="" width="1" height="1" /> and <a href="http://www.amazon.co.uk/gp/product/0470191376?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0470191376">Professional C# 2008</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0470191376" border="0" alt="" width="1" height="1" />.</p>
<p><strong>Write Something!</strong></p>
<p>At the end of the day &#8211; don&#8217;t procrastinate! Write some code! Get your hands dirty and enjoy the glory that is !le code!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/05/how_to_become_a_better_programmer/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/05/how_to_become_a_better_programmer/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Cross-page PostBack&#8217;s and Master Pages]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/05/cross-page-postbacks-master-pages/" />
		<id>http://blog.amadiere.com/?p=108</id>
		<updated>2009-11-01T09:58:05Z</updated>
		<published>2009-05-21T17:39:44Z</published>
		<category scheme="http://amadiere.com/blog" term="ASP.NET" /><category scheme="http://amadiere.com/blog" term="C#" /><category scheme="http://amadiere.com/blog" term="Webforms" />		<summary type="html"><![CDATA[We were trying to use Webforms to submit a POST to another Webforms page. We had our trusty copy of ASP.NET 3.5 Professional, but its example wasn't working in our page.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/04/mysql-two-way-master-master-replication/' rel='bookmark' title='MySQL Two-Way, Master-Master Replication'>MySQL Two-Way, Master-Master Replication</a> <small>A bit back, I was looking into database replication and...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/05/cross-page-postbacks-master-pages/"><![CDATA[<p>I&#8217;ve been a developer for a long time in PHP and Classic ASP, recently, we&#8217;ve been picking up the ASP.NET baton and running with it. We&#8217;re not running very fast it has to be said. It&#8217;s more a running the hundred metres with 100&#8242;s of rakes scattered across your track.</p>
<p>I digress. We came across a problem and boy did it stump us. We were trying to use Webforms to submit a POST to another Webforms page. We had our trusty copy of <a href="http://www.amazon.co.uk/gp/product/0470187573?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0470187573">ASP.NET 3.5 Professional</a>, but its example wasn&#8217;t working in our page. We took it out and placed it into a sandbox, sure enough it was fine and dandy. We eventually bottomed it to be something to do with the Master Page and after examining the Site.master file for any obvious errors we were stumped.</p>
<p>Basically, the book says to do a standard CrossPage PostBack you do the following:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Web.UI.WebControls</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">partial</span> <span style="color: #6666cc; font-weight: bold;">class</span> DestinationPage <span style="color: #008000;">:</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Web</span><span style="color: #008000;">.</span><span style="color: #0000FF;">UI</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Page</span>
<span style="color: #008000;">&#123;</span>
  <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #6666cc; font-weight: bold;">void</span> Page_Load<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, EventArgs e<span style="color: #008000;">&#41;</span>
  <span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>PreviousPage <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span> <span style="color: #008000;">&amp;</span>amp<span style="color: #008000;">;&amp;</span>amp<span style="color: #008000;">;</span> PreviousPage<span style="color: #008000;">.</span><span style="color: #0000FF;">IsCrossPagePostBack</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
      TextBox text <span style="color: #008000;">=</span> PreviousPage<span style="color: #008000;">.</span><span style="color: #0000FF;">FindControl</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;TextBox1&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">as</span> TextBox<span style="color: #008000;">;</span>
      <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>text <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
         Label1<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> text<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span><span style="color: #008000;">;</span>
      <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
  <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>This didn&#8217;t work quite because the PreviousPage was the Master and the Master doesn&#8217;t directly contain the TextBox1. Therefore, before we can access this property, we must create an access point to the ContentPlaceHolder via something like:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">ContentPlaceHolder ContentPH1 <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>ContentPlaceHolder<span style="color: #008000;">&#41;</span>PreviousPage<span style="color: #008000;">.</span><span style="color: #0000FF;">Master</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FindControl</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;ContentPlaceHolder1&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>This worked a treat, we were then able to access our TextBox1 via that control.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">TextBox text <span style="color: #008000;">=</span> ContentPH1<span style="color: #008000;">.</span><span style="color: #0000FF;">FindControl</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;TextBox1&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">as</span> TextBox<span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>This may seem a very trivial question, but it caused no ends of problems because the searches we found were never clearly the scenario we had. Therefore, I&#8217;m actively writing this post to reverse that injustice and hope that someone, at somepoint, finds it useful!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/04/mysql-two-way-master-master-replication/' rel='bookmark' title='MySQL Two-Way, Master-Master Replication'>MySQL Two-Way, Master-Master Replication</a> <small>A bit back, I was looking into database replication and...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/05/cross-page-postbacks-master-pages/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/05/cross-page-postbacks-master-pages/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[StackOverflow.com &#8211; (Almost) Better Than Pie!]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/05/stackoverflowcom-almost-better-than-pie/" />
		<id>http://blog.amadiere.com/?p=97</id>
		<updated>2010-01-24T15:42:36Z</updated>
		<published>2009-05-20T18:01:39Z</published>
		<category scheme="http://amadiere.com/blog" term="Websites" />		<summary type="html"><![CDATA[I know, I know &#8211; it&#8217;s an outrageous claim! How can a website be better than pie? Obviously, a Meat Pie still has its place atop of the leaders board &#8211; but what about the Steak &#38; Kidneys and Apple pies&#8230; can a website really be good enough to top them&#8230;? I&#8217;ve been subscribed to [&#8230;]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/05/stackoverflowcom-almost-better-than-pie/"><![CDATA[<p>I know, I know &#8211; it&#8217;s an outrageous claim! How can a website be better than pie? Obviously, a Meat Pie still has its place atop of the leaders board &#8211; but what about the Steak &amp; Kidneys and Apple pies&#8230; can a website really be good enough to top them&#8230;?</p>
<p>I&#8217;ve been subscribed to Jeff Atwood&#8217;s blog, <a href="http://www.codinghorror.com/">Coding Horror</a>, for a year or two now &#8211; it always makes for an excellent read. He would say that it [consistently doesn't suck, or it sucks inconsistently]&#8230;</p>
<p>Anyway&#8230;! A bit back, he teamed up with <a href="http://www.joelonsoftware.com">Joel Spolsky</a> (of <a href="http://www.fogbugz.com">Fogbugz</a>) and he coded with help from others the very excellent <a href="http://www.stackoverflow.com">Stack Overflow</a>! Amazingly, for years we made do with generic Google searches and the scroll-bar intensive <a href="http://www.experts-exchange.com">Experts-Exchange</a> (which geniously, was named without the dash: ExpertSexChange). I&#8217;ve been a long fan and admirer and although I don&#8217;t actively participate much in the community, I&#8217;m in massive awe of what they have achieved and have been registered since the beta. They have literally taken the developer and programming community by storm!</p>
<p>There are so many things that I could mention in this post, but it would just go on for absolutely ages, so I&#8217;ll just try and list some of my favourites:</p>
<p><strong>Open ID to Login:</strong></p>
<p><strong><span style="font-weight: normal;">Woah! What the hell is this <a href="http://openid.net/">OpenID</a> lark? Turns out its mega kick ass! I&#8217;m sure I&#8217;m not alone in my naivety of this excellent standard, but what I&#8217;m hoping for now is that actually StackOverflow opens the eyes of developers everywhere and they all start to use this instead of yet more passwords and usernames! Not that you have to login of course. You can simply browse around and see all the answers and questions and to the most part &#8211; feel like a valued customer.</span></strong></p>
<p>In addition to just using OpenID though, it does a really excellent user experience. To login, all I need to do is click the provider of my OpenID and then type in my username and it guesses the rest of my URL. It then sends me to my provider who I&#8217;m already logged in with and confirm I want to allow SO to find out about me &#8211; and BOOM! I&#8217;m born!</p>
<div id="attachment_98" style="width: 686px" class="wp-caption alignnone"><img class="size-full wp-image-98" title="StackOverflow OpenID Support" src="http://amadiere.com/blog/wp-content/uploads/2009/05/stackoverflow_openid.png" alt="Look at all the colours! It's amazing!" width="676" height="380" /><p class="wp-caption-text">Look at all the colours! It&#39;s amazing!</p></div>
<p><strong>It&#8217;s A Question &amp; Answer Site</strong></p>
<p>All the existing rivals I&#8217;ve seen for StackOverflow were based on the tried and tested discussion boards technique. But this didn&#8217;t ever suit the function it needed to perform and answers could get lost in the midst of a page of differing opinions. This was solved in some cases by adding the &#8216;accepted answer&#8217; technique, whereby someone would click to say that a specific response was able to satisfy their query. StackOverflow improved upon this model by adding a few mechanisms that allowed it to get rid of a few of the niggling flaws.</p>
<p>In an ideal world, everyone would know how to ask a good question and will include all relevant information. However, we don&#8217;t live in the ideal world (pie&#8217;s contain calories &#8211; do you need more proof?), so further information or clarification is often sought. This can be added into the original question, or as a comment in addition to it.</p>
<div id="attachment_99" style="width: 701px" class="wp-caption alignnone"><img class="size-full wp-image-99" title="StackOverflow - Original Question" src="http://amadiere.com/blog/wp-content/uploads/2009/05/stackoverflow_editing.png" alt="Creating the perfect question" width="691" height="394" /><p class="wp-caption-text">Creating the perfect question</p></div>
<p>As you can see in the example above, the site is built towards not only getting top quality answers, but top quality questions too! Eljenso asked this question, but there was some debate over the question and what was meant by &#8220;flow&#8221;, between the original poster and the other users, they came to a fairly decent understanding. You can also see the question was edited &#8211; this was probably by the original poster. But if you are sufficiently trusted by the system (you have a high enough &#8216;reputation&#8217;), you&#8217;re able to rephrase the question, correct spelling, format code better &#8211; whatever you feel will help the correct answer appear.</p>
<p><strong>Badges &amp; Reputation</strong></p>
<p>So, you have a fab site with an excellent mechanism for logging in, a clearly defined purpose (in being an &#8220;questions &amp; answers&#8221; site), you even have the means to allow people to create the perfect questions &#8211; but without a great answer, or more specifically, without a constant flow of great answers. Your site is worthless.</p>
<p>StackOverflow tackled this in an interesting and seemingly extremely successful way. <a href="http://stackoverflow.com/badges">Reputation and Badges</a>. First, let me say that StackOverflow wasn&#8217;t launched from nothing. Jeff Atwood had a big following thanks to his blog, and similar could be said about Joel Spolsky. If they blogged about this new project and asked for participants (including on the <a href="http://blog.stackoverflow.com/">blogging site devoted to StackOverflow</a> that existed throughout development) &#8211; they would have got hundreds if not thousands of offers from their readers. This didn&#8217;t rule out the need for (not only a good product, but also) a good marketing campaign. This they did well with their blogs and with the very excellent and entertaining <a href="http://itc.conversationsnetwork.org/series/stackoverflow.html">StackOverflow Podcast</a> (recommended and <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=279215411&amp;uo=4">available from iTunes</a> too). Basically, the problem they had wasn&#8217;t in gaining an audience &#8211; it was in keeping it. They had to create a site that was engaging and encouraging to read and answer questions for. They achieved something better though, they created an addiction. They managed to create a site that rewarded and encouraged users to not only reply, but reply well! So many sites reward for the most amount of posts, whereas StackOverflow lets other users say whether your points total should go up, based on how useful they think the question was.</p>
<p>The one thing that takes this really to the next level, is Badges!</p>
<div id="attachment_103" style="width: 712px" class="wp-caption alignnone"><img class="size-full wp-image-103" title="StackOverflow Badges" src="http://amadiere.com/blog/wp-content/uploads/2009/05/stackoverflow_badges.png" alt="Jon Skeet's badges have been removed to avoid the need for Horizontal Scroll" width="702" height="260" /><p class="wp-caption-text">Jon Skeet&#39;s badges have been removed to avoid the need for Horizontal Scroll</p></div>
<p>There are the three types of badges indicating the difficulty of gaining them, and these badges are shown on your user profile so that people can see your achievements (and to some degree &#8220;trustability&#8221;). Even when you post a question or answer, people can see the number of bronze, silver and gold badges you have, along with your total reputation. These aren&#8217;t new ideas please note (badges for example are simply the same as XBox Achievements), they are just great implementations of them. Why re-invent the wheel? All you have to do work out how to get all the best ideas into one very nice, round package. This system they created, did that very well!</p>
<p>A quiet moment should be inserted here in <a href="http://askjonskeet.com/">homage</a> of the great <a href="http://stackoverflow.com/users/22656/jon-skeet">Jon Skeet.</a> Almost<a href="http://stackoverflow.com/users"> double the reputation of his nearest rival</a> using that age old formula of &#8216;writing an excellent and accurate answer&#8217;. /bow.</p>
<div id="attachment_104" style="width: 684px" class="wp-caption alignnone"><a href="http://stackoverflow.com/questions/305223/jon-skeet-facts/310323"><img class="size-full wp-image-104" title="Did you mean: Jon Skeet?" src="http://amadiere.com/blog/wp-content/uploads/2009/05/jonskeet.png" alt="Maybe Google is just fibre optics into Jon's mind...?" width="674" height="225" /></a><p class="wp-caption-text">Maybe Google is just fibre optics into Jon&#39;s mind...?</p></div>
<p>In short &#8211; it&#8217;s really worth checking out! If you do any sort of programming (or if you&#8217;re a responsible for the servers, then maybe visit <a href="http://www.ServerFault.com">ServerFault.com</a> &#8211; the sister site, an almost clone of StackOverflow by the team), then you may find help (or be able to help others) at this site. If you do get addicted, please don&#8217;t forget to eat (though feel free to send the Pies to me!)</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/05/stackoverflowcom-almost-better-than-pie/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/05/stackoverflowcom-almost-better-than-pie/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Changing WordPress Permalinks]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/05/changing-wordpress-permalinks/" />
		<id>http://blog.amadiere.com/?p=92</id>
		<updated>2010-01-24T15:41:44Z</updated>
		<published>2009-05-09T14:29:35Z</published>
		<category scheme="http://amadiere.com/blog" term="Wordpress" /><category scheme="http://amadiere.com/blog" term="Permalinks" />		<summary type="html"><![CDATA[I set up my blog and just had a little wander through the settings, not really examining them like I normally would do when I get a new toy. This is how I missed the settings for permalinks or at least I saw it, but paid it too little attention.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/06/changing-hosting-providers-and-iis-wordpress/' rel='bookmark' title='Changing Hosting Providers &amp; IIS WordPress'>Changing Hosting Providers &#038; IIS WordPress</a> <small>There has been half a reason for the absense of...</small></li>
<li><a href='http://amadiere.com/blog/2009/04/wordpress-blog-the-tools-for-the-job/' rel='bookmark' title='WordPress Blog &amp; The Tools for the Job'>WordPress Blog &amp; The Tools for the Job</a> <small>It was then, just as I was about to start...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/05/changing-wordpress-permalinks/"><![CDATA[<p>I didn&#8217;t think enough at the start, that&#8217;s the bottom line here.</p>
<p>I set up my blog and just had a little wander through the settings, not really examining them like I normally would do when I get a new toy. This is how I missed the settings for permalinks or at least I saw it, but paid it too little attention. When I eventually did decide I didn&#8217;t like this layout of URLs (/archives/%post_id%), it was too late.</p>
<p>I basically came to the decision to change them when looking at <a href="http://www.google.com/analytics">Google Analytics</a> and the following was part of my report.</p>
<div id="attachment_93" style="width: 490px" class="wp-caption alignnone"><img class="size-full wp-image-93" title="Example of the URL breakdown in page views." src="http://amadiere.com/blog/wp-content/uploads/2009/05/permalinkschange.png" alt="Wow, post 41, ooh yeah. A sweet, sweet day.... remind me what it was again?" width="480" height="239" /><p class="wp-caption-text">Wow, post 41, ooh yeah. A sweet, sweet day.... remind me what it was again?</p></div>
<p>I was reviewing the most popular pages and I realised I had no idea what post 41 was. Absolutely no idea! So it was then it hit me &#8211; that archive permalink naming schema-thingy, it&#8217;s a bit, ya know, poop. But behold! I could change that! I&#8217;d alter the URLs so instead of this useless URL with a number in it, I&#8217;d change it and make it fantastic and include the URL-friendly post title as part of the Permalink.</p>
<p>There was much rejoicing!</p>
<p>So, I changed them &#8211; and the obvious happened. All my old links broke and became 404&#8242;s &#8211; losing all inbound Google traffic.</p>
<p>I decided I could live with that. I&#8217;m a grown man! What&#8217;s a 404 here and there, pffft! Google would update itself, right? It wouldn&#8217;t take long, surely&#8230;. But alas, it was a lie to myself as it was pecking at my head every time I thought about it. So eventually (today &#8211; after something like 3-4 weeks), I decided to do something about it. I thought that I would have to dig around with <a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html">.htaccess files</a> and <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">MOD_REWRITE</a> rules, something I am not masochistic enough to indulge in just yet. But, alas, a search around the Internet solved my problem!</p>
<p>I stumbled upon <a href="http://www.deanlee.cn/wordpress/permalinks-migration-plugin/">Dean Lee&#8217;s Permalink Migration Plug-in for WordPress</a>. Genius! You can simply search for it in the plugins area of your blogs admin and install it simply from that route. It&#8217;s done what I needed exactly and it behaves how I wanted exactly!</p>
<p>After installing, I simply told it what my old links were clicked save and&#8230;. and&#8230;. oh. No change. My permalinks were already setup, so why wasn&#8217;t this working. I decided what I&#8217;d do is re-save my permalinks settings page and delete cache to see if that made a difference &#8211; I maybe should have checked after each one &#8211; but either way &#8211; one of them fixed it for me and now all my old links work again! <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<p>Old: <a href="http://amadiere.com/blog/archives/56">http://blog.amadiere.com/archives/56<br />
</a>New: <a href="http://amadiere.com/blog/56/calculating-the-date-of-easter-programatically">http://amadiere.com/blog/56/calculating-the-date-of-easter-programatically</a></p>
<p>Yes, that music you hear is the angelic chorus declaring the fantasticness of my links! <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<p>The best thing about this plug-in (other than not needing to delve into MOD_REWRITE), is that it redirects to the new URL instead of pretending the old one was fine. Well done, Dean Lee &#8211; take a bow!</p>
<p>So the bottom line is. Choose your permalinks wisely &#8211; they should be helpful enough that you can work out the content of the page from reading it, while at the same time being very nice to Google (and the other search engines&#8230;). I&#8217;m lucky because my blog isn&#8217;t popular &#8211; no one really noticed. But there were people hitting these 404&#8242;s who maybe could have done with some of the info in the posts.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/06/changing-hosting-providers-and-iis-wordpress/' rel='bookmark' title='Changing Hosting Providers &amp; IIS WordPress'>Changing Hosting Providers &#038; IIS WordPress</a> <small>There has been half a reason for the absense of...</small></li>
<li><a href='http://amadiere.com/blog/2009/04/wordpress-blog-the-tools-for-the-job/' rel='bookmark' title='WordPress Blog &amp; The Tools for the Job'>WordPress Blog &amp; The Tools for the Job</a> <small>It was then, just as I was about to start...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/05/changing-wordpress-permalinks/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/05/changing-wordpress-permalinks/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[PSF Social Media &amp; Web 2.0 Event #psfbuzz]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/05/psf-social-media-web-20-event-psfbuzz/" />
		<id>http://blog.amadiere.com/?p=86</id>
		<updated>2009-11-01T10:00:57Z</updated>
		<published>2009-05-02T15:12:58Z</published>
		<category scheme="http://amadiere.com/blog" term="Social Networking" /><category scheme="http://amadiere.com/blog" term="PSF" /><category scheme="http://amadiere.com/blog" term="Web 2.0" />		<summary type="html"><![CDATA[Late last week, myself and two of my colleagues attended a great little seminar at Old Trafford about Web 2.0 and Social Networking sites and how they can be used by Councils across the UK. The event was hosted at the Manchester United ground (hurrah for the Red Devils, etc!) and organised and run by [&#8230;]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/05/psf-social-media-web-20-event-psfbuzz/"><![CDATA[<p>Late last week, myself and two of my colleagues attended <a href="http://www.publicsectorforums.co.uk/page.cfm?pageID=5593">a great little seminar at Old Trafford about Web 2.0 and Social Networking sites</a> and how they can be used by Councils across the UK. The event was hosted at the Manchester United ground (hurrah for the Red Devils, etc!) and organised and run by the <a href="http://www.publicsectorforums.co.uk/">Public Sector Forums</a> and it seemed to go swimmingly.</p>
<p>All in all, it was a great event and quite worthwhile and we came away with a few helpful hints and a few bits and bobs to look at. I think for us, as we&#8217;d done a fair bit of research and thinking about the sites and (although we weren&#8217;t maybe quick enough on the take up) we didn&#8217;t come away with as much as maybe we&#8217;d hoped &#8211; but it&#8217;s not without its great bits.</p>
<p>As a techy, I really enjoyed the Mashups section (Mike Saunt) and came away with a few things that I&#8217;m definitely going to have a look at. Specifically, the pointers towards Plings was something that really interested me. I was mightily impressed by the work with the BBC Traffic Feeds as well &#8211; jolly fabulous! Until then, I was unaware that you could simply cut and paste an RSS feed into Google Maps and have it display all the items on a list &#8211; genius!</p>
<p>The presentation that was (I think, and I apologise if I got this wrong) by <a href="http://www.timdavies.org.uk/">Tim Davies,</a> set to the Fatboy Slim track &#8220;Right Here, Right Now&#8221; was excellent and something that I&#8217;ll hopefully be able to get some people to have a look at. The figures were quite dramatic and when you consider that sometimes, you may get resistance to this unknown of Social Media &#8211; stats, so excellently arranged, will go a long way to persuading people to embrace these sites.</p>
<p>The section on Facebook (by <a href="http://davepress.net/">Dave Briggs</a>) was great and cemented a lot of the decisions we&#8217;d made and helped us decide a way forward to finally push it to the users. This flowed well with the section after from <a href="http://www.medway.gov.uk/">Medway Council</a>&#8216;s<a href="http://www.simonwakeman.com/"> Simon Wakeman</a> who spoke about their experiences of Social Media and what things they&#8217;ve learnt to do and not to do.</p>
<p>Unfortunately, we had to leave and missed the last two sessions &#8211; but the rest of the event was a worthwhile and enjoyable experience as far as I&#8217;m concerned personally. And hopefully, the way forward for our Council will be positive and worthwhile. An article from Jan 09 by Liz Azyan was re-posted there and it proved interesting. It acted as a <a href="http://www.lgeoresearch.com/status-of-uk-local-councils-facebook-fan-pages-and-groups-as-of-16th-january-2009/">leaderboard for the top Council&#8217;s and their followers</a> on the main social networking sites &#8211; hopefully we can get ourselves out into the public and near the top of any subsequent lists <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>
<p>I was even chuffed to see that Clay Shirky got a quote thrown in there.</p>
<blockquote><p>Communications tools don&#8217;t get socially interesting until they get technologically boring</p></blockquote>
<p><a href="http://www.shirky.com/">Clay Shirky</a> is an excellent prophet for the evolution of the Internet and for anyone who was even slightly interested in Thursday&#8217;s event &#8211; I&#8217;d recommend very heavily his book &#8220;<a href="http://www.amazon.co.uk/gp/product/0713999896?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0713999896">Here Comes Everybody</a>&#8220;. In it he brings to earth all the changes that the Internet has forced upon the community, and also compares them with changes that have happened in the past of similar magnitude.</p>
<p><strong>Edit: </strong>Forgot to say, added #psfbuzz to the title for the <a href="http://www.psfbuzz.com">PSFBuzz</a> site which has a Twitter Aggregator on it, set up I think by Dave Briggs.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/05/psf-social-media-web-20-event-psfbuzz/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/05/psf-social-media-web-20-event-psfbuzz/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Configuring Subversion Clients]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/04/configuring-subversion-clients/" />
		<id>http://blog.amadiere.com/?p=81</id>
		<updated>2010-02-07T12:33:59Z</updated>
		<published>2009-04-25T14:16:52Z</published>
		<category scheme="http://amadiere.com/blog" term="Subversion" /><category scheme="http://amadiere.com/blog" term="Repository" /><category scheme="http://amadiere.com/blog" term="Version Control" />		<summary type="html"><![CDATA[There are a number of things in the TortoiseSVN settings that I've needed to change so far which have caused me a bit of bother maybe. That and I'd like to just point out a few cool things that you can find when digging around TortoiseSVN too.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/04/the-layout-of-a-subversion-repository/' rel='bookmark' title='The Layout of a Subversion Repository'>The Layout of a Subversion Repository</a> <small>How I'm suggesting we layout or works Subversion repository and...</small></li>
<li><a href='http://amadiere.com/blog/2009/06/multiple-subversion-projects-in-one-visual-studio-solution-using-svnexternals/' rel='bookmark' title='Multiple Subversion Projects in one Visual Studio Solution using svn:externals'>Multiple Subversion Projects in one Visual Studio Solution using svn:externals</a> <small>I have a Visual Studio solution with two projects in...</small></li>
<li><a href='http://amadiere.com/blog/2008/09/sourcesafe-or-subversion/' rel='bookmark' title='SourceSafe or SubVersion?'>SourceSafe or SubVersion?</a> <small>Since time of yore, Microsoft Visual Source Safe has been...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/04/configuring-subversion-clients/"><![CDATA[<p>After my new found love of all things <a href="http://subversion.tigris.org/">Subversion</a>, I&#8217;ve been trying to faff about obtaining that perfect config (instead of doing any actual coding!). There are a number of things in the <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> settings that I&#8217;ve needed to change so far which have caused me a bit of bother maybe. That and I&#8217;d like to just point out a few cool things that you can find when digging around TortoiseSVN too.</p>
<p>Firstly, there is the two important settings you should heavily consider before you even start using SVN:</p>
<div id="attachment_82" style="width: 709px" class="wp-caption alignnone"><img class="size-full wp-image-82" title="TortoiseSVN Settings" src="http://amadiere.com/blog/wp-content/uploads/2009/04/tortoisesvn-settings.gif" alt="Some important settings for TortoiseSVN" width="699" height="468" /><p class="wp-caption-text">Some important settings for TortoiseSVN</p></div>
<p>The first thing of note is the big &#8220;Global Ignore Pattern&#8221; box. This is a space delimited list of files (with wildcards included) that can be used for excluding when you commit to your repository. The original set I left as it was, but added a few key additional files to that list:</p>
<blockquote><p>*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp .DS_Store *_ReSharper* *.suo Thumbs.db</p></blockquote>
<p>The key ones you&#8217;ll spot I&#8217;ve added are <strong>*_ReSharper*, *.suo </strong>and <strong>Thumbs.db</strong>. I was keen to avoid putting all the ReSharper files in there by default, and this seemed like a good way of doing this. The *.suo was added when I realised that all I had to do was open the project and this file would change, a little look around shed the light that this file isn&#8217;t needed and can be dropped from SVN altogether. Thumbs.db (case sensitivity is important btw), was because I develop on a windows box and it seems intent on creating that damn file everytime I put an image in the directory &#8211; so I&#8217;ve excluded that too.</p>
<p>The tickbox at the bottom was a little bit more <em>recommended</em>, than something I&#8217;ve learnt from. When you have a nosey at the <a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-main">official documentation for TortoiseSVN</a>, they do say that Visual Studio.NET has issues with the dot format SVN directory (<strong>Edit:</strong> <em>This was only relevant for VS 2003 it seems (see Bert Huijben&#8217;s comment below) &#8211; so not much of a worry if you are on exclusively newer versions.</em>):</p>
<blockquote><p>VS.NET when used with web projects can&#8217;t handle the <code class="literal">.svn</code> folders that Subversion uses to store its internal information. This is not a bug in Subversion. The bug is in VS.NET and the frontpage extensions it uses. Read <a class="xref" title="Subversion Working Folders" href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-asp-dot-net">the section called “Subversion Working Folders”</a> to find out more about this issue.</p>
<p>If you want to change the behaviour of Subversion and TortoiseSVN, you can use this checkbox to set the environment variable which controls this.</p>
<p>You should note that changing this option will not automatically convert existing working copies to use the new admin directory. You will have to do that yourself using a script (See our FAQ) or simply check out a fresh working copy.</p></blockquote>
<p>While this issue might have gone away (I never experienced it).  It seems quite foolish to simply ignore this setting when it does explicitly say against it!</p>
<p>I&#8217;ll reserve this post for any future amendments to my standard settings &#8211; as much a reference for myself as anyone else.</p>
<p>Wooooo! Time to do some coding!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/04/the-layout-of-a-subversion-repository/' rel='bookmark' title='The Layout of a Subversion Repository'>The Layout of a Subversion Repository</a> <small>How I'm suggesting we layout or works Subversion repository and...</small></li>
<li><a href='http://amadiere.com/blog/2009/06/multiple-subversion-projects-in-one-visual-studio-solution-using-svnexternals/' rel='bookmark' title='Multiple Subversion Projects in one Visual Studio Solution using svn:externals'>Multiple Subversion Projects in one Visual Studio Solution using svn:externals</a> <small>I have a Visual Studio solution with two projects in...</small></li>
<li><a href='http://amadiere.com/blog/2008/09/sourcesafe-or-subversion/' rel='bookmark' title='SourceSafe or SubVersion?'>SourceSafe or SubVersion?</a> <small>Since time of yore, Microsoft Visual Source Safe has been...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/04/configuring-subversion-clients/#comments" thr:count="2"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/04/configuring-subversion-clients/feed/atom/" thr:count="2"/>
		<thr:total>2</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[MySQL Two-Way, Master-Master Replication]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/04/mysql-two-way-master-master-replication/" />
		<id>http://blog.amadiere.com/?p=77</id>
		<updated>2009-11-01T10:01:44Z</updated>
		<published>2009-04-20T12:32:47Z</published>
		<category scheme="http://amadiere.com/blog" term="MySQL" /><category scheme="http://amadiere.com/blog" term="Databases" /><category scheme="http://amadiere.com/blog" term="Replication" />		<summary type="html"><![CDATA[A bit back, I was looking into database replication and specifically, two-way replication. Meaning that either server could be updated and it would replicate any changes to it's nice neighbour. Microsoft SQL offer a solution - but it was way out of our price-range. So, we looked into the world of MySQL and at the time, the sparkly and new MySQL 5.0.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/05/cross-page-postbacks-master-pages/' rel='bookmark' title='Cross-page PostBack&#8217;s and Master Pages'>Cross-page PostBack&#8217;s and Master Pages</a> <small>We were trying to use Webforms to submit a POST...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/04/mysql-two-way-master-master-replication/"><![CDATA[<p>A bit back, I was looking into database replication and specifically, two-way replication. Meaning that either server could be updated and it would replicate any changes to it&#8217;s nice neighbour. <a href="http://msdn.microsoft.com/en-us/library/ms151198.aspx">Microsoft SQL offer a solution</a> &#8211; but it was way out of our price-range. So, we looked into the world of MySQL and at the time, the sparkly and new <a href="http://dev.mysql.com/doc/refman/5.0/en/index.html">MySQL 5.0</a>.</p>
<p>MySQL offer quite a bit of <a href="http://dev.mysql.com/doc/refman/5.0/en/replication.html">useful documentation on replication</a> in general, but for our requirement of Master to Master connections, it <a href="http://dev.mysql.com/doc/refman/5.0/en/replication-faq.html#qandaitem-16-3-4-1-5">offered the wonderful barley&#8217;s</a> of:</p>
<blockquote><p>MySQL replication currently does not support any locking protocol between master and slave to guarantee the atomicity of a distributed (cross-server) update. In other words, it is possible for client A to make an update to co-master 1, and in the meantime, before it propagates to co-master 2, client B could make an update to co-master 2 that makes the update of client A work differently than it did on co-master 1. Thus, when the update of client A makes it to co-master 2, it produces tables that are different from what you have on co-master 1, even after all the updates from co-master 2 have also propagated. This means that you should not chain two servers together in a two-way replication relationship unless you are sure that your updates can safely happen in any order, or unless you take care of miss-ordered updates somehow in the client code.</p>
<p>You should also realize that two-way replication actually<strong> does not improve performance very much</strong> (if at all) as far as updates are concerned. Each server must do the same number of updates, just as you would have a single server do. The only difference is that there is a little less lock contention, because the updates originating on another server are serialized in one slave thread. Even this benefit might be offset by network delays.</p></blockquote>
<p>This offers some good advice and you really do need to understand exactly what you are doing before you can continue down this path. But suppose that<strong> it doesn&#8217;t really matter what order things happen, as long as they happen consistently across all servers</strong>, what are we to do then to get it all working? Well, enhancing and copying from <a href="http://stackoverflow.com/questions/325791/which-is-the-best-way-to-bi-directionally-synchronize-dynamic-data-in-real-time-u/">my response to a question on the awesome Stack Overflow</a>, here is what I&#8217;d do.</p>
<p>The first major problem that you must overcome, is that when a new incremental seed is created, it&#8217;s normally created 1, 2, 3, 4, 5 (the glorious one times table). However, this will be no good if the theoretical two-inserts-at-once-on-different-boxes happens. It would great two number 4&#8242;s. A BIG data-integrity issue. This is solved simply however, by simply providing a seed which equals the total number of masters you would have. So, in my case (and maybe most), there would be two Masters, one would be counting evens, and the other ones odd. 2,4,6,8 and 1,3,5,7. Following this logic there can be no duplicates. It does create the OCD-Offensive side-effect that there are numbers that are never used &#8211; but that doesn&#8217;t really matter a great deal as far as things go.  In addition, you should ensure both your server_id&#8217;s are different (two MySQL servers with the same name in replication has distinct disadvantage to the other setups (it doesn&#8217;t work) &#8211; but that&#8217;s standard replication setup anyway. ;0</p>
<p>Master MySQL 1:</p>
<pre>auto_increment_increment = 2
auto_increment_offset = 1</pre>
<p>Master MySQL 2:</p>
<pre>auto_increment_increment = 2
auto_increment_offset = 2</pre>
<p>Using all the functionality and commands of the standard MySQL replication, you should then be able to start both servers up as slaves of the other one. Then to check both are working OK, connect to both machines and perform the command <code>SHOW SLAVE STATUS</code> and you should note that both<code>Slave_IO_Running</code> and <code>Slave_SQL_Running</code> should both say “YES” on each box.</p>
<p>When creating your code to connect to the database servers, you want to send to both boxes equally? Or maybe favour one because it&#8217;s a bit beefier? You could add in death-checks to make sure a server is still serving queries and allowing connections &#8211; and if its not, use the other one.</p>
<p>All being told, I really like this solution for replication. For the fuller picture, you&#8217;d obviously add a slave somewhere that is remotely connected periodically (or all the time) and allowed to update. It acts as an off-site backup should your building be compromised (burns to the ground in a huge inferno-type-mess scenario. For example <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" />  ).</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/05/cross-page-postbacks-master-pages/' rel='bookmark' title='Cross-page PostBack&#8217;s and Master Pages'>Cross-page PostBack&#8217;s and Master Pages</a> <small>We were trying to use Webforms to submit a POST...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/04/mysql-two-way-master-master-replication/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/04/mysql-two-way-master-master-replication/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[What&#8217;s all this Twitter lark?]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/04/whats-all-this-twitter-lark/" />
		<id>http://blog.amadiere.com/?p=71</id>
		<updated>2009-11-01T10:02:04Z</updated>
		<published>2009-04-15T14:21:12Z</published>
		<category scheme="http://amadiere.com/blog" term="Social Networking" /><category scheme="http://amadiere.com/blog" term="Twitter" />		<summary type="html"><![CDATA[I found myself in the envious task of explaining Twitter and its pro's and con's to a number of colleagues. One question in particular made me smile and stutter as I hadn't really thought about it prior to the meeting:Why would people want to use Twitter?<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/04/whats-all-this-twitter-lark/"><![CDATA[<p>One of the things I&#8217;m working on at the moment is the embracing of <a href="http://twitter.com">Twitter</a> where I work.  Social Networks are something that <a href="http://twitter.com/search/users?q=COuncil&amp;category=people&amp;source=find_on_twitter">Local Authorities don&#8217;t really do</a> a great deal to embrace historically &#8211; though this isn&#8217;t across the board and there are some great users of it.</p>
<p>When originally we were talking about pushing out our press releases, news and events via sites &#8211; Twitter wasn&#8217;t something that many people had a great deal of knowledge about. I found myself in the envious task of explaining Twitter and its pro&#8217;s and con&#8217;s to a number of colleagues. One question in particular made me smile and stutter as I hadn&#8217;t really thought about it prior to the meeting:</p>
<blockquote><p>Why would people want to use Twitter?</p></blockquote>
<p>I&#8217;m not sure those were the same words, but the sentiment was that. It&#8217;s not that they were sceptical about change, nor that they wanted to try and trick me into a corner &#8211; it&#8217;s just that it&#8217;s a very logical question. Why <em>would</em><em> </em>anyone want to use Twitter? It&#8217;s not a technology that isn&#8217;t already out there, but its certainly not got a single rival in existing technology.</p>
<ul>
<li>SMS / Text Messages &#8211; These exist in similar format to the limited characters, although almost all modern phones make it easy to send longer messages, it&#8217;s not their purpose and people generally keep it short. However, these cost money and sending them to all your friends is even more expensive.</li>
<li>Email &#8211; People tend to ramble-on in emails. Instead of keeping to the point, they elaborate and expand upon points and (much like a blog) they aren&#8217;t used to convey the same type of information as Twitter.</li>
<li><a href="http://www.facebook.com">Facebook</a> (etc) &#8211; Arguably, it&#8217;s similar to the Facebook Status, but without the 3rd person tense and indeed, the requirement to talk about how you are feeling.</li>
</ul>
<p>A few very key points that Twitter does that other software doesn&#8217;t &#8211; decisions made that stand it aside from others.</p>
<ul>
<li><strong>Friendship isn&#8217;t always mutual</strong>. This is a <strong>big</strong> difference. If JoeBloggs23 starts to follow me, I&#8217;ve no requirement to follow them back &#8211; I don&#8217;t even know them! It doesn&#8217;t stop them from following me though. This means that I (or the Council) need not accept friendship to all these people. It&#8217;s not something I want to get into a great deal of effort debating, but there are people that the Council would not want to be seen as &#8216;following&#8217;, but there is no harm in them following us. Touchy subject <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </li>
<li><strong>It keeps things short</strong>. People can&#8217;t write essays (they can link to them on their blogs &#8211; though people don&#8217;t need to follow those links and read the blog post). It forces them to chose their words a little more carefully than maybe they would.</li>
<li><strong>It&#8217;s not personal &#8211; it&#8217;s micro news.</strong> This is only slightly different from my first point about friendship, but worth its own point. While the system is built for individuals, it allows organisations to simply tag along and become pushers of news. The sigma of being &#8216;friends&#8217; or &#8216;a fan&#8217; of a Council might be hard work &#8211; but just following for updates isn&#8217;t that bad really. It&#8217;s not something that people would be that worried about.</li>
</ul>
<p>At the moment, Twitter is still in the world of the tech-savvy and has yet to branch into the general population (if it ever does). But make no mistakes, it&#8217;s here and it&#8217;s popular alright. It&#8217;s a valid and worthwhile means of communication, financially too when you consider how little time and effort it takes to promote things that you are already promoting anyway!</p>
<p>But the true test is still not complete. When my mum starts to follow me, I know then that Twitter is indeed truely mainstream&#8230;</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/04/whats-all-this-twitter-lark/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/04/whats-all-this-twitter-lark/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[WordPress Blog &amp; The Tools for the Job]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/04/wordpress-blog-the-tools-for-the-job/" />
		<id>http://blog.amadiere.com/?p=66</id>
		<updated>2009-11-01T10:02:40Z</updated>
		<published>2009-04-12T19:01:43Z</published>
		<category scheme="http://amadiere.com/blog" term="Wordpress" /><category scheme="http://amadiere.com/blog" term="Blog" /><category scheme="http://amadiere.com/blog" term="Plugins" />		<summary type="html"><![CDATA[It was then, just as I was about to start my first new post for months, that I figured I should check for plugins before I continue. After all, it may make my life easier! .... two weeks later... ;)<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/05/changing-wordpress-permalinks/' rel='bookmark' title='Changing WordPress Permalinks'>Changing WordPress Permalinks</a> <small>I set up my blog and just had a little...</small></li>
</ol>
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/04/wordpress-blog-the-tools-for-the-job/"><![CDATA[<p>I decided about 6 months ago I&#8217;d start a blog! So, I created a blog.</p>
<p>About 2 weeks ago, I decided I&#8217;d resurrect that blog idea and carry on. But this time carry it on! One of the things I&#8217;ve been doing when I&#8217;m supposed to be writing blog entries, is tweaking my setup and trying to improve the way my blog works and I can monitor things. After all, I want to feel as if my blog posts are getting better!</p>
<p>After installing <a href="http://wordpress.org/">WordPress</a> way back in October or even earlier, I can&#8217;t remember &#8211; but either way &#8211; it needed an update! To my amazement, that was a piece of cake. In my site admin area, I just click to update the link &#8211; this is fantastic as I&#8217;m utterly not interested in FTP and file permissions, so to be able to just click a link appealed to me greatly!</p>
<p>It was then, just as I was about to start my first new post for months, that I figured I should check for plugins before I continue. After all, it may make my life easier! Over the period of the next two weeks, I&#8217;ve been digging out a number of different plugins to make my life easier and to promote my blog posts better.</p>
<p><strong><a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/">All in One SEO (Search Engine Optimisation)</a></strong><strong> </strong>- I&#8217;d definitely recommend this and the fact that its one of the most popular plug-ins for WordPress and has been for as long as I can remember, is testament to how good it is. It tweaks elements of the page to ensure that Google, Yahoo and the others are all looking at a view of the same information, but more tailored to them.</p>
<p><strong><a href="http://www.feedburner.com/fb/a/help/wordpress_quickstart">Feedburner</a></strong> &#8211; This was something new to me and it took a bit of fiddling about to get it how I want it. But I was keen to know how many people are subscribing to my blog. While at the moment &#8211; it&#8217;s just me. I think in time, it&#8217;ll be good to see if anyone takes an interest, and how things are change over time.</p>
<p><strong><a href="http://wordpress.org/extend/plugins/google-analytics-for-wordpress/">Google Analytics</a></strong><strong> &#8211; </strong>How I love this service from Google. I&#8217;ve experienced a number of services that do similar, as well as attempting to monitor internally &#8211; but this free service from Google is fantastic and I&#8217;ve seen no better of late. The mod itself isn&#8217;t rocket science &#8211; but it does it&#8217;s job beautifully well!</p>
<p><strong><a href="http://wordpress.org/extend/plugins/sociable/">Sociable</a> &#8211; </strong>Worth setting up to give those that browse with accounts on the various different linking networks, the ability to share your content &#8211; if it proves to be of any merit or worth. <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>
<p><strong><a href="http://alexking.org/projects/wordpress">Twitter Tools</a> &#8211; </strong>Twitter Tools is great for the right hand side &#8211; but I think I started at the wrong time as I&#8217;m finding it a bit of a tricky devil to make it post. I&#8217;m using currently the old &#8220;archives&#8221; format of Permalinks. This is making my life a damn-sight easier to fit into a twitter post. So it&#8217;s not too bad. However, it does come with the disadvantage that Google Analytics code can&#8217;t be added to it to enable monitoring of campaigns (basically, letting me know how many visitors are coming from my Tweets.</p>
<p><strong><a href="http://lesterchan.net/portfolio/programming/php/">PostViews</a> &amp; <a href="http://wordpress.org/extend/plugins/wp-postratings/">PostRating</a> &#8211; </strong>These required me to faff about with the template file, but nothing major and they worked other than that, right out of the box. If people use them, I&#8217;ll maybe get to see what people think I&#8217;m good at.</p>
<p><strong><a href="http://wordpress.org/extend/plugins/wp-super-cache/">Super Cache</a> &#8211; </strong>Bonafide God. It makes WordPress usable! One of the only definite!</p>
<p><strong><a href="http://wordpress.org/extend/plugins/wptouch/">WPTouch</a> &#8211; </strong>A quite nifty change to the template when viewed via an iPhone or iPod Touch, my current phone, so I&#8217;m bias.</p>
<p>With these tools &#8211; and I&#8217;m always on the lookout for more things &#8211; I hope to keep up the motivation and effort and post fairly frequently. But, first, I&#8217;m just gonna look for some other plugin&#8230; <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://amadiere.com/blog/2009/05/changing-wordpress-permalinks/' rel='bookmark' title='Changing WordPress Permalinks'>Changing WordPress Permalinks</a> <small>I set up my blog and just had a little...</small></li>
</ol></p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/04/wordpress-blog-the-tools-for-the-job/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/04/wordpress-blog-the-tools-for-the-job/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Calculating the Date of Easter Programatically]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/04/calculating-the-date-of-easter-programatically/" />
		<id>http://blog.amadiere.com/?p=56</id>
		<updated>2009-11-01T10:03:36Z</updated>
		<published>2009-04-07T22:25:19Z</published>
		<category scheme="http://amadiere.com/blog" term="Classic ASP" /><category scheme="http://amadiere.com/blog" term="Calendar" /><category scheme="http://amadiere.com/blog" term="Easter" /><category scheme="http://amadiere.com/blog" term="VBScript" />		<summary type="html"><![CDATA[Easter. A religious problem solved by a good ol' bit of Math! How to calculate the Date of Easter programatically, beating the lunisolar calendar into submission!<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/04/calculating-the-date-of-easter-programatically/"><![CDATA[<p>Every now and then, something really complex comes along and the answer is there on Google. A bit back now, I was asked to create a file for import into the organisations payroll system. The tricky thing was that this had to be an automated procedure that knew the date on which we would be paid.</p>
<p>The rule of thumb is fairly simple: We get paid on the 15th of the month. If this day happens to be a Saturday or Sunday &#8211; then it should be the preceding Friday. So sometimes, the 13th or 14th maybe. Bank Holidays? Most bank holidays avoid the 15th of the month without a problem &#8211; the exception is Easter. Easter is based on the lunisolar calendar. I had a quick Google, but alas, the Moon didn&#8217;t have a web-service, so I was gonna have to do this the hard way!</p>
<p>Having a <a href="http://en.wikipedia.org/wiki/Easter#Date_of_Easter">quick read up about the subject</a> reveals a wealth of complications where, between them, the Gregorian calendar and Christianity just about mess everything up for everyone! Unthoughtful, I agree. But the general rule of thumb is:</p>
<blockquote><p>Easter and the holidays that are related to it are moveable feasts, in that they do not fall on a fixed date in the Gregorian or Julian calendars (both of which follow the cycle of the sun and the seasons). Instead, the date for Easter is determined on a lunisolar calendar, as is the Hebrew calendar.</p>
<p>In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between March 22 and April 25 inclusively.[36] The following day, Easter Monday, is a legal holiday in many countries with predominantly Christian traditions. In Eastern Christianity, which use the Julian calendar for religious dating, Easter also falls on a Sunday between March 22 and April 25 inclusive of the Julian calendar. In terms of the Gregorian calendar, due to the 13 day difference between the calendars between 1900 and 2099, these dates are between April 4 and May 8 inclusive.</p></blockquote>
<p>I could have settled for programming the relevant <a href="http://users.sa.chariot.net.au/~gmarts/eastcalc.htm">dates for the next 40 years</a>, but somehow, that didn&#8217;t sit comfortably with me. It was then I stumbled upon a <a href="http://www.wildfire.dircon.co.uk/holidays.html">great article</a> (the link no longer works, but <a href="http://www.wildfire.dircon.co.uk">it seems the guy knows</a> and is working on updating it &#8211; so I&#8217;ll leave the link in for now).</p>
<p>To work out the date of Easter Sunday, there is some mathematical algorithms to it after all! (Praise be to science!)</p>
<p>These are the original comments, which are well written and I shan&#8217;t be able to improve upon much:</p>
<blockquote><p>First work out &#8220;epact&#8221;:  the approximate date of the Paschal moon.  The number is the approximate number of days before April 19 that a full moon will occur.  The number increases by 11 each year because 365 days is equal to 12 lunar cycles of 29.5 days plus 11 days.  The 2 is an arbitrary start point based on the state of the moon when they worked out this algorithm is 1582.</p>
<p>&#8220;a&#8221; and &#8220;b&#8221; are corrections based on the current century.</p>
<p>The formula was based on the simpler one in use with the Julian calendar, so the first correction is just to make it work with the Gregorian calendar.  It is essentially the &#8220;missing&#8221; leap days in the Gregorian calendar for 1700, 1800, etc, which is 15 for years 1900-2099.</p>
<p>The second correction improves the 19 years = 235 moons approximation.</p>
<p>Then the whole sum is reduced mod 30 to give us the age of the moon in days on April 5th (14 = full)</p>
<p>And a last correction is made in case either the epact is 0 (which would push the date of the moon later than the set limit of 18 April) or it is 1 AND we are in the second half of the 19 year cycle (because that means the previous correction was made already in this cycle but we don&#8217;t want to repeat it) In either case we just bump it on 1 because e=2 cannot happen.</p></blockquote>
<p>Genius! There was a wonderful example function written in a language which wasn&#8217;t much use to me,  so I converted into a VB Script function that could be called by my script. While the following is written for Classic ASP / VBScript, there is no reason why it can&#8217;t be easily turned back into PHP, Java, or a VB or C#.NET function.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #E56717; font-weight: bold;">Function</span> EasterMonday(iYear)
&nbsp;
  <span style="color: #151B8D; font-weight: bold;">Dim</span> iMonth, iDay, iMoon, iEpact, iSunDay, iGold, iCent, iCorx, iCorz
&nbsp;
  <span style="color: #8D38C9; font-weight: bold;">If</span> IsNumeric (iYear) <span style="color: #8D38C9; font-weight: bold;">Then</span>
    iYear = CInt(iYear)
&nbsp;
    <span style="color: #8D38C9; font-weight: bold;">If</span> (iYear &amp;gt;= 1583) <span style="color: #8D38C9; font-weight: bold;">And</span> (iYear &amp;lt;= 8702) <span style="color: #8D38C9; font-weight: bold;">Then</span>
      iGold = ((iYear <span style="color: #151B8D; font-weight: bold;">Mod</span> 19) + 1) <span style="color: #008000;">'the golden number of the year in the 19 year metonic cycle
</span>      iCent = ((Int(iYear / 100)) + 1) <span style="color: #008000;">'calculate the century
</span>      iCorx = (Int((3 * iCent) / 4) - 12) <span style="color: #008000;">'no. of years in which leap year was dropped in order to keep in step with the sun
</span>      iCorz = (Int((8 * iCent + 5) / 25) - 5) <span style="color: #008000;">'special correction to syncronize easter with the moon's orbit
</span>      iSunDay = (Int((5 * iYear) / 4) - iCorx - 10) <span style="color: #008000;">'find sunday
</span>      iEpact = ((11 * iGold + 20 + iCorz - iCorx) <span style="color: #151B8D; font-weight: bold;">Mod</span> 30) <span style="color: #008000;">'set epact (specifies occurance of full moon
</span>
      <span style="color: #8D38C9; font-weight: bold;">If</span> (iEpact &amp;lt; 0) <span style="color: #8D38C9; font-weight: bold;">Then</span>
        iEpact = iEpact + 30
      <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
      <span style="color: #8D38C9; font-weight: bold;">If</span> ((iEpact = 25) <span style="color: #8D38C9; font-weight: bold;">And</span> (iGold &amp;gt; 11)) <span style="color: #8D38C9; font-weight: bold;">Or</span> (iEpact = 24) <span style="color: #8D38C9; font-weight: bold;">Then</span>
        iEpact = iEpact + 1
      <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
      iMoon = 44 - iEpact <span style="color: #008000;">'Find Full Moon
</span>
      <span style="color: #8D38C9; font-weight: bold;">If</span> (iMoon &amp;lt; 21) <span style="color: #8D38C9; font-weight: bold;">Then</span>
        iMoon = iMoon + 30
      <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
      iMoon = (iMoon + 7 - ((iSunDay + iMoon) <span style="color: #151B8D; font-weight: bold;">Mod</span> 7)) <span style="color: #008000;">'advance to sunday
</span>
      <span style="color: #8D38C9; font-weight: bold;">If</span> (iMoon &amp;gt; 31) <span style="color: #8D38C9; font-weight: bold;">Then</span>
        iMonth = 4
        iDay = (iMoon - 31)
      <span style="color: #8D38C9; font-weight: bold;">Else</span>
        iMonth = 3
        iDay = iMoon
      <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
      EasterSunday = DateSerial(iYear, iMonth, iDay)
    <span style="color: #8D38C9; font-weight: bold;">Else</span>
      EasterSunday = <span style="color: #00C2FF; font-weight: bold;">False</span>
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
  <span style="color: #8D38C9; font-weight: bold;">Else</span>
    EasterSunday = <span style="color: #00C2FF; font-weight: bold;">False</span>
  <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Function</span></pre></td></tr></table></div>

<p>I&#8217;m always amazed by things like this. What initially seemed to me to be an overwhelming task, was solved by a small amount of code. What I thought was entirely based about the moon and how it felt like eclipsing every now and then, can actually be solved by mathematical equations!</p>
<p>I&#8217;d think about chalking this up as another victory for science over religion. However, I&#8217;m not entirely convinced that science and the stupidity of man didn&#8217;t pay part in the confusion in the first place. So I&#8217;ll just leave that potentially controversial debate for another time <img src="http://amadiere.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/04/calculating-the-date-of-easter-programatically/#comments" thr:count="1"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/04/calculating-the-date-of-easter-programatically/feed/atom/" thr:count="1"/>
		<thr:total>1</thr:total>
	</entry>
		<entry>
		<author>
			<name>Alex Holt</name>
						<uri>http://amadiere.com</uri>
					</author>
		<title type="html"><![CDATA[Jamie Oliver&#8217;s Ministry Of Food]]></title>
		<link rel="alternate" type="text/html" href="http://amadiere.com/blog/2009/04/jamie-olivers-ministry-of-food/" />
		<id>http://blog.amadiere.com/?p=46</id>
		<updated>2010-01-24T15:45:03Z</updated>
		<published>2009-04-04T19:04:50Z</published>
		<category scheme="http://amadiere.com/blog" term="Cooking" /><category scheme="http://amadiere.com/blog" term="Reviews" /><category scheme="http://amadiere.com/blog" term="Jamie Oliver" /><category scheme="http://amadiere.com/blog" term="Ministry Of Food" /><category scheme="http://amadiere.com/blog" term="Recipes" />		<summary type="html"><![CDATA[My new years resolution this year was to learn to cook. It took a month or so for me to start, and that's thanks to this really cool little book.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></summary>
		<content type="html" xml:base="http://amadiere.com/blog/2009/04/jamie-olivers-ministry-of-food/"><![CDATA[<div id="attachment_49" style="width: 130px" class="wp-caption alignright"><a href="http://www.amazon.co.uk/gp/product/0718148622?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0718148622"><img class="size-full wp-image-49" title="Ministry of Food" src="http://amadiere.com/blog/wp-content/uploads/2009/04/511iadnz92l_sl160_.jpg" alt="Anyone can learn to cook in 24 hours" width="120" height="160" /></a><p class="wp-caption-text">Anyone can learn to cook in 24 hours</p></div>
<p>My new years resolution this year was to learn to cook. It took a month or so for me to start, and that&#8217;s thanks to this really cool little book. This may sound a touch cliché, but I knew very little about cooking and I was quite happy with my concept of cooking being &#8220;bunging something in the microwave&#8221;, or if I was adventurous &#8211; a frozen pizza. Don&#8217;t get me wrong &#8211; I&#8217;m not a totally new man through the invention of this book, but I&#8217;m well on the way.</p>
<p>First things to note, I don&#8217;t have a big kitchen or loads of money to spend on expensive recipes, so this isn&#8217;t one of them exclusive books that has you out buying some ridiculously priced ingredients.</p>
<p>It has a number of good sections (<a href="http://www.jamiesministryoffood.com/content/jo/home.html">and website as well actually</a>) and I did really like the first section with the &#8220;essentials&#8221; in it. Don&#8217;t get me wrong, they are useful, but essential is debateable. I have bought a number of them since the beginning of the new year, but only as and when I needed them &#8211; obviously no point in pumping out hard earned cash for something you might never need! The book then has a good number of chapters with food broken down into them:</p>
<blockquote><p>Twenty-minute meals, Quick Pasta, Tasty Stir-fties, Easy curries, Lovin&#8217; Salads, Simple Soups, Homely mince, Comforting Stews, Family Roasts, Delish Veg, Quick-cooking meat &amp; fish, Classic Fish, Kick-start breakfasts, Sweet things.</p></blockquote>
<p>There are two things, without going into detail about the final product from the recipes just yet, that I like about this book. The first is <strong>it doesn&#8217;t take anything for granted</strong>. It assumes I&#8217;m as novice as a novice could be and explains the recipes from that direction. As an example, <strong>it tells you how to boil, fry and poach an egg</strong> &#8211; and even how to cook rice&#8230; without it sticking! I&#8217;m embarassed to ask someone those questions for fear of ridicule! But here I am, able to follow a set of guidelines, procedures and protocols &#8211; I&#8217;m back in an environment I understand, albeit a slightly different IDE.</p>
<p>The second great element of this book is the pictures. Normally, they include some arty farty picture of the final product which none of us would ever achieve, nor indeed even want to. This book (save the odd instance), includes <strong>pictures for the inbetween steps </strong>so you can feel assured that what you are making is going the right way (or at least has a chance of going ok). That piece of mind is great to know and has helped encourage my cooking regimé!</p>
<p>Obviously, I&#8217;ve not cooked everything in the book yet, but what I have, I&#8217;ve really enjoyed. Of the sections, the Curries are really nice and I&#8217;ve been amazed at how &#8230; amazing (!) they are! The Tikka Massala, Rogan Josh and even the Thai Green curry were better than any of my local take aways and a damn site cheaper when you weigh it all up! I&#8217;ve enjoyed the Kedgeree, some of other fish dishes (including the Fish Pie) immensely. But one thing that I think I&#8217;ve been surprised at, is the soups. They really have been awesome! They make portions for about 6-8 people an I happily freeze a number of them and take them to work over the next week or so. It works out much cheaper than buying sandwiches every day.</p>
<p>After getting this book, I thought that I&#8217;d have a look for another cooking book. One that does the same type of meals that are in this one. The great english, down to earth, &#8216;can imagine my granny cooking&#8217; dishes. So I bought <a href="http://www.amazon.co.uk/gp/product/0007289820?ie=UTF8&amp;tag=amadierecom-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0007289820">Gordon Ramsay&#8217;s Great British Pub Food</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=amadierecom-21&amp;l=as2&amp;o=2&amp;a=0007289820" border="0" alt="" width="1" height="1" /> and was <strong>uberly disappointed</strong>. The recipes are so far fetched from my universe I really can&#8217;t comprehend what type of pub sells them. Maybe I should have looked a bit closer at the recipes before I bought, but ah well. Back to Jamie&#8217;s MoF &#8211; it&#8217;s time to make a Stew! And it should last me a few days too! Mmmmm&#8230;.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content>
			<link rel="replies" type="text/html" href="http://amadiere.com/blog/2009/04/jamie-olivers-ministry-of-food/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://amadiere.com/blog/2009/04/jamie-olivers-ministry-of-food/feed/atom/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
	</feed>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->