<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>58bits - tech</title>
  <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/" />
  <link rel="self" href="http://www.58bits.com/blog/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2010-04-25T12:36:52.9357956-04:00</updated>
  <author>
    <name>Anthony Bouch</name>
  </author>
  <subtitle>Six bits short of sixty four...</subtitle>
  <id>http://www.58bits.com/blog/</id>
  <generator uri="http://dasblog.info/" version="2.3.9074.18820">DasBlog</generator>
  <entry>
    <title>Problem Syncing iTunes 9.1 with Outlook 2007 Contacts and Calendar</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2010/04/25/Problem-Syncing-ITunes-91-With-Outlook-2007-Contacts-And-Calendar.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,d38ff6e7-e351-4bd3-b15c-9624ca4c0907.aspx</id>
    <published>2010-04-25T12:32:52.1497956-04:00</published>
    <updated>2010-04-25T12:36:52.9357956-04:00</updated>
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <category term="Hardware" label="Hardware" scheme="http://www.58bits.com/blog/CategoryView,category,Hardware.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I wouldn’t normally post a rant article on my blog – but iTunes – grrrrr. I really
wish I wasn’t forced to use iTunes to sync my Outlook Contacts and Calendar with my
iPhone 3GS. 
</p>
        <p>
For the last few days I’ve been unable to sync my Outlook 2007 Contacts with my iPhone
– and it was driving me nuts. 
</p>
        <p>
I tried reinstalling iTunes 9.1, tried the Edit –&gt; Preferences –&gt; Devices –
Reset Sync History option. I tried checking all my recurring dates in Outlook – since
this was reported in the past as a problem.
</p>
        <p>
In the end – the answer was to roll back to iTunes 9.03 – by doing the following.
</p>
        <p>
As per <a title="http://support.apple.com/kb/HT1923" href="http://support.apple.com/kb/HT1923">http://support.apple.com/kb/HT1923</a> …
</p>
        <p>
Use the Control Panel to uninstall iTunes and related software components in the following
order: 
</p>
        <ol>
          <li>
iTunes 
</li>
          <li>
QuickTime 
</li>
          <li>
Apple Software Update 
</li>
          <li>
Apple Mobile Device Support 
</li>
          <li>
Bonjour 
</li>
          <li>
Apple Application Support (iTunes 9 or later) 
</li>
        </ol>
        <p>
I then deleted ALL of the Apple and Apple Computer folders in all of the user profiles
– under 
</p>
        <p>
&lt;UserName&gt;\AppData\Local 
<br />
&lt;UserName&gt;\AppData\LocalLow 
<br />
&lt;UserName&gt;\AppData\Roaming
</p>
        <p>
Reboot my Windows 7 PC – and then downloaded a copy of iTunes 9.0.3 from here… <a title="http://www.oldapps.com/itunes.php" href="http://www.oldapps.com/itunes.php">http://www.oldapps.com/itunes.php</a></p>
        <p>
Installed 9.03 - rebooted again – and presto – it worked.
</p>
        <p>
You’ve wasted nearly a day of my time Apple – which is worth more to me than your
phone and your terrible software.
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=d38ff6e7-e351-4bd3-b15c-9624ca4c0907" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Synchronising Sheep (Using LINQ)</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2010/04/14/Synchronising-Sheep-Using-LINQ.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,d6169db1-f8cf-4f91-ac2f-a5ea1b09f944.aspx</id>
    <published>2010-04-14T09:11:13.3497244-04:00</published>
    <updated>2010-04-15T14:41:20.6885452-04:00</updated>
    <category term="C#" label="C#" scheme="http://www.58bits.com/blog/CategoryView,category,C.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
LINQ to Objects in C# has been around for a while now – and yet I’m regularly amazed
at how easy LINQ has made it to perform what would have previously been fairly tedious
tasks (well unless you were very clever and had written your own set of IEnumerable
helper methods)  - like the following – where I needed to synchronise a list
of records in a database…
</p>
        <pre class="brush: csharp; auto-links: false;">/// &lt;summary&gt;
/// Let's synchronise some sheep...
/// &lt;/summary&gt;
/// &lt;param name="newSheep"&gt;&lt;/param&gt;
/// &lt;param name="db"&gt;&lt;/param&gt;
/// &lt;returns&gt;&lt;/returns&gt;
public IEnumerable&lt;Sheep&gt; SynchronizeSheep(IEnumerable&lt;Sheep&gt; newSheep, IDbService db)
{
    IEnumerable&lt;Sheep&gt; oldSheep = db.GetSheeps();

    foreach (var delete in oldSheep.Except(newSheep))
    {
        db.DeleteSheep(delete.Id);
    }

    foreach (var update in newSheep.Intersect(oldSheep))
    {
        db.UpdateSheep(update);
    }

    foreach (var addition in newSheep.Except(oldSheep))
    {
        db.InsertSheep(addition);
    }

    return db.GetSheeps();
}</pre>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=d6169db1-f8cf-4f91-ac2f-a5ea1b09f944" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Google Chrome Hidden Gems</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2010/02/22/Google-Chrome-Hidden-Gems.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,21a3dce5-4964-4795-ae11-715129f099f3.aspx</id>
    <published>2010-02-22T09:43:37.0424059-05:00</published>
    <updated>2010-02-22T09:46:37.8319648-05:00</updated>
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/GoogleChromeHiddenGems_CE60/chrome_2.jpg">
            <img style="border-bottom: 0px; border-left: 0px; margin: 5px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="chrome" border="0" alt="chrome" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/GoogleChromeHiddenGems_CE60/chrome_thumb.jpg" width="221" height="240" />
          </a> For
a while now I’ve been jumping between <a href="http://www.microsoft.com/uk/windows/internet-explorer/" target="_blank">IE8</a>, <a href="http://www.mozilla.com/en-US/firefox/firefox.html" target="_blank">Firefox</a>,
and <a href="http://www.google.com/chrome" target="_blank">Google Chrome</a>. The
browser that’s pulling me in – is definitely Chrome. For starters it’s fast. I mean
really fast – even after a solid couple of months of use with a large local cache. 
</p>
        <p>
Other sticky features include being able to just type my search terms into the address
bar – and execute a search (not unique to Chrome of course IE8 and Firefox both do
this). And then the little details – like the screen shot shown here. While visiting
one of my regular podcasts with Chrome – just clicking on the MP3 file – from what
I’m assuming is a progressive download – launched a very nice little audio player.
I don’t know why it’s there – or what ‘auto-magical’ stuff happened under the hood
– it just worked. I also like the <a href="https://tools.google.com/chrome/intl/en-GB/themes/p/at_chrome.html?installdataindex=nosearch&amp;hl=en-GB&amp;brand=CHOS&amp;utm_campaign=en-GB&amp;utm_source=en-GB-ha-emea-uk-bk&amp;utm_medium=ha" target="_blank">dark
theme</a> I found for Chrome and just ‘clicked’ and it was in – nice and dark and
less painful to the eye – just like my dev IDE. 
</p>
        <p>
There are bigger issues and tectonic industry shifts at work here. I couldn’t write
about them all with enough zest or knowledge to be of interest in this short post
(like the future of Firefox now that the Mozilla Foundation’s largest funding organisation
– Google – has their own browser) – suffice to say that for me at least- Chrome is
sticky – and I’m using it more and more.
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=21a3dce5-4964-4795-ae11-715129f099f3" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Google Custom Search Engine and Google Site Search – In 30 Seconds</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/11/23/Google-Custom-Search-Engine-And-Google-Site-Search-In-30-Seconds.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,af7171d7-5fc6-4aad-ae9d-429d52eaeed6.aspx</id>
    <published>2009-11-23T13:11:56.129253-05:00</published>
    <updated>2009-11-26T07:29:10.6157327-05:00</updated>
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
A project I’ve been working on recently required a search feature. After a quick look
around I thought I’d give a hosted solution a try – using Google Site Search.
</p>
        <p>
After almost a full day of banging my head against the wall – here’s what I discovered…
</p>
        <p>
          <strong>I)</strong> The only difference between Site Search and Google Custom Search
– is that you pay for Site Search and you get on-demand indexing – so you’re guaranteed
(in theory) to have all of the pages in your site indexed.
</p>
        <p>
          <strong>II)</strong> Once you’ve paid for Site Search – the control panel is effectively
the Custom Search Engine Search control panel – with the on-demand option present.
</p>
        <p>
          <strong>III)</strong> There are three ‘levels’ of control you have over the results
on your site.
</p>
        <p>
