<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Thought Stuff &#187; Development</title> <atom:link href="http://thoughtstuff.co.uk/category/development/feed/" rel="self" type="application/rss+xml" /><link>http://thoughtstuff.co.uk</link> <description>tom morgan &#124; software engineer &#124; norfolk, uk</description> <lastBuildDate>Fri, 03 Feb 2012 21:51:55 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Call Lync IE Accelerator &#8211; Now Available!</title><link>http://thoughtstuff.co.uk/2012/02/call-lync-ie-accelerator-now-available/</link> <comments>http://thoughtstuff.co.uk/2012/02/call-lync-ie-accelerator-now-available/#comments</comments> <pubDate>Fri, 03 Feb 2012 21:51:55 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Microsoft Lync]]></category> <category><![CDATA[accelerator]]></category> <category><![CDATA[call lync]]></category> <category><![CDATA[lync]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=771</guid> <description><![CDATA[Lync comes with an Internet Explorer Add-On which adds a call shortcut to any telephone numbers it recognises on the page. I bet this works really well in the States, but in the UK (and, I&#8217;m guessing) lots of other countries, the UK format doesn&#8217;t get picked up by the parser, isn&#8217;t recognised and therefore doesn&#8217;t get [...]]]></description> <content:encoded><![CDATA[<p>Lync comes with an Internet Explorer Add-On which adds a call shortcut to any telephone numbers it recognises on the page.</p><p>I bet this works really well in the States, but in the UK (and, I&#8217;m guessing) lots of other countries, the UK format doesn&#8217;t get picked up by the parser, isn&#8217;t recognised and therefore doesn&#8217;t get a shortcut.</p><p>As a work-around to this, I&#8217;ve created a very simple IE Accelerator. It&#8217;s a selection-based accelerator, which means you can select any text you want, and Lync will try and call it. (It works best with real phone numbers, but will also work for internal extension numbers.)</p><p>It&#8217;s a little finicky because in an accelerator you can only make an HTTP call. So, I&#8217;m making an call to a page, passing the selected number, then using JavaScript to invoke to call. That works fine, but the downside is that you&#8217;re left with a new page open in the browser. There&#8217;s really nothing I can do about that so I&#8217;ve stuck a big smiley face on it.</p><p>In order to submit the Accelerator to the IE Gallery, it had to have a webpage. I&#8217;d recently read <a
rel="nofollow" target="_blank" href="http://www.hanselman.com" target="_blank">Scott Hansleman&#8217;s</a> <a
rel="nofollow" target="_blank" href="http://www.hanselman.com/blog/FromConceptToCodeIn6HoursShippingMyFirstWindowsPhoneApp.aspx" target="_blank">post </a>on creating a Windows Phone app, and really liked the <a
rel="nofollow" target="_blank" href="http://wp7appsite.codeplex.com/" target="_blank">Wp7AppSite </a>website template. So, I used that. I know it&#8217;s not a phone app. Meh.</p><p>Anyway, until it gets featured as the Number One Accelerator in the UK  ;-p , you can install it for yourself by visiting <a
href="http://thoughtstuff.co.uk/accelerator/" target="_blank">http://thoughtstuff.co.uk/accelerator/</a></p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/02/call-lync-ie-accelerator-now-available/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>WPF: Sorting GridView Columns by Clicking Headers</title><link>http://thoughtstuff.co.uk/2012/01/wpf-sorting-gridview-columns-by-clicking-headers/</link> <comments>http://thoughtstuff.co.uk/2012/01/wpf-sorting-gridview-columns-by-clicking-headers/#comments</comments> <pubDate>Thu, 26 Jan 2012 17:30:47 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[gridview]]></category> <category><![CDATA[sorting]]></category> <category><![CDATA[wpf]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=755</guid> <description><![CDATA[Recently, I was doing something in WPF where I had a table of data to output. According to my book, the ListView ships with a concrete ViewBase class, called GridView, which looks pretty much like the &#8216;normal&#8217; Window data grid experience. It was pretty trivial to add in, and takes the format, roughly, of: &#38;lt;ListView [...]]]></description> <content:encoded><![CDATA[<p>Recently, I was doing something in WPF where I had a table of data to output. According to my book, the <em>ListView</em> ships with a concrete <em>ViewBase</em> class, called <em>GridView</em>, which looks pretty much like the &#8216;normal&#8217; Window data grid experience.</p><p>It was pretty trivial to add in, and takes the format, roughly, of:</p><pre class="brush: xml">
   &amp;lt;ListView x:Name=&amp;quot;MyList&amp;quot; MaxHeight=&amp;quot;300&amp;quot; ItemsSource=&amp;quot;{Binding}&amp;quot;&amp;gt;
                    &amp;lt;ListView.View&amp;gt;
                        &amp;lt;GridView&amp;gt;
                            &amp;lt;GridViewColumn Header=&amp;quot;Name&amp;quot; DisplayMemberBinding=&amp;quot;{Binding FullName}&amp;quot;/&amp;gt;
                            &amp;lt;GridViewColumn Header=&amp;quot;Hair Colour&amp;quot; DisplayMemberBinding=&amp;quot;{Binding HairColour}&amp;quot;/&amp;gt;
                            &amp;lt;GridViewColumn Header=&amp;quot;Eye Colour&amp;quot; DisplayMemberBinding=&amp;quot;{Binding EyeColour}&amp;quot;/&amp;gt;
                         &amp;lt;/GridView&amp;gt;
					&amp;lt;/ListView.View&amp;gt;
    &amp;lt;/ListView&amp;gt;
