<?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>www.fooberry.com &#187; Visual Studio</title>
	<atom:link href="http://fooberry.com/category/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://fooberry.com</link>
	<description>Sweetness Without Context</description>
	<lastBuildDate>Fri, 30 Jul 2010 14:17:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Package and Compress with Google Closure via MSBuild</title>
		<link>http://fooberry.com/2010/02/18/package-and-compress-with-google-closure-via-msbuild/</link>
		<comments>http://fooberry.com/2010/02/18/package-and-compress-with-google-closure-via-msbuild/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 15:38:21 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://fooberry.com/2010/02/18/package-and-compress-with-google-closure-via-msbuild/</guid>
		<description><![CDATA[<br/>The Problem So our problem is we are building a library of JavaScript files that we use all over the place. I’ve been pushing, on the project where I’m the sole developer, to wrote 99% of the JavaScript as jQuery plugins. This works great because we can compile that 99% into a single file, or [...]]]></description>
			<content:encoded><![CDATA[<br/><h1>The Problem</h1>
<p>So our problem is we are building a library of JavaScript files that we use all over the place. I’ve been pushing, on the project where I’m the sole developer, to wrote 99% of the JavaScript as jQuery plugins. This works great because we can compile that 99% into a single file, or to reverse the perspective, we can split that huge file into smaller, more manageable and logical files. </p>
<p>For example, we have a file called jquery.mycompany.core.js which does a variety of mundane tasks. The file is huge, but unlike C# code, it’s huge for a reason. We want the browser to make as few requests as possible so there is less handshaking, less overhead, and faster page loads. </p>
<p>Previously we had several files and we manually combine them to one and then run it through some online compressing tool once we get close to production. This <em>technically </em>worked, but changes found a way of making their way into the huge file and the segmented files become out of date and obsolete.</p>
<h1>The Hack</h1>
<p>So here was my plan, take a list of file, concatenate them, and then compress them. Simple enough right? Well, it actually isn’t that bad</p>
<pre class="xml" name="code">  &lt;ItemGroup&gt;
    &lt;JavaScriptFiles  Include=&quot;scripts\jQueryPlugins\Custom\core\**\*.js&quot; /&gt;
  &lt;/ItemGroup&gt;

  &lt;Target Name=&quot;Default&quot; DependsOnTargets=&quot;BuildAndCompressOrdersJavaScript&quot;&gt;

  &lt;/Target&gt;

  &lt;Target Name=&quot;BuildAndCompressJavaScript&quot;&gt;
    &lt;ReadLinesFromFile File=&quot;%(JavaScriptFiles.Identity)&quot; &gt;
      &lt;Output
          TaskParameter=&quot;Lines&quot;
          ItemName=&quot;lines&quot;/&gt;
    &lt;/ReadLinesFromFile&gt;

    &lt;WriteLinesToFile File=&quot;scripts\jquery.mycompany.core.uncompressed.js&quot;
                      Lines=&quot;@(Lines)&quot;
                      Overwrite=&quot;true&quot; /&gt;

  &lt;/Target&gt;</pre>
<p>Not so bad right? Lastly, just add a bit of Google Closure. I just shell out and run it from the command line here.</p>
<pre class="xml" name="code">&lt;Exec Command='java -jar ..\compiler.jar --js scpts\jq.myco.core.un.js &gt; scpts\jq.myco.core.js' /&gt;</pre>
<p>I shortened some paths and filenames there so it would fit better in the blog’s column, but you get the idea. </p>
<p>I threw this into a post build event even though I could have added it to the csproj directly. The post build event was easier and it avoids those nasty warnings when you open the csproj. </p>
<p>The only issue I see with it right now is it is not as portable as I would like it to be. You pretty much company and past the build steps if you need to use it again. This is my major gripe about MSBuild. It’s difficult to create <em>functions</em> you repeat in the build. </p>
<p>This is a total cheapskate way to accomplish this task. I should be creating a nice parameterized MSBuild task, or even better, dump MSBuild for Rake. MSBuild and I acknowledge we are never going to be friends and have come to a professional arrangement. MSBuild does nothing to accommodate me and I do as little as possible with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2010/02/18/package-and-compress-with-google-closure-via-msbuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Font Rendering in Visual Studio 2010 RC</title>
		<link>http://fooberry.com/2010/02/12/font-rendering-in-visual-studio-2010-rc/</link>
		<comments>http://fooberry.com/2010/02/12/font-rendering-in-visual-studio-2010-rc/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 17:36:00 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://fooberry.com/2010/02/12/font-rendering-in-visual-studio-2010-rc/</guid>
		<description><![CDATA[<br/>I have to admit, I haven’t used Visual Studio 2010 much, and only recently have I made an effort to switch to it as my daily editor. One thing I’ve noticed is the font rendering in Visual Studio 2010 is a bit bolder than in 2008. Here we have Visual Studio 2008 on the left [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I have to admit, I haven’t used Visual Studio 2010 much, and only recently have I made an effort to switch to it as my daily editor. One thing I’ve noticed is the font rendering in Visual Studio 2010 is a bit bolder than in 2008. </p>
<p>Here we have Visual Studio 2008 on the left and Visual Studio 2010 RC on the right. Both using similar font settings (Monaco 10pt)</p>
<p><a href="http://fooberry.com/wp-content/uploads/2010/02/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2010/02/image_thumb.png" width="702" height="398" /></a> </p>
<p>It’s easy to see how the fonts in 2010 (on the right) look bolder and a bit blurry. From what I’ve read, WPF has had problem with Clear Type font rendering. This is the first WPF application I use with any appreciation.&#160; </p>
<p>Windows 7 has a tool to help you tune your Clear Type settings. Just type “clear type” into the start search bar, and you should find the tool. It only takes a few moments, and the outcome was pretty surprising. I’ve very happy with the results after the calibration.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2010/02/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2010/02/image_thumb1.png" width="711" height="413" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2010/02/12/font-rendering-in-visual-studio-2010-rc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 RC + ReSharper 5.0 + Xunitcontrib all in harmony&#8230;.finally.</title>
		<link>http://fooberry.com/2010/02/12/visual-studio-2010-rc-resharper-5-0-xunitcontrib-all-in-harmony-finally/</link>
		<comments>http://fooberry.com/2010/02/12/visual-studio-2010-rc-resharper-5-0-xunitcontrib-all-in-harmony-finally/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 16:28:29 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[ReSharper Tip of the Day]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Beta]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://fooberry.com/2010/02/12/visual-studio-2010-rc-resharper-5-0-xunitcontrib-all-in-harmony-finally/</guid>
		<description><![CDATA[<br/>Working on the bleeding edge is painful. Very painful at times. Throwing away our Team City builds because TFS 2010 didn’t support it really hurt. It was a big woops that I regret. Moving to Visual Studio 2010 Beta was painful too. Visual Studio worked fine, but no ReSharper made it painful. Even in the [...]]]></description>
			<content:encoded><![CDATA[<br/><p><a href="http://www.flickr.com/photos/bcymet/3292063588/"><img style="border-right-width: 0px; margin: 0px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="madmen_icon" border="0" alt="madmen_icon" align="left" src="http://farm4.static.flickr.com/3309/3292063588_877bb98b0b_m.jpg" width="240" height="161" /></a></p>
<p>Working on the bleeding edge is painful. Very painful at times. Throwing away our Team City builds because TFS 2010 didn’t support it really hurt. It was a big woops that I regret. </p>
<p>Moving to Visual Studio 2010 Beta was painful too. Visual Studio worked fine, but no ReSharper made it painful. Even in the early days, ReSharper was not stable in 2010, but after a few months, things look good now. ReSharper and VS 2010 are playing nice together. </p>
<p>There is one last pain point. No Xunit.net test runner. Xunitcontrib provides a ReSharper 5.0 build, but I was never able to get it to work…until now. Previously I was getting <a href="http://xunitcontrib.codeplex.com/Thread/View.aspx?ThreadId=79225">the same problem seen by others</a>.</p>
<blockquote><p>The plugin xunit could not be loaded from &quot;C:\program files(x86)\jetBrains\resharper\v5.0\bin\plugins\xunit.dll&quot; or one of its dependencies.&#160; Operation is not supported.&#160; (Exception from HRRESULT: 0&#215;801311515)</p>
</blockquote>
<p>I tried the best I could to <em>right-click | Properties | Unblock</em> all the files in the plug-in, but the “Unblock” never worked. I would get the same error. Going back into the properties dialog, the unblock would appear again. It looked like the unblock wasn’t sticking. </p>
<p>After a quick Google search, I found an <a href="http://forum.soft32.com/windows/unblock-files-command-line-ftopict307142.html">alternative way to unblock files</a>. <strong>Copy the files to a FAT 32 and back. </strong>The block is stripped. Sweet! My USB key is FAT 32, and after a quick copy and back. No more errors! ReSharper sees and runs my Xunit.net tests. </p>
<p>Just a quick overview of how I installed the plug-in:</p>
<ol>
<li>Close Visual Studio.</li>
<li>Copy the contents of the ExternalAnnotations to:     <br />C:\Program Files (x86)\JetBrains\ReSharper\v5.0\Bin\ExternalAnnotations</li>
<li>Create a folder:     <br />C:\Program Files (x86)\JetBrains\ReSharper\v5.0\Bin\plugins\xunitcontrib.runner.resharper.5.0</li>
<li>Copy everything else to the USB key.</li>
<li>Copy it to the folder I just created in step #3.</li>
<li>Open Visual Studio and run all my tests. </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2010/02/12/visual-studio-2010-rc-resharper-5-0-xunitcontrib-all-in-harmony-finally/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Refactor rename on LINQ to SQL Classes</title>
		<link>http://fooberry.com/2009/12/31/refactor-rename-on-linq-to-sql-classes/</link>
		<comments>http://fooberry.com/2009/12/31/refactor-rename-on-linq-to-sql-classes/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 15:54:17 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[ReSharper]]></category>

		<guid isPermaLink="false">http://fooberry.com/2009/12/31/refactor-rename-on-linq-to-sql-classes/</guid>
		<description><![CDATA[<br/>This is a quick, dirty work around to renaming the properties of the LINQ to SQL classes. Say you have a simple DBML class you want to rename. Simple enough right? Just click in there and edit the WidgetName to Name right? Wrong! You have code like this. public Widget CreateNewWidget(string name, string description) { [...]]]></description>
			<content:encoded><![CDATA[<br/><p>This is a quick, dirty work around to renaming the properties of the LINQ to SQL classes. Say you have a simple DBML class you want to rename. </p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/12/image3.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/12/image_thumb3.png" width="224" height="161" /></a></p>
<p>Simple enough right? Just click in there and edit the WidgetName to Name right? Wrong! You have code like this.</p>
<pre class="c#" name="code">public Widget CreateNewWidget(string name, string description)
{
    return new Widget {
        WidgetDescription = description,
        WidgetName = name
    };
}</pre>
<p>You’re going to abandon all those calls to WidgetName and do a search and replace refactor. That sucks. So rename it to WidgetName2 for now and let all the references break.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/12/image4.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/12/image_thumb4.png" width="233" height="167" /></a> </p>
<p>That breaks our code.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/12/image5.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/12/image_thumb5.png" width="545" height="155" /></a> </p>
<p>Fine for now. Create a partial class for the Widget.cs and add our WidgetName back in</p>
<pre class="c#" name="code">public partial class Widget
{
    public string WidgetName { get; set; }
}</pre>
<p>Use ReSharper to rename that property to name.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/12/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/12/image_thumb6.png" width="580" height="218" /></a> </p>
<p>Then delete the partial class, or property and rename the property in the DBML to Name. </p>
<p>Done.</p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2009/12/31/refactor-rename-on-linq-to-sql-classes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 Cassini / IIS Deltas</title>
		<link>http://fooberry.com/2009/10/27/visual-studio-2010-cassini-iis-deltas/</link>
		<comments>http://fooberry.com/2009/10/27/visual-studio-2010-cassini-iis-deltas/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 15:09:41 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://fooberry.com/2009/10/27/visual-studio-2010-cassini-iis-deltas/</guid>
		<description><![CDATA[<br/>We’ve recently upgraded to the shiny new Visual Studio 2010 Beta 2. With the go live license we hope we can transition to the RTM once it drops. It has some nice features everyone already knows about. First step to the future, the conversion. The conversion went pretty smooth. It doesn’t like the MVC 1.0 [...]]]></description>
			<content:encoded><![CDATA[<br/><p>We’ve recently upgraded to the shiny new Visual Studio 2010 Beta 2. With the go live license we hope we can transition to the RTM once it drops. It has some nice features everyone already knows about.</p>
<p>First step to the future, the conversion. The conversion went pretty smooth. It doesn’t like the MVC 1.0 project, but that’s OK since it was just a shell placeholder. We plan on converting that to the MVC 2.0 before we get any real work in there.</p>
<p>After fixing a few minor things the conversion wizard missed, we fire up the app in Cassini….and it looks awful.<img style="border-bottom: 0px; border-left: 0px; margin: 0px auto; display: block; float: none; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/10/image_thumb.png" width="256" height="332" /></p>
</p>
<p>OK, well maybe it doesn’t look awful, but it doesn’t look how our talented designers want it to look. It is mostly there. That bottom block should appear to the right of the login. Fire up the same VS 2010 project in IIS and it looks fine. <img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/10/image_thumb1.png" width="640" height="281" /></p>
<p>Weird huh? Looking at the HTML there are a few differences between the two, but none that we would really expect to cause the two to render differently. Some URL’s were changed to absolute URL’s and include the hostname and port of each site. There are some view state differences, but nothing else.&#160; Hmm…Why don’t we just stop using Cassini and debug through IIS.</p>
<p>There were just a few steps needed to set that up. First, tell Visual Studio to use a different server besides the development server. </p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/10/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/10/image_thumb2.png" width="640" height="341" /></a> </p>
<p>Here we’ve already setup a host header IIS site and added dev.mysite.localhost do the hosts file. We have a hybrid of ASP.Net and classic ASP, so we already used ISS for a lot of testing. </p>
<p>Second step, run Visual Studio as administrator. You can default the shortcut to always run as administrator by editing the advanced properties of the shortcut. </p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/10/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/10/image_thumb3.png" width="394" height="300" /></a> </p>
<p>That’s it. It looks like Visual Studio automatically attaches to the IIS process. The best part; <strong>It is a worlds faster than Cassini</strong>. I don’t know why you would debug through Cassini, unless you had to because you were missing either administrator privileges or missing IIS with your Home version of Windows. </p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2009/10/27/visual-studio-2010-cassini-iis-deltas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode one ups #region in Visual Studio</title>
		<link>http://fooberry.com/2009/06/19/xcode-one-ups-region-in-visual-studio/</link>
		<comments>http://fooberry.com/2009/06/19/xcode-one-ups-region-in-visual-studio/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 17:49:05 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[A Tale of Awful Design]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://fooberry.com/2009/06/19/xcode-one-ups-region-in-visual-studio/</guid>
		<description><![CDATA[<br/>I hate regions in Visual Studio. I don’t like the fact you can hide code from my incremental search and scanning eyes. If it is unimportant to me at the moment, give me a mechanism to jump over it. #region &#34;collapse me&#34; // you’ll never see me if I’m collapsed. #endregion I don’t like that [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I hate regions in Visual Studio. I don’t like the fact you can hide code from my incremental search and scanning eyes. If it is unimportant to me at the moment, give me a mechanism to jump over it.</p>
<pre language="c#" name="code">#region &quot;collapse me&quot;
    // you’ll never see me if I’m collapsed.
#endregion</pre>
<p>I don’t like that I can’t CTRL+I through them nor CTRL+F will skip them unless you tell them otherwise. </p>
<p>While Visual Studio gives your the ability to skip to the method directly via a dropdown.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/06/image5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/06/image_thumb.png" width="308" height="224" /></a></p>
<p>The dropdown is nice and all, but the members are in alphabetical order, not the order they are in file. Alphabetical may make sense in some cases, but I usually have related members near each other in the source. When I go look for them in the dropdown, why aren’t they the same.</p>
<p>Xcode does things a bit differently. They line up everything with the order of the members in the file. Also, they let you give clues to the IDE to format the dropdown into sections. Brilliant. </p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/06/image6.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/06/image_thumb1.png" width="633" height="494" /></a> </p>
<p>Notice the following lines of source and their related markup of the dropdown.</p>
<pre language="c" name="code">#pragma mark -
#pragma mark Picker DataSource Methods</pre>
<p>Pretty awesome huh? The best part is as you move the code around, the markup and members move in the dropdown. A+</p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2009/06/19/xcode-one-ups-region-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dark IDE Colors v2.0</title>
		<link>http://fooberry.com/2009/04/23/dark-ide-colors-v20/</link>
		<comments>http://fooberry.com/2009/04/23/dark-ide-colors-v20/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 14:53:04 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://fooberry.com/2009/04/23/dark-ide-colors-v20/</guid>
		<description><![CDATA[<br/>I’ve been a long time supporter to dark IDE settings. After recently spending some more time in TextMate, and seeing some presentations given in Visual Studio with a setting that more closely matches my favorite TM theme, and seeing HippoEDIT ships with the same theme, I’ve decided to tweak my current dark theme to be [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I’ve been a long time supporter to dark IDE settings. After recently spending some more time in TextMate, and seeing some presentations given in Visual Studio with a setting that more closely matches my favorite TM theme, and seeing <a href="http://www.hippoedit.com/">HippoEDIT</a> ships with the same theme, I’ve decided to tweak my current dark theme to be a little close to TM. </p>
<p>Here is what it currently looks like for C# code.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image7.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb7.png" width="613" height="450" /></a> </p>
<p>Here is some XML.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image8.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb8.png" width="584" height="589" /></a> </p>
<p>Some CSS:</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image9.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb9.png" width="244" height="83" /></a> </p>
<p>And some HTML.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image10.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb10.png" width="695" height="358" /></a> </p>
</p>
</p>
<p>Something interesting here is that I’ve given different styles to inline HTML elements (e.g. label) vs block HTML elements (e.g. div, p). You can do this by going to Tools | Options | Text Editor | HTML | Format | Tag Specific Options…</p>
<p>The biggest bummer here is for ASP.Net controls you can only style the leading control prefix.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image11.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb11.png" width="452" height="37" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2009/04/23/dark-ide-colors-v20/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>RubyMine vs VisualStudio: Editing CSS Properties</title>
		<link>http://fooberry.com/2009/04/22/rubymine-vs-visualstudio-editing-css-properties/</link>
		<comments>http://fooberry.com/2009/04/22/rubymine-vs-visualstudio-editing-css-properties/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 15:31:43 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://fooberry.com/2009/04/22/rubymine-vs-visualstudio-editing-css-properties/</guid>
		<description><![CDATA[<br/>I&#8217;m not a closet fan of JetBrain&#8217;s products. ReSharper is a dream and I can&#8217;t imagine hate coding anything without it. Recently, I’ve been using the RubyMine Beta as JavaScript editor. I’ve really liked it, and it far exceeds Visual Studio with only the fact it doesn’t keep shifting my JavaScript around while it auto [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;m not a closet fan of JetBrain&#8217;s products. ReSharper is a dream and I <strike>can&#8217;t imagine</strike> hate coding anything without it. Recently, I’ve been using the RubyMine Beta as JavaScript editor. I’ve really liked it, and it far exceeds Visual Studio with only the fact it doesn’t keep shifting my JavaScript around while it auto indents, un-indents, then re-indents. It does many more things better than Visual Studio, but this was the madding factor that made me search for something new.</p>
<p>The more I use it for JavaScript, the more I find myself editing other file types in RM as well. Most recently, I was working in one of our Stylesheets and found it’s UI for editing colors far exceeded the VS equivalent. Let’s take the following example. Let’s say I want to edit the following CSS class.</p>
<pre name="code" language="css">
.note-type-Glitch-Active{
    background-color:#D3262E;
    color:White;
}</pre>
<p>VS will let me right click inside the class, and click “Build Style”. I get a nice dialog window to edit the style.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb2.png" width="587" height="490" /></a> </p>
<p>Nice huh? There are lots of switch to flip and buttons to click. My complaint is you took me from something succinct, and cluttered it with a bunch of options I don’t care about. Do I really need to click a checkbox to make it blink? I clicked on “background-color”, chances are I want to edit that.</p>
<p>OK, I’m being picky, but I really do want to change the background color. So, I click Background, and then swatch color, and then the custom dialog, because how often do you pick from their swatch pallet? </p>
<p>I finally end up here.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb3.png" width="609" height="512" /></a> </p>
<p>What glorious color picker dialog? I swear this thing hasn’t changed since Windows 3.1. It is really pitiful. I’ve complained about this color picker before, but I don’t mind doing it again. I can’t make slider adjustments to the RGB values individually. I can’t adjust saturation via a slider, and go ahead and try to make use of that customer colors palette. It is near impossible. Yuck!.</p>
<p>You can make your change, OK all the way out and you’ve got your new color.</p>
<p>Now let’s look at RubyMine.</p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb4.png" width="341" height="95" /></a> </p>
<p>Hey! Is that a swatch right there in the editor? That’s pretty nice. Single click it and we get a nice picker. </p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb5.png" width="454" height="414" /></a> </p>
<p>It still starts out with a swatch palette, but the preview is pretty nice. Also, the recent color palette is much easier to use.. Click over to HSB. </p>
<p><a href="http://fooberry.com/wp-content/uploads/2009/04/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://fooberry.com/wp-content/uploads/2009/04/image-thumb6.png" width="484" height="430" /></a> </p>
</p>
<p>Hue, saturation and luminance adjustments via a slider! Nice! Naturally the RGB gives you exactly what you would expect: RGB adjustments for each component via sliders. </p>
<p>I click once and I’m out of the dialog with the new color.</p>
<p>In my opinion, this is a much more usable color picker. I’m sure I’ll be back with more things RubyMine does better than Visual Studio. </p>
<p>Don’t get me wrong. I love Visual Studio, but there are something other tools do better. </p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2009/04/22/rubymine-vs-visualstudio-editing-css-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asp.Net and forcing password change after PasswordRecovery</title>
		<link>http://fooberry.com/2009/02/18/aspnet-and-forcing-password-change-after-passwordrecovery/</link>
		<comments>http://fooberry.com/2009/02/18/aspnet-and-forcing-password-change-after-passwordrecovery/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 04:13:33 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://fooberry.com/?p=678</guid>
		<description><![CDATA[<br/>Like many websites, we implemented a feature that will let our users self recover lost or forgottton passwords.  Asp.Net provides this right out of the box with the PasswordRecovery control.  It took us 90% of the way to where we want to be. It verifies the account exists, generates a random password and mails it [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Like many websites, we implemented a feature that will let our users self recover lost or forgottton passwords.  Asp.Net provides this right out of the box with the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.passwordrecovery.aspx">PasswordRecovery</a> control.  It took us 90% of the way to where we want to be. It verifies the account exists, generates a random password and mails it to user.  The last step we wanted was to force the user to change their password after they&#8217;ve requested  a new on from the <code>PasswordRecovery </code>control. Turns out, it wasn&#8217;t that bad.</p>
<p>We created a new profile property for our user to track if we were requiring a password change on the next login.</p>
<pre name="code" language="xml">
 &lt;profile>
   &lt;properties>
     &lt;add name="RequirePasswordChange" type="System.Boolean" allowAnonymous="false"/>
   &lt;/properties>
 &lt;/profile>
</pre>
<p>We already had our <code>ForgotPassword.aspx</code> page with our <code>PasswordRecovery </code>control on it. We just needed to write up one more event.</p>
<pre language="html" name="code">
&lt;asp:PasswordRecovery ID="PasswordRecovery1" runat="server"
     OnSendingMail="SendingMail" >
 &lt;/asp:PasswordRecovery>
</pre>
<p>In the new event we&#8217;ll set that flag so we know the next time they successfully log in, we&#8217;ll make them change their password. I didn&#8217;t really see any other event that was more appropriate than <code>SendingMail</code>, but since we only send the e-mail when we pass all the challenges we&#8217;ve setup, it works well enough. </p>
<p>Also, since we&#8217;re not logged in, we have to ask for the profile by name, and then make the change.</p>
<pre name="code" language="c#">
protected void SendingMail(object sender, MailMessageEventArgs e)
{
    var p = Profile.GetProfile(PasswordRecovery1.UserName);
    p.RequirePasswordChange = true;
    p.Save();
}
</pre>
<p>The login page has some code added after we login.</p>
<pre name="code" language="html">
&lt;asp:Login ID="Login1" runat="server" OnLoggedIn="LoggedIn">
&lt;/asp:Login>
</pre>
<p>If we require the password change, then redirect to the new page.</p>
<pre language="c#" name="code">
protected void LoggedIn(object sender, EventArgs e)
{
    if (Profile.GetProfile(Login1.UserName).RequirePasswordChange)
        Response.Redirect("ChangePassword.aspx");
}
</pre>
<p>Lastly, <code>ChangePassword.aspx</code> resets the flag on successful login.</p>
<pre name="code" language="html">
&lt;asp:ChangePassword ID="ChangePassword1" runat="server"
    OnChangedPassword="ChangedPassword">
&lt;/asp:ChangePassword>
</pre>
<pre name="code" language="c#">
protected void ChangedPassword(object sender, EventArgs e)
{
    Profile.RequirePasswordChange = false;
    Profile.Save();
}
</pre>
<p>That&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2009/02/18/aspnet-and-forcing-password-change-after-passwordrecovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Extensions and Visual Studio</title>
		<link>http://fooberry.com/2009/02/17/git-extensions-and-visual-studio/</link>
		<comments>http://fooberry.com/2009/02/17/git-extensions-and-visual-studio/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 14:00:41 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://fooberry.com/?p=669</guid>
		<description><![CDATA[<br/>With the Git extensions you get some nice Visual Studio integration. You get a nice menu and toolbar to work some of your Git magic right from the IDE.]]></description>
			<content:encoded><![CDATA[<br/><p>With the <a href="http://sourceforge.net/projects/gitextensions/">Git extensions</a> you get some nice Visual Studio integration. You get a nice menu and toolbar to work some of your Git magic right from the IDE.<br />
<img src="http://fooberry.com/wp-content/uploads/2009/02/ss-20090215112020.png" alt="ss-20090215112020" title="ss-20090215112020" width="700" height="610" class="alignnone size-full wp-image-670" /></p>
]]></content:encoded>
			<wfw:commentRss>http://fooberry.com/2009/02/17/git-extensions-and-visual-studio/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