Here’s a quick tour of each – assuming you’ve read just enough of the docs (Here’s
a link to the <a href="http://code.google.com/intl/en/apis/ajaxsearch/documentation/" target="_blank">Google
AJAX Search API</a>) to know that you need to link to the jsapi JavaScript library
– load the search api via: google.load('search', '1'); and then declare your OnLoad
function .
</p>
        <p>
Note – for all three options it’s a good idea to have the following style sheet at
the top of all your test pages – since you get some ‘freebie’ and fast styling as
a result.
</p>
        <p>
          <a title="http://www.google.com/cse/style/look/default.css" href="http://www.google.com/cse/style/look/default.css">http://www.google.com/cse/style/look/default.css</a>
        </p>
        <p>
 
</p>
        <p>
          <strong>1)</strong>
          <strong>google.search.CustomSearchControl</strong> – with just
two lines of code – you can have a custom search page up and running (well not quite
two lines – but these are the most important two).
</p>
        <pre class="brush: js; auto-links: false;">var customSearchControl = new google.search.CustomSearchControl('013652945859801643433:fdsfsqjnea4');
customSearchControl.draw('targetDiv');</pre>
        <p>
The parameter to the CustomSearchControl is the CSE id for the custom search engine
you’ve created – and calling ‘draw’ will render the completed form and search results
area to the page. The CustomSearch control has a built in ‘searcher’ based on the
settings from your CSE control panel. CustomSearchControl is however a little difficult
to customize. I found it hard to turn off the default ‘search’ form and place the
results where I wanted them. You can add additional searchers – like images and video
search via:
</p>
        <pre class="brush: js; auto-links: false;">customSearchControl.addSearcher(new google.search.ImageSearch(), options);</pre>
        <p>
The main point to note here – is that CustomSearchControl is ‘driven’ by the CSE control
panel – including filter options, look and feel etc. all based on the search engine
unique ID that you’ll also find in the CSE control panel.
</p>
        <p>
This is custom search with training-wheels on.
</p>
        <p>
 
</p>
        <p>
          <strong>2)</strong>
          <strong>google.search.SearchControl</strong> – is the next level
down in abstraction – and here’s the ‘<a href="http://code.google.com/intl/en/apis/ajaxsearch/documentation/#The_Hello_World_of_Google_Search" target="_blank">Hello
World</a>’ example from the docs. With SearchControl – you have to add searchers to
the control and then you can tell the control to ‘draw’ itself – just like with the
CustomSearchControl. However it’s a little easier to customize. For example:
</p>
        <pre class="brush: js; auto-links: false; highlight: [8];">this.control = new google.search.SearchControl();
// set up for CSE result sets
this.control.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);

// configure search control
var options = new google.search.SearcherOptions();
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
options.setRoot(resultsDiv)

var searcher = new google.search.WebSearch();
searcher.setSiteRestriction("01365294584480dsadad3:ffsfsfseqjnea4");
searcher.setUserDefinedLabel("Search Results");
searcher.setLinkTarget(google.search.Search.LINK_TARGET_SELF);

this.control.addSearcher(searcher, options);

this.control.draw();</pre>
        <p>
Note the options.setRoot(resultsDiv) highlighted line. This does two things – 1) It
sends the output of the search to the ‘resultsDiv’ and 2) it turns off the submit
form – which means you can now control the input to search – from your own form –
placed anywhere on the page as long as you handle the OnSubmit event and call 
</p>
        <p>
this.control.execute(‘formInputValue’);
</p>
        <p>
Again if you link to <a title="http://www.google.com/cse/style/look/default.css" href="http://www.google.com/cse/style/look/default.css">http://www.google.com/cse/style/look/default.css</a> –
you’ll get some instant results that look ok.
</p>
        <p>
 
</p>
        <p>
          <strong>3)</strong>
          <strong>google.search.Search</strong> – is the lowest level abstraction
– the raw searcher class – and although you still get some good stuff here, you will
have to take care of rendering the results to the page. In this case you will need
to handle the input and output for every class of searcher you use – Web, Local, Image
or Video – all of which are derived from google.search.Search. For example…
</p>
        <pre class="brush: js; auto-links: false;">// Our searcher instance.
var searcher = new google.search.WebSearch();

searcher.setSiteRestriction("013652945859801616623:ecbgsqjnea4");
searcher.setResultSetSize(google.search.Search.LARGE_RESULTSET);
searcher.setUserDefinedLabel("QCC Search Results");
searcher.setLinkTarget(google.search.Search.LINK_TARGET_SELF);
searcher.setSearchCompleteCallback(this, searchComplete, null);

var searchForm = document.getElementById("search");
if (searchForm.q.value) {
    searcher.execute(searchForm.q.value);
}</pre>
        <p>
Here's a link to a complete example of a <a href="http://code.google.com/apis/ajax/playground/#raw_search" target="_blank">raw
search with output being handled by the developer</a> (which is in another area of
the Google docs – the Code Playground).
</p>
        <p>
While there’s more plumbing required here – you’re still off to a good start. <strong><em>Unlike</em></strong>the
sample above for raw handling of the results – you can use the .html property of the
result object in the results array – which will tie up again nicely with the linked
style sheet - and you’ll have a ‘Goggle-like’ – good-to-go search experience in your
site. Like this…
</p>
        <pre class="brush: js; auto-links: false;">function searchComplete() {
    // Check that we got results            
    if (searcher.results &amp;&amp; searcher.results.length &gt; 0) {
        // Grab our content div, clear it.
        var resultsDiv = document.getElementById('results');
        resultsDiv.innerHTML = '';
        // Loop through our results, printing them to the page.
        var results = searcher.results;
        for (var i = 0; i &lt; results.length; i++) {
            // For each result write it's title and image to the screen
            var result = results[i];
            resultsDiv.appendChild(result.html);
        }

        // Now add the paging links so the user can see more results.
        addPaginationLinks(searcher);
    }
}</pre>
        <p>
And that's it. There <strong><em>is</em></strong> documentation available for all
of this – but it’s in various locations. The first examples you will see if you come
to search via the CSE control panel – will be the CustomSearchControl. The hard part
was the ‘orientation’ exercise that I had to go through to understand what the heck
I was using, where it fit in the bigger picture of the search API, and how I could
create a more customized search experience. The docs are a bit all over the shop in
this case – and so it took me nearly a day to write some POC tests and properly understand
the relationship between google.search.CustomSearchControl, google.search.SearchControl
and good.search.Search.
</p>
        <p>
Hope this post helps to reduce the pain for anyone else that’s new to Google Search
and would like to implement a tailored search experience.
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=af7171d7-5fc6-4aad-ae9d-429d52eaeed6" />
      </div>
    </content>
  </entry>
  <entry>
    <title>We Come to Bury IE6</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/11/04/We-Come-To-Bury-IE6.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,54bd260f-4b6a-485f-9719-6d1f5c9464c1.aspx</id>
    <published>2009-11-04T08:15:21.834244-05:00</published>
    <updated>2009-11-04T08:18:24.323044-05:00</updated>
    <category term="CSS/XHTML" label="CSS/XHTML" scheme="http://www.58bits.com/blog/CategoryView,category,CSSXHTML.aspx" />
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
When the desired death of a browser makes it into a <a href="http://www.spectrum.ieee.org/telecom/internet/we-come-to-bury-ie6" target="_blank">full-page
editorial of IEEE Spectrum</a> – you know that the issue is finally starting to gain
some traction. The tech blogosphere communities have been making plenty of noise about
this for a while now. And I’d love someone to do an ‘economic’ impact analysis for
IE6 – both in terms of development and security related incidents.
</p>
        <p>
I think the Spectrum article (and the referring blog post from Digg) does a good job
of describing the issues – corporate restrictions being high on the list of reasons
that prevent a user from upgrading. That said I’d rank Microsoft’s failed Vista strategy
which resulted in downgrade options to Windows XP being offered by manufacturers,
along with the number of illegal and non-updating XP installations out there as just
as large a contribution.
</p>
        <p>
