<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6148876678513202505</id><updated>2011-07-31T06:57:08.271+10:00</updated><category term='string'/><category term='code snippet'/><category term='regex'/><category term='linq'/><category term='Access'/><category term='SQL'/><category term='XSL'/><category term='agile'/><category term='debugging'/><category term='bugs'/><category term='random'/><category term='dynamic data'/><category term='conversion'/><category term='XML'/><category term='format'/><category term='Moq unit testing'/><category term='error'/><category term='links'/><category term='nullable types'/><category term='query'/><category term='management'/><category term='Entity Framework'/><category term='tips string null'/><title type='text'>Nix' Dot .Net Tech Blog</title><subtitle type='html'>A .NET developer&amp;#39;s rambles, collections and thoughts on going from old school VB6/ VB.NET 1.0 to C# &amp;amp; VB .NET 3.5 world.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-7684838735601000798</id><published>2011-01-28T07:16:00.001+10:00</published><updated>2011-01-28T07:16:49.485+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Moq unit testing'/><title type='text'>Moq - Matching types to assert true</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;This is for using Moq when the method you are unit testing has an output of a particular type (as opposed to a boolean or string).&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;This code is really rough (the statement in green is the most important statement and does work)&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;[Test Method]&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;public void MyTest()&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;{&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;....Setup stuff&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;myType result = CallSomeMethod();&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: green; font-family: 'Courier New';"&gt;Assert.IsTrue(result.GetType() == typeof(myType&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: green; font-family: 'Courier New';"&gt;));&lt;/span&gt;&lt;/div&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-7684838735601000798?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/7684838735601000798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2011/01/moq-matching-types-to-assert-true.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/7684838735601000798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/7684838735601000798'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2011/01/moq-matching-types-to-assert-true.html' title='Moq - Matching types to assert true'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-4880993339778672239</id><published>2010-08-31T16:45:00.002+10:00</published><updated>2010-08-31T16:53:22.338+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XSL'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Carriage return being stripped when using XSLCompiledTransform - simple XSL fix to prevent it</title><content type='html'>One of the most interesting and annoying parts about doing rewrites of .net 1.0 to .net 3.5 is discovering simple changes under the hood, have the potential to drive you nuts! XML serialization has been my personal cross as I do tasks such as transforming a message from XML to text using an XSLT. Now, you'd think that this would be simply changing from XslTransform to &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xsl.xslcompiledtransform.aspx"&gt;XslCompiledTransform&lt;/a&gt;. Unfortunately it's not that straight forward.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now there are perfectly good reasons why Microsoft made the changes. They even kindly put up documentation for migration: &lt;a href="http://msdn.microsoft.com/en-us/library/66f54faw.aspx%20"&gt;Migrating From the XslTransform Class&lt;/a&gt;. So I rewrote the code, made some minor tweaks, checked the XSLT output against an XML payload. Perfect. And then I ran the code. Instead of getting a text file with an output like this:&lt;br /&gt;&lt;br /&gt;Data Blah&lt;br /&gt;Field 1: X&lt;br /&gt;Field 2: Y&lt;br /&gt;Field 3: Z&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;I got&lt;br /&gt;Data Blah&amp;nbsp; Field 1: X&amp;nbsp; Field 2: Y&amp;nbsp; Field 3: Z&lt;br /&gt;&lt;br /&gt;You might think, so what, the formatting is a bit screwed up. Sadly, the formatting is used by a secondary processor and the return carriages are the delimiters - part of which is a stored proc that I don't really want to change.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;So why is this happening? Well from what I can gather, it's all a part of the XmlReader and the way that it handles whitespace. Because this is from a few weeks ago, and is mainly notes to remind myself, I've forgotten most of the technical details (if I find my notes, I'll update this). Basically what ended up happening was that the XSL inserted text spaces such as #xD; or #xA; was effectively translating to a space when being read in. When the transformation happened to output the result as a text file through the XSLT, because the XML had been read in with spaces rather than Carriage Returns, the result ended up being one single line.&lt;br /&gt;&lt;br /&gt;I played with much code, thought about rejigging the entire processing feed to insert and use a different delimiter character, and finally got a really stupidly simple thing to work. Rather than using just #xD;, I did a combination. So the XSL text became something like (note syntax may not be quite correct):&lt;br /&gt;&lt;br /&gt;&lt;field&gt;&lt;field&gt;&lt;br /&gt;&lt;select-of="xpath goes="" here=""&gt;&lt;xsl-text&gt;#xD; #xA; &lt;/xsl-text&gt;&lt;/select-of="xpath&gt;&lt;/field&gt;&lt;/field&gt;&lt;br /&gt;&lt;field&gt;&lt;/field&gt;&lt;br /&gt;&lt;br /&gt;I'm not sure why the two fields worked, when a singular one didn't, but hey, changing one line in an XSL rather than writing custom deserialiser is ok by me!&lt;br /&gt;&lt;br /&gt;As a side note: #xD; is the same as&amp;nbsp;   which is CR (Carriage return)&lt;br /&gt;#xA; is the same as &amp;amp;a10, which is LF (Line feed)&lt;br /&gt;&lt;br /&gt;From an XSL point of view, all of these values work, it's only when using the XMLSerializer in XMLReader which is used by XSLCompiledTransform that the transformations don't always work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-4880993339778672239?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/4880993339778672239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2010/08/carriage-return-being-stripped-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/4880993339778672239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/4880993339778672239'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2010/08/carriage-return-being-stripped-when.html' title='Carriage return being stripped when using XSLCompiledTransform - simple XSL fix to prevent it'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-38183580555718265</id><published>2010-06-02T18:42:00.002+10:00</published><updated>2010-06-02T18:48:30.696+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Force XML closing tag when using XML Serializer (in VB.NET)</title><content type='html'>To force an xml closing tag explicitly when using XML serializer (Kind of the vb version of this)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bytes.com/topic/net/answers/178893-force-xmlserializer-use-explicit-closing-tags-zero-length-strings"&gt;http://bytes.com/topic/net/answers/178893-force-xmlserializer-use-explicit-closing-tags-zero-length-strings &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I wanted to serialize an empty object to&amp;nbsp; &lt;mytag&gt;&lt;/mytag&gt;&lt;mytag&gt;&lt;/mytag&gt;&lt;br /&gt;&lt;br /&gt;xmlSerialize.serialize produced&amp;nbsp; &lt;mytag&gt;&lt;mytag&gt;.&amp;nbsp;&lt;/mytag&gt;&lt;/mytag&gt;&lt;br /&gt;&lt;br /&gt;&lt;mytag&gt;Without manually fixing up the produced xml, I decided to do like the above article and override the default &lt;/mytag&gt; WriteEndElement behaviour. Unfortunately the application is in vb (It turned out I didn't need to do it, but I got it working anyway )&lt;br /&gt;&lt;br /&gt;So here's a rough conversion:&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: Courier New; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Imports&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; System.Xml.Serialization&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: Courier New; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Public&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Class&lt;/span&gt;&lt;/span&gt; XMLTextWriterEE&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Inherits&lt;/span&gt;&lt;/span&gt; XmlTextWriter&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt;&lt;/span&gt; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Sub&lt;/span&gt;&lt;/span&gt; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;New&lt;/span&gt;&lt;/span&gt;(&lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt;&lt;/span&gt; sink &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;As&lt;/span&gt;&lt;/span&gt; TextWriter)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;MyBase&lt;/span&gt;&lt;/span&gt;.New(sink)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&lt;/span&gt; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;&lt;span style="color: green;"&gt;''' &lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey;"&gt;&lt;span style="color: grey;"&gt;&lt;summary&gt;&lt;/summary&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;&lt;span style="color: green;"&gt;''' Wrapper that forces more compact empty element end tags to be written whenever possible.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;&lt;span style="color: green;"&gt;''' &lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey;"&gt;&lt;span style="color: grey;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt;&lt;/span&gt; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Overrides&lt;/span&gt;&lt;/span&gt; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Sub&lt;/span&gt;&lt;/span&gt; WriteEndElement()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;MyBase&lt;/span&gt;&lt;/span&gt;.WriteFullEndElement()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&lt;/span&gt; &lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;To use you just do the normal serialize call, but pass the stringWriter to your overridden property:&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;serializer.Serialize( new XmlTextWriterEE( destTextWriter), obj)&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-38183580555718265?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/38183580555718265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2010/06/force-xml-closing-tag-when-using-xml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/38183580555718265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/38183580555718265'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2010/06/force-xml-closing-tag-when-using-xml.html' title='Force XML closing tag when using XML Serializer (in VB.NET)'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-3262759103619005079</id><published>2010-03-28T09:25:00.000+10:00</published><updated>2010-03-28T09:25:53.975+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>General programming posts</title><content type='html'>Recently read articles that are worth sharing &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.kevinwilliampang.com/2008/08/28/top-10-things-that-annoy-programmers/"&gt;Top 10 things that annoy programmers&lt;/a&gt;&amp;nbsp; Great list of things that annoy developers - in any language, at any time, and on any project! BTW, the rest of his blog is well worth a read!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codinghorror.com/blog/2009/01/top-25-most-dangerous-programming-mistakes.html"&gt;Top 25 most dangerous programming mistakes&lt;/a&gt; - covering a little bit of everything regarding security including input validation, XSS, SQL Injection. If you aren't reading this blog and a you're a programmer, you should be :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://elegantcode.com/2010/03/27/an-address-on-the-craft/"&gt;An Address on the Craft (Of Software Development)&lt;/a&gt; A little bit of nostalgia, some comments on reality, and a little bit of poetry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-3262759103619005079?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/3262759103619005079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2010/03/general-programming-posts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3262759103619005079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3262759103619005079'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2010/03/general-programming-posts.html' title='General programming posts'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-5059014830452785217</id><published>2010-02-17T19:30:00.006+10:00</published><updated>2010-02-17T19:30:00.237+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Looping through XML</title><content type='html'>Code snippet for transforming an XML Document to an XDocument (I got this from another blog, though I've lost the link - google and you shall probably find). I didn't end up using it as I decided to work with XMLNodeLists. Personal project so performance is not an issue (if it's taking too long, I'll fix it)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: orange;"&gt;&amp;nbsp; private static &lt;/span&gt;&lt;span style="color: yellow;"&gt;XDocument &lt;/span&gt;DocumentToXDocumentReader(&lt;span style="color: yellow;"&gt;XmlDocument &lt;/span&gt;doc)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: orange;"&gt;return &lt;/span&gt;&lt;span style="color: yellow;"&gt;XDocument&lt;/span&gt;.Load(&lt;span style="color: orange;"&gt;new &lt;/span&gt;&lt;span style="color: yellow;"&gt;XmlNodeReader&lt;/span&gt;(doc));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;Looping through XML Nodes ... one solution.Get the repeating nodes and set them to a nodelist. Loop through the nodelist using foreach function.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: yellow;"&gt;WebRequest &lt;/span&gt;request = &lt;span style="color: yellow;"&gt;HttpWebRequest&lt;/span&gt;.Create(url);&lt;br /&gt;&lt;span style="color: yellow;"&gt;WebResponse &lt;/span&gt;response = request.GetResponse();&lt;br /&gt;doc.Load(response.GetResponseStream());&lt;br /&gt;&lt;span style="color: yellow;"&gt;XmlNodeList &lt;/span&gt;nodelist = doc.GetElementsByTagName(&lt;span style="color: lime;"&gt;"Item"&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: orange;"&gt;int &lt;/span&gt;i = 0;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: orange;"&gt;foreach &lt;/span&gt;(&lt;span style="color: yellow;"&gt;XmlNode &lt;/span&gt;item &lt;span style="color: orange;"&gt;in &lt;/span&gt;nodelist)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: #38761d;"&gt;&amp;nbsp;// Do stuff like string temp = item.ChildNodes.Item(3).InnerText;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #38761d;"&gt;// In my case I'm passing the data from the XML payload into a list of objects&lt;/span&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-5059014830452785217?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/5059014830452785217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2010/02/looping-through-xml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/5059014830452785217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/5059014830452785217'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2010/02/looping-through-xml.html' title='Looping through XML'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-7771686975096360750</id><published>2010-02-14T10:41:00.001+10:00</published><updated>2010-03-28T09:27:38.432+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><title type='text'>My machine hates me - debugging hell</title><content type='html'>So I've been working on some code at work. In many ways it's is fairly straight forward. Porting unmanaged code into a managed environment. The whole thing is pseudo-synchronous, with the service setting up a call and dumping it in a queue, a listener picking it up and doing stuff, then putting it back, while the calling service checks for the result and uses the result.&lt;br /&gt;&lt;br /&gt;All was going well.&lt;br /&gt;&lt;br /&gt;The service to set up the command was working. Check.&lt;br /&gt;The message was being picked up and processed correctly. Check.&lt;br /&gt;The response was being generated correctly. Check&lt;br /&gt;Hook it all up together ... and the response wasn't coming back.&lt;br /&gt;&lt;br /&gt;To say I was quite confused was putting it mildly. I had effectively duplicated an existing process ... that was working perfectly (well it was after I fixed some minor configuration and environment issues). So what the heck was going on?&lt;br /&gt;&lt;br /&gt;I debugged about 15 different ways. Ran it normally and wrote in some logging outputs. I attached to the service process. I attached to the async process. I attached to multiple processes. I injected data. I used our test stub. I hacked the data in the database. I ran unit tests. I ran a console runner.&lt;br /&gt;&lt;br /&gt;In final desperation I handed the code over another dev and asked them to take a look. 1 shelveset and some database scripts to run against the base code. An hour or so later they came back (Actually it may have been earlier, but I'd been called to a meeting so was gone for an hour). Apparently it worked on their machine. No changes. No problems It magically worked.&lt;br /&gt;&lt;br /&gt;Can I scream now?&lt;br /&gt;&lt;br /&gt;So the long and the short of it? I have a very good document written with detailed instructions on setting up and debugging this code. I pretty much understand the code on a level I certainly didn't expect to have to know. I have no clue as to why my code is not running on my machine, yet will happily run on someone elses (although I swear it hates me, unlike my other old faithful which I tearfully left to a tester because she couldn't handle the RAM upgrade necessary to run my shiny pretties).&lt;br /&gt;&lt;br /&gt;Which leads me to my conclusion. Timebox the problem (I probably spent far too much time on it, even if I did solve some other bugs in the process). Grab a partner to give you some fresh perspective. Give someone else the code to look at on a different machine. If you're like me, it may be that you dev environment may be the culprit. (That theory is being tested on Monday after I get the code running again on my machine. We are so not trusting the 'it worked on this machine, so that machine can go to prod' theory. I want answers damn it. If my machine is evil, so be it. She gets reimaged again - 2nd time this year - and I pull down the code and the sql scripts and try it again).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Some random notes around debugging a frustrating problem &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Check your permissions on everything. You should be running under the lowest security necessary, however different OS's may differ slightly in their permission sets.&lt;/li&gt;&lt;li&gt;Check that the project has been set to run under the OS correctly. If you are on a 64bit machine and you are dealing with a 32bit dll/ COM interop, then the individual project will probably need to run as X86 rather than 'Any CPU'. (Main solution can be Any CPU, but project that hosts the 32 bit dll can't be)&lt;/li&gt;&lt;li&gt;Use unit tests to verify that each part is working in isolation&lt;/li&gt;&lt;li&gt;Run through the code without debug. Sometimes things work different in debug to when it runs 'normally' (i.e. no timeout issues)&lt;/li&gt;&lt;li&gt;Information is power. As a vb6 dev, easiest way to debug something complex was often to log to a file chunks of data. It's ugly, but it works. The more you know about the state of the data, the easier it is to pinpoint where in the code the problem is&lt;/li&gt;&lt;li&gt;Get someone else to help. Your eyes start to gloss over the details you need to be looking at.&lt;/li&gt;&lt;/ul&gt;Edit://&lt;br /&gt;Turns out that I was a bit of a nong and had screwed up/ missed some dependency injection with unity. So all working now, but boy, what a mess to track down! Lucky one of the guys at work was more cluey than me and got it sorted!&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-7771686975096360750?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/7771686975096360750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2010/02/my-machine-hates-me-debugging-hell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/7771686975096360750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/7771686975096360750'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2010/02/my-machine-hates-me-debugging-hell.html' title='My machine hates me - debugging hell'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-2070238562812457688</id><published>2010-01-30T10:55:00.000+10:00</published><updated>2010-01-30T10:55:21.000+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><title type='text'>Linq 2 SQL - where statement querying multiple columns with the same value</title><content type='html'>I have a search function that I need to be able to search for a piece of text against two columns in the database. In this case, I'm searching for the title of a book, but I also want to be able to search against the subtitle column with the same search value.&lt;br /&gt;&lt;br /&gt;For example, the book title may be "The Smith's Christmas", with a subtitle of "First in the Xmas dinners series". I know that 'dinner' is somewhere in the name of the book. I input the term 'dinner', and need it to search against both the Title and the Subtitle (which are two separate fields).&lt;br /&gt;&lt;br /&gt;This is some of my code.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #38761d;"&gt;// Because I have multiple search fields, I create 'matches' as the search criteria that changes depending on what I input. Allows it to be a bit dynamic&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0b5394;"&gt;IQueryable&lt;/span&gt;&amp;lt;&lt;span style="color: yellow;"&gt;Book&lt;/span&gt;&amp;gt; matches = &lt;span style="color: yellow;"&gt;LibraryModelHelpers&lt;/span&gt;.dc.Books;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #38761d;"&gt;// This is the lambda statement. Basically translates to get me a match where the title contains my input text OR the subtitle contains my input text &lt;/span&gt;&lt;br /&gt;matches = matches.Where(c =&amp;gt; (c.Title.Contains(myInputText) || c.Subtitle.Contains(myInputText)));&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #38761d;"&gt;&amp;nbsp;// Using the search statement, create an anonymous type which has a title, the author, the bookID and the cover information - I don't care about the rest for this operation&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span style="color: orange;"&gt;var &lt;/span&gt;coverDetails = &lt;span style="color: orange;"&gt;from &lt;/span&gt;c &lt;span style="color: orange;"&gt;in&lt;/span&gt; matches&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: orange;"&gt;select new&lt;/span&gt; { c.Title, c.Author, c.BookID, c.Cover };&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-2070238562812457688?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/2070238562812457688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2010/01/linq-2-sql-where-statement-querying.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/2070238562812457688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/2070238562812457688'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2010/01/linq-2-sql-where-statement-querying.html' title='Linq 2 SQL - where statement querying multiple columns with the same value'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-3857014012093387844</id><published>2010-01-26T11:21:00.000+10:00</published><updated>2010-01-26T11:21:06.486+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>XML node doesn't exist?</title><content type='html'>This is from a small personal project using Amazon webservices. It's a pretty simple windows form desktop app that uses Linq to SQL.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Dealing with some evil XML from Amazon that seems to have several variations. In some responses the node is there, other responses the node doesn't exist and is called something else (for pretty much the same data). I'm being lazy and pulling out the data I need one node at a time which can be a problem when the nodes are not present.&lt;br /&gt;&lt;br /&gt;To get around this, for the nodes that I know to be problematic, I needed to check that the node was actually going to be available before doing the convert. I do this by looking at the exact node and check if it's null.&lt;br /&gt;&lt;br /&gt;doc.GetElementsByTagName(&lt;span style="color: lime;"&gt;"TotalReviews"&lt;/span&gt;).Item(0) != null&lt;br /&gt;&lt;br /&gt;If you just look at the&amp;nbsp; doc.GetElementsByTagName(&lt;span style="color: lime;"&gt;"TotalReviews"&lt;/span&gt;) != null it won't return null, but will fall over because there are no items to pull data from. I think when I looked at it it returned '0'. Anyway, you need the Item(0) as this is the value you are doing .InnerText on.&lt;br /&gt;&lt;br /&gt;I'm using the GetElementsByTagName as it's generally easier than a longwinded xpath, but in some cases this is just not appropriate. A few cases I've selected children nodes by their position. I know this code isn't pretty, it probably isn't the best way to do thing, but it works. &lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: white;"&gt;&lt;span style="color: orange;"&gt;using&lt;/span&gt; &lt;/span&gt;System.Xml;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: yellow;"&gt;WebRequest&lt;/span&gt; request = &lt;span style="color: yellow;"&gt;HttpWebRequest&lt;/span&gt;.Create(url);&lt;br /&gt;&lt;span style="color: yellow;"&gt;WebResponse&lt;/span&gt; response = request.GetResponse();&lt;br /&gt;doc.Load(response.GetResponseStream());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="color: #38761d;"&gt;//If in doubt, spit the xml out somewhere and look at the payload&lt;/span&gt;&lt;br style="color: #38761d;" /&gt;&lt;span style="color: #38761d;"&gt;// doc.Save(Console.Out);&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span style="color: orange;"&gt;&amp;nbsp;if&lt;/span&gt; (doc.GetElementsByTagName(&lt;span style="color: lime;"&gt;"TotalReviews"&lt;/span&gt;).Item(0) != null)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; book.NumOfReviews = Convert.ToInt32(doc.GetElementsByTagName(&lt;span style="color: lime;"&gt;"TotalReviews"&lt;/span&gt;).Item(0).InnerText);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: orange;"&gt;&amp;nbsp;else if &lt;/span&gt;(doc.GetElementsByTagName(&lt;span style="color: lime;"&gt;"TotalFeedback"&lt;/span&gt;).Item(0) != null)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; book.NumOfReviews = Convert.ToInt32(doc.GetElementsByTagName(&lt;span style="color: lime;"&gt;"TotalFeedback"&lt;/span&gt;).Item(0).InnerText);&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&lt;span style="color: orange;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; book.NumOfReviews = 0;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-3857014012093387844?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/3857014012093387844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2010/01/xml-node-doesnt-exist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3857014012093387844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3857014012093387844'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2010/01/xml-node-doesnt-exist.html' title='XML node doesn&apos;t exist?'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-5851906720894600476</id><published>2009-12-13T14:44:00.000+10:00</published><updated>2009-12-13T14:44:29.062+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='random'/><title type='text'>Coding craziness</title><content type='html'>I know this probably sounds like a crazy exercise, but I've been finding it very enlightening.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;I've been working on the one application for about 12 months (personal project). I know exactly what I want to do with it, but because I've been exploring a stack of new technologies, I'm finiding that I'll get part of the functionality working, and then rewrite the code in a new technology stack. I've played with Rest, MVC, ADO.NET, Linq, Entity Framework, WinForms and a host of other bits. WPF is on the list to investigate once I get the functionality running the way that I want.&lt;br /&gt;&lt;br /&gt;One nice thing about this 'playing around' is that I know the logic, the general structure, and the high level architecture. As I go along, I'm finding my code is more precise... less verbose. I hate giving out my code when I'm 'tinkering' ... it always looks like a dogs breakfast. But by the time I'm finished, it's generally pretty much to the point and clean. I remember a bug I worked on at work a few years ago, the initial code was lines and lines long. I spent about a week on it. And the end result was about 3 lines long.&lt;br /&gt;&lt;br /&gt;Kind of makes me think that code would be so much nicer if you got to rewrite a major system after you initially built it. It probably would be more stable, more efficient, and easier to maintain.&lt;br /&gt;&lt;br /&gt;I think this is why some artists get stuck on the same subject matter, repainting using new tools, techniques and methods. It's all about editting, revising and rethinking. I'm getting to the point now where I just want to finish to application so I can actually start using it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-5851906720894600476?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/5851906720894600476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/12/coding-craziness.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/5851906720894600476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/5851906720894600476'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/12/coding-craziness.html' title='Coding craziness'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-8927477860864075888</id><published>2009-12-12T22:19:00.000+10:00</published><updated>2009-12-12T22:19:13.284+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='query'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework'/><title type='text'>Entity Framework query</title><content type='html'>&lt;div style="color: #38761d;"&gt;Three examples of doing a simple select operation - one using standard entity framework, one using Linq to Entities, one using a lambda expression.&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #38761d;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #38761d;"&gt;//example using entities. No filtering of the data.&lt;br /&gt;&lt;/div&gt;var books = context.Book;&lt;br /&gt;foreach (var book in books)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("{0} {1} {2}", book.Author, book.Title, book.URL);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #38761d;"&gt;//example using Linq to entities. Adding in a where clause to filter out the data a bit&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;var booksLinq = from b in context.Book&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where b.Author.Contains("Brown")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select b;&lt;br /&gt;&lt;br /&gt;foreach (var item in booksLinq)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Console.WriteLine("{0} {1} {2}", item.Author, item.Title, item.URL);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #38761d;"&gt;//example using lambda&lt;br /&gt;&lt;/div&gt;var booksLambda = context.Book.Where(c =&amp;gt; c.Author.Contains("Brown"));&lt;br /&gt;foreach (var book in booksLambda )&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Console.WriteLine("{0} {1} {2}", book.Author, book.Title, book.URL);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-8927477860864075888?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/8927477860864075888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/12/entity-framework-query.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/8927477860864075888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/8927477860864075888'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/12/entity-framework-query.html' title='Entity Framework query'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-2828694339658226377</id><published>2009-10-24T08:52:00.000+10:00</published><updated>2009-10-24T08:52:19.541+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code snippet'/><title type='text'>Loading applications code sample</title><content type='html'>Code snippet for loading applications (This was adapted from a tutorial over at &lt;a href="http://www.codeproject.com/"&gt;CodeProject&lt;/a&gt; so not even going to claim that I was the first to do this :) It's just a function I've used a few times at home). I'll be expanding it to take in a FileName as a string that will be the file I want to load, but I'm a keep it simple kind of girl. Do the basics first, get that bedded down, then add in more complexity. This is for windows apps/ console apps.&lt;br /&gt;&lt;br /&gt;FileName is the location of the executable I want to load&lt;br /&gt;i.e. FileName = &lt;span style="color: #cc0000;"&gt;@"C:\Program Files\Mobipocket.com\Mobipocket Reader\reader.exe"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: orange;"&gt;&amp;nbsp;private void&lt;/span&gt; loadApplication(&lt;span style="color: orange;"&gt;string &lt;/span&gt;FileName)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: yellow;"&gt; Process&lt;/span&gt; p = &lt;span style="color: orange;"&gt;null&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: orange;"&gt; try&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p = &lt;span style="color: orange;"&gt;new&lt;/span&gt; Process();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.StartInfo.FileName = FileName;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.Start();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.WaitForExit();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: orange;"&gt;catch&lt;/span&gt; (&lt;span style="color: yellow;"&gt;Exception&lt;/span&gt; ex)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: yellow;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: lime;"&gt;"Exception Occurred :{0},{1}"&lt;/span&gt;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ex.Message, ex.StackTrace.ToString());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-2828694339658226377?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/2828694339658226377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/10/loading-applications-code-sample.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/2828694339658226377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/2828694339658226377'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/10/loading-applications-code-sample.html' title='Loading applications code sample'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-2948612308491040272</id><published>2009-10-24T08:07:00.001+10:00</published><updated>2009-10-24T08:11:07.624+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Outputting XML to a file</title><content type='html'>A quick way to debug XML contents (I'm using this as&amp;nbsp; apart of a webservice call - where the response is long) &lt;br /&gt;&lt;br /&gt;&lt;div style="color: lime;"&gt;//Create an XML document&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;XmlDocument doc = &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt; XmlDocument();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: lime;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;//Do stuff with it (add elements, properties, nodes, update text whatever)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;.... &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: lime;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;// Save the document to file so you can look at it later &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;doc.Save("C:\\temp.xml");&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: lime;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;// You could also do it as - particularly if you have a long path to where you are saving your files&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt; doc.Save(&lt;span style="color: #990000;"&gt;@"C:\temp.xml"&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="color: lime;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;//Otherwise, dump into the output window&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;doc.Save(Console.Out);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-2948612308491040272?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/2948612308491040272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/10/outputting-xml-to-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/2948612308491040272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/2948612308491040272'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/10/outputting-xml-to-file.html' title='Outputting XML to a file'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-3190504987445837417</id><published>2009-10-04T10:00:00.002+10:00</published><updated>2009-10-24T08:15:38.033+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='format'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>String formatting in ASP.NET</title><content type='html'>&lt;div style="font-family: inherit;"&gt;I'm doing some pretty basic string formatting stuff while playing with an ASP.NET MVC application. The C# syntax for string formats in ASP.NET is pretty straight forward. At the moment I'm more interested in getting the controllers working - I can play with making the view pretty later :)&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;String formatting allows you to render common text formats such as:&lt;br /&gt;&lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;Dates&lt;/li&gt;&lt;li&gt;Currency&lt;/li&gt;&lt;li&gt;alignment &lt;/li&gt;&lt;li&gt;numbers such as reals, decimals, scientific formats, floats, hex&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: inherit;"&gt;Some basic examples that I've played with are:&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: lime; font-family: inherit;"&gt;&amp;nbsp;Purchase Price:&amp;nbsp; &amp;lt;%= Html.Encode(String.Format("{0:c}", Model.PurchasePrice))%&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;would render to the HTML page as Purchase Price: $49.95 &lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: lime; font-family: inherit;"&gt;Release Date: &amp;lt;%= Html.Encode(String.Format("{0:d}", Model.ReleaseDate)) %&amp;gt; &lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;would render to the HTML page as&amp;nbsp; Release Date: 7/11/1999&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;And because it's rendering in string format, if there is no string passed, then nothing is returned (it doesn't fall over). I haven't yet played with what happens if it can't format into a particular value as the data was  validated before saving. But like a dutiful coder, that's what my unit tests will be for (when I wite them for this page now that the basic code is there.) &lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;a href="http://idunno.org/archive/2004/07/14/122.aspx"&gt;http://idunno.org/archive/2004/07/14/122.aspx&lt;/a&gt; has a fantastic overview of string formatting tags&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-3190504987445837417?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/3190504987445837417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/10/string-formatting-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3190504987445837417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3190504987445837417'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/10/string-formatting-in-aspnet.html' title='String formatting in ASP.NET'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-3505601436604647784</id><published>2009-10-03T11:28:00.000+10:00</published><updated>2009-10-03T11:28:55.848+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Various Links/ blog posts/ articles</title><content type='html'>Some interesting posts:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.hanselman.com/blog/ProgrammingForAbsoluteBeginners.aspx"&gt;Programming for complete beginners&lt;/a&gt;&lt;br /&gt;Talks about Microsoft's site for beginning programming&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.hanselman.com/blog/MultiBrowserOrCrossBrowserTestingAndDeconstructingMicrosoftExpressionWebSuperPreview.aspx"&gt;Cross Browser &amp;amp; Multibrowser testing using Microsoft Expression Web Support&lt;/a&gt;&lt;br /&gt;A way of testing multiple browsers on the same OS&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=356"&gt;Performing common tasks with Linq in ASP.NET&lt;/a&gt;&lt;br /&gt;- finding enabled text boxes&lt;br /&gt;- finding long items in a drop down box&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://thedatafarm.com/blog/data-access/mvc-with-entity-framework-a-twist-on-brad-abram-s-example/"&gt;MVC &amp;amp; Entity Framework&lt;/a&gt;&lt;br /&gt;Considering they're just about to release version 2 of the ASP.NET MVC framework, I'm wondering how much will change ...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://devlicio.us/blogs/casey/archive/2009/09/21/make-it-easy-to-refactor.aspx"&gt;Making it easy to refactor&lt;/a&gt;&lt;br /&gt;- Providing good test names&lt;br /&gt;- well named variables&lt;br /&gt;- appropriate test coverage&lt;br /&gt;- avoiding fragile tests &lt;br /&gt;- avoiding [Setup] and [tear down]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-3505601436604647784?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/3505601436604647784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/10/various-links-blog-posts-articles.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3505601436604647784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3505601436604647784'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/10/various-links-blog-posts-articles.html' title='Various Links/ blog posts/ articles'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-837021152724499906</id><published>2009-09-19T10:00:00.002+10:00</published><updated>2009-09-19T10:00:01.962+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nullable types'/><title type='text'>casting nullable ints or int?</title><content type='html'>Hmm, love nullable types :) But sometimes they can be a little tricky. When working with Linq, you sometimes create anonymous types as a return. If the field that you bring back is a nullable column in the database, it can mean that the anonymous type created is a nullable type as well. The next computation you use can check to see if the value is null, and if it's not, assign it to a new variable. Not saying this is the best way or even the only way, but it worked for me, and I liked it :)&lt;br /&gt;&lt;br /&gt;int value = (myNullableValue.HasValue) ? 0 : myNullableValue.Value;&lt;br /&gt;&lt;br /&gt;What does it all mean? It's a ternary operation.&lt;br /&gt;&lt;br /&gt;If the first value is true ((myNullableValue.HasValue) ? 0), return that, otherwise return the second expression (myNullableValue.Value)&lt;br /&gt;&lt;br /&gt;Otherwise if you've already done a nullable check ...&lt;br /&gt;int value = (int)myNullableValue;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-837021152724499906?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/837021152724499906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/09/casting-nullable-ints-or-int.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/837021152724499906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/837021152724499906'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/09/casting-nullable-ints-or-int.html' title='casting nullable ints or int?'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-1065567952415483793</id><published>2009-09-18T21:47:00.000+10:00</published><updated>2009-09-18T21:47:17.992+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dynamic data'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><title type='text'>Dynamic data website error</title><content type='html'>If you get this error when setting up a dynamic website there are two things it could be:&lt;br /&gt;&lt;br /&gt;"There are no accessible tables. Make sure that at least one data model is registered in Global.asax and scaffolding is enabled or implement custom pages"&lt;br /&gt;&lt;br /&gt;Firstly check&amp;nbsp; the Global.ascx.cs page to make sure that you've updated YourDataContext to whatever the name of your datacontext is.&lt;br /&gt;&lt;br /&gt;Secondly make sure ScaffoldAllTable is set to True.&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;model.RegisterContext(typeof(&lt;b style="color: purple;"&gt;YourDataContext&lt;/b&gt;), new ContextConfiguration() { ScaffoldAllTables = true });&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-1065567952415483793?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/1065567952415483793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/09/dynamic-data-website-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/1065567952415483793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/1065567952415483793'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/09/dynamic-data-website-error.html' title='Dynamic data website error'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-3930170945280089562</id><published>2009-08-30T10:23:00.002+10:00</published><updated>2009-08-30T10:39:48.692+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Joins - Joining a table to itself</title><content type='html'>This is a quick sql query that you can use to join a table to itself. There are a lot of joins, the most common is used to join two related tables together, but the LEFT JOIN can be a really quick alternative to a Sub query.&lt;br /&gt;&lt;br /&gt;I used something similar to populate a treeview that had child and parent nodes. Effectively each parent had muliple children, and I used a sql query to check the data that I wanted (I will turn this  into a LINQ statement in code, rather than a stored procedure)&lt;br /&gt;&lt;br /&gt;use category&lt;br /&gt;select  c.ParentID, c.ChildID, c.Description&lt;br /&gt;from category c&lt;br /&gt;left join category p  on c.ChildID = p.ParentID and p.ChildID = c.ParentID&lt;br /&gt;order by c.ParentID&lt;br /&gt;&lt;br /&gt;More info here: &lt;a href="http://www.w3schools.com/sql/sql_join_left.asp"&gt;http://www.w3schools.com/sql/sql_join_left.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-3930170945280089562?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3930170945280089562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3930170945280089562'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/08/joins-joining-table-to-itself.html' title='Joins - Joining a table to itself'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-3726395088447902907</id><published>2009-08-23T19:02:00.005+10:00</published><updated>2009-08-23T19:18:10.597+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='conversion'/><category scheme='http://www.blogger.com/atom/ns#' term='Access'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Importing an Access database into SQL Server</title><content type='html'>I have an old application I want to rewrite. It uses an Access database and considering there's more about a 1000 records in it, I am not about to manually re-add the data.  As part of the upgrade I wanted to work with SQL Server instead. So what's a quick way to upgrade?&lt;br /&gt;&lt;br /&gt;I have Access &amp;amp; Microsoft SQL Server 2008 installed. I have a blank database on SQL server set up to import the data into.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go to Start &gt; Microsoft SQL  Server 2008&gt; Import and Export Data. This begins a simple Wizard process&lt;/li&gt;&lt;li&gt;Select the source that you want to import from (in this case Access) &amp;amp; browse to the location of the Access database.&lt;br /&gt;&lt;br /&gt;Set any options like passwords. I'm doing a straight conversion into a blank database. I don't need to do any special queries, but you could specify which tables the data goes into, which tables you want to import and which ones you don't.&lt;/li&gt;&lt;li&gt;Click the ok button :)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;If everything goes well, when you hook into SQL Server, your data will all be there!&lt;br /&gt;&lt;br /&gt;More info from MSDN: &lt;a href="http://msdn.microsoft.com/en-us/library/ms188032.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms188032.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-3726395088447902907?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3726395088447902907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/3726395088447902907'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/08/importing-access-database-into-sql.html' title='Importing an Access database into SQL Server'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-5875980663316439127</id><published>2009-07-11T16:30:00.005+10:00</published><updated>2009-07-11T16:56:09.853+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips string null'/><category scheme='http://www.blogger.com/atom/ns#' term='regex'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>Code I love #2: regex &amp; verbatim string literal</title><content type='html'>A really simple regular expression to strip out anything except alpha or numeric characters. In the following example \r, \n, !! and space are all non-alpha numerics.&lt;br /&gt;&lt;br /&gt;Example characters that this could strip out&lt;br /&gt;&lt;br /&gt;\n  = new line&lt;br /&gt;\r  = carriage return&lt;br /&gt;\"  = quotation marks&lt;br /&gt;\\  = Backslash&lt;br /&gt;\t  = tab&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;using&lt;/span&gt; System.Text.RegularExpressions;&lt;br /&gt;&lt;br /&gt;....&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;string&lt;/span&gt; input = "This \r  is a !! test \n";&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;string&lt;/span&gt; output = &lt;span style="color: rgb(255, 204, 0);"&gt;Regex&lt;/span&gt;.Replace(input, &lt;span style="color: rgb(204, 0, 0);"&gt;@"[^a-zA-Z0-9]"&lt;/span&gt;, &lt;span style="color: rgb(255, 102, 0);"&gt;string&lt;/span&gt;.Empty);&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;//output =  Thisisatest&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;By the way, using the @ symbol in fromt of a string means that you don't have to muck around with escape characters like \[]/. This is known as a &lt;a href="http://msdn.microsoft.com/en-us/library/aa691090%28VS.71%29.aspx"&gt;verbatim string literal&lt;/a&gt;. Essentiall any string where you write @" at the beginning of the text in question (and close it off with ") means that all characters inside the quotation marks are treated exactly as they are typed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-5875980663316439127?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/5875980663316439127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/07/code-snippets-i-love-2-regex-verbatim.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/5875980663316439127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/5875980663316439127'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/07/code-snippets-i-love-2-regex-verbatim.html' title='Code I love #2: regex &amp; verbatim string literal'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-5128034704038202660</id><published>2009-07-10T13:36:00.005+10:00</published><updated>2009-07-11T16:56:35.619+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips string null'/><title type='text'>Code I love #1: IsNullOrEmpty(string)</title><content type='html'>String.IsNullOrEmpty(string)&lt;br /&gt;&lt;br /&gt;Back in days of yore you would need to do something like&lt;br /&gt;&lt;br /&gt;if (String.Empty) || (string = "") || (string = null)&lt;br /&gt;{&lt;br /&gt;//do stuff&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now you can cover off all those in one hit with String.IsNullOrEmpty(string).&lt;br /&gt;&lt;br /&gt;(And yeah, code probably is probably wrong because I try not to use them since upgrading from vb6/ .net 1.0, but you get the idea :) )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-5128034704038202660?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/5128034704038202660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/07/code-snippets-i-love-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/5128034704038202660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/5128034704038202660'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/07/code-snippets-i-love-1.html' title='Code I love #1: IsNullOrEmpty(string)'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6148876678513202505.post-4315043620489184622</id><published>2009-07-08T19:21:00.004+10:00</published><updated>2009-07-08T21:13:53.599+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><category scheme='http://www.blogger.com/atom/ns#' term='management'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Beginnings... on Agile &amp; bug fixing</title><content type='html'>About 5 months ago I began the way overdue transfer from VB6/ .NET 1.0/ SQL 2000 to the new and exciting world of C# &amp;amp; VB.NET 3.5. Of course 4.0 is just around the corner with VS2010 being released, but still, I can write about stuff I'm learning :) I'm not expecting that I'll be writing about anything majorly interesting to anyone else, and I won't really be one for answering other people's questions. The stuff I write at work is all confidential, though the stuff I'm learning working in the Microsoft SDC is majorly awesome.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.betterprojects.net/2009/06/email-whiteboards-and-well-caffeinated.html"&gt;http://www.betterprojects.net/2009/06/email-whiteboards-and-well-caffeinated.html&lt;/a&gt;&lt;br /&gt;Fantastic article on project management&lt;br /&gt;1. Set Your Sights - defining the goal&lt;br /&gt;2. The Real Team Energizer - making information critical to the project easily available to everyone in the project&lt;br /&gt;3. Don’t Rush into Commitment&lt;br /&gt;4. Ask Around - see what others have tried&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Interesting article on how bugs are a failure in process and 3 questions we need to ask to improve ourselves as devs: (&lt;a href="http://secretgeek.net"&gt;http://secretgeek.net&lt;/a&gt; )&lt;br /&gt;1. Is this mistake somewhere else also?&lt;br /&gt;2. What next bug is hidden behind this one?&lt;br /&gt;3. What should I do to prevent bugs like this?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Great quote about agile development. Maybe I should put it on a t-shirt and walk around the office? "Agile is about surfacing pain. It's not about roses, perfume, and happy candlelight dinners together. " &lt;a href="http://codebetter.com/"&gt;http://codebetter.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;NotImplementedException is an awesome way of stubbing stuff out when you haven't figured out your return statement&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6148876678513202505-4315043620489184622?l=nixdotnettech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nixdotnettech.blogspot.com/feeds/4315043620489184622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nixdotnettech.blogspot.com/2009/07/beginnings-on-agile-bug-fixing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/4315043620489184622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6148876678513202505/posts/default/4315043620489184622'/><link rel='alternate' type='text/html' href='http://nixdotnettech.blogspot.com/2009/07/beginnings-on-agile-bug-fixing.html' title='Beginnings... on Agile &amp; bug fixing'/><author><name>Nicole Cadet</name><uri>http://www.blogger.com/profile/07856570750269789522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_UMJ9vlYdkO4/R56eupGcJYI/AAAAAAAAAAc/7X-GI_xJ0mQ/S220/NicoleAv.jpg'/></author><thr:total>0</thr:total></entry></feed>