</pre><p>So far, so good. I mean, it works pretty much exactly as you would expect it to.</p><p>During testing, it came out that it would be handy to be able to sort the grid by clicking on the columns, as you&#8217;d be used to do in Windows Explorer. I didn&#8217;t think this would be a big deal. In Windows Forms it&#8217;s a built-in feature, it happens automagically. However, I couldn&#8217;t find an equivalent in the WPF control.</p><p>I did find a MSDN article -<a
rel="nofollow" target="_blank" href="http://msdn.microsoft.com/en-us/library/ms745786.aspx" target="_blank"> How to: Sort a GridView Column When a Header Is Clicked</a> &#8211; which describes how to attach a click event to the column header click, work out what needs to be done, and sort the results. I made a couple of changes, for instance, I rewrote the Sort function, arguably making it less generic, but much more readable, by adding a <em>SortDescription</em> directly to the <em>ListView</em> control. (In fact, I only did this because I thought it was causing the problems below. I&#8217;m pretty sure it would have been find if I&#8217;d left it alone.)</p><div
class="mceTemp" style="text-align: center;"><dl
id="attachment_756" class="wp-caption alignright" style="width: 250px;"><dt
class="wp-caption-dt"><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/confused.jpg"><img
class="size-full wp-image-756" title="confused" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/confused.jpg" alt="" width="240" height="188" /></a></dt><dd
class="wp-caption-dd">Photo by PhotoJonny</dd></dl></div><p>Something wasn&#8217;t right though. The event was firing, the code looked like it was working, but the list was either getting sorted in a seemingly random fashion, or not at all when I clicked it.</p><p>It took me quite a long time to work out why, because there were no errors, and the event always got called, even when it didn&#8217;t seem like it was doing anything.</p><p>Also, I guess I was a bit blinded by my faith in the MSDN code sample. Eventually, I saw the problem in the sample:</p><pre class="brush: csharp">
string header = headerClicked.Column.Header as string;
Sort(header, direction);
</pre><p><strong>The list is being sorted by assuming that the column header is the same as the binding source property name.</strong></p><p>That&#8217;s quite an assumption, and I do think MSDN could have called it out better. It works in their simplistic example (column names of Month,Day,Year) but silently stops working for anything more complicated. It&#8217;s also why the list was either being sorted randomly (because you&#8217;re sorting by something that doesn&#8217;t exist) or not at all (once you&#8217;ve sorted it randomly once, you&#8217;re just repeating yourself).</p><p>Anyway, it&#8217;s fairly simple to fix, because you can still get at the real binding value, with something like this:</p><pre class="brush: csharp">
string header =((Binding)headerClicked.Column.DisplayMemberBinding).Path.Path;
Sort(header, direction);
</pre><p>With that in place, clicking on the headers now works fine.</p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/wpf-sorting-gridview-columns-by-clicking-headers/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Achievement Unlocked: Be a Great Developer!</title><link>http://thoughtstuff.co.uk/2012/01/achievement-unlocked-be-a-great-developer/</link> <comments>http://thoughtstuff.co.uk/2012/01/achievement-unlocked-be-a-great-developer/#comments</comments> <pubDate>Thu, 19 Jan 2012 08:45:24 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[achievement]]></category> <category><![CDATA[plugin]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=744</guid> <description><![CDATA[About a year ago, I was sitting in a pub with Steve and Rob. We were talking about this and that, when we came up with an idea. Now, I say &#8220;we&#8221;&#8230;but I think I mean &#8220;me&#8221;&#8230;but I don&#8217;t want to offend anyone, as it did happen after about 5 pints! The idea was a [...]]]></description> <content:encoded><![CDATA[<p>About a year ago, I was sitting in a pub with <a
rel="nofollow" target="_blank" href="https://twitter.com/#!/powerstm" target="_blank">Steve </a>and <a
rel="nofollow" target="_blank" href="https://twitter.com/#!/stoner7" target="_blank">Rob</a>. We were talking about this and that, when we came up with an idea. Now, I say &#8220;we&#8221;&#8230;but I think I mean &#8220;me&#8221;&#8230;but I don&#8217;t want to offend anyone, as it did happen after about 5 pints!</p><p>The idea was a plug-in for Visual Studio that rewarded you for good keyboard shortcut use. So, if you commented code with CTRL+K, CTRL+C then you&#8217;d get 10 points, that sort of thing. I imagined the points flashing up in the corner, and there being some sort of hi-score online somewhere.</p><p>Sadly, like so many of my <del>good</del> hair-brained ideas, I just never had time to do anything about it.</p><p>But, it seems I was not alone. The clever chaps over at <a
rel="nofollow" target="_blank" href="http://channel9.msdn.com/" target="_blank">Channel 9</a> have created a very similar sort of thing: the <a
rel="nofollow" target="_blank" href="http://channel9.msdn.com/Blogs/C9team/Announcing-Visual-Studio-Achievements" target="_blank">Visual Studio Achievements Beta Plugin</a>!</p><div
id="attachment_745" class="wp-caption aligncenter" style="width: 542px"><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/VSAchievements.png"><img
class="size-full wp-image-745" title="VSAchievements" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/VSAchievements.png" alt="" width="532" height="319" /></a><p
class="wp-caption-text">More than 10 breakpoints in a file? Achievement Unlocked, +5 points! (image from channel9.msdn.com)</p></div><p>Yes, this is as cool as it sounds. It&#8217;s not just keyboard shortcuts &#8211; you can be rewarded for a <a
rel="nofollow" target="_blank" href="http://channel9.msdn.com/achievements/visualstudio" target="_blank">wide selection of things</a>: loading custom VS Settings gets you 5 points, referencing 25 assemblies wins you 10 points, and unlocks the <a
rel="nofollow" target="_blank" href="http://channel9.msdn.com/achievements/visualstudio/ReferencedAssemblies25" target="_blank">On The Shoulders of Giants</a> achievement.</p><p>There&#8217;s also a <a
rel="nofollow" target="_blank" href="http://channel9.msdn.com/achievements/visualstudio/leaderboard" target="_blank">leaderboard</a>, where you can make your development début.</p><p>The only criticism I can see is that quite a lot of the &#8216;achievements&#8217; awarded are for slightly shady, bad practices. I think that&#8217;s probably because it&#8217;s harder to identify good practice in a way that can be picked up by a plug-in. Mind you, my keyboard shortcut idea still stands, if anyone from C9 wants to implement it!</p><p><a
rel="nofollow" target="_blank" href="http://channel9.msdn.com/Blogs/C9team/Announcing-Visual-Studio-Achievements" target="_blank">Get the plug-in from Channel 9 now</a>. There&#8217;s also a <a
rel="nofollow" target="_blank" href="http://channel9.msdn.com/Blogs/C9Team/Visual-Studio-Achievements-Widget" target="_blank">display widget</a> for your blog/homepage, showcasing your recent software skills.</p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/achievement-unlocked-be-a-great-developer/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>.NET Demon from RedGate: continuous compilation</title><link>http://thoughtstuff.co.uk/2012/01/net-demon-from-redgate-continuous-compilation/</link> <comments>http://thoughtstuff.co.uk/2012/01/net-demon-from-redgate-continuous-compilation/#comments</comments> <pubDate>Wed, 18 Jan 2012 17:32:34 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[demon]]></category> <category><![CDATA[redgate]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=741</guid> <description><![CDATA[The guys at RedGate have just released a Beta of a new tool, an extension for Visual Studio called .NET Demon. Firstly, for everyone: it continuously compiles your code, so that you don&#8217;t get the delay when you hit F5. Also, by monitoring the public interfaces of the project your working on, it can make [...]]]></description> <content:encoded><![CDATA[<p>The guys at <a
rel="nofollow" target="_blank" href="http://www.red-gate.com/" target="_blank">RedGate </a>have just released a Beta of a new tool, an extension for Visual Studio called .NET Demon.</p><p>Firstly, for everyone: it continuously compiles your code, so that you don&#8217;t get the delay when you hit F5. Also, by monitoring the public interfaces of the project your working on, it can make an intelligent decision on whether to re-compile any dependant projects or not.</p><p>If you use unit tests, it gets better: tests are run continuously as you develop, so you get instant feedback. In addition, the results of the test results (and coverage) are shown inline.</p><p>Because it&#8217;s in Beta, you can evaluate this tool, now. For free! Download it from the <a
rel="nofollow" target="_blank" href="http://visualstudiogallery.msdn.microsoft.com/96dabaeb-05e1-4850-a5cc-a6cce79f17c1" target="_blank">Visual Studio Gallery</a>, or from <a
rel="nofollow" target="_blank" href="http://www.red-gate.com/products/dotnet-development/dotnet-demon/" target="_blank">RedGate</a>. The final will be paid-for, but this evaluation lets you see whether it&#8217;ll make a significant difference to your day.</p><p>I&#8217;m going to download it and play with it now, and I&#8217;ll write up my experiences in a new post.</p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/net-demon-from-redgate-continuous-compilation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Welcome to the Future: Code Reviews, Questions on Code etc</title><link>http://thoughtstuff.co.uk/2012/01/welcome-to-the-future-code-reviews-questions-on-code-etc/</link> <comments>http://thoughtstuff.co.uk/2012/01/welcome-to-the-future-code-reviews-questions-on-code-etc/#comments</comments> <pubDate>Tue, 17 Jan 2012 14:52:23 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[Microsoft Lync]]></category> <category><![CDATA[lync]]></category> <category><![CDATA[plugin]]></category> <category><![CDATA[Visual Studio]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=721</guid> <description><![CDATA[9am. Mary is writing code. So&#8230;uhhh, yep, that goes there, and then that value gets passed to here&#8230;and, oh? What&#8217;s that doing there? That doesn&#8217;t look right. Hang on, who wrote this? &#60;click, click&#62; Oh, Bob. Well, his code usually makes sense, there&#8217;s probably a good reason for this. Let me check. So, IM, there [...]]]></description> <content:encoded><![CDATA[<h1><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/2011.png"><img
class="size-full wp-image-726 alignnone" title="2011" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/2011.png" alt="" width="132" height="50" /></a></h1><p><em>9am. Mary is writing code.</em></p><p>So&#8230;uhhh, yep, that goes there, and then that value gets passed to here&#8230;and, oh? What&#8217;s that doing there? That doesn&#8217;t look right. Hang on, who wrote this? &lt;click, click&gt; Oh, Bob. Well, his code usually makes sense, there&#8217;s probably a good reason for this. Let me check.</p><p>So, IM, there he is&#8230; and he&#8217;s online. Great.</p><p>09:01 Mary: hey, Bob, you have a second to talk me through some code?<br
/> 09:01 Bob: yeah, sure, what&#8217;s up?<br
/> 09:01 Mary: OK, I&#8217;m in project XYZ, version 3, in the Presenters folder, looking at Car Presenter. I&#8217;m at around line 300.<br
/> 09:01 Bob: OK, OK, hang on. I&#8217;m doing something in another project, let me just fire up another instance of Visual Studio<br
/> &#8230;<br
/> 09:02 Bob: OK, I&#8217;m in. Now, let me just find that project.<br
/> &#8230;<br
/> 09:04 Bob: OK, I&#8217;ve got the project loaded. Line 300&#8230;.let&#8217;s see&#8230;  the case statement?<br
/> 09:05 Mary: That&#8217;s not right. Oh, I see. I have it checked out and I&#8217;ve added some stuff. I don&#8217;t really want to check it in right now as it&#8217;s broken. I could make a shelf, but for this, I&#8217;ll just email it to you.<br
/> 09:05 Bob: OK, I&#8217;ll shout when I&#8217;ve got it.<br
/> &#8230;<br
/> 09:10 Bob: Allright, I have the email. Line 300. Oh I see, the constructor<br
/> 09:11 Mary: Yes, that&#8217;s it. My question was&#8230;</p><p><em>Time to get to asking question: 11 mins.</em></p><h1></h1><p>&nbsp;</p><h1><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/2012.png"><img
class="alignnone size-full wp-image-727" title="2012" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/2012.png" alt="" width="132" height="40" /></a></h1><p><em>9am. Mary is writing code. However, she also has the <a
rel="nofollow" target="_blank" href="http://msdn.microsoft.com/en-us/library/hh228143.aspx" target="_blank">Lync 2010 Plug-In for Visual Studio</a>.</em></p><p>So&#8230;uhhh, yep, that goes there, and then that value gets passed to here&#8230;and, oh? What&#8217;s that doing there? That doesn&#8217;t look right. Hang on, who wrote this? &lt;click, click&gt; Oh, Bob. Well, his code usually makes sense, there&#8217;s probably a good reason for this. Let me check.</p><p>So, I highlight the code here, click the Lync icon, there he is&#8230;and he&#8217;s online. Great.</p><p>09:01 Mary: hey, Bob, you have a second to talk me through some code?<br
/> 09:01 Bob: yeah, sure, what&#8217;s up?<br
/> 09:01 Mary: It&#8217;s this code here. My question was&#8230;</p><p><em>Time to get to asking question: 1 min.</em></p><div
id="attachment_723" class="wp-caption aligncenter" style="width: 535px"><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/LyncVSPlugin1.png"><img
class=" wp-image-723  " title="LyncVSPlugin" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/LyncVSPlugin1.png" alt="" width="525" height="309" /></a><p
class="wp-caption-text">Using the Lync2010 Visual Studio Plug-in</p></div><p>That&#8217;s not an unusual scenario, and we&#8217;ve probably all had experiences of the first type.</p><p>The other great thing here is that Bob doesn&#8217;t have to be sitting at a computer running Visual Studio, tapped into the corporate source control system. He doesn&#8217;t even need Visual Studio to see the code Mary is talking about. He could be at home, relaxing on his tablet (oh, lucky Bob).</p><p>In this plug-in example the code is also editable by both parties, and the originating caller (Mary) can elect to replace the highlighted section of code in Visual Studio with the new version which was the result of the collaboration.</p><p>I see this being <em>really</em> useful &#8211; not just for geographically disparate teams, but even for developers who sit opposite each other. If you look after a significant amount of code located in lots of different projects, it really does take that long to get to the point where you&#8217;re both singing from the same hymn-sheet.</p><p>Marcelo Farjalla is a program manager with Microsoft Lync, and the author of the MSDN article above. He talks about the plug-in, and gives a working demo, in this Channel 9 video:</p><p>&nbsp;</p><p><iframe
style="height: 288px; width: 512px;" src="http://channel9.msdn.com/posts/At-look-at-the-Lync-SDK-with-Marcelo-Farjalla/player?w=512&amp;h=288" frameborder="0" scrolling="no" width="320" height="240"></iframe></p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/welcome-to-the-future-code-reviews-questions-on-code-etc/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Top Tools for 2012</title><link>http://thoughtstuff.co.uk/2012/01/top-tools-for-2012/</link> <comments>http://thoughtstuff.co.uk/2012/01/top-tools-for-2012/#comments</comments> <pubDate>Sat, 14 Jan 2012 10:00:02 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[2012]]></category> <category><![CDATA[toolkit]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=707</guid> <description><![CDATA[Everyone else does a &#8216;top tools&#8217; list, so I thought I&#8217;d join in. Before I do though, I must defer to the most excellent Scott Hanselman&#8217;s 2011 Ultimate Developer and Power Users Tool List for Windows. I regularly go here to check out what I&#8217;m missing out on. These don&#8217;t include things like Windows7, Visual Studio, [...]]]></description> <content:encoded><![CDATA[<div
id="attachment_718" class="wp-caption alignright" style="width: 310px"><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/tools.jpg"><img
class="size-medium wp-image-718" title="tools" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/tools-300x229.jpg" alt="" width="300" height="229" /></a><p
class="wp-caption-text">Everyone has their own set of tools - their Personal Tool Kit</p></div><p>Everyone else does a &#8216;top tools&#8217; list, so I thought I&#8217;d join in.</p><p>Before I do though, I must defer to the most excellent <a
rel="nofollow" target="_blank" href="http://www.hanselman.com/blog/ScottHanselmans2011UltimateDeveloperAndPowerUsersToolListForWindows.aspx" target="_blank">Scott Hanselman&#8217;s 2011 Ultimate Developer and Power Users Tool List for Windows</a>. I regularly go here to check out what I&#8217;m missing out on.</p><p>These don&#8217;t include things like Windows7, Visual Studio, SQL Management Studio etc. Everyone knows you have to use them (well, for .NET anyway). These are more the &#8220;developer&#8217;s choice&#8221; selection of everything else that makes up your toolkit.</p><p>Oh, and another thing. Lots of the tools listed below are included in <a
rel="nofollow" target="_blank" href="http://ninite.com/" target="_blank">Ninite</a>. Go and have a look. Basically, you select what you want to install, then download a automated install program which silently install all those applications. Takes no time, no mindless clicking, it&#8217;s brilliant for new installs.</p><h1>In no particular order&#8230;</h1><p><a
rel="nofollow" target="_blank" href="http://www.spotify.com" target="_blank">Spotify</a>. I listen to a lot of different music, and like experimenting with different genres. Being able to do so instantly and legally, from anywhere, is brilliant. Get Spotify Premium, it&#8217;s only £10 a month, and you&#8217;ll save that in your first day if you listen all day at work.</p><p><a
rel="nofollow" target="_blank" href="http://notepad-plus-plus.org/" target="_blank">Notepad++</a>. If you develop you need a good text editor you&#8217;re happy with and that lets you perform magic tricks with text files. You may not get on with Notepad++, but I do.</p><p><a
rel="nofollow" target="_blank" href="http://www.getpaint.net/" target="_blank">Paint.Net</a>. I don&#8217;t do massive amount of graphics work, but when I need to crop, rotate, layer and otherwise mess with photos, Paint.Net has everything I need, and it&#8217;s free.</p><p><a
rel="nofollow" target="_blank" href="http://www.piriform.com/ccleaner" target="_blank">CCleaner</a>. This has been around ages. I have absolutly no scientific stats which show that it makes your computer cleaner, faster and a better place to work &#8211; but it feels like it does.</p><p><a
rel="nofollow" target="_blank" href="http://www.mydefrag.com/" target="_blank">MyDefrag</a> (previously JKDefrag). See above.</p><p><a
rel="nofollow" target="_blank" href="http://www.evernote.com/" target="_blank">Evernote</a>. You can use any note-recording software you want, but try and use something. It helps ease your mind knowing you don&#8217;t have to try and remember everything.</p><p><a
rel="nofollow" target="_blank" href="http://www.faststone.org/FSResizerDetail.htm" target="_blank">FastStone PhotoResizer</a>. Bulk resize, squish, rename, watermark or otherwise mess with images. Good to have in the toolkit for when some marketing dude gives you 3TB of TIFF and wants them on the web.</p><p><a
rel="nofollow" target="_blank" href="http://www.fiddler2.com/fiddler2/" target="_blank">Fiddler2</a>. Excellent tool for monitoring HTTP traffic from your machine. Helps debug awkward communication problems.</p><p><a
rel="nofollow" target="_blank" href="http://www.foxitsoftware.com/Secure_PDF_Reader/" target="_blank">FoxitReader</a>. Faster than Acrobat Reader, seems to work just as well. There&#8217;s probably things it can&#8217;t do but I don&#8217;t do much with PDFs and I&#8217;ve not come across any problems.</p><p><a
rel="nofollow" target="_blank" href="http://www.magiciso.com/tutorials/miso-magicdisc-overview.htm" target="_blank">MagicDisk</a>. Easiest way I&#8217;ve found of mounting ISOs.</p><p><a
rel="nofollow" target="_blank" href="http://www.voidtools.com/" target="_blank">SearchEverything</a>. I don&#8217;t use this very often, so I don&#8217;t keep it running 24/7. I don&#8217;t mind waiting for it to rebuild its cache on first run, because once it&#8217;s done, it can find anything instantly.</p><p><a
rel="nofollow" target="_blank" href="http://www.dropbox.com/" target="_blank">DropBox</a>. Either as a handy mini-back of important files (or files that haven&#8217;t made it to backup yet) or as a way of sharing files across multiple computers, you need some sort of in-cloud storage solution. There are others, but DropBox gives you 2GB free and has a nice tool to keep it all synchronised.</p><p><a
rel="nofollow" target="_blank" href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a>. If you have, ahem&#8230; sensitive material, or if you really do have sensitive material, then have a look at TrueCrypt. It creates a new drive volume which you can drop stuff into, then encrypts it into a file. Reverse to decrypt.</p><p><a
rel="nofollow" target="_blank" href="http://www.7-zip.org/" target="_blank">7-Zip</a>. You need to have some way of extracting a variety of different archives, and you need to be able to compress files properly, and fast. The built-in Windows compression seems to have some issues, and can only work on ZIPs. 7-zip is free and fast.</p><p><a
rel="nofollow" target="_blank" href="http://winscp.net/eng/index.php" target="_blank">WinSCP</a>. FTP tool, with support for scripting and embedding into batch files. <a
title="FTP folder upload via command line / macro madness &amp; WinSCP" href="http://thoughtstuff.co.uk/2012/01/ftp-folder-upload-via-command-line-macro-madness-winscp/" target="_blank">Saved my life</a> recently.</p><p><a
rel="nofollow" target="_blank" href="https://secure.logmein.com/" target="_blank">LogMeIn</a>. This has been a God-Send for diagnosing problem&#8217;s on Mum&#8217;s computer (200 miles away). Closer to home, sometimes it&#8217;s just really useful to be able to jump on a machine at home from the office in order to start something running, downloading or converting.</p><h1>Finally&#8230;</h1><p>This isn&#8217;t really a &#8216;tool&#8217;, but it&#8217;s a bit of fun and may interest you:</p><p><a
rel="nofollow" target="_blank" href="http://social.wakoopa.com/" target="_blank">Wakoopa</a>. Keeps a track of what programs you use and for how long, then charts it for you. I display a badge for this on the homepage, and you can see more information about my usage on my <a
rel="nofollow" target="_blank" href="http://social.wakoopa.com/tomorgan" target="_blank">Wakoopa Profile Page</a>.</p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/top-tools-for-2012/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Monitor Performance of your Apps at run-time&#8230;with PerfMon!</title><link>http://thoughtstuff.co.uk/2012/01/monitor-performance-of-your-apps-at-run-time-with-perfmon/</link> <comments>http://thoughtstuff.co.uk/2012/01/monitor-performance-of-your-apps-at-run-time-with-perfmon/#comments</comments> <pubDate>Fri, 13 Jan 2012 17:37:39 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[perfmon]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=711</guid> <description><![CDATA[Ben Day has a blog post on a really interesting idea: using Performance Monitor (perfmon) to monitor the performance of your applications at run-time. You can create your own custom perfmon counters and record various things in your application. Then, if a client running your application has performance issues, you&#8217;ve got something concrete to go [...]]]></description> <content:encoded><![CDATA[<p><a
rel="nofollow" target="_blank" href="http://www.benday.com" target="_blank">Ben Day</a> has a blog post on a really interesting idea: using Performance Monitor (perfmon) to monitor the performance of your applications at run-time.</p><p>You can create your own custom perfmon counters and record various things in your application. Then, if a client running your application has performance issues, you&#8217;ve got something concrete to go on. You get all the benefits of perfmon: graphing, max/min recording over time, comparison with other system variables etc.</p><p>It&#8217;s one of those &#8220;well, duh, obvious&#8221; ideas, but it&#8217;s never occurred to me before. It&#8217;s worth putting the time in to wrap this functionality, as I see it being useful in loads of different scenarios.</p><p>You can read Ben&#8217;s full post <a
rel="nofollow" target="_blank" href="http://www.benday.com/archive/2011/12/17/how-to-create-custom-performance-monitor-perfmon-counters.aspx" target="_blank">here</a>, in which he credits <a
rel="nofollow" target="_blank" href="http://www.codeproject.com/KB/dotnet/perfcounter.aspx?msg=3261798" target="_blank">this CodeProject article</a> on how to create the counters (also worth a read).</p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/monitor-performance-of-your-apps-at-run-time-with-perfmon/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>&#8220;86% of developers listen to music whilst coding&#8221; and other stats</title><link>http://thoughtstuff.co.uk/2012/01/86-of-developers-listen-to-music-whilst-coding-and-other-stats/</link> <comments>http://thoughtstuff.co.uk/2012/01/86-of-developers-listen-to-music-whilst-coding-and-other-stats/#comments</comments> <pubDate>Wed, 11 Jan 2012 18:40:14 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[music]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=699</guid> <description><![CDATA[Zend Technologies have just released their latest &#8216;Developer Pulse&#8217; survey results. You can see the full report here, but it&#8217;s mostly PHP-based (as Zend are mostly PHP based) However, at the end of the reports are some more generic, lighter results, such as the one that 86% developers prefer to listen to music to get [...]]]></description> <content:encoded><![CDATA[<p><a
rel="nofollow" target="_blank" href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/Schoolboy_with_headphones_working_on_computer_FAN1003193.jpg"><img
class="alignright size-medium wp-image-700" title="Schoolboy with headphones working on computer" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/Schoolboy_with_headphones_working_on_computer_FAN1003193-300x207.jpg" alt="" width="300" height="207" /></a><a
href="http://www.zend.com" target="_blank">Zend Technologies</a> have just released their latest &#8216;Developer Pulse&#8217; survey results.</p><p>You can see the <a
rel="nofollow" target="_blank" href="http://static.zend.com/topics/zend-developer-pulse-survey-report-0112-EN.pdf" target="_blank">full report here</a>, but it&#8217;s mostly PHP-based (as Zend are mostly PHP based)</p><p>However, at the end of the reports are some more generic, lighter results, such as the one that 86% developers prefer to listen to music to get them &#8220;in the zone&#8221; whilst coding.</p><p>The most popular artist was Metallica, with Pink Floyd and Linkin Park close behind. The least popular was that Bieber chap. In the &#8216;guilty pleasures&#8217; section was Britney, ABBA and Lady Gaga.</p><p>Over at the Flickr HQ, they&#8217;ve done a quick poll of their developers for their favourite  music. The poll was done in March, but you might find some inspiration. The list is <a
rel="nofollow" target="_blank" href="http://code.flickr.com/blog/2011/03/02/inspiration-tuesday/" target="_blank">here</a>, and they also have a <a
rel="nofollow" target="_blank" href="http://www.last.fm/group/FlickrHQ" target="_blank">Last.FM group</a>.</p><p>If you&#8217;re interested, you can see my own musical preferences on my <a
rel="nofollow" target="_blank" title="/music" href="http://thoughtstuff.co.uk/music/" target="_blank">/music</a> page, which lists what I&#8217;ve recently listened to, or on my <a
href="http://www.last.fm/user/tom_morgan" target="_blank">Last.FM page</a>.</p><h1>Resolutions</h1><p>The report authors also asked developers about their New Year resolutions for 2012.</p><p>The most popular was to &#8216;take a vacation&#8217; at 19%, with spending more time with family and getting more sleep close behind. Eating healthily was also up there.</p><p>Good to see that my own resolutions chime in pretty close to everyone else&#8217;s. Also, I&#8217;m pretty sure they&#8217;ll be the same as my resolutions for next year as well!</p><p>&nbsp;</p><h6><em>(data from <a
rel="nofollow" target="_blank" href="http://static.zend.com/topics/zend-developer-pulse-survey-report-0112-EN.pdf" target="_blank">Zend Developer&#8217;s Pulse Report</a>)</em></h6><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/86-of-developers-listen-to-music-whilst-coding-and-other-stats/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>FTP folder upload via command line / macro madness &amp; WinSCP</title><link>http://thoughtstuff.co.uk/2012/01/ftp-folder-upload-via-command-line-macro-madness-winscp/</link> <comments>http://thoughtstuff.co.uk/2012/01/ftp-folder-upload-via-command-line-macro-madness-winscp/#comments</comments> <pubDate>Thu, 05 Jan 2012 22:31:56 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[coreftp]]></category> <category><![CDATA[FTP]]></category> <category><![CDATA[NAnt]]></category> <category><![CDATA[winscp]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=686</guid> <description><![CDATA[I was pair-programming today and we made a change to a fundamental data type which required all the web-services to be rebuilt and republished. We&#8217;d done this a couple of times before. The build is OK, but what then follows is a torterous process of manual FTPing 10 webserservices to a pre-live environment. Find folder [...]]]></description> <content:encoded><![CDATA[<p>I was pair-programming today and we made a change to a fundamental data type which required all the web-services to be rebuilt and republished.</p><p>We&#8217;d done this a couple of times before. The build is OK, but what then follows is a torterous process of manual FTPing 10 webserservices to a pre-live environment. Find folder locally, find folder remotely, select all..NOT web.config(!), double check you&#8217;re in the pre-live folder, copy, repeat.</p><p>The pragmatic part of me thought there had to be a better way of doing this. Why not just script it. Surely every man and his dog has a handy FTP upload script to recursively upload a folder of stuff?</p><p>Apparently not.</p><p>I tried PowerShell first. I like PS, but I&#8217;m a novice user trying to get better. Last time I used it (to find a string in a collection of files) I was blown away by how simple and elegant it was. 3 commands, piped together on one line, no fuss.</p><p>Turns out you can&#8217;t FTP in PowerShell.</p><p><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/official_wtf.jpg"><img
class="aligncenter size-full wp-image-688" title="official_wtf" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/official_wtf.jpg" alt="" width="374" height="300" /></a></p><p>OK, let me clarify&#8230; <a
rel="nofollow" target="_blank" href="http://stackoverflow.com/questions/1867385/upload-files-with-ftp-using-powershell" target="_blank">According to StackOverflow</a>, you <em>can</em>, but only really by getting .NET to do it for you, and only then one file at a time. And the code&#8230;</p><pre><code># create the FtpWebRequest and configure it
$ftp = [System.Net.FtpWebRequest]::Create("ftp://localhost/me.png")
$ftp = [System.Net.FtpWebRequest]$ftp
$ftp.Method = [System.Net.WebRequestMethods+Ftp]::UploadFile
$ftp.Credentials = new-object System.Net.NetworkCredential("anonymous","anonymous@localhost")
$ftp.UseBinary = $true
$ftp.UsePassive = $true
# read in the file to upload as a byte array
$content = gc -en byte c:\me.png
$ftp.ContentLength = $content.Length
# get the request stream, and write the bytes into it
$rs = $ftp.GetRequestStream()
$rs.Write($content, 0, $content.Length)
# be sure to clean up after ourselves
$rs.Close()
$rs.Dispose()
</code></pre><p>That&#8217;s not a solution.</p><p>You could also do it using <a
rel="nofollow" target="_blank" href="http://www.powershellinside.com/powershell/ssh/download.aspx" target="_blank">NetCmdlets</a>, some sort of add-on for PowerShell, but seriously, even if it is free for one concurrent connection, registering, providing email addresses, downloading, installing &#8230; just to put some FTP away? In a scripting language?!</p><p>Where else did we try? Oh, we tried NAnt as well &#8211; I thought they must have a decent &lt;ftp&gt; task. Apparently not. The only one anywhere close was this <a
rel="nofollow" target="_blank" href="http://blog.streamlinelogic.ca/2008/03/nant-ftp-task.html" target="_blank">NAnt FTP Task</a> &#8211; but don&#8217;t waste your time getting excited about the example because although it looks like it does exactly what we needed, the link is broken and there&#8217;s no trace of an alternative.</p><p>We tried DOS&#8217; FTP mput as well &#8230; but this isn&#8217;t recursive.</p><p>We did think that it would be pretty cool if there was an FTP client which recorded your commands, allowing you to play them back later, or save them to a script file, but alas, such a client doesn&#8217;t exist. Add it to the list of programs I will one day get around to making (yeah, right).</p><p>By this point, things were getting pretty desperate, and we started to consider just writing a small .NET Console Application to automate the transfer for us, although that would have had its problems as well.</p><p>Finally, however, we came across <a
rel="nofollow" target="_blank" href="http://winscp.net/eng/index.php" target="_blank">WinSCP</a>. At one level, this is just another FTP Client. However, you can run it in command line mode, and you can send scripts to it. And it&#8217;s clever enough to know that when you specify a folder instead of a file, it needs to copy everything in that folder.</p><p>Within 10 mins of downloading, we&#8217;d thrown together a simple script using WinSCP&#8217;s <strong>put</strong> command which worked perfectly. The GUI isn&#8217;t too shabby either, so I&#8217;m pretty sure that <a
rel="nofollow" target="_blank" href="http://winscp.net/eng/index.php" target="_blank">WinSCP </a>will be replacing <a
rel="nofollow" target="_blank" href="http://www.coreftp.com/" target="_blank">CoreFTP </a>as my new FTP Client of choice. It&#8217;s supposed to be a SSH file copy client (Win SecureCoPy), but it does FTP pretty well too, and is a true open-source app under GPL.</p><div
id="attachment_689" class="wp-caption aligncenter" style="width: 310px"><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/commander.png"><img
class="size-medium wp-image-689" title="commander" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/commander-300x239.png" alt="" width="300" height="239" /></a><p
class="wp-caption-text">WinSCP - more screenshots at http://winscp.net/eng/docs/screenshots</p></div><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/ftp-folder-upload-via-command-line-macro-madness-winscp/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Visual Studio New Class Template Modification</title><link>http://thoughtstuff.co.uk/2012/01/visual-studio-new-class-template-modification/</link> <comments>http://thoughtstuff.co.uk/2012/01/visual-studio-new-class-template-modification/#comments</comments> <pubDate>Wed, 04 Jan 2012 18:56:45 +0000</pubDate> <dc:creator>Tom</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[pragmatic]]></category> <category><![CDATA[template]]></category> <guid
isPermaLink="false">http://thoughtstuff.co.uk/?p=674</guid> <description><![CDATA[New Year is a good time for some introspection. I&#8217;ve been looking at how I can do things, and re-reading the most excellent book The Pragmatic Programmer: From Journeyman to Master. One of the mantras of a pragmatic programmer is avoiding repetition by using automation. In VB.NET, creating a new class file usually involves the same things [...]]]></description> <content:encoded><![CDATA[<p>New Year is a good time for some introspection. I&#8217;ve been looking at how I can do things, and re-reading the most excellent book <a
rel="nofollow" target="_blank" href="http://www.amazon.co.uk/gp/product/B000SEGEKI/ref=as_li_ss_tl?ie=UTF8&amp;tag=thostultd-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B000SEGEKI" target="_blank">The Pragmatic Programmer: From Journeyman to Master</a>.</p><p>One of the mantras of a pragmatic programmer is avoiding repetition by using automation.</p><p>In VB.NET, creating a new class file usually involves the same things again and again:</p><ul><li>Setting Option Explicit On</li><li>Setting Option Strict On</li><li>Importing some frequently used namespaces</li><li>Adding some comments about who created the file, and why</li></ul><p>The default template provided for VB.NET class files is pretty poor:</p><pre class="brush: vb">
Public Class #CLASSNAME#
End Class
</pre><p>Even if we can just add the Options in, it will save a couple of seconds each time. More importantly, it won&#8217;t ever be forgotten.</p><p>This is easily done in Visual Studio. Within the application folder structure, navigate to /Microsoft Visual Studio 10.0/Common7/IDE/ItemTemplates.</p><p>Where you go from here depends slightly on your language. For VB.NET it&#8217;s VisualBasic/Code/1033/Class.zip.</p><p>Copy and extract the .zip file, and simply edit the code file to contain whatever you want, then carefully zip back up and replace. <a
rel="nofollow" target="_blank" href="http://msdn.microsoft.com/en-us/library/eehb4faa.aspx" target="_blank">MSDN </a>has a good list of available template commands which you can use to insert the current user, date etc.</p><p>Finally, rebuild the templates for VS start devenv with the flag /installvstemplates</p><p>NOTE: don&#8217;t use the in-built Windows 7 ZIP File extensions to unzip/zip the zip file, as the file it creates isn&#8217;t recognised by Visual Studio, resulting in the modified template not showing at all in the list of types to add! Instead, use something better, like <a
rel="nofollow" target="_blank" href="http://www.7-zip.org/" target="_blank">7zip</a>.</p><p>Here&#8217;s my new New Class file now:</p><p><a
href="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/VSTemplateEditing.png"><img
class="aligncenter size-full wp-image-684" title="VSTemplateEditing" src="http://thoughtstuff.co.uk/wp-content/uploads/2012/01/VSTemplateEditing.png" alt="" width="339" height="329" /></a></p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://thoughtstuff.co.uk/2012/01/visual-studio-new-class-template-modification/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