Despite my <a href="http://www.58bits.com/blog/2009/07/11/How-To-Ban-Internet-Explorer-6-From-Your-Site-Using-The-IIS7-Url-Rewrite-Module.aspx" target="_blank">earlier
and naïve attempt</a> to ban IE6 from my site I’ve now successfully bared the browser
using IE conditional comments – which is the only reliable way you can detect this
version of IE (you can’t sniff for it reliably). I then display the following :-)
</p>
        <p>
          <a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/WeCometoBuryIE6_B6F1/your_browser.jpg">
            <img style="border-bottom: 0px; border-left: 0px; margin: 0px; display: inline; border-top: 0px; border-right: 0px" title="your_browser" border="0" alt="your_browser" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/WeCometoBuryIE6_B6F1/your_browser_thumb.jpg" width="433" height="299" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=54bd260f-4b6a-485f-9719-6d1f5c9464c1" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Nikon ViewNX Broken on Windows 7</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/10/24/Nikon-ViewNX-Broken-On-Windows-7.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,52b0d286-7d24-4eca-abd1-69d971f6ad5e.aspx</id>
    <published>2009-10-24T08:15:25.1073624-04:00</published>
    <updated>2009-10-24T08:15:25.1073624-04:00</updated>
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I posted <a href="http://www.58bits.com/otherblog/2009/06/12/Nikon-ViewNX-You-Suck.aspx" target="_blank">my
views earlier on Nikon software</a> – and I’m now pretty sure that Nikon ViewNX is
broken on Windows 7. Below is a link to the native Process Monitor log file – filtered
for ViewNX after a complete uninstall and re-install to the latest version of ViewNX
1.5.0 – running on the RTM of Windows 7. ViewNX was still performing an endless loop
of I/O and registry requests. 
</p>
        <p>
I stopped recording after 1.7 million events (a 182MB log file – compressed to 21MB
below).
</p>
        <p>
          <a href="http://www.58bits.com/download/ViewNX.zip">ViewNX.zip</a>
        </p>
        <p>
:-(
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=52b0d286-7d24-4eca-abd1-69d971f6ad5e" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Formal Versus Agile Methodologies</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/09/25/Formal-Versus-Agile-Methodologies.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,a4c3fa36-ab75-4709-8531-496b5b1c2a5c.aspx</id>
    <published>2009-09-25T19:28:41.6687988-04:00</published>
    <updated>2009-10-23T00:54:08.7088844-04:00</updated>
    <category term="Enterprise" label="Enterprise" scheme="http://www.58bits.com/blog/CategoryView,category,Enterprise.aspx" />
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ve been an IEEE and Computer Society member for a couple of years now. Trying to
keep up with the IEEE publications along with my RSS Reader and tech news has been
a challenge – so I’m sure I’ve missed some good stuff along the way.
</p>
        <p>
However, an article in the September 2009 edition of ‘Computer’ caught my eye: “<a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2009.284" target="_blank">Formal
Versus Agile: Survival of the Fittest</a>” by Sue Black, Paul P. Boca, Jonathan P.
Bowan, Jason Gorman and Mike Hinchey.
</p>
        <p>
It’s a great article with good history and an insightful assessment of the current
‘methodologies’ landscape. Unfortunately the article is only available to subscribers
of ‘Computer’ at the moment. I hope it will be published more widely in the near future
since I think it has a wide appeal.
</p>
        <p>
The author’s comparison of RAD and Agile was particularly interesting – and the following
statement about Agile practises is worth quoting…
</p>
        <blockquote>
          <p>
Most teams purporting to be doing agile software development are not applying the
level of technical rigor necessary to succeed at it. Most ‘agile’ teams have actually
only adopted Scrum’s project-management practise and have failed to effectively adopt
‘the hard disciplines’ like test-driven development, refactoring, pair programming,
simple design (writing the simplest code possible to satisfy the customer’s requirements),
and continuous integration.
</p>
        </blockquote>
        <p>
Their description of the major misconception that ‘Agile = Fast’ was also insightful
(when it should be about being responsive to ‘change’).
</p>
        <p>
A great read if you can get hold of it.
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=a4c3fa36-ab75-4709-8531-496b5b1c2a5c" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Projects</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/09/01/Projects.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,59808b09-609c-40c0-9bc8-509a22fe0d22.aspx</id>
    <published>2009-09-01T18:09:39.1316484-04:00</published>
    <updated>2009-12-08T15:50:06.6366518-05:00</updated>
    <category term="C#" label="C#" scheme="http://www.58bits.com/blog/CategoryView,category,C.aspx" />
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <category term="Visual Studio" label="Visual Studio" scheme="http://www.58bits.com/blog/CategoryView,category,VisualStudio.aspx" />
    <category term="WPF" label="WPF" scheme="http://www.58bits.com/blog/CategoryView,category,WPF.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m pretty sure that anyone who actually likes to ‘make stuff’ and has been a programmer
at least once in their life – has got a short list of pet projects that he/she has
started – and maybe even finished :-)
</p>
        <p>
Here are a few of my ‘pets’.
</p>
        <p>
          <strong>CodeDom class generator for VS2005/2008</strong>
        </p>
        <p>
          <img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="addin-screenshot_01" border="0" alt="addin-screenshot_01" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/addin-screenshot_01_3.jpg" width="305" height="94" />This
was an early attempt of mine at writing a Visual Studio Add-in - designed to create
a class from a database query, table or stored procedure. There’s a ton of stuff like
this out there – but I wanted something that generated the class from the DataTable
– SchemaTable of an IReader – so that a class could be generated from any query or
shape for use with DTOs, reporting, or a simple domain model. You can choose from
C#, VB or C++ to generate the class as well as a number of styles of classes – from
a built-in IReader constructor, attribute based mapper, or plain old CLR object (POCO).
There also doesn’t have to be any data in the result set for this to work since the
SchemaTable will be returned regardless.
</p>
        <p>
 <a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/addin-screenshot_02_4.jpg" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="addin-screenshot_02" border="0" alt="addin-screenshot_02" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/addin-screenshot_02_thumb_1.jpg" width="464" height="385" /></a></p>
        <p>
The Add-in also adds an ‘Open Folder’ option to the context menu of all solutions,
projects, folders, etc. in Solution Explorer. This feature exists as of VS 2008 –
but I wanted it at the top of the context menu – not at the bottom.
</p>
        <p>
You can download the Add-in here at - <a href="http://www.58bits.com/download/FiftyEightBitsAddin.zip">FiftyEightBitsAddin.zip</a> Just
unzip and place the contents of the zip file into any one of the Add-in locations
for VS2008.
</p>
        <p>
 
</p>
        <p>
          <strong>PreCode Code Snippet Plugin for WLW</strong>
        </p>
        <p>
This is an open source project hosted at Codeplex – a plugin for Windows Live Writer
that helps to format code snippets before pasting them into a blog post (or elsewhere).
It was written for the excellent <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter" target="_blank">SyntaxHighlther
from Alex Gorbatchev</a>. It’s a WPF app – and also includes a standalone desktop
version for pasting formatted code into any app (ideal for <a href="http://stackoverflow.com/" target="_blank">Stack
Overflow</a>). Please don’t look at this as a reference WPF app though – it’s more
than just a little ‘hacky’. The app that follows is my ‘better’ WPF effort. Visit <a title="http://www.codeplex.com/precode" href="http://www.codeplex.com/precode">http://www.codeplex.com/precode</a> for
more details, the source code and the installer.
</p>
        <p>
 <a href="http://www.codeplex.com/precode" target="_blank"><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="precode_screenshot" border="0" alt="precode_screenshot" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/precode_screenshot_3.jpg" width="507" height="498" /></a></p>
        <p>
 
</p>
        <p>
          <strong>Gallery Builder – Desktop and Web</strong>
        </p>
        <p>
If you follow the <a href="http://www.58bits.com/photos" target="_blank">Photos</a> link
above – you’ll see the results of this application. Yet another gallery builder app
– however I’ve spent a bit of time on this one – choosing a specific architecture
that I think represents a good balance between desktop and web server processing for
small to medium size collections of photos. I’ll be hosting a Wiki soon with docs
and the full download including the HttpModule that is used display galleries online
(along with a sample app and extensibility features). The module can be integrated
into any site and includes full Atom and Rss syndication support, nested galleries,
as well as good caching/304 response support.
</p>
        <p>
 <a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/0.9.8.1000_2.jpg" target="_blank"><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="0.9.8.1000" border="0" alt="0.9.8.1000" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/0.9.8.1000_thumb.jpg" width="512" height="427" /></a></p>
        <p>
A pre-release version of the desktop application can be downloaded from the link below
(although it’s not a whole lot of good without the web component). Hand rolling a
complete set of control templates for a custom theme in WPF was a great way to get
to know the inside of WPF.
</p>
        <p>
          <strong>NOTE: </strong>If there are no other WPF apps on your machine – and this application
is the first WPF application you start – the ‘cold’ loading time for a WPF app is
very long. Subsequent application loading times are what you’d expect.
</p>
        <p>
          <a href="http://www.58bits.com/download/GalleryBuilder_0.9.9.1000.zip">GalleryBuilder_0.9.9.1000.zip</a>
        </p>
        <p>
 
</p>
        <p>
          <strong>
          </strong>
        </p>
        <p>
          <strong>Yet another Task Management App - DotNetTime</strong>
        </p>
        <p>
          <a href="http://www.58bits.com/dnt" target="_blank">
            <img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dnt_screenshot" border="0" alt="dnt_screenshot" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/dnt_screenshot_3.jpg" width="409" height="365" />
          </a>
        </p>
        <p>
