<?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>Ellis Web Development</title>
	<atom:link href="http://ellisweb.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://ellisweb.net</link>
	<description>Thoughts &#38; Articles on ASP.net, C#, Software Development and Technology by Yaakov Ellis</description>
	<lastBuildDate>Mon, 07 May 2012 07:45:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Could not load type &#8216;System.Web.Razor.Parser.SyntaxTree.CodeSpan&#8217; from assembly &#8216;System.Web.Razor</title>
		<link>http://ellisweb.net/2012/04/could-not-load-type-system-web-razor-parser-syntaxtree-codespan-from-assembly-system-web-razor/</link>
		<comments>http://ellisweb.net/2012/04/could-not-load-type-system-web-razor-parser-syntaxtree-codespan-from-assembly-system-web-razor/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 12:54:19 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[webapi]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=544</guid>
		<description><![CDATA[I am working with an ASP.net MVC4 project with WebAPI, and upgraded/installed a number of nuget packages (and stupidly did not test after each one). When the dust settled, I tried to load an API page in my browser and got the following error message: &#8220;Could not load type &#8216;System.Web.Razor.Parser.SyntaxTree.CodeSpan&#8217; … <a href="http://ellisweb.net/2012/04/could-not-load-type-system-web-razor-parser-syntaxtree-codespan-from-assembly-system-web-razor/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>I am working with an ASP.net MVC4 project with WebAPI, and upgraded/installed a number of nuget packages (and stupidly did not test after each one). When the dust settled, I tried to load an API page in my browser and got the following error message:</p>
<h4><em>&#8220;Could not load type &#8216;System.Web.Razor.Parser.SyntaxTree.CodeSpan&#8217; from assembly &#8216;System.Web.Razor&#8221;</em></h4>
<p>Eventually, I was able to resolve the error by removing the following from my web.config and app.config files:</p>
<pre class="brush: xml; gutter: false">&lt;runtime&gt;
  &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;&gt;
    &lt;!-- Begin Remove --&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;System.Web.Razor&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; culture=&quot;neutral&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;0.0.0.0-2.0.0.0&quot; newVersion=&quot;2.0.0.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;!-- End Remove --&gt;
  &lt;/assemblyBinding&gt;
&lt;/runtime&gt;</pre>
<p>I would guess that one of the packages that I installed added this reference, which had a conflict with a different version of the same assembly in the GAC. In any event, it fixed the error (and did not cause any apparent new errors). Posting in case it may help you out with a similar error.</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2012/04/could-not-load-type-system-web-razor-parser-syntaxtree-codespan-from-assembly-system-web-razor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force WebAPI to return JSON by Default for Html GET Requests</title>
		<link>http://ellisweb.net/2012/04/force-webapi-to-return-json-by-default-for-html-get-requests/</link>
		<comments>http://ellisweb.net/2012/04/force-webapi-to-return-json-by-default-for-html-get-requests/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 06:04:38 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[webapi]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=536</guid>
		<description><![CDATA[Currently, the default response type of for Web API requests is XML. By the time it comes out of beta, it will be the default (source - this is mentioned by Hanselman towards the end of the post). However, if you want to activate this right now, how should you … <a href="http://ellisweb.net/2012/04/force-webapi-to-return-json-by-default-for-html-get-requests/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>Currently, the default response type of for Web API requests is XML. By the time it comes out of beta, it will be the default (<a href="http://www.hanselman.com/blog/OnTheNightmareThatIsJSONDatesPlusJSONNETAndASPNETWebAPI.aspx">source </a>- this is mentioned by Hanselman towards the end of the post). However, if you want to activate this right now, how should you do it?</p>
<p>Two steps:</p>
<ol>
<li>Set a JSON formatter as the first Formatter in the Web API Config Formatters collection</li>
<li>Set &#8220;text/html&#8221; as an accepted media type for this formatter</li>
</ol>
<p>WebAPI includes a JSON Serializer by default: DataContractJsonSerializer. However, <a href="http://encosia.com/jquery-asp-net-web-api-and-json-net-walk-into-a-bar/">no one wants to use it</a>, and for good reason: lots of issues with different types, slow performance, bad date formatting <a href="http://www.west-wind.com/weblog/posts/2012/Mar/09/Using-an-alternate-JSON-Serializer-in-ASPNET-Web-API">and more</a>.</p>
<p>Thankfully, WebAPI allows you to switch customize the data formatters used for different content types. Bloggers have recommended a number of different approaches. What seems to be the most promising is <a href="http://blogs.msdn.com/b/henrikn/archive/2012/02/18/using-json-net-with-asp-net-web-api.aspx">Henrik Nielsen&#8217;s</a> <a href="https://github.com/WebApiContrib/WebAPIContrib/blob/master/src/WebApiContrib.Formatting.JsonNet/JsonNetFormatter.cs">JsonNetFormatter</a> (using Json.NET to handle the JSON serialization) combined with a fix for a DateTime serialization issue (Hanselman also implies that this will be the default in post-beta WebAPI).</p>
<p>After you add the code for the JsonNetFormatter, you can set this up as the default Json data formatter by doing the following:</p>
<pre class="brush: csharp; gutter: true">protected void Application_Start()
{
    ...

    JsonSerializerSettings serializerSettings = new JsonSerializerSettings();
    serializerSettings.Converters.Add(new IsoDateTimeConverter());
    GlobalConfiguration.Configuration.Formatters.Insert(0, new JsonNetFormatter(serializerSettings));

    ...
}</pre>
<p>Once you have done this, any request that comes in to the API that asks for json (setting a header to accept content of type application/json, utilizing the facility in WebAPI for <a href="http://weblogs.asp.net/gunnarpeipman/archive/2012/04/19/asp-net-web-api-how-content-negotiation-works.aspx">content negotiation</a>) will receive Json content formatter using the JsonNetFormatter class. However, if you want to just test this out in your browser, you will still get XML content. This is because a plan request from your browser is for type text/html, which translates to xml in the Web API universe. Though the Json will be returned automatically if you explicitly request json content (or if you use a function that requests this content type, like the <a href="http://api.jquery.com/jQuery.ajax/">$.ajax</a> function in jQuery), if you want to test out the json in your browser, you will be out of luck using the standard configuration.</p>
<p>To get around this, you need to <a href="http://stackoverflow.com/a/10197525/51">set the JsonNetFormatter</a> to support the &#8220;text/html&#8221; media type. This will allow it to respond to requests made from the browser (and since the JsonNetFormatter is now the first Formatter in the Formatters collection, it will be used by default). You can do this as follows:</p>
<pre class="brush: csharp; gutter: true">protected void Application_Start()
{
    ...

    JsonSerializerSettings serializerSettings = new JsonSerializerSettings();
    serializerSettings.Converters.Add(new IsoDateTimeConverter());
    var jsonFormatter = new JsonNetFormatter(serializerSettings);
    jsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue(&quot;text/html&quot;));
    GlobalConfiguration.Configuration.Formatters.Insert(0, jsonFormatter);

    ...
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2012/04/force-webapi-to-return-json-by-default-for-html-get-requests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Translating Search Queries on the Fly</title>
		<link>http://ellisweb.net/2012/03/google-translating-search-queries-on-the-fly/</link>
		<comments>http://ellisweb.net/2012/03/google-translating-search-queries-on-the-fly/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 19:07:02 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hebrew]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[translate]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=532</guid>
		<description><![CDATA[The most popular post on this blog, by far, is Where Does Google Chrome Store User History, Profile and Bookmarks. I had the good luck to be the first person on the Internet to post an answer to this question (even before Google did so in their documentation), just a … <a href="http://ellisweb.net/2012/03/google-translating-search-queries-on-the-fly/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>The most popular post on this blog, by far, is <a href="http://ellisweb.net/2008/09/where-does-google-chrome-store-user-history-profile-and-bookmarks/">Where Does Google Chrome Store User History, Profile and Bookmarks</a>. I had the good luck to be the first person on the Internet to post an answer to this question (even before Google did so in their documentation), just a few days into the original Chrome Beta release. The vast majority of hits come from Google searches that include one or more of the following keywords: Chrome, History, Profile, Bookmarks, Cookies, Save.</p>
<p>I mention this because I saw something very interesting in my site stats today. Someone got to this page by searching for &#8220;שמירת סימניות בכרום&#8221;. This is <a href="http://translate.google.co.il/?q=%D7%A9%D7%9E%D7%99%D7%A8%D7%AA+%D7%A1%D7%99%D7%9E%D7%A0%D7%99%D7%95%D7%AA+%D7%91%D7%9B%D7%A8%D7%95%D7%9D&amp;um=1&amp;ie=UTF-8&amp;hl=en&amp;sa=N&amp;tab=wT">Hebrew</a> for &#8220;Save Bookmarks in Chrome&#8221;. If you searched for this term in English you would see a link to my post on the subject somewhere in the range of the 5th-10th link. However, they searched in Hebrew, and even so, a link to this post showed up (<a href="http://www.google.co.il/#sclient=psy&amp;hl=en&amp;site=&amp;source=hp&amp;q=%D7%A9%D7%9E%D7%99%D7%A8%D7%AA+%D7%A1%D7%99%D7%9E%D7%A0%D7%99%D7%95%D7%AA+%D7%91%D7%9B%D7%A8%D7%95%D7%9D">number 8 in the results</a> when I tried it).</p>
<p>So they must be taking the Hebrew, and while they are processing results in Hebrew, the search algorithm also translates it on the fly, searches on the term translated into English, and integrates relevant English results into the result set. This is very cool, and in a world where the bulk of technical literature and answers to questions like this are in English, it is very smart. There is a good chance that someone searching for this in Hebrew will still find an answer in English to be useful. Looks like the Google Search team still has a few tricks up their collective sleeve.</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2012/03/google-translating-search-queries-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error Loading MVC 3 Project after MVC 4 is Installed or in VS 2011</title>
		<link>http://ellisweb.net/2012/02/error-loading-mvc-3-project-after-mvc-4-is-installed-or-in-vs-2011/</link>
		<comments>http://ellisweb.net/2012/02/error-loading-mvc-3-project-after-mvc-4-is-installed-or-in-vs-2011/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 12:29:44 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[mvc3]]></category>
		<category><![CDATA[mvc4]]></category>
		<category><![CDATA[vs]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=525</guid>
		<description><![CDATA[Since installing the ASP.net MVC 4 Beta, it has happened to me a few times that MVC 3 websites will not load when the solution is loaded into VS 2010 (I have also read about this happening with VS 2011). You can fix this by doing the following: In the … <a href="http://ellisweb.net/2012/02/error-loading-mvc-3-project-after-mvc-4-is-installed-or-in-vs-2011/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>Since installing the ASP.net MVC 4 Beta, it has happened to me a few times that MVC 3 websites will not load when the solution is loaded into VS 2010 (I have also read about this happening with VS 2011).</p>
<p>You can fix this by doing the following:</p>
<ol>
<li>In the Solution Explorer, right click on the project that wont load and click on &#8220;Edit [ProjectName].csproj&#8221;. This will open up the project definition file in VS. You can also edit this manually using your favorite text editor, opening the file through Windows Exporer.</li>
<li>Find the line in the file that starts with <code>ProjectTypeGuids</code> and remove the entry &#8220;{E53F8FEA-EAE0-44A6-8774-FFD645390401}&#8221; from the list (this is code that tells Visual Studio that it is an MVC 3 project &#8211; for some reason, including this in the project file after installing MVC 4 messes things up).</li>
<li>Save the .csproj. file and [Reload] the project through the Right Click menu in Solution Explorer.</li>
</ol>
<p>The project should now load properly (if the MVC project has been the startup project for the solution, you may have to reset this as well).</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2012/02/error-loading-mvc-3-project-after-mvc-4-is-installed-or-in-vs-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Love it When Technical Book Authors Have a Sense of Humor</title>
		<link>http://ellisweb.net/2012/02/i-love-it-when-technical-book-authors-have-a-sense-of-humor/</link>
		<comments>http://ellisweb.net/2012/02/i-love-it-when-technical-book-authors-have-a-sense-of-humor/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 20:27:40 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[mvc3]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=520</guid>
		<description><![CDATA[I am going through Pro ASP.NET MVC 3 Framework by Adam Freeman and Steven Sanderson (@StevenSanderson) (Apress). Enjoying it so far &#8211; good technical writing, good level of detail mixed with useful examples of different implementation options. And most importantly, they have a good sense of humor. From Page 381 … <a href="http://ellisweb.net/2012/02/i-love-it-when-technical-book-authors-have-a-sense-of-humor/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>I am going through <a href="http://www.amazon.com/gp/product/1430234040/ref=as_li_ss_tl?ie=UTF8&amp;tag=httpellinet-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1430234040">Pro ASP.NET MVC 3 Framework</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=httpellinet-20&amp;l=as2&amp;o=1&amp;a=1430234040" alt="" width="1" height="1" border="0" /> by <a href="https://www.apress.com/index.php/author/author/view/id/1863">Adam Freeman</a> and <a href="http://blog.stevensanderson.com/">Steven Sanderson</a> (<a href="https://twitter.com/#!/stevensanderson">@StevenSanderson</a>) (<a href="http://www.apress.com/9781430234043">Apress</a>). Enjoying it so far &#8211; good technical writing, good level of detail mixed with useful examples of different implementation options.</p>
<p>And most importantly, they have a good sense of humor. From Page 381 (my highlights):</p>
<p style="text-align: center;"><a href="http://ellisweb.net/wp-content/uploads/2012/02/mvc1.jpg" rel="lightbox[mvc]" title="MVC 3 Quote"><img class="aligncenter size-medium wp-image-521" title="MVC 3 Quote" src="http://ellisweb.net/wp-content/uploads/2012/02/mvc1-300x181.jpg" alt="Quote from Pro ASP.NET MVC 3 (Sanderson &amp; Freeman), page 381" width="300" height="181" /></a></p>
<p style="text-align: left;">If you don&#8217;t want to click on the link, they are talking about best practices for url schemas using MVC, and give an example of a link to Amazon as something <em>not to do</em> (I realize the irony of my linking to Amazon above). They then include in an aside:</p>
<blockquote>
<p style="text-align: left;"><em><strong>Note</strong> To be very clear, we have only the highest respect for Amazon, who sells more of our books than everyone else combined. We know for a fact that each and every member of the Amazon team is a strikingly intelligent and beautiful person. Not one of them would be so petty as to stop selling our books over something so minor as criticism of their URL format. We love amazon. We adore Amazon. We just wish they would fix their URLs</em></p>
</blockquote>
<p><a style="line-height: 24px; font-style: normal; text-align: left;" name="rest"></a></p>
<p style="text-align: left;"><em>.</em>Another good one: The authors are talking about using MVC to create a REST API, where the same action name in a given controller can be overridden to handle HTTP Get/Post/Delete requests (page 476, my emphasis):</p>
<blockquote>
<p style="text-align: left;"><em>Now each <code>StaffMember</code> entity in our application can be uniquely addressed using a URL of the form <code>Staff/123</code>, and a client can use the <code>GET</code>, <code>POST</code>, and <code>DELETE</code> HTTP methods to perform operations on those addresses. <strong>This is called a </strong></em><strong>RESTful</strong><em><strong> API, except by people who claim to be experts in REST, who will tell you that nothing is truly </strong></em><strong>RESTful</strong><em><strong> except their own code</strong>. (We joke—sort of).</em></p>
</blockquote>
<p style="text-align: left;">Gotta love it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2012/02/i-love-it-when-technical-book-authors-have-a-sense-of-humor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crucible Code Review Wishlist</title>
		<link>http://ellisweb.net/2012/02/crucible-code-review-wishlist/</link>
		<comments>http://ellisweb.net/2012/02/crucible-code-review-wishlist/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 12:41:52 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CodeReview]]></category>
		<category><![CDATA[Crucible]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=515</guid>
		<description><![CDATA[I have been trying out Crucible Code Review software from Atlassian (halfway through the trial) with a number of teams in my department. The competition in this area is pretty sparse, and each one has its other issues: Kiln only works for Mercurial (which we may move to some day, but … <a href="http://ellisweb.net/2012/02/crucible-code-review-wishlist/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been trying out <a href="http://www.atlassian.com/software/crucible/overview">Crucible Code Review</a> software from Atlassian (halfway through the trial) with a number of teams in my department. The competition in this area is pretty sparse, and each one has its other issues:</p>
<ul>
<li><a href="http://www.fogcreek.com/kiln">Kiln</a> only works for Mercurial (which we may move to some day, but for now we are using SVN so we need a solution that works with that as also)</li>
<li><a href="http://www.reviewboard.org/">Review Board</a> seems to be very popular, but just looking at the list of the <a href="http://www.reviewboard.org/docs/codebase/dev/getting-started/">dependencies</a> gives me indigestion when considering an install on our Windows Server environment.</li>
<li><a href="http://smartbear.com/products/development-tools/code-review/">Code Collaborator</a> is way too expensive without giving much extra (50 users in Crucible = $2200, 50 named users in Code Collaborator = $24,450)</li>
<li><a href="http://codereviewtool.com/">Code Review Tool</a> doesn&#8217;t have a very professional looking site, hardly any documentation and no plugin potential and no Mercurial support</li>
<li><a href="http://www.bigfishsolutions.biz/Products/PeerReviewswithSpectare/tabid/121/Default.aspx">Specatare</a>&#8216;s and <a href="http://www.parasoft.com/jsp/technologies/code_review.jsp?itemId=325">Parasoft</a>&#8216;s websites are even sparser and gives almost no info (aside from a few screenshots) &#8211; not enough to make me spend the time trying it out.</li>
</ul>
<p>On the other hand, thus far Crucible has delivered on the main functionality: establishing a medium for easily performing code reviews. The <a href="http://www.atlassian.com/software/crucible/pricing">price</a> is very fair and there is very <a href="http://confluence.atlassian.com/display/CRUCIBLE">decent documentation</a>. We will probably go with it, just for those reasons alone.</p>
<p>That said, I have a number of issues with Crucible &#8211; posting them here in the hopes that someone from Atlassian will see this and can do something about some or all of them.<span id="more-515"></span></p>
<ol>
<li><strong>Design</strong>: The marketing website is professionally designed, from a usability perspective. The software is not. It looks like I (or someone with their head in code all day) designed it. For new users, it is just not so intuitive to use. What is the difference between Source and Projects? Where do I need to go to get things done? Where are the important items? After spending some time, we can figure it out, but a better design would go a long way. If you need some hints, just check out <a href="http://www.jetbrains.com/teamcity/">Team City</a>. They have figured this out pretty well.</li>
<li><strong>Installation</strong>: I was able to get it running on Windows Server with Sql Server as a backend, without <em>too much</em> pain (note: there was <em>some</em> pain involved). However, thus I am only able to launch it from the command line. Instructions for setting it up as a <a href="http://confluence.atlassian.com/pages/viewpage.action?pageId=179439487">Windows Service</a> did not work. If we end up purchasing a license, I will have to bite the bullet and get it working somehow. But this needs to be fixed. Both Team City and <a href="http://www.fogcreek.com/fogbugz/">Fog Creek</a> (and I am sure, many others) have figured out how to bundle the installation of a windows service into an Installation Setup routine. Please see to this (and for upgrades as well). Same with documentation relating to getting Crucible to bind to the domain name properly. I eventually figured it out, but more guidance around this could have been given (hint: HTTP bind to the IP address on port 80, set the Proxy Host to the domain name without &#8220;http://&#8221; and set the site url to the domain name with &#8220;http://&#8221;).</li>
<li><strong>Repository Administration</strong>: A lot of little things here could be changed to make this easier (again, check out Team City &#8211; they have nailed this). Off the top of my head:</li>
<ol>
<li>Why can&#8217;t I change the name of a repository after it has been created?</li>
<li>Please give me some concrete examples about how Include/Exclude paths work in a repository. I want to use these but don&#8217;t want to put in a couple of hours trying it out (especially when the only way to try it is to re-index the whole repository, something that can take a really long time).</li>
<li>Why can&#8217;t I create a new repository based off of the settings used in a different repository, or better yet, have one base repository root, from which I define other repositories based on their relative paths (like in TC)? We have one big SVN repository, and Crucible, our individual repositories are all subdirectories somewhere down from this root. Right now it is really annoying to create new repositories &#8211; this could be made less painful.</li>
</ol>
<li><strong>Workflows &amp; Permission Schemes</strong>: Bit of a learning curve here &#8211; so many options. Some more explanation and help with setting these up <a href="http://ellisweb.net/wp-content/uploads/2012/02/crucible1.jpg" rel="lightbox[515]" title="crucible permission schemes"><img class="size-medium wp-image-516 alignright" style="border-style: initial; border-color: initial;" title="crucible permission schemes" src="http://ellisweb.net/wp-content/uploads/2012/02/crucible1-300x249.jpg" alt="" width="300" height="249" /></a>would be good. Maybe more default setups available out of the box. And the one preset Permission Scheme that was given (agile) was setup by default to make the contents and reviews of all associated projects public to all users, including users who have not logged in (not so cool).</li>
<li><strong>Better Notifications</strong>: Right now it is easy for notifications to get lost in the different dashboards. I want to be able to set up a way for notifications regarding certain types of SCM updates to be elevated in prominence. For example, let me give a path or pattern match within a repository so that whenever code is committed to this path, I will get some loud notifications about these. Or when a specific user commits code to a specific project. There are so many commits, that I am not always able to review every single one &#8211; this is something to strive for, but I am  not there yet. However, there are some areas in my projects (or some users) where I always want to review every line of code that they put in. I don&#8217;t want to lose these in the haystack. Give me a way to do this better and I will be very appreciative.</li>
</ol>
<p>Looking at the market for code review software, it definitely seems like it is a third-class citizen, not getting as much attention as its bigger cousins in the realm of Continuous Integration or Bug Tracking (it is obvious even from looking at the list of different Twitter accounts used by <a href="https://twitter.com/#!/atlassian">@Atlassian</a>, or the popular tags on their <a href="http://blogs.atlassian.com/">blog</a> &#8211; Crucible or Fisheye are naught to be seen). Still, this lower status can also present an opportunity to really claim the mantle as the best in the business (and a note to competitors, existing or potential: not a high barrier to entry right now).</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2012/02/crucible-code-review-wishlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Horrible Page Design at JPost.com</title>
		<link>http://ellisweb.net/2012/02/horrible-page-design-at-jpost-com/</link>
		<comments>http://ellisweb.net/2012/02/horrible-page-design-at-jpost-com/#comments</comments>
		<pubDate>Sun, 26 Feb 2012 14:19:48 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[WebDev]]></category>
		<category><![CDATA[jpost]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[web-design]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=507</guid>
		<description><![CDATA[I just loaded up a link at jpost.com talking about how the Rami Levy supermarket chain predicts that by 2012 20% of food purchases in Israel will be online. However, when I loaded the link, it took me a minute to actually find the content. Can you see the problem … <a href="http://ellisweb.net/2012/02/horrible-page-design-at-jpost-com/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>I just loaded up a link at jpost.com talking about how the Rami Levy supermarket chain predicts that by 2012 <a href="http://www.jpost.com/Business/Globes/Article.aspx?id=258816">20% of food purchases in Israel</a> will be online. However, when I loaded the link, it took me a minute to actually find the content. Can you see the problem here?</p>
<p><a href="http://ellisweb.net/wp-content/uploads/2012/02/jpost1.jpg" rel="lightbox[jpost]" title="jpost1"><img class="aligncenter size-medium wp-image-508" title="jpost1" src="http://ellisweb.net/wp-content/uploads/2012/02/jpost1-300x278.jpg" alt="" width="300" height="278" /></a></p>
<p>To make it a little bit clearer, I have added highlights &#8211; Ads are in yellow, In-site navigation is in green, and the content is in blue. The content occupies a tiny strip down the center of the page (maybe 30-40% of the total width of the page). This is surrounded on all sides several layers:<span id="more-507"></span></p>
<p><a href="http://ellisweb.net/wp-content/uploads/2012/02/jpost2.jpg" rel="lightbox[jpost]" title="jpost2"><img class="aligncenter size-medium wp-image-510" title="jpost2" src="http://ellisweb.net/wp-content/uploads/2012/02/jpost2-300x278.jpg" alt="" width="300" height="278" /></a></p>
<ol>
<li>The first layer has a set of Ads (Yellow &#8211; all advertising the same thing) and goes around the entire perimeter, switching vertical alignment to fit the ad into a narrow width going up each side (not to mention the completely irrelevant ad for investing in Brazilian agriculture &#8211; what is that about?). These are loud and completely distract the user&#8217;s attention.</li>
<li>The next layer is a mixture of ads (Yellow) and navigation links (Blue). The ads here are either irrelevant AdSense style ads, or ads from the Jerusalem Post advertising your ability to advertise on jpost.com (I wonder what the ROI is on that).</li>
<li>The worst part though are the strips of internal navigation links going up and down either side of the page. They all relate to different subcontent areas of the site (things other than news) and each one has a very similar looking graphics. The overall affect is that the graphics make it hard to tell the difference between the different sections, and I am completely turned off from clicking here.</li>
</ol>
<p>Though these ads may add a bit of revenue in the short-term, in the long term the poor usability and design of this page will probably lead to lower traffic, shorter visits by users (in terms of both number of pages visited and overall time spent on the site) and fewer repeat visitors. It also reflects rather poorly on the professionalism of the site (and I would think that conveying an air of professionalism would be quite important in the online news-delivery market space).</p>
<p>Fixing these problems would require:</p>
<ol>
<li><strong>Rethinking the ad strategy for the site</strong>:</li>
<ul>
<li>Do you really need those vertically aligned ads surrounding the whole page? What is that Brazil ad doing all the way out there? Are those AdSense style ads actually getting clicks? The ads should not distract users from the main purpose of the site. Doing so will not get you clicks, they will only end up annoying users.</li>
</ul>
<li><strong>Smarter Navigation</strong>:</li>
<ul>
<li>The navigation links that I would find the most useful (links to other news sections) are the least pronounced and emphasized links on the whole page. Make these easier to use.</li>
<li>Where are the tags? Links to similar articles? Links to most popular articles and most emailed articles? If I saw these, I might spend more time on your site?</li>
<li>Those ads going up and down each side of the content are totally useless. How about using a well designed expanding menu that can include links to all of these areas without taking up so much room and without being such an eyesore? And if you really have to see all of those links at once, do something about the graphics.</li>
</ul>
<li><strong>Standards-Based Design</strong>:</li>
<ul>
<li>Looking at <a href="http://pastebin.com/htDE3LFK" target="_blank">the source</a> for the site, it is a big mess. Definitely not built using web standards. Lots of table-based design. I imagine that this is very hard to maintain and does not play nicely on some or all mobile platforms. And that is not even starting with <a href="http://wave.webaim.org/report?url=http%3A%2F%2Fwww.jpost.com%2FBusiness%2FGlobes%2FArticle.aspx%3Fid%3D258816&amp;js=2" target="_blank">accessibility</a>.</li>
<li>I have a fast Internet connection and I presumably located very close to the servers. Fully loading the page took about 25 seconds, and includes 37 HTML Get/Post requests, 20 separate CSS files, 104 different JS files, 119 different images &#8211; a total of around 290 separate requests. Total downloaded off of a fresh load: 2.5MB (imaging this on a slower connection). Reloading the page still took 240 requests and 19 seconds. This is just not acceptable. It is really bad.</li>
<li></li>
</ul>
</ol>
<p>(To anyone at <a href="http://jpost.com">jpost.com</a> who is reading this &#8211; I have nothing personal against you guys, and I do enjoy reading some of your content. But your site design is so poor, getting to the content is just too hard and too much of a strain on my eyes).</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2012/02/horrible-page-design-at-jpost-com/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Clearing out a Mysterious Table Lock (LCK_M_S) in Sql Server 2008</title>
		<link>http://ellisweb.net/2012/02/clearing-out-a-mysterious-table-lock-lck_m_s-in-sql-server-2008/</link>
		<comments>http://ellisweb.net/2012/02/clearing-out-a-mysterious-table-lock-lck_m_s-in-sql-server-2008/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 20:35:46 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[Sql Server]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=487</guid>
		<description><![CDATA[A user reported today that they were trying to query a table with 181 records and the output stopped at 178 and just hung there. I tried to replicate this and the same thing happened &#8211; also couldn&#8217;t run a Select (*) on the table. So I pulled up the … <a href="http://ellisweb.net/2012/02/clearing-out-a-mysterious-table-lock-lck_m_s-in-sql-server-2008/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>A user reported today that they were trying to query a table with 181 records and the output stopped at 178 and just hung there. I tried to replicate this and the same thing happened &#8211; also couldn&#8217;t run a Select (*) on the table. So I pulled up the Activity Monitor for the server and observed that there was only one query in process &#8211; the hung query. It listed the process as being suspended with a Wait Type of <code>LCK_M_S</code>. Some quick searching <a href="http://blog.sqlauthority.com/2011/02/15/sql-server-lck_m_xxx-wait-type-day-15-of-28/">told me</a> that the task was waiting to acquire a shared lock. However, it was not obvious what was locking the table. What to do?</p>
<p>After some more searching, I found two more posts that gave advice on what to do in the given scenario:</p>
<ul>
<li><a href="http://weblogs.sqlteam.com/joew/archive/2008/08/14/60687.aspx">Sql Server Locks, a Sleeping Process Still Holds Them</a></li>
<li><a href="http://blog.sqlauthority.com/2010/10/06/sql-server-quickest-way-to-identify-blocking-query-and-resolution-dirty-solution/">SQL SERVER – Quickest Way to Identify Blocking Query and Resolution – Dirty Solution</a></li>
</ul>
<p>Based on these, I did the following:</p>
<ol>
<ol>
<li>Ran <code>Exec sp_who2</code> through Sql Management Studio. This gave me a list of all current processes. There was only one open process on this database at the time, so it was the likely culprit.</li>
<li>Next, ran the code in the Sql Server Locks article above to show the process that was locking my table. Bingo &#8211; process 52.</li>
</ol>
</ol>
<pre class="brush: sql; gutter: true">USE DBNAME; GO;

DECLARE @dbid INT ; --what&#039;s the dbid for DBNAME?
SET @dbid = DB_ID() ;

DECLARE @objectid INT ; --what&#039;s objectid for our demo table?
SET @objectid = OBJECT_ID(N&#039;TABLENAME&#039;) ;

--look at locking in the DB
SELECT  resource_type
       ,resource_database_id
       ,resource_associated_entity_id
       ,request_mode
       ,request_type
       ,request_session_id
FROM    sys.dm_tran_locks
WHERE   resource_database_id = @dbid ;

--limit the results to only the offending table
SELECT  *
FROM    sys.dm_tran_locks
WHERE   resource_database_id = @dbid AND
        resource_associated_entity_id = @objectid ;</pre>
<p>After I had confirmed the identity of the process, I ran <code>Kill 52</code> to kill the offending process. Everything immediately started working again with the table.</p>
<p>(After the fact, went back through the code with my team and found the spot where someone was running <code>db.Connection.BeginTransation()</code> on a data context that already had an open transaction, causing an error: &#8220;<code>SqlConnection does not support parallel transactions</code>&#8220;. And to make things worse, this was done outside of the <code>try/catch/finally</code> structure that ensured that any open transactions would be committed. Oy.)</p>
<p>As Pinal Dave writes:</p>
<blockquote><p>As mentioned earlier, if you kill something important on your production server, there’s a great possibility that you’ll face some serious integrity issues, so I there’s no way I advise use this method. As the title goes, this is a dirty solution so you must utilize this only if you are confident.</p></blockquote>
<p>It is important to keep that in mind. But that said, this technique for identifying and killing a hung transaction can definitely come in handy. (And be sure to backup your DB and transaction logs regularly!)</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2012/02/clearing-out-a-mysterious-table-lock-lck_m_s-in-sql-server-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Surfing Helps at Work</title>
		<link>http://ellisweb.net/2011/08/web-surfing-helps-at-work/</link>
		<comments>http://ellisweb.net/2011/08/web-surfing-helps-at-work/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 17:45:29 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[fatigue]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=482</guid>
		<description><![CDATA[I have been claiming this for years. Web Surfing Helps at Work, Study Says: According to a new study, Web browsing can actually refresh tired workers and enhance their productivity, compared to other activities such as making personal calls, texts or emails, let alone working straight through with no rest … <a href="http://ellisweb.net/2011/08/web-surfing-helps-at-work/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been claiming this for years. <a href="http://online.wsj.com/article/SB10001424053111904070604576518261775512294.html">Web Surfing Helps at Work, Study Says</a>:</p>
<blockquote><p>According to a new study, Web browsing can actually refresh tired workers and enhance their productivity, compared to other activities such as making personal calls, texts or emails, let alone working straight through with no rest at all&#8230;.Because Web-surfing can aid productivity, the researchers caution employers against over-restricting workers&#8217; Web access. They recommend that managers allow time for limited personal Web browsing &#8220;since it has a salubrious impact on employees&#8217; productivity,&#8221; while limiting access to personal emails.</p></blockquote>
<p>It has happened to me many times that I am stuck on a problem and just come up with a solution. Then I spend a few minutes &#8220;wasting time&#8221; on some website and the answer comes to me. Nice to see it substantiated in a study.</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2011/08/web-surfing-helps-at-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Numeric String Sort in C#</title>
		<link>http://ellisweb.net/2011/06/numeric-string-sort-in-c/</link>
		<comments>http://ellisweb.net/2011/06/numeric-string-sort-in-c/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 07:06:42 +0000</pubDate>
		<dc:creator>Yaakov Ellis</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[icomparer]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://ellisweb.net/?p=470</guid>
		<description><![CDATA[Scenario: you have a List&#60;string&#62; collection where the contents could be alpha, numeric, or alphanumeric. If you just sort the collection using the built-in Sort() method, it will use string.CompareTo(), treating each item in the collection as a string. Thus a collection with the following values ["1", "44", "22", 4", … <a href="http://ellisweb.net/2011/06/numeric-string-sort-in-c/"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>Scenario: you have a <code>List&lt;string&gt;</code> collection where the contents could be alpha, numeric, or alphanumeric. If you just sort the collection using the built-in <code>Sort()</code> method, it will use <code>string.CompareTo()</code>, treating each item in the collection as a string. Thus a collection with the following values <code>["1", "44", "22", 4", "5"]</code> will end up being sorted as <code>["1", "22", "4", "44", "5"]</code> &#8211; even though you might want the items to be treated as numbers (in which case they would be sorted as <code>["1", "4", "5", "22", "44"]</code>.</p>
<p>The solution to this is to use a custom comparer class. I put the following together:</p>
<pre class="brush: csharp; gutter: true">public class NumericStringSort : IComparer {

    int IComparer.Compare(string a, string b) {
        decimal aDec;
        decimal bDec;
        if (decimal.TryParse(a, out aDec) &amp;&amp; decimal.TryParse(b, out bDec)) {
            return aDec.CompareTo(bDec);
        } else {
            return a.CompareTo(b);
        }
    }

    public static IComparer NumericStringSorter() {
        return (IComparer) new NumericStringSort();
    }
}</pre>
<p>As you can see, the class implements the <a href="http://msdn.microsoft.com/en-us/library/system.collections.icomparer.aspx">IComparer</a> interface. If both of the strings can be converted into decimals, then the decimal comparison is used. Otherwise the string comparison is used.</p>
<p>You can see a usage example through the following set of unit tests (as you can see, it also handles mixed alphanumeric sets gracefully, sorting all numeric items to the front of the list in numeric order, followed by all alpha entries in alphabetical order):</p>
<pre class="brush: csharp; gutter: true">[TestFixture]
public class NumericStringSortTests {

    [Test]
    public void TestNumericSort_AllNumeric() {
        List items = new List { &quot;1&quot;, &quot;44&quot;, &quot;22&quot;, &quot;4&quot;, &quot;5&quot; };
        items.Sort(NumericStringSort.NumericStringSorter());
        List expectedItems = new List { &quot;1&quot;, &quot;4&quot;, &quot;5&quot;, &quot;22&quot;, &quot;44&quot; };
        Assert.IsTrue(items.SequenceEqual(expectedItems));
    }

    [Test]
    public void TestNumericSort_MixesAlphaNumeric() {
        List items = new List { &quot;a&quot;, &quot;c&quot;, &quot;d&quot;, &quot;b&quot;, &quot;1&quot;, &quot;2&quot;, &quot;22&quot;, &quot;3&quot; };
        items.Sort(NumericStringSort.NumericStringSorter());
        List expectedItems = new List { &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;22&quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; };
        Assert.IsTrue(items.SequenceEqual(expectedItems));
    }

    [Test]
    public void TestNumericSort_AllAlpha() {
        List items = new List { &quot;a&quot;, &quot;c&quot;, &quot;d&quot;, &quot;b&quot; };
        items.Sort(NumericStringSort.NumericStringSorter());
        List expectedItems = new List { &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; };
        Assert.IsTrue(items.SequenceEqual(expectedItems));
    }
}</pre>
<p>This is something that I have needed on previous occasions &#8211; perhaps it may be of use to someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://ellisweb.net/2011/06/numeric-string-sort-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