Yet another task/project list manager; only I actually use this one. This is an ASP.Net
Model View Presenter application (and hopefully my last Webforms app). I use this
to track my own time working on projects or just to ‘monitor’ my own time in general.
Implementing multi-language support was a good learning exercise – and until recently
this had been my ‘workbench’ throw anything at it hobby app. Now that charting controls
are available <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&amp;displaylang=en" target="_blank">free
from Microsoft</a> – I’ll be adding some charts to the reporting page. Feel free to
register and have a play – it’s very basic – but it does what I need. Be gentle too
if you’re into web hackery– this was built <strong><em>before</em></strong>my formal
introduction to the world of <a href="http://www.58bits.com/blog/2009/05/20/MSc-In-Information-Security.aspx" target="_blank">application
security</a> and so I wouldn’t be surprised at all if there were XSS or CSRF vulnerabilities
(although there shouldn’t be any SQL injection weaknesses – he says).
</p>
        <p>
          <a href="http://www.58bits.com/dnt" target="_blank">http://www.58bits.com/dnt</a>
        </p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=59808b09-609c-40c0-9bc8-509a22fe0d22" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Get XElement Value with Default</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/08/02/Get-XElement-Value-With-Default.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7.aspx</id>
    <published>2009-08-01T21:24:20.1873925-04:00</published>
    <updated>2009-08-02T20:14:24.3927283-04:00</updated>
    <category term="C#" label="C#" scheme="http://www.58bits.com/blog/CategoryView,category,C.aspx" />
    <category term="Utilities" label="Utilities" scheme="http://www.58bits.com/blog/CategoryView,category,Utilities.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Thanks to this post at <a href="http://brokenbokken.wordpress.com/2007/11/27/net-dojo-methods-with-a-generic-return-type/" target="_blank">.Net
Dojo</a>, here’s a utility method for getting a safe value from an XElement, returning
a default value if the element was not found.
</p>
        <pre class="brush: csharp; auto-links: false;">public static T GetElementValue&lt;T&gt;(XElement parent, string elementId, T defaultValue) where T : IConvertible
{
    XElement element = parent.Element(elementId);
    if (element != null)           
        return (T)Convert.ChangeType(element.Value, typeof(T), CultureInfo.InvariantCulture);           
    else
        return defaultValue;   
}    </pre>
        <p>
I’ve been using this combined with .Net 3.0 object initializers to re-hydrate objects
from Xml with safe values, like…
</p>
        <pre class="brush: csharp; auto-links: false;">var myClass = new MyClass() 
{ 
    Name = GetElementValue(parent, "Name", String.Empty),
    IsDefault = GetElementValue(parent, "IsDefault ", true),
    YearsLeft = GetElementValue(parent, "Yearsleft", 100)
}</pre>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7" />
      </div>
    </content>
  </entry>
  <entry>
    <title>ASP.NET MVC 304 Not Modified Filter for Syndication Content</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/07/26/ASPNET-MVC-304-Not-Modified-Filter-For-Syndication-Content.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,c4c4312d-d1f7-4d15-9721-723c9d3ad16d.aspx</id>
    <published>2009-07-26T02:35:50.0756155-04:00</published>
    <updated>2009-07-26T07:47:21.394424-04:00</updated>
    <category term="ASP.Net" label="ASP.Net" scheme="http://www.58bits.com/blog/CategoryView,category,ASPNet.aspx" />
    <category term="C#" label="C#" scheme="http://www.58bits.com/blog/CategoryView,category,C.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Earlier I posted about a <a href="http://www.58bits.com/blog/2009/05/02/GZip-And-Deflate-Compression-Filter-For-ASPNet-MVC.aspx" target="_blank">compression
filter for ASP.NET MVC</a> that was the product of two other posts on compression
and QValues. I’ve also seen a couple of posts describing different approaches to creating
syndication content via ASP.NET MVC – RSS or Atom feeds. Here are two suggestions
– one at <a href="http://www.developerzen.com/2009/01/11/aspnet-mvc-rss-feed-action-result/" target="_blank">DeveloperZen</a> and
the other at <a href="http://stackoverflow.com/questions/11915/rss-feeds-in-asp-net-mvc" target="_blank">Stack
Overflow</a> that both use an RssActionResult subclass of <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.actionresult.aspx" target="_blank">ActionResult</a>. 
</p>
        <p>
What was missing was a 304 Not Modified filter – so that feeds that have not changed
can return a 304 Not Modified HTTP Response - saving bandwidth and improving performance
of the consumer.
</p>
        <p>
Here’s my attempt at putting it all together using a custom NotModifiedFilter, the
CompressionFilter and a SyndicationActionResult class.
</p>
        <p>
First the NotModifiedFilter. This article at the <a href="http://edn.embarcadero.com/article/38123" target="_blank">Embarcadero
Developer Network</a> was very helpful (along with the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5" target="_blank">W3C
standard for 304 Not Modified</a>).
</p>
        <p>
Here’s the filter.
</p>
        <pre class="brush: xml; auto-links: false;">public class NotModifiedFilterAttribute : ActionFilterAttribute
{
    public override void OnResultExecuted(ResultExecutedContext filterContext)
    {
        var response = filterContext.HttpContext.Response;
        var request = filterContext.HttpContext.Request;           

        if ((IsSourceModified(request, response) == false))
        {
            response.SuppressContent = true;
            response.StatusCode = 304;
            response.StatusDescription = "Not Modified";
            // Explicitly set the Content-Length header so the client doesn't wait for
            // content but keeps the connection open for other requests
            response.AddHeader("Content-Length", "0");
        }
    }
}</pre>
        <p>
And here’s the helper method that tests for modified content.
</p>
        <pre class="brush: xml; auto-links: false;">private static bool IsSourceModified(HttpRequestBase request, HttpResponseBase response)
{                  
    bool dateModified = false;
    bool eTagModified = false;

    string requestETagHeader = request.Headers["If-None-Match"] ?? string.Empty;
    string requestIfModifiedSinceHeader = request.Headers["If-Modified-Since"] ?? string.Empty;            
    DateTime requestIfModifiedSince;                    
    DateTime.TryParse(requestIfModifiedSinceHeader, out requestIfModifiedSince);
    
    string responseETagHeader = response.Headers["ETag"] ?? string.Empty;
    string responseLastModifiedHeader = response.Headers["Last-Modified"] ?? string.Empty;
    DateTime responseLastModified;
    DateTime.TryParse(responseLastModifiedHeader, out responseLastModified);

    if (requestIfModifiedSince != DateTime.MinValue &amp;&amp; responseLastModified != DateTime.MinValue)
    {
        if (responseLastModified &gt; requestIfModifiedSince)
        {
            TimeSpan diff = responseLastModified - requestIfModifiedSince;
            if (diff &gt; TimeSpan.FromSeconds(1))
            {
                dateModified = true;
            }
        }
    }
    else
    {
        dateModified = true;
    }

    //Leave the default for eTagModified = false so that if we
    //don't get an ETag from the server we will rely on the fileDateModified only           
    if (String.IsNullOrEmpty(responseETagHeader) == false)
    {
        eTagModified = responseETagHeader.Equals(requestETagHeader, StringComparison.Ordinal) == false;
    }

    return (dateModified || eTagModified);    
}</pre>
        <p>
And lastly – here’s my SyndicationActionResult class which uses a Func&lt;FeedData&gt;
delegate to get the feed data – and so can be used for any type of feed – Rss, Atom,
Sitemaps etc. (FeedData contains the feed content as well as the last modified date
and the ETag). Not sure if I’m guilty of <a href="http://en.wikipedia.org/wiki/Cargo_cult_programming" target="_blank">cargo
cult programming</a> here since I was a little unsure about setting the ‘Last-Modified’
header manually instead of using response.Cache.SetLastModified() method. However
the latter was not showing up in the HttpContext of the OnResultExecuted method in
the filter. Maybe the runtime moves this value into the headers collection later in
the pipeline.
</p>
        <pre class="brush: xml; auto-links: false;">public class SyndicationActionResult : ActionResult
{
    public Func&lt;FeedData&gt; ActionDelegate { get; set; }
    
    public override void ExecuteResult(ControllerContext context)
    {
        if (ActionDelegate != null)
        {
            var response = context.HttpContext.Response;
            var data = ActionDelegate.Invoke() as FeedData;
            if (data != null)
            {
                response.ContentType = data.ContentType;
                response.AppendHeader("Cache-Control", "private");
                response.AppendHeader("Last-Modified", data.LastModifiedDate.ToString("r"));
                //response.Cache.SetLastModified(data.LastModifiedDate);
                response.AppendHeader("ETag", String.Format("\"{0}\"", data.ETag));
                response.Output.WriteLine(data.Content);
                response.StatusCode = 200;
                response.StatusDescription = "OK";
            }
        }
    }
}</pre>
        <p>
Note that we write the content to the response.Output stream - however if the NotModifiedFilter
tells us nothing has changed – then this will be suppressed – (although it is important
that the ETag remains).
</p>
        <p>
And very lastly - here's the Action in my SyndicationController class that puts it
all together, and in this case – is used to provide the aggregate Atom feed on my
home page at <a href="http://www.58bits.com" target="_blank">http://www.58bits.com</a>.
</p>
        <pre class="brush: xml; auto-links: false;">[AcceptVerbs(HttpVerbs.Get)]
[NotModifiedFilter(Order = 1)]
[CompressFilter(Order = 2)]
public SyndicationActionResult SiteFeedAtom()
{
    return new SyndicationActionResult() { ActionDelegate = SyndicationHelper.GetAggregateAtomFeed };
}</pre>
        <p>
As <a href="http://www.hanselman.com/blog/" target="_blank">Scott</a> sometimes says
-  it may be  “poo”… or it maybe useful. At least it seems to be working
ok for me, although suggestions on how any of it might be improved would be greatly
appreciated.
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=c4c4312d-d1f7-4d15-9721-723c9d3ad16d" />
      </div>
    </content>
  </entry>
  <entry>
    <title>The Best Windows 7 Feature</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/07/17/The-Best-Windows-7-Feature.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,e298af50-8ebc-4d6d-aff6-0f4d4bf570ff.aspx</id>
    <published>2009-07-17T12:13:03.2326223-04:00</published>
    <updated>2009-07-17T12:17:05.7221311-04:00</updated>
    <category term="Other Tech" label="Other Tech" scheme="http://www.58bits.com/blog/CategoryView,category,OtherTech.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m still freak’n over how solid, fast and all-round great Windows 7 is. The first
time ever an OS upgrade (without repaving the machine) actually feels like I did a
fresh install.
</p>
        <p>
Vista drove me nuts – both because of its sluggishness, and because of a totally failed
file and folder management strategy. At the height of my frustration I was experimenting
with <a href="http://www.ghisler.com/" target="_blank">Total Commander</a>, <a href="http://www.gpsoft.com.au/" target="_blank">Opus
9</a> and a couple of other file management applications in an effort to rid my self
of the the ‘built in’ windows explorer. Folders did not remember the view or view
preferences between sessions. Even worse was Vista’s attempt to guess the contents
of a folder and ‘adapt’ accordingly. Maybe one day when we’re all in the cloud – or
when the file system has been abstracted away by a content and keyword management
system we won’t need conventional access to the file system per se – but we’re not
there yet – and I do.
</p>
        <p>
Here’s what they’ve done in Windows 7 – which is exactly right. They’ve separated
their attempt at managing views based on content – from a regular file management
window (and all explorer windows always remember the last view used).
</p>
        <p>
So for example – if I’m looking at photos via the Picture Library – it looks like
this.
</p>
        <p>
          <img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Library" border="0" alt="Library" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/TheBestWindows7Feature_14573/Library_3.png" width="626" height="476" />
        </p>
        <p>
…with extra columns for tags and picture information. It’s a media specific view and
that’s fine. Of course it could be a thumbnails view – but the important thing is
that in details view – content specific columns appear.
</p>
        <p>
If I need a ‘real’ file system window though – say because I want to quickly sort
by file type or some other file system criteria – then I navigate to the same folder
via the file system using a ‘regular’ explorer window (Windows Key – E) – which looks
like this.
</p>
        <p>
          <img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Folder" border="0" alt="Folder" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/TheBestWindows7Feature_14573/Folder_3.png" width="630" height="474" />
        </p>
        <p>
The default view for folders when you’ve entered them not via a Library but via the
file system – is the ‘General Items’ view – which works like you’d expect it to when
you need a ‘regular’ file management window. 
</p>
        <p>
What a relief. It works. It makes sense, and I can use Windows Explorer again.
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:40299bed-6a9b-4560-af22-792a146916a2" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/Windows+7" rel="tag">Windows 7</a></div>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=e298af50-8ebc-4d6d-aff6-0f4d4bf570ff" />
      </div>
    </content>
  </entry>
  <entry>
    <title>How to ban Internet Explorer 6 from your Site Using the IIS7 Url Rewrite Module</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/07/11/How-To-Ban-Internet-Explorer-6-From-Your-Site-Using-The-IIS7-Url-Rewrite-Module.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,3e491ea6-f0ef-4abf-baae-f866ebd5cbfd.aspx</id>
    <published>2009-07-11T06:39:08.792678-04:00</published>
    <updated>2009-07-12T12:23:24.7186051-04:00</updated>
    <category term="ASP.Net" label="ASP.Net" scheme="http://www.58bits.com/blog/CategoryView,category,ASPNet.aspx" />
    <category term="CSS/XHTML" label="CSS/XHTML" scheme="http://www.58bits.com/blog/CategoryView,category,CSSXHTML.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>
            <font color="#ff0000">UPDATE 12/07/2009</font>
          </strong> - As Shirley Boyle
sang - "I dreamed a dream". The exercise below was great for learning how
to use the IIS7 Url Rewrite Module - but there is a long <a href="http://www.zytrax.com/tech/web/browser_ids.htm" target="_blank">list
of user agents</a> that contain the string "compatible; MSIE 6.0;" including
the MSN spider and some transparent proxies. Internet Explorer 6 is the browser that
refuses to die. :-(
</p>
        <p>
          <strong>ORIGINAL POST</strong> - This one took a little while to figure out along
with a careful read of the <a href="http://learn.iis.net/page.aspx/465/url-rewrite-module-configuration-reference/#UsingServerVars" target="_blank">reference
docs for the IIS7 Url Rewrite Module</a>. I was banging my head against the wall for
a few minutes with {USER_AGENT} before reading the fine print… the HTTP prefix bit
in particular.
</p>
        <blockquote>
          <p>
All dash (“-”) symbols in the HTTP header name are converted to underscore symbols
(“_”). 
<br />
All letters in the HTTP header name are converted to capital case. 
<br />
“HTTP_” prefix is added to the header name. 
<br />
For example, in order to access the HTTP header “user-agent” from a rewrite rule,
you can use the {HTTP_USER_AGENT} server variable.
</p>
        </blockquote>
        <p>
And here’s the result…
</p>
        <pre class="brush: xml; auto-links: false;">&lt;rule name="BlockIE6" stopProcessing="true"&gt;
  &lt;match url=".*" /&gt;
  &lt;conditions&gt;
    &lt;add input="{HTTP_USER_AGENT}" pattern="MSIE 6" /&gt;
    &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
    &lt;add input="{URL}" negate="true" pattern="ie6" /&gt;
  &lt;/conditions&gt;
  &lt;action type="Redirect" url="ie6" redirectType="Permanent" /&gt;
&lt;/rule&gt;</pre>
It’s really really important that you do two things: 1) Prevent the redirect from
redirecting static content – like script files and style sheets, ala the {REQUEST_FILENAME}
negative condition, and 2) You also check the Url to see if it’s the redirected Url
– i.e. they’ve already been redirected – otherwise you’ll get an endless redirect
loop. In this case I’m sending them to the url “ie6” which is an action on a route
in ASP.Net MVC – displaying a download page with some ‘alternatives’ :-) <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=3e491ea6-f0ef-4abf-baae-f866ebd5cbfd" /></div>
    </content>
  </entry>
  <entry>
    <title>The Functional Renaissance</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/07/08/The-Functional-Renaissance.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,257b90a9-cd32-447d-8c07-90b1762e5506.aspx</id>
    <published>2009-07-08T14:09:39.6659076-04:00</published>
    <updated>2009-07-10T01:53:45.2597913-04:00</updated>
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://msdn.microsoft.com/en-us/fsharp/default.aspx" target="_blank">
            <img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="fsharp" border="0" alt="fsharp" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/TheFunctionalRenaissance_D32/fsharp_3.jpg" width="161" height="120" />
          </a>I
recently watched Luca Bolognese’s presentation at last years <a href="http://channel9.msdn.com/pdc2008/TL11/" target="_blank">PDC
on F#</a>. A really great presentation.
</p>
        <p>
I’ve also been listening to Steve Vinoski’s podcasts on the <a href="http://www2.computer.org/portal/web/computingnow/functionalweb" target="_blank">The
Functional Web</a>. 
</p>
        <p>
There’s definitely stuff up in this area now. Coming from a non-comp-sci background
– and only ever having written statically typed and imperative code (sad I know) –
I’m curious to see where this will all lead. <a href="http://en.wikipedia.org/wiki/Haskell_%28programming_language%29" target="_blank">Haskell</a> , <a href="http://en.wikipedia.org/wiki/Erlang_%28programming_language%29" target="_blank">Erlang</a>,
and <a href="http://en.wikipedia.org/wiki/Scala_%28programming_language%29" target="_blank">Scala</a> are
all on the rise. <a href="http://en.wikipedia.org/wiki/CouchDB" target="_blank">CouchDB</a> (backed
I think by <a href="http://en.wikipedia.org/wiki/Lucene" target="_blank">Lucene</a> for
search) and even <a href="http://yaws.hyber.org/" target="_blank">Yaws</a> (yet another
web server) – are just two of several significant projects written in Erlang. 
</p>
        <p>
I think it was Martin Fowler who said that the best way to be a better programmer
– is to learn another language, and F# is now on my list of things to do.
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:3cc8e1fd-78db-48ed-a634-f19ebb9c31a8" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/fsharp" rel="tag">fsharp</a>,<a href="http://technorati.com/tags/haskell" rel="tag">haskell</a>,<a href="http://technorati.com/tags/erlang" rel="tag">erlang</a>,<a href="http://technorati.com/tags/scala" rel="tag">scala</a></div>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=257b90a9-cd32-447d-8c07-90b1762e5506" />
      </div>
    </content>
  </entry>
  <entry>
    <title>iPoo</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/07/08/iPoo.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,6111d784-4cc3-4eae-bbf0-38d1cc306f18.aspx</id>
    <published>2009-07-08T11:47:00-04:00</published>
    <updated>2009-07-09T07:00:12.1603154-04:00</updated>
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <category term="Hardware" label="Hardware" scheme="http://www.58bits.com/blog/CategoryView,category,Hardware.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
What will those crazy folks at <a href="http://www.apple.com/" target="_blank">Apple</a> think
of next?
</p>
        <p>
          <a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/iPoo_FAF9/AGB_9599_2.jpg" target="_blank">
            <img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AGB_9599" border="0" alt="AGB_9599" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/iPoo_FAF9/AGB_9599_thumb.jpg" width="568" height="380" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=6111d784-4cc3-4eae-bbf0-38d1cc306f18" />
      </div>
    </content>
  </entry>
  <entry>
    <title>BlackBerry Tour</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/07/05/BlackBerry-Tour.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,a1e77be4-6650-4a4a-b409-f47c0aa5a460.aspx</id>
    <published>2009-07-05T01:43:41.3177629-04:00</published>
    <updated>2009-07-05T01:45:52.2806024-04:00</updated>
    <category term="Hardware" label="Hardware" scheme="http://www.58bits.com/blog/CategoryView,category,Hardware.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://na.blackberry.com/eng/devices/blackberrytour/" target="_blank">
            <img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="2009-07-01_083947_270x355" border="0" alt="2009-07-01_083947_270x355" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/BlackBerryTour_B2F8/2009-07-01_083947_270x355_3.jpg" width="212" height="278" />
          </a> I'm
still in watch and wait mode - being torn between the <a href="http://www.apple.com/iphone/" target="_blank">iPhone</a> 3GS
and a <a href="http://www.backberry.com/" target="_blank">BlackBerry</a> device. 
</p>
        <p>
I partly want to own an <a href="http://www.apple.com/iphone/" target="_blank">iPhone</a> just
to be part of the <a href="http://www.apple.com/iphone/" target="_blank">iPhone</a> phenomena
- not to mention use the device that has totally changed the landscape of mobile communication. 
</p>
        <p>
I also really admire the BlackBerry devices. I noticed a few reviews for the new <a href="http://na.blackberry.com/eng/devices/blackberrytour/" target="_blank">BlackBerry
Tour</a> - and thought 'oh that's nice'. Great specs - a refinement of the BlackBerry
World Edition and Bold all rolled up into one - and then the bottom fell out. No WiFi.
? WTF? Here’s a good review of the <a href="http://crackberry.com/blackberry9630review" target="_blank">Tour</a>.
</p>
        <p>
Still waiting and watching....
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7e6bd0b6-6b89-4f29-bcd7-db6ca4361d9c" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/blackberry" rel="tag">blackberry</a>,<a href="http://technorati.com/tags/iphone" rel="tag">iphone</a></div>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=a1e77be4-6650-4a4a-b409-f47c0aa5a460" />
      </div>
    </content>
  </entry>
  <entry>
    <title>How to Compile a WPF Application as a Class Library</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/06/25/How-To-Compile-A-WPF-Application-As-A-Class-Library.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,09803c9e-6689-4eb7-879d-132f2179d547.aspx</id>
    <published>2009-06-25T02:17:09.4162204-04:00</published>
    <updated>2009-06-25T02:19:02.7353468-04:00</updated>
    <category term="C#" label="C#" scheme="http://www.58bits.com/blog/CategoryView,category,C.aspx" />
    <category term="WPF" label="WPF" scheme="http://www.58bits.com/blog/CategoryView,category,WPF.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Charles Petzold’s book, <a href="http://www.charlespetzold.com/wpf/" target="_blank">Applications
= Code + Markup</a> - received some critical press for not being very pretty. And
it’s true that there’s a lot of text and code listings but (and as you’ll see below),
he <strong><em>was</em></strong> methodical. 
</p>
        <p>
I recently wanted to upgrade a Windows Live Writer plug-in I’d written to use the
Windows Presentation Framework (WPF) – instead of WinForms and a custom UI library. 
</p>
        <p>
However my first attempt to compile the application as a Class Library resulted in
the following error…
</p>
        <blockquote>“Library project file cannot specify ApplicationDefinition element”.</blockquote>
        <p>
Thankfully I’d remembered the opening chapters of Charles’ book where he spent considerable
time explaining the creation of the application class and initial window. The trick
in this case is to remove the App.xaml file. You then need to create your own start-up
class – like Program.cs – as shown below, and the application will compile fine as
either a Windows Application or Class Library. In the example below extra parameters
are passed to the constructor of the main window which is opened as a Dialog – and
then checked for the DialogResult value when the window is closed.
</p>
        <pre class="brush: csharp; auto-links: false;">public class Program : Application
{
    [STAThread]
    public static void Main()
    {
        var app = new Program();
        app.Run();
    }

    protected override void OnStartup(StartupEventArgs args)
    {
        base.OnStartup(args);

        var window = new PreCodeWindow(new PreCodeSettings(), PreCodeWindow.Mode.StandAlone);
        window.ShowDialog();
        if (window.DialogResult.HasValue &amp;&amp; window.DialogResult.Value)
        {
            System.Diagnostics.Debug.WriteLine("OK");
            Clipboard.SetText(window.Code);
        }
        else
        {
            System.Diagnostics.Debug.WriteLine("Not OK");
        }        
    }
}</pre>
        <p>
The downside to this approach is that you no longer have an application level location
for placing resource dictionaries and other shared objects - and so these will need
to be placed in each window as required.
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=09803c9e-6689-4eb7-879d-132f2179d547" />
      </div>
    </content>
  </entry>
  <entry>
    <title>IIS7 StaticContent and ClientCache Settings</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/06/13/IIS7-StaticContent-And-ClientCache-Settings.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,36ac2f10-78a1-4796-9b46-82457061ad46.aspx</id>
    <published>2009-06-12T20:58:35.8315896-04:00</published>
    <updated>2009-06-13T00:31:05.411461-04:00</updated>
    <category term="ASP.Net" label="ASP.Net" scheme="http://www.58bits.com/blog/CategoryView,category,ASPNet.aspx" />
    <category term="Enterprise" label="Enterprise" scheme="http://www.58bits.com/blog/CategoryView,category,Enterprise.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yet another great feature of IIS7  - declarative static content cache settings.
It took a little detective work to find the settings for this feature – including
a helpful post from <a href="http://www.joergjooss.de/archive/2007/04/29/http-caching-mysteries-part-2-static-resource-zombies-iis-7.aspx" target="_blank">Jörg
Jooss</a>. 
</p>
        <p>
I wanted to be able to set the client cache settings for the static content of a site
I host at <a href="http://www.orcsweb.com/" target="_blank">ORCS Web</a>. In the past
– unless offered by the control panel of your shared hosting provider – this would
have meant emailing support and asking them to set the client cache header settings
for the required directory in IIS6. In IIS7 this can be set now in the &lt;system.webserver&gt;
section.
</p>
        <p>
Note: If you’re going to try this on your local machine first, you will need to unlock
the staticContent section in IIS7 (from the machine level) using the following appcmd…
</p>
        <p>
appcmd unlock config /section:staticContent
</p>
        <p>
You can also use appcmd to create the static content cache settings as shown in Jörg’s
post above, which will add the correct section to your web.config – or you can directly
edit/create the web.config file for the required directory. 
</p>
        <p>
I chose to hand edit the web.config – creating a new web.config located in the directory
with the static content (i.e. images, style sheets, script files – all under the ‘assets’
directory in my case)
</p>
        <pre class="brush: xml; auto-links: false;">&lt;?xml version="1.0"?&gt;
&lt;configuration&gt;
  &lt;system.webServer&gt;
    &lt;staticContent&gt;
      &lt;clientCache cacheControlCustom="private" cacheControlMode="UseMaxAge" cacheControlMaxAge="3.00:00:00" /&gt;
    &lt;/staticContent&gt;
  &lt;/system.webServer&gt;
&lt;/configuration&gt;</pre>
        <p>
A couple of things to note about these settings. Firstly – you can add any custom
cache control header setting using the cacheControlCustom attribute (e.g. no-store,
must-revalidate, private, public etc). Secondly using the http 1.1 max-age setting
– you can specify days – by using the 1.00 notation for the hours portion of the hh:mm:ss
timespan value. So the setting above will set the max-age value to 3 days – or 259200
seconds when you see it in the response header.
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=36ac2f10-78a1-4796-9b46-82457061ad46" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Bing – Fast, Refreshing and Relaxing</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/06/02/Bing-Fast-Refreshing-And-Relaxing.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,bd6c02ed-8b5c-4b38-942b-9feadd2b828d.aspx</id>
    <published>2009-06-02T11:51:41.6750246-04:00</published>
    <updated>2009-06-02T19:23:03.4305282-04:00</updated>
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/BingFastRefreshingandRelaxing_14171/AGB_8209_1.jpg">
            <img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AGB_8209" border="0" alt="AGB_8209" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/BingFastRefreshingandRelaxing_14171/AGB_8209_2.jpg" width="205" height="337" />
          </a>A
little experimenting with Microsoft’s new search engine <a href="http://www.bing.com/" target="_blank">Bing</a> -
and I’m sold. 
</p>
        <p>
Even <a href="http://www.techcrunch.com/2009/06/01/apparently-bing-is-something-of-a-hit/" target="_blank">TechCrunch</a> thinks
it’s a hit. 
</p>
        <p>
What’s more – it comes in four different flavours! 
</p>
        <p>
When was the last time you searched and felt refreshed and relaxed too! Not even Google
can compete with this one. Google in a bottle? Refreshing Google? Not even close... 
</p>
        <p>
Have a Bing today…. :-)
</p>
        <p>
NOTE: Not kidding about the ‘fast’ part. Don’t know what’s up with Google over the
past few months – both their regular search page and access to features such as analytics
and webmaster tools are crawling. <a href="http://www.bing.com" target="_blank">Bing</a> –
so far at least – has been super quick.
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=bd6c02ed-8b5c-4b38-942b-9feadd2b828d" />
      </div>
    </content>
  </entry>
  <entry>
    <title>MSc in Information Security</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/05/20/MSc-In-Information-Security.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,a8626d69-a368-4082-8ee4-e33ae1ae96c2.aspx</id>
    <published>2009-05-19T22:52:54.7212579-04:00</published>
    <updated>2009-05-30T12:34:45.5539472-04:00</updated>
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <category term="Security" label="Security" scheme="http://www.58bits.com/blog/CategoryView,category,Security.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.isg.rhul.ac.uk/" target="_blank">
            <img style="border-right-width: 0px; margin: 5px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="rhulisg_01" border="0" alt="rhulisg_01" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/MScinInformationSecurity_1183F/rhulisg_01_3.jpg" width="161" height="236" />
          </a>Whew
– well after a tough few months I’ve finally completed the coursework towards my masters
degree in Information Security - taught by the <a href="http://www.isg.rhul.ac.uk/" target="_blank">Information
Security Group (ISG)</a> at <a href="http://www.rhul.ac.uk/" target="_blank">Royal
Holloway</a>,  (via the <a href="http://www.londonexternal.ac.uk/index.html" target="_blank">University
of London External System</a>).
</p>
        <p>
The online <a href="http://www.londonexternal.ac.uk/prospective_students/postgraduate/holloway/info_security/structure.shtml" target="_blank">syllabus</a> is
available from the external system and the ISG also provides an <a href="http://www.isg.rhul.ac.uk/msc/info#duration" target="_blank">overview
of the programme here</a>.
</p>
        <p>
In addition to the syllabus and ISG’s introduction - I thought that a personal summary
might be useful for those considering the programme.
</p>
        <p>
As per the syllabus – there are four compulsory modules, two optional modules and
a final project. A module is really a course, composed of roughly ten units, and lasts
the full academic year – from October to the final exam in May.  Here’s a description
of the compulsory modules (accurate as of 2008/09 academic year) along with my two
chosen optional modules.
</p>
        <p>
          <strong>IC01 Security Management</strong>
        </p>
        <p>
This course addresses the major themes of security management, including people, processes
and technology with particular emphasis on the role of policy in helping to shape
an organisation’s security management strategy. The ISO <a href="http://www.27000.org/" target="_blank">27000</a> series
of standards (ISO 27001 and 27002 in particular) are covered in detail. <a href="http://www.isaca.org/" target="_blank">COBIT</a>, <a href="http://www.itil-officialsite.com" target="_blank">ITIL</a>, <a href="http://www.isfsecuritystandard.com/" target="_blank">ISF
SOGP</a> along with the DPA, RIPA, and relevant EU directives are examined. So too
is the impact of industry specific regulations such as Sarbanes Oxley, Turnbull, Basel
II, and HIPAA. Principles of risk assessment (quantitative/qualitative), compliance,
audit, and management including excellent lectures from industry leaders help to round
out what is probably the most important message of the course; namely the importance
of creating organisational awareness and a culture of information security that includes
all aspects of the business (and not just the technology). Some of the material on
the course was a little dated but relevant nevertheless.  A ‘must read’ companion
to this course is Bruce Schneier’s ‘Secrets and Lies.’
</p>
        <p>
          <strong>IC02 An Introduction to Cryptography and Security Mechanisms</strong>
        </p>
        <p>
This was a really great course in cryptography and security mechanisms. Pitched at
just the right level for non-maths graduates the course explains the roles of all
the major cryptographic primitives, including symmetric key cryptography (block and
stream ciphers), hashes, message authentication codes, asymmetric (public) key cryptography
and digital signatures. Historical algorithms along with well known algorithms like <a href="http://en.wikipedia.org/wiki/DES" target="_blank">DES</a>, <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard" target="_blank">AES</a>, <a href="http://en.wikipedia.org/wiki/RSA" target="_blank">RSA</a>, <a href="http://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange" target="_blank">Diffie-Hellman</a> and
others are explained in detail (including worked examples of RSA modulus, public and
private key calculations). The use of these primitives as mechanisms for providing
higher level security services like data integrity, data origin authentication, entity
authentication (unilateral and mutual authentication protocols) and non-repudiation
is also explained in detail. If you can get a copy – you really should ready Stephen
Levy’s book ‘Crypto - Secrecy and Privacy in the New Code War’ for a brilliant side-by-side
narrative of everything that happened in the crypto world from 1975 onwards. It puts
the course into perspective and explains exactly what was happening from the 70s to
the 90s in the struggle between governments attempting to regulate crypto, and the
commercial interests of the private sector. Simon Singh’s ‘The Code Book’ is also
another great companion read.
</p>
        <p>
          <strong>IC03 Network Security</strong>
        </p>
        <p>
Also a great course on the fundamentals of network communications security including
ISO 7498-2, as well as detailed analysis of network, transport, and application level
security protocols (IPSec, SSL/TLS, SSH, Kerberos etc.) Other unit subjects included
biometrics, email security, wireless networking, firewalls, GSM/UMTS security and
an introduction to intrusion detection systems (IDS). One of the texts for this course
is Douglas Comer’s brilliant book - <a href="http://www.amazon.com/Computer-Networks-Internets-Douglas-Comer/dp/0136061273/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1224374502&amp;sr=1-1" target="_blank">'Computer
Networks and Internets (5th Edition)</a>'.
</p>
        <p>
          <strong>IC03 Computer Security</strong>
        </p>
        <p>
A bit like IC02 above – there was some important history in this course in terms of
the evolution of computer security, operating systems and formal security models including <a href="http://en.wikipedia.org/wiki/David_Elliott_Bell" target="_blank">Bell
Lapadula</a>, <a href="http://en.wikipedia.org/wiki/Biba_Model" target="_blank">Biba</a>, <a href="http://en.wikipedia.org/wiki/Chinese_wall" target="_blank">Chinese
Wall</a>, and <a href="http://en.wikipedia.org/wiki/Clark-Wilson_model" target="_blank">Clark-Wilson</a>.
For me at least – a real eye opener and it filled in a lot of important gaps – especially
in terms of access control and some of the things I’d previously worked on in the
areas of authorisation and workflow. Units on security in Pentium architecture, Unix/Linux,
IBM z/OS and Windows helped to round off theory with real world and practical examples
of applied computer security.
</p>
        <p>
          <strong>OPT5 Secure Electronic Commerce and Other Applications</strong>
        </p>
        <p>
I’d assumed (which turned out to be partially correct) that this course would be close
to my comfort zone given my background in Web and e-commerce development. The course
was ok – but I think could be structured better. It’s a pretty large subject (especially
the ‘other applications’). The course’s primary objective is to link security specific
methodologies to the traditional software development lifecycle as well as emphasise
the different security approaches that might be required depending on the context
of the application. Information flow analysis, threat modelling and application level
risk assessment are covered in the opening units. The TETRA system is used as an initial
case study, followed by units on Web application security, Web services security and
an excellent unit on identity management. The final units introduce smart cards and
the EMV standard. Lots of help from IC02 in this module as secure protocols are described
in several units.
</p>
        <p>
          <strong>OPT12 Smart Cards/Tokens Security and Applications</strong>
        </p>
        <p>
This course was new to the distance learning programme this year (although taught
at the ISG for several years). The accompanying text – ‘<a href="http://www.amazon.com/Smart-Cards-Tokens-Security-Applications/dp/0387721975" target="_blank">Smart
Cards, Tokens, Security and Applications</a>’ edited by two RHUL faculty members,
Keith Mayes and Konstantinos Markantonakis – is a tour de force on all things in the
smart card world. I’ll never look at my ‘chip and pin’ credit card the same way again.
A really great course, benefiting hugely from being fresh and up-to-date. Topics included
smart card production, smart card development, smart card for mobile communications
(GMS/UMTS), banking and finance (EMV), RFID and contactless smart cards, smart cards
in video broadcasting (DVB), an introduction to trusted platform modules (TCG/TPM),
the Common Criteria (ISO 15408) for evaluation assurance, ID cards, e-passports and
a fascinating unit on smart card attacks and countermeasures from Jacques Fournier
at Gemalto.
</p>
        <p>
          <strong>
          </strong>
        </p>
        <p>
          <strong>In Summary</strong>
        </p>
        <p>
Looking back on the last two years, there were times when I wasn’t entirely sure how
it was all going to fit together. With the benefit of hindsight I can clearly see
the aims of the programme, and how the ISG has attempted to strike a balance between
history, fundamentals, and applied techniques in information security.
</p>
        <p>
The ISG has also put a lot of work into creating the distance learning version of
this degree. They’ve experimented with multimedia and an online format which for the
most part works well (although I still lean towards printed material and my trusty
highlighter). Some of the material however (in particular a couple of the lectures
in IC01) is starting to show its age and could do with a refresh – or at the least
with a yearly update to the introduction for each module.
</p>
        <p>
The course has totally changed the way I view the ‘information age’,  information
security, and privacy (having now taken the <a href="http://en.wikipedia.org/wiki/Redpill" target="_blank">‘red
pill’</a>). I’m extremely glad I enrolled and looking forward to putting what I’ve
learned into practise on future projects. Also looking forward to taking my time and
working on my final project at a more relaxed pace over the next year or so. 
</p>
        <p>
To be continued…
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=a8626d69-a368-4082-8ee4-e33ae1ae96c2" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Windows 7 RC 7100 Upgrade from Vista</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/05/14/Windows-7-RC-7100-Upgrade-From-Vista.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,8508f718-a18d-4fdb-9b56-95909bbda67a.aspx</id>
    <published>2009-05-14T01:55:27.9834616-04:00</published>
    <updated>2009-05-14T01:55:27.9834616-04:00</updated>
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img style="border-right-width: 0px; margin: 5px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="windows7" border="0" alt="windows7" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Windows7RC7100UpgradefromVista_12FCD/windows7_3.jpg" width="244" height="185" /> Well
I figured since the RC was generally available – I’d test the upgrade process from
Windows Vista to Windows 7. I chose my ThinkPad T61p as the victim. This is my fully
loaded portable dev environment including BitLocker encrypted volumes - and I was
a little sceptical at first. A new OS usually means re-paving the machine, but I thought
I’d try the upgrade and see how it went.
</p>
        <p>
          <strong>Get Ready</strong>
        </p>
        <p>
After a complete system backup to a removable drive I launched the setup program from
the DVD – from within Vista (not via a booted DVD). Windows 7 setup reported MagicISO,
LifeCam, and Skype as software that might not work after the upgrade – so I uninstalled
these first. BitLocker had to be disabled as well (not volume decrypted – just disabled).
SQL Server 2005 was also on the list of ‘might not work’ after upgrade, but I decided
to try upgrading to SQL 2008 Developer Edition afterwards.
</p>
        <p>
          <strong>Make Yourself a Coffee</strong>
        </p>
        <p>
First word of advice – make yourself a coffee – grab some donuts too – and find something
to read, or watch. The upgrade took over three hours to complete. The ‘Gathering files,
settings, and programs’ stage took over an hour alone. At 18% of ‘Expanding Windows
files’ – the PC rebooted and continued to expand files – but not before 30 minutes
of ‘Gathering additional information before expanding files…’
</p>
        <p>
Transferring files, settings and programs – <strong>1,138,187</strong> files, settings,
and programs to be exact – took another hour (and two reboots).
</p>
        <p>
Incredibly – it worked!
</p>
        <p>
          <strong>First Impressions</strong>
        </p>
        <p>
I’ve not been following the Windows 7 story that closely – but most of the reviews
report performance improvements, and I like the new task bar and general UI improvements
a lot. Will be interesting to see how it goes over the next few days of general use
and abuse. A couple of noticeable changes though – disabling Windows Search – also
removes the search function from the start menu – it didn’t used to. Also Superfetch
– which was on my list of disk thrashing culprits, is enabled by default – and so
I’ve turned this off again (the I/O at start-up because of Superfetch was horrendous
in Vista – will have to experiment to see if it’s any better in Windows 7) 
</p>
        <p>
          <font color="#ff0000">
            <strong>UPDATE</strong>
          </font>: If you’ve upgraded from Vista
as I have – and have previously installed a LifeCam VX-700 – uninstall the LifeCam
software before the upgrade and be sure to delete the following file as well C:\Windows\inf\OEM16.INF
(check that this is the LifeCam driver inf file) – otherwise the installation of the
LifeCam will fail in Windows 7 when it finds the previous LifeCam inf file.
</p>
        <p>
More soon…
</p>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=8508f718-a18d-4fdb-9b56-95909bbda67a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>RFIDs on the Brain</title>
    <link rel="alternate" type="text/html" href="http://www.58bits.com/blog/2009/05/10/RFIDs-On-The-Brain.aspx" />
    <id>http://www.58bits.com/blog/PermaLink,guid,72eacf2f-1437-4d47-abaf-a4b40c46e5aa.aspx</id>
    <published>2009-05-10T00:59:20.0949156-04:00</published>
    <updated>2009-05-10T00:59:52.8703055-04:00</updated>
    <category term="General" label="General" scheme="http://www.58bits.com/blog/CategoryView,category,General.aspx" />
    <category term="Security" label="Security" scheme="http://www.58bits.com/blog/CategoryView,category,Security.aspx" />
    <author>
      <name>Anthony Bouch</name>
    </author>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Speechless really. I’m not often lost for words – but this presentation by Patrick
Dixon of Siemens leaves me speechless. Thanks to <a href="http://www.boingboing.net/2009/05/08/rfids-on-the-brain.html" target="_blank">RFIDs
on the Brain</a> from <a href="http://www.boingboing.net" target="_blank">Boing Boing</a> (and <a href="http://rushkoff.com/" target="_blank">Douglas
Rushkoff</a> via ‘Joe’).
</p>
        <object width="425" height="344">
          <param name="movie" value="http://www.youtube.com/v/1vxdaj9Z-Bw&amp;hl=en&amp;fs=1" />
          <param name="allowFullScreen" value="true" />
          <param name="allowscriptaccess" value="always" />
          <embed src="http://www.youtube.com/v/1vxdaj9Z-Bw&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344">
          </embed>
        </object>
        <img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=72eacf2f-1437-4d47-abaf-a4b40c46e5aa" />
      </div>
    </content>
  </entry>
</feed>