<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Dot Mac</title> <link>http://dotmac.rationalmind.net</link> <description>Adventures with OS X and DotNet by David Veksler</description> <lastBuildDate>Fri, 11 May 2012 15:12:52 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/dotmacblog" /><feedburner:info uri="dotmacblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>How often do you read code?</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/GVS0TyhI1vA/</link> <comments>http://dotmac.rationalmind.net/2012/05/read-more-code/#comments</comments> <pubDate>Wed, 09 May 2012 08:00:13 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=750</guid> <description>It is very possible and probably common to go through a major team development effort without spending very much time reading other people&amp;#8217;s code. It&amp;#8217;s possible to spend an entire career like that. If over 90% of the code you read is your own, how will you learn to be a better programmer?  No matter [...]</description> <content:encoded><![CDATA[<p>It is very possible and probably common to go through a major team development effort without spending very much time reading other people&#8217;s code. It&#8217;s possible to spend an entire career like that. If over 90% of the code you read is your own, how will you learn to be a better programmer?  No matter how many thousands of hours you spend programming, if you are doing only what you already know, you will not improve your skills. You must challenge yourself and sometimes <a title="Fail Early, Fail Often" href="http://www.codinghorror.com/blog/2006/05/fail-early-fail-often.html">fail</a> to improve.</p><p>How can you read other people&#8217;s code?</p><ul><li>Read your team members code</li><li>Read (&amp; <a title="Refactoring Manifesto" href="http://refactoringmanifesto.org/">refactor</a>) your old code – you probably forgot what you did already</li><li>Read books on software &amp; algorithms</li><li>Participate in open source projects</li><li>Read blogs on software</li><li>Write a programming blog</li></ul> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=GVS0TyhI1vA:bZ0QyEbinFY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=GVS0TyhI1vA:bZ0QyEbinFY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=GVS0TyhI1vA:bZ0QyEbinFY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=GVS0TyhI1vA:bZ0QyEbinFY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=GVS0TyhI1vA:bZ0QyEbinFY:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/GVS0TyhI1vA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/05/read-more-code/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/05/read-more-code/</feedburner:origLink></item> <item><title>A few useful commands for automating VS builds via batch file</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/0NDCck2ixA0/</link> <comments>http://dotmac.rationalmind.net/2012/04/commands-automating-builds/#comments</comments> <pubDate>Tue, 24 Apr 2012 08:42:03 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[code]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=744</guid> <description>(Batch files are not meant to be a substitute for CI) Getting latest from TFS: &amp;#34;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe&amp;#34; get (use /preview to preview) Getting latest from Subversion: &amp;#34;C:\Program Files (x86)\VisualSVN Server\bin\svn.exe&amp;#34; update &amp;#34;F:\web\Beta&amp;#34; Building a Visual Studio solution via MSBuild: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe D:\Mises\MisesWeb.sln /p:configuration=&amp;#34;Debug&amp;#34; Checking whether the build succeded: if %errorlevel% neq 0 [...]</description> <content:encoded><![CDATA[<p><em>(Batch files are not meant to be a substitute for <a title="Setting up continuous integration with TFS | Dot Mac" href="http://dotmac.rationalmind.net/2011/03/continuous-integration-with-tfs/">CI</a>)</em></p><p>Getting latest from TFS:</p><div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">&quot;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe&quot; get</pre></div></div><p>(use /preview to preview)</p><p>Getting latest from Subversion:</p><div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">&quot;C:\Program Files (x86)\VisualSVN Server\bin\svn.exe&quot; update &quot;F:\web\Beta&quot;</pre></div></div><p>Building a Visual Studio solution via MSBuild:</p><div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe D:\Mises\MisesWeb.sln /p:configuration=&quot;Debug&quot;</pre></div></div><p>Checking whether the build succeded:</p><div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">if %errorlevel% neq 0 exit /b %errorlevel%
REM BUILD OK, GO TO NEXT STEP</pre></div></div><p>Copying build output:</p><div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">xcopy F:\web\Beta\MisesWeb\bin\* F:\web\Mises\bin\ /Y
REM /Y don’t prompt for overwrite
REM /S recursive
REM /Z restartable mode
REM /D only copy files newer than those at destination
REM More: http://www.computerhope.com/xcopyhlp.htm</pre></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=0NDCck2ixA0:B6ZTXaIk8xk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=0NDCck2ixA0:B6ZTXaIk8xk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=0NDCck2ixA0:B6ZTXaIk8xk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=0NDCck2ixA0:B6ZTXaIk8xk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=0NDCck2ixA0:B6ZTXaIk8xk:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/0NDCck2ixA0" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/04/commands-automating-builds/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/04/commands-automating-builds/</feedburner:origLink></item> <item><title>Why fix bugs with unit tests?</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/96o2ZUtF97I/</link> <comments>http://dotmac.rationalmind.net/2012/04/fixing-bugs-unit-tests/#comments</comments> <pubDate>Tue, 10 Apr 2012 10:12:01 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=701</guid> <description>I know this is nothing new, but I will share my perspective anyway: How I fix bugs with unit tests: Write a unit test that reproduces the bug so the test fails Fix the bug so the unit test passes Send a link with both to the bug submitter Why I like it: Saves time [...]</description> <content:encoded><![CDATA[<p>I know this is <a href="http://www.grumpydev.com/2010/03/09/automated-unit-testing-its-not-just-for-tdd-its-for-bug-fixing-too/">nothing new</a>, but I will share my perspective anyway:</p><p><strong>How I fix bugs with unit tests:</strong></p><ol><li>Write a unit test that reproduces the bug so the test fails</li><li>Fix the bug so the unit test passes</li><li>Send <a title="  WebSVN            - MisesWeb              - Path Comparison                 - / Rev 2155 and / Rev 2157 " href="http://code.mises.com/svn/comp.php?repname=MisesWeb&amp;compare[]=/@2155&amp;compare[]=/@2157">a link with both</a> to the bug submitter</li></ol><p><strong>Why I like it:</strong></p><ul><li>Saves time debugging &#8211; just run the unit test instead of recreating the bug scenario every time</li><li>Creates a simple yes/no criteria to verify whether the bug is fixed</li><li>Regression can be detected quickly in the future</li><li>Better communication: bug is documented for other developers looking at this code</li><li>If you don’t have time to fix the bug immediately, write a failing test.  Then you or someone else can fix the bug later</li><li>An organic way to increase code coverage for existing code</li></ul><p><img class=" wp-image-737 alignnone" title="unit tests" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/unit-tests.png" alt="" width="594" height="269" /></p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=96o2ZUtF97I:HZ1_S_oWHyc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=96o2ZUtF97I:HZ1_S_oWHyc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=96o2ZUtF97I:HZ1_S_oWHyc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=96o2ZUtF97I:HZ1_S_oWHyc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=96o2ZUtF97I:HZ1_S_oWHyc:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/96o2ZUtF97I" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/04/fixing-bugs-unit-tests/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/04/fixing-bugs-unit-tests/</feedburner:origLink></item> <item><title>Project highlight: Mises.org Multimedia CMS</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/-x3MktIvakQ/</link> <comments>http://dotmac.rationalmind.net/2012/04/project-highlight-mises-org-multimedia-cms/#comments</comments> <pubDate>Tue, 10 Apr 2012 08:58:53 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=704</guid> <description>In February, I did a high-level review of the Mises.org CMS admin UI.  Today I want to highlight both the public and private parts a part of it: the multimedia CMS. The Mises.org Media Management System is part of the Mises.org open source project.  It was started around 2004, and evolved slowly from there, with [...]</description> <content:encoded><![CDATA[<p>In February, I did a high-level review <a href="http://blog.mises.org/21218/tech-note-an-inside-look-at-the-mises-org-cms/">of the Mises.org CMS admin UI</a>.  Today I want to highlight both the public and private parts a part of it: the multimedia CMS.</p><p>The <a href="http://mises.org/media">Mises.org Media</a> Management System is part of the <a href="http://wiki.mises.org/wiki/MisesWiki:Development">Mises.org open source project</a>.  It was started around 2004, and evolved slowly from there, with the latest release around February.  It is used to manage over 6400 audio/visual files.  Total document size is 275GB.  Monthly bandwidth exceeds 10 terabytes.</p><p>The front-end features:</p><ul><li>Dynamic, AJAX-based interface build with JQuery UI</li><li>Advanced search and browsing based navigation</li><li>Detects the best media player for the current browser: HTML5, Flash, or Silverlight</li><li>Extensive RSS support.  Integrates with iTunes and iTunes University with iTunes-specific feed extensions</li><li>Optimized for scalable deployment, CDN&#8217;s, SEO, external embedding, and social network sharing</li></ul><p>The media asset management includes:</p><ul><li>Support for internal and externally hosted content: MP4, MP3, WMA, streaming video, &amp; YouTube</li><li>Integrated drag and drop uploader: management interface allows uploading multi-gigabyte media files straight from the browser us</li><li>Meta data parsing: reads full meta information such as embedded thumbnails, duration, keywords, description, etc.  Able to process all popular audio/video formats as well as PDF.</li><li>Catalog builder:  organizes files in a human-friendly format: http://library.mises.org/media/</li><li>Define arbitrary hierarchical categories</li><li>Versioning and multi-volume support.</li></ul><p>Architecture:</p><ul><li>Backend: ASP.Net 4.0, MVC3 (frontend) &amp; Web Forms (backend), Entity Framework, and SQL Server</li><li>Frontend: JQuery UI, HTML5,</li></ul><p>How to get it for your site:</p><ul><li>It&#8217;s part of the Mises.org CMS</li><li>See <a href="http://wiki.mises.org/wiki/MisesWiki:Development">http://wiki.mises.org/wiki/MisesWiki:Development</a> for details</li></ul><p><strong>Screenshots:</strong></p><p><span id="more-704"></span></p><ul>Filtering UI:</ul><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Image" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image_thumb.png" alt="Image" width="575" height="484" border="0" /></a></p><p>Media list:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Image [1]" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-1_thumb.png" alt="Image [1]" width="323" height="484" border="0" /></a></p><p>Light box popover players:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/image1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/image_thumb1.png" alt="image" width="479" height="484" border="0" /></a></p><p>Media detail:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Image [2]" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-2_thumb.png" alt="Image [2]" width="496" height="484" border="0" /></a></p><p>Category browse UI:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-3.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Image [3]" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-3_thumb.png" alt="Image [3]" width="347" height="484" border="0" /></a></p><p>Category detail:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-4.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Image [4]" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-4_thumb.png" alt="Image [4]" width="317" height="484" border="0" /></a></p><p>RSS feed:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-5.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Image [5]" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-5_thumb.png" alt="Image [5]" width="446" height="484" border="0" /></a></p><p>Admin UI – detail page:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-6.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Image [6]" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-6_thumb.png" alt="Image [6]" width="374" height="484" border="0" /></a></p><p>Alternative UI:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/image2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/image_thumb2.png" alt="image" width="487" height="484" border="0" /></a></p><p>File system storage:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-7.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Image [7]" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/Image-7_thumb.png" alt="Image [7]" width="644" height="212" border="0" /></a></p><p>iTunes U interface:</p><p><a href="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/04/image_thumb.png" alt="image" width="644" height="467" border="0" /></a></p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=-x3MktIvakQ:LK_Kg0Ls6vg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=-x3MktIvakQ:LK_Kg0Ls6vg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=-x3MktIvakQ:LK_Kg0Ls6vg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=-x3MktIvakQ:LK_Kg0Ls6vg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=-x3MktIvakQ:LK_Kg0Ls6vg:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/-x3MktIvakQ" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/04/project-highlight-mises-org-multimedia-cms/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/04/project-highlight-mises-org-multimedia-cms/</feedburner:origLink></item> <item><title>Tips for adding optional SSL support</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/wyM5hZPdgZg/</link> <comments>http://dotmac.rationalmind.net/2012/03/tips-for-adding-optional-ssl-support/#comments</comments> <pubDate>Mon, 26 Mar 2012 07:03:04 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[HTTPS]]></category> <category><![CDATA[schemeless protocol URIs]]></category> <category><![CDATA[SSL]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=669</guid> <description>I am excited by the growing popularity of the HTTPS Everywhere plugin. I became aware of it recently when users wrote me to complain that some part of Mises.org did not work over SSL. It turns out that our store software redirects visitors to the official hostname, so going to https://mises.org/store would redirect to http://mises.org/store, [...]</description> <content:encoded><![CDATA[<p>I am excited by the growing popularity of the <a href="https://www.eff.org/https-everywhere">HTTPS Everywhere</a> plugin. I became aware of it recently when users wrote me to complain that some part of Mises.org did not work over SSL. It turns out that our store<br /> software redirects visitors to the official hostname, so going to https://mises.org/store would redirect to http://mises.org/store, which HTTPS Everywhere would redirect back to https://mises.org/store, and so on. I decided to fix this and also to fix the &#8220;this page includes other resources which are not secure&#8221; warning.</p><p><strong>How I implemented automatic SSL switching:</strong></p><ul><li>SSL proxy: We use <a href="http://blog.cloudflare.com/easiest-ssl-ever-now-included-automatically-w">CloudFlare </a>as an SSL proxy. Even though we already had SSL configured on our Windows server, CloudFlare makes it easy to share SSL certificates between Windows and Linux servers, which is otherwise quite tricky. But it&#8217;s also great if your web server does not have SSL support.</li><li>Relative (scheme-less) Urls: <a href="http://stackoverflow.com/questions/550038/is-it-valid-to-replace-http-with-in-a-script-src-http">I removed the scheme from all our resources</a>, so they look like <em>&lt;img <strong>src=&#8221;//</strong>images.mises.org/Theme/images/bf_lvmi.png&#8221; alt=&#8221;" /&gt;  </em>We are transitioning to scheme-less URLs for everything.  It allows users to choose HTTPS even if your site is served over HTTP by default.</li><li>Request.Url.Scheme: I used to append the URL scheme used by the request when I was not sure if the client (rss reader, email, templates etc) would support scheme-less URL&#8217;s. But this has the disadvantage of not working with cached pages. So far, it seems that scheme-less URL&#8217;s are safe for all popular web clients.</li></ul><p>I don&#8217;t think there was ever much sense in having the <em>http://www.</em> prefix in URI&#8217;s, so getting it down to just <em>//</em> is very nice.</p><p><strong>How to find non-SSL resources on a page:</strong></p><p>One frustrating debugging step for me used to be finding the http resources within a page. I would have to search for http resources in the source code. If the page references scripts that load other resources, this could get complicated. Fortunately, Google Chrome offers a simple solution &#8211; the network inspector can export information to a searchable JSON file:</p><ol><li>Open a new private browsing session in chrome (to disable your extensions, which may inject non-SSL links within the page)</li><li>Alt-click and &#8220;Inspect element&#8221;</li><li>Go to the Network tab</li><li>Open the URL to inspect</li><li>Right click inside the Network tab and &#8220;Copy all as HAR&#8221;</li><li>Paste the JSON into notepad, and search for http:// resources</li></ol><p>One last note: If you use third-party widgets or services which do not fully support SSL, please take the time to contact the vendor and request that they add full support for SSL.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=wyM5hZPdgZg:PsNmyG67vcs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=wyM5hZPdgZg:PsNmyG67vcs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=wyM5hZPdgZg:PsNmyG67vcs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=wyM5hZPdgZg:PsNmyG67vcs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=wyM5hZPdgZg:PsNmyG67vcs:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/wyM5hZPdgZg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/03/tips-for-adding-optional-ssl-support/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/03/tips-for-adding-optional-ssl-support/</feedburner:origLink></item> <item><title>The HD revolution is coming to the web – update your creative process today</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/L7HyP92c1ts/</link> <comments>http://dotmac.rationalmind.net/2012/03/the-hd-revolution-is-coming-to-the-web-update-your-creative-process-today/#comments</comments> <pubDate>Thu, 22 Mar 2012 11:13:37 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[News]]></category> <category><![CDATA[high dpi]]></category> <category><![CDATA[high resolution]]></category> <category><![CDATA[images]]></category> <category><![CDATA[retina]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=655</guid> <description>You&amp;#8217;ve probably heard about the “retina” displays on the iPhone 4/4S and the new iPad. These devices have double the display density of most other devices. The high-DPI displays of these devices are unique, but they won’t be for long. Most analysts are predicting that within a few months, Apple will introduce the same “retina” displays [...]</description> <content:encoded><![CDATA[<p>You&#8217;ve probably heard about the “<a href="https://www.apple.com/ipad/features/">retina</a>” displays on the iPhone 4/4S and the new iPad. These devices have double the display density of most other devices. The high-DPI displays of these devices are unique, but they won’t be for long. Most analysts <a href="http://arstechnica.com/apple/news/2012/03/signs-in-mountain-lion-point-to-retina-display-coming-this-summer.ars">are predicting</a> that within a few months, Apple will introduce the same “retina” displays for their laptops as well. Once display manufacturers like Samsung and Sharp ramp up production, the rest of the industry will very likely follow.</p><p>In other words, we are facing the equivalent of the HD TV transition for personal computing. It will come to smartphones, tablets and then desktops. Speculating about the timeline of the transition is of course risky, but I suspect that there will be many high-DPI devices being sold by the end of 2012 – <a href="http://techcrunch.com/2012/03/21/windows-8-is-retina-ready/">not limited to Apple</a>. Certainly within a few years, we can expect the rest of the industry to follow. Because websites and applications can display content appropriate to the viewer’s hardware, they can gain a competitive advantage without imposing costs on non-HD visitors.</p><p>Currently <a href="http://bits.blogs.nytimes.com/2012/03/21/ipad-web-retina/?hp">very few websites and desktop applications take advantage of the high-DPI displays</a>. While Apple has demonstrated how it can be done, the specific browser-side implementation may change. For most websites and applications it’s probably too early to invest resources in the transition. However, it is not too early to start updating your creative process to include high-definition graphics and video.  If you decide to upgrade your website six months or a year from now, it will be easier to use pre-prepared HD graphics than have to re-create them from the original PSD files (which may not be easily available.) <a href="http://cloudfour.com/how-apple-com-will-serve-retina-images-to-new-ipads/">Apple’s implementation</a> makes it possible to transition to high-DPI by adding a single JavaScript file to your website – without increasing the page size for current users.</p><p>What this means in practical terms:</p><ul><li>You should start preparing double resolution graphics and video for new content, especially important elements like headers &amp; front page content.<ul><li>Example: <span style="text-decoration: underline;"><a href="http://images.website.org/header.png">http://images.website.org/header.png</a></span> should be complemented by <span style="text-decoration: underline;"><a href="http://images.website.org/header_2x.png">http://images.website.org/header<strong>_2x</strong>.png</a></span></li></ul></li><li>If you target iPad or iPhone users, you should already be updating your website’s technology to support HD graphics &amp; video.</li><li>When initiating projects going forward, you should give increasing consideration to adding support for high-DPI resolutions.</li></ul> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=L7HyP92c1ts:rj5f5uM--mg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=L7HyP92c1ts:rj5f5uM--mg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=L7HyP92c1ts:rj5f5uM--mg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=L7HyP92c1ts:rj5f5uM--mg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=L7HyP92c1ts:rj5f5uM--mg:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/L7HyP92c1ts" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/03/the-hd-revolution-is-coming-to-the-web-update-your-creative-process-today/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/03/the-hd-revolution-is-coming-to-the-web-update-your-creative-process-today/</feedburner:origLink></item> <item><title>Success factors for quality software development teams</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/zyipvUbh-EU/</link> <comments>http://dotmac.rationalmind.net/2012/03/quality-software-development-teams/#comments</comments> <pubDate>Mon, 19 Mar 2012 11:09:13 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[software development]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=642</guid> <description>Some notes from a short presentation I gave on building quality software development teams: Effective teams start with good people. A business is not a charity and cannot wait for people to grow into the role required of them. Intelligence and inherent motivation cannot be taught. These and many other aspects must be screened for. [...]</description> <content:encoded><![CDATA[<div>Some notes from a short presentation I gave on building quality software development teams:</div><div></div><div></div><hr /><div><ul><li>Effective teams start with good people. A business is not a charity and cannot wait for people to grow into the role required of them. Intelligence and inherent motivation cannot be taught. These and many other aspects must be screened for.</li><li>But <a href="http://dotmac.rationalmind.net/2012/03/demonstrated-technical-depth/">hiring good people </a>is not enough.  Getting the most of a development team requires certain environmental factors. I have organized them into three areas:  internal/motivational, structural/organizational, and interpersonal/communication. Sometimes they will conflict with practical considerations, but we ought to take them consideration whenever possible.</li></ul></div><div></div><hr /><div><strong>Motivation</strong></div><ul><li><em>Instill a sense of professional pride</em><ul><li>Developers should take part in the technical design</li><li>Provide interesting, challenging work</li><li>Developers should own the technical solution</li><li>Technical architects should be part of the development team</li></ul></li><li><em>Respect the developer time</em><ul><li>Provide a quiet environment dedicated to development work</li><li>Buy the best tools for the jobs &#8211; powerful computers, large monitors, etc.</li></ul></li><li><em>Reward learning and exploration</em><ul><li>Take (reasonable) risks with new technologies</li><li>Schedule time for self-education and information sharing</li></ul></li><li><em>Create a sense of project ownership</em><ul><li>Delegation &#8220;ownership&#8221; of functional parts to individual people</li><li>Assign developers responsibility for follow-up maintenance (don&#8217;t just hand it off to a maintenance team)</li></ul></li></ul><div><strong>Structure</strong></div><ul><li><em>Hold people accountable for their work:</em><ul><li>Use a work unit tracking system (TFS, etc)</li><li>Make task status publicly visible</li><li>Hold daily stand ups (Scrum)</li><li>Consider a public scrum board</li><li>Provide clear project requirements</li><li>Lean development approach<ul><li>No time-wasting tasks (useless documentation)</li><li>Isolate developers from unrelated tasks (no business interruptions)</li></ul></li></ul></li><li><em>Hold high expectations</em><ul><li>Monitor quality of work with code reviews</li><li>Regular training &amp; information sharing sessions</li><li>Consequences for bad work</li></ul><div></div></li><li><em>Set well defined deadlines</em><ul><li>Don&#8217;t set arbitrary deadlines, but all work should have a deadline</li><li>Developers should have input on deadlines for their work units</li></ul></li></ul><div><strong>Team Communication</strong></div><ul><li><em>Instill a sense of collective ownership of the project</em><ul><li>Hold architectural education sessions</li></ul></li><li><em>High-bandwidth communications</em><ul><li>Entire team should work in physical proximity</li></ul></li><li><em>Make quality visible</em><ul><li>Use continuous integration and automated testing to provide immediate feedback of quality</li><li>Developers should fix their own bugs</li><li>Track quality over time</li></ul></li><li><em>Explicit mentor roles</em></li></ul><ul><li>Mentor roles should be explicitly defined</li><li>Mentoring time should be scheduled into the project</li></ul><p>&nbsp;</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=zyipvUbh-EU:YohVsHlL6zg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=zyipvUbh-EU:YohVsHlL6zg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=zyipvUbh-EU:YohVsHlL6zg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=zyipvUbh-EU:YohVsHlL6zg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=zyipvUbh-EU:YohVsHlL6zg:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/zyipvUbh-EU" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/03/quality-software-development-teams/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/03/quality-software-development-teams/</feedburner:origLink></item> <item><title>Mises.org CMS</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/JZk6-uSNNYA/</link> <comments>http://dotmac.rationalmind.net/2012/03/mises-org-cms/#comments</comments> <pubDate>Sun, 04 Mar 2012 08:23:45 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[News]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=638</guid> <description>From the Mises Blog: A look at the Mises.org CMS I&amp;#8217;ve maintained for the last 7 years.</description> <content:encoded><![CDATA[<p>From the Mises Blog:<br /> <a href="http://blog.mises.org/21218/tech-note-an-inside-look-at-the-mises-org-cms/">A look at the Mises.org CMS</a> I&#8217;ve maintained for the last 7 years.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=JZk6-uSNNYA:Wa6knD-ERnQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=JZk6-uSNNYA:Wa6knD-ERnQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=JZk6-uSNNYA:Wa6knD-ERnQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=JZk6-uSNNYA:Wa6knD-ERnQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=JZk6-uSNNYA:Wa6knD-ERnQ:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/JZk6-uSNNYA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/03/mises-org-cms/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/03/mises-org-cms/</feedburner:origLink></item> <item><title>Three jQuery-based frameworks for a rich UI</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/ArZYtXi8R8s/</link> <comments>http://dotmac.rationalmind.net/2012/02/three-jquery-based-frameworks-for-a-rich-ui/#comments</comments> <pubDate>Tue, 21 Feb 2012 04:08:49 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[reviews]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[jQuery UI]]></category> <category><![CDATA[Kendo UI]]></category> <category><![CDATA[Telerik ASP.Net MVC]]></category> <category><![CDATA[Wijmo]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=618</guid> <description>After spending several months refactoring a large ASP.Net MVC application for performance, I became intimately aware of certain fundamental limitations of the server-side UI approach and began looking into pure client-side UI frameworks as an alternative. Having decided on jQuery as the foundation, I’ve narrowed down the possibilities to three candidates: jQuery UI, Kendo UI and [...]</description> <content:encoded><![CDATA[<p>After spending several months refactoring a large ASP.Net MVC application for performance, I became intimately aware of certain fundamental limitations of the server-side UI approach and began looking into pure client-side UI frameworks as an alternative. Having decided on <a href="http://jquery.com/">jQuery</a> as the foundation, I’ve narrowed down the possibilities to three candidates: jQuery UI, Kendo UI and Wijmo.  Here are some of my conclusions:</p><p><strong> Why choose pure-client side?</strong></p><p>My current development approach is <a href="http://www.asp.net/mvc/mvc3">MVC 3</a> “enriched” with the <a href="http://www.telerik.com/products/aspnet-mvc.aspx">Telerik Extensions for ASP.Net MVC</a>.   ASP.Net MVC <a href="http://msdn.microsoft.com/en-us/library/dd410596.aspx">HtmlHelper</a>s are much simpler than the traditional .Net drag-and-drop Web Forms approach in that they simply return strings, without the baggage of ViewState management or a complex page event lifecycle.    This provides certain advantages: lightweight rendering, granular state management and simple AJAX – along with auto-generated HTML and IntelliSense.  But any developer-friendly server-side technology also has costs: server-processing time affects performance and flexibility, and server-side controls prevent you from having a true rich-client design which fully separates the user interface and business logic.</p><p>Presenting a new alternative to server-side MVC controls, are several client-side UI frameworks.  Much of the rich client movement comes from the open-source world with frameworks like <a href="http://sproutcore.com/">SproutCore</a>/Amber.js, <a href="http://developer.yahoo.com/yui/">YUI</a> and <a href="http://cappuccino.org/">Cappuccino</a>.  But now that Microsoft <a href="http://msdn.microsoft.com/library/hh673549.aspx">is </a><a href="http://techcrunch.com/2010/04/30/microsoft-html5/">embracing </a><a href="http://www.microsoft.com/presspass/press/2011/apr11/04-12mix1pr.mspx">HTML5</a>, the two heavyweight .Net tool vendors are getting on-board as well.</p><p>There are three competing HTML5 UI/Ajax UI frameworks I want to mention.  They are pure-JavaScript libraries built on top of jQuery.</p><p><a href="http://jqueryui.com/"><strong>jQuery UI</strong></a><strong>:  </strong></p><p>jQuery UI provides a bunch of client-side UI widgets, &#8220;interactions&#8221; and effects.   It is semi-sponsored by industry bigwigs which include such as Microsoft and Adobe.</p><p><strong>Pros</strong>: From the same team which brought you jQuery.  There are many plug-ins for missing functionality.  Theming is very nice.  (Btw, <a href="http://juiceui.com/">Juice UI</a> is server-side jQueryUI for ASP.Net WebForms &#8211; perhaps an intermediate solution?)</p><p><strong>Cons</strong>: Key components are not included with the framework, such as Grid, Template, DataSource/DataView, Validation.</p><p><strong>Cost: </strong>Free for commercial and non-commercial use:<strong> </strong>MIT and GPL licenses</p><p><strong> </strong><a href="http://www.kendoui.com/"><strong>Telerik Kendo UI</strong></a><strong>:</strong></p><p>Kendo UI is a fork of Telerik ASP.Net MVC framework.  The first version of Kendo UI has just been released, but the client-framework is based on the two-year old Telerik MVC framework.</p><p><strong>Pros</strong>: Complete feature set, with 16 widgets (vs. 8 for jQuery UI), including everything missing from jQuery UI; Visualization; Mobile versions of widgets;</p><p><strong>Cons</strong>: Just released late 2011; is not jQuery UI;</p><p><strong>Cost: </strong>GPLv3 and Commercial licenses; closed-source code requires purchasing the commercial license which starts at $399/1yr</p><p><a href="http://wijmo.com/"><strong>ComponentOne Wijmo</strong></a><strong>:</strong></p><p>ComponentOne is Telerik’s arch competitor.  Their client-side offering is an &#8220;extension&#8221; of jQuery UI, and so relies on both jQuery and jQuery UI.  It is more mature (version 2.0) and they are sponsoring jQuery UI development.</p><p><strong>Pros</strong>: mature; sponsor of jQuery UI development; works well (shares theming) with jQuery UI;</p><p><strong>Cons</strong>: Free version comes with a subset of controls; replaces existing jQuery UI widgets</p><p><strong>Cost: </strong>“Open” version with 18 widgets is free<strong> </strong>(MIT/ GPL v2).  “Complete” version with Grids, Charts, Forms, etc is $299-499</p><p>I’m still getting started with this approach, so I’m not sure which framework is best.  They are all good alternatives to a server-side framework (whether Web Forms or MVC).  They all have a learning curve and are probably less efficient from a developer perspective – especially one used to writing server-side controls.  On the other hand, they enable a different development methodology (isolation of UI and the service stack) which may be more efficient overall and better for performance and scalability.</p><p>My tentative suggestions:</p><ul><li> jQuery UI for open-source, small projects, low budgets, simple or non-form heavy UI, and minimal support or learning-curve availability</li><li>Kendo UI to leverage Telerik MVC expertise and maintain compatibility with MVC</li><li>Wijmo when a rich UI is needed as well as compatibility with JQuery UI or the open-source world</li></ul> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=ArZYtXi8R8s:Wgsnq4uhdyk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=ArZYtXi8R8s:Wgsnq4uhdyk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=ArZYtXi8R8s:Wgsnq4uhdyk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=ArZYtXi8R8s:Wgsnq4uhdyk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=ArZYtXi8R8s:Wgsnq4uhdyk:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/ArZYtXi8R8s" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/02/three-jquery-based-frameworks-for-a-rich-ui/feed/</wfw:commentRss> <slash:comments>3</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/02/three-jquery-based-frameworks-for-a-rich-ui/</feedburner:origLink></item> <item><title>Google Search Dashboard Widget</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/2-7vp2jGqh0/</link> <comments>http://dotmac.rationalmind.net/2012/02/google-search-dashboard-widget/#comments</comments> <pubDate>Mon, 13 Feb 2012 12:28:15 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[os x dashboard]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=611</guid> <description>Here is a Google search widget for the OS X Dashboard that doesn&amp;#8217;t suck &amp;#8212; or at least sucks less than what I was able to find. Google.wdgt Is it lame that I am posting a dashboard widget in 2012 when they have been totally abandoned by Apple?  Maybe, but I think it&amp;#8217;s lame that [...]</description> <content:encoded><![CDATA[<p><img class="size-full wp-image-613 alignright" title="Screen Shot 2012-02-13 at 8.19.09 PM" src="http://dotmac.rationalmind.net/wp-content/uploads/2012/02/Screen-Shot-2012-02-13-at-8.19.09-PM.png" alt="" width="317" height="38" /></p><p>Here is a Google search widget for the OS X Dashboard that doesn&#8217;t suck &#8212; or at least sucks less than what I was able to find.</p><p><a href="http://dotmac.rationalmind.net/2012/02/google-search-dashboard-widget/google-wdgt/" rel="attachment wp-att-614">Google.wdgt</a></p><p>Is it lame that I am posting a dashboard widget in 2012 when they have been totally abandoned by Apple?  Maybe, but I think it&#8217;s lame that Apple has <a href="http://www.apple.com/downloads/dashboard/">abandoned dashboard</a>, as I still use it every day.  Or is there some announcement that I missed?</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=2-7vp2jGqh0:ycQ5pH9M-I0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=2-7vp2jGqh0:ycQ5pH9M-I0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=2-7vp2jGqh0:ycQ5pH9M-I0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=2-7vp2jGqh0:ycQ5pH9M-I0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=2-7vp2jGqh0:ycQ5pH9M-I0:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/2-7vp2jGqh0" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/02/google-search-dashboard-widget/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/02/google-search-dashboard-widget/</feedburner:origLink></item> <item><title>Four tips for more effective web design projects</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/kzUV6CLnnp8/</link> <comments>http://dotmac.rationalmind.net/2012/02/four-tips-for-more-effective-web-design-projects/#comments</comments> <pubDate>Thu, 09 Feb 2012 10:53:29 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[tips]]></category> <category><![CDATA[design]]></category> <category><![CDATA[web design]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=599</guid> <description>I want to share some strategies for maximizing the productivity and effectiveness of  web design projects.  I&amp;#8217;ve used them when the project has a large scope but minimal budget for a professional design team, such as non-profit organizations. 1: Visualize your users with analytics, personas, and user stories The most important consideration in web design [...]</description> <content:encoded><![CDATA[<p>I want to share some strategies for maximizing the productivity and effectiveness of  web design projects.  I&#8217;ve used them when the project has a large scope but minimal budget for a professional design team, such as non-profit organizations.</p><p><strong>1: Visualize your users with analytics, personas, and user stories</strong></p><p>The most important consideration in web design is to meet the needs of your users. There are two aspects to this:</p><p>First, collect statistical data on the demographics and usage patterns of existing users. Use web analytics, (GA), in-page analytics (GA events, <a href="http://www.crazyegg.com/">crazyegg</a>) to understand exactly how users use the site, what content is popular, and how that relates to revenue goals.  There is no need to rely on hunches and guesses when the relevant information is easily available.</p><p>Second: visualize the kind of customers you have and want to have with <a href="http://en.wikipedia.org/wiki/Persona_(marketing)">personas</a> and <a href="http://en.wikipedia.org/wiki/User_story">user stories</a>. Understand their goals and visualize the best way to meet them.</p><p><strong>2: Steal ideas from the best</strong></p><p>Web design consists mostly of weaving together design patterns from other projects. Coming up with entirely new design paradigms is very rare, difficult and risky. With that in mind, how can we choose the best design patters for a projects? By systematically borrowing from other successful designs.</p><p>One of the nice things about web development is that it is much easier to copy successful designs than in other fields. So why not pick the very best websites on the web? There are many websites which have spent millions on market research and high-end design firms. I systematically research successful designs and borrow the best elements from each. Many people make the mistake of only looking at their competition for inspiration.  But looking just like the competition won’t inspire users and limits you to a very narrow sample.</p><p>Here are three ways to find sources for inspiration:</p><ul><li>Look for winners of <a href="http://www.webbyawards.com/">web design awards</a></li><li>Frequent web design <a href="http://www.alistapart.com/">blogs</a> &amp; <a href="http://www.smashingmagazine.com/">magazines</a></li><li>The easiest way: go straight for the websites with the biggest design budgets.</li></ul><p>For #3, I sometimes use Wikipedia as a resource to find proxies for design budgets and just go down the list. For example, I use the <a href="http://en.wikipedia.org/wiki/List_of_wealthiest_charitable_foundations">list of the wealthiest charitable foundations</a> or the <a href="http://en.wikipedia.org/wiki/List_of_corporations_by_market_capitalization">largest market caps</a>.  I go straight down the list and note the designs I like.<br /> For example, #5 – the Ford Foundation has a very effective design.  The useful information we can gather goes far beyond visual elements.  By researching their site, press releases and job ads, I was quickly able to identify their technology platform, content management system, the person in charge of their information technology (technical people at non-profits are often willing to share expertise) and some of the contractors they hired to work on it.  The cross-section of people visiting the Ford Foundation and your site is likely to be very small, so you can borrow more liberally than you could from a competitor.</p><p><strong>3: Develop a design language</strong></p><p>A &#8220;<a href="http://en.wikipedia.org/wiki/Design_language">design language</a>&#8221; is a set of visual concepts which we can use as building blocks for a web design. A design language helps us share ideas visually and then create consistent look and feel for the site, even if multiple people or multiple iterations are involved. A coherent design pattern is very important for a site. I suggest something like a Google Docs document with screenshots of elements from other sites and mockups. Eventually we can weed it down to unique elements representing key building blocks: header, menu, tabular data, form, product list, etc.</p><p>A design language is also important for controlling costs, as it is cheaper to pay a designer to create a reusable set of elements than to pay them to create each page from scratch.</p><p><strong>4: Aim for the web technologies of the future</strong></p><p>The lifetime of the average web design is about three years, though many last much longer. Three years is a long time in web design &#8211; paradigms come and go very quickly, as does the need to respond to competitors. That&#8217;s why it&#8217;s important to find the right balance between targeting emerging technologies while controlling risk. For example, most people don&#8217;t have smartphones with full web browsers, but they are likely to in a year or two. It thus makes more sense to invest in full-featured mobile sites and not the last-generation WAP version. At the same time, we don&#8217;t know if the Apple, Android, or Windows Phone platform will be most popular in the future, so it&#8217;s best to build mobile web versions than native apps in today&#8217;s hottest platform.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=kzUV6CLnnp8:irFIqf9YARs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=kzUV6CLnnp8:irFIqf9YARs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=kzUV6CLnnp8:irFIqf9YARs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=kzUV6CLnnp8:irFIqf9YARs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=kzUV6CLnnp8:irFIqf9YARs:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/kzUV6CLnnp8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/02/four-tips-for-more-effective-web-design-projects/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/02/four-tips-for-more-effective-web-design-projects/</feedburner:origLink></item> <item><title>Name this blog!</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/13DK835a9qE/</link> <comments>http://dotmac.rationalmind.net/2012/02/help-me-choose-a-new-title-for-this-blog/#comments</comments> <pubDate>Wed, 01 Feb 2012 08:58:16 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=589</guid> <description>It&amp;#8217;s time to re-launch this blog with new branding that better reflects my ambition as aspiring IT guru.  Help me choose a title from the poll (thanks S/O) or suggest your own.</description> <content:encoded><![CDATA[<p>It&#8217;s time to re-launch this blog with new branding that better reflects my ambition as aspiring IT guru.  Help me choose a title from the poll (thanks <a href="http://stackoverflow.com/questions/2349378/new-programming-jargon-you-coined">S/O</a>) or suggest your own.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=13DK835a9qE:Dpm1Yu27L18:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=13DK835a9qE:Dpm1Yu27L18:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=13DK835a9qE:Dpm1Yu27L18:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=13DK835a9qE:Dpm1Yu27L18:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=13DK835a9qE:Dpm1Yu27L18:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/13DK835a9qE" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2012/02/help-me-choose-a-new-title-for-this-blog/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2012/02/help-me-choose-a-new-title-for-this-blog/</feedburner:origLink></item> <item><title>Understanding processing time</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/REmX-PEGxNs/</link> <comments>http://dotmac.rationalmind.net/2011/12/understanding-processing-time/#comments</comments> <pubDate>Wed, 07 Dec 2011 15:47:39 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[CPU time]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[performance analysis]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=582</guid> <description>I want to give a brief tutorial on understanding CPU processor utilization since it is commonly an area of confusion during performance analysis. CPU time CPU time is the percentage of clock ticks than a processor spends waiting for instructions. This is opposed to wall-clock time, which is the total time the whole computer takes [...]</description> <content:encoded><![CDATA[<p>I want to give a brief tutorial on understanding CPU processor utilization since it is commonly an area of confusion during performance analysis.</p><p><strong>CPU time</strong></p><p>CPU time is the percentage of clock ticks than a processor spends waiting for instructions. This is opposed to wall-clock time, which is the total time the whole computer takes to perform an operation. The &#8220;load&#8221; on a system is the ratio of clock ticks which are performing operations versus the click ticks spent waiting for instructions over a given time period. Thus, load only makes sense as an average over a particular time period. During any single clock tick, the CPU is either processing an instruction or a HLT.</p><p><strong>Idle time</strong></p><p>The CPU processes a set of instructions fed from memory. The memory contains a set of opcodes (commands) which tell the CPU which operation to perform and the memory where it is located. The rate of clock ticks is constant &#8211; several gigahertz in a modern CPU &#8211; and during each clock tick, the CPU processes either an instruction to do some work, or a HLT &#8211; an opcode which tells the CPU to turn keep components idle until the next cycle.</p><p><strong>Monitoring CPU time</strong></p><p>So if we were to &#8220;observe&#8221; a CPU at the clock-tick level of detail, we would see that it&#8217;s always either working or waiting. But we can&#8217;t actually do that, since the more closely we monitor clock cycles, the more clock cycles are needed to do the monitoring. So to get an accurate picture of activity, we have to step back to a level where the monitoring tool does not interfere too much with the process being observed.</p><p><strong>Input/output overhead</strong></p><p>Any given computer task has several components: CPU instructions, memory IO, disk IO, network IO, and many others. Only extremely simple tasks (like calculating π) can fit in the small (but very fast) memory buffers on the CPU itself. Real-world tasks will almost always require the CPU to wait for other components to finish shuffling data back and forth in a state where it is ready for the CPU to work on it. But the ideal scenario is for the CPU to be kept as busy as possible (constant 100% load) until the task is completed. This is the minimum possible time in which a task can be completed. If we were to monitor CPU activity during such a task, we&#8217;d see the load jump to 100% during the task than back to the baseline when it&#8217;s done.  But if the task is shorter than the measurement frequency of the CPU monitoring tool, it would be an average over two periods, or it might not be detected at all.</p><p><strong>Multitasking</strong></p><p>The situation is more complicated when there are multiple tasks to run, each off which requires some fraction of CPU time. The operating system will run the tasks concurrently. Both the processing time and the IO of tasks will overlap, but because the operating system takes turns running each task, the total CPU load will be some combination which may be higher or lower than the total of the individual tasks &#8211; depending on the other competing resources the tasks use. For example, two disk-intensive tasks will use less CPU than the sum of both running individually because the disk IO will be the bottleneck. But two CPU-intensive tasks would more than double total load because the CPU will have to run both tasks and have to handle the context switching between concurrent tasks.</p><p><strong>Further reading</strong></p><ul><li><a title="CPU time" href="http://en.wikipedia.org/wiki/CPU_time">http://en.wikipedia.org/wiki/CPU_time</a></li><li><a href="http://en.wikipedia.org/wiki/Load_(computing)">http://en.wikipedia.org/wiki/Load_(computing)</a></li><li><a href="http://en.wikipedia.org/wiki/No_op">http://en.wikipedia.org/wiki/No_op</a></li><li><a href="http://en.wikipedia.org/wiki/Idle_task">http://en.wikipedia.org/wiki/Idle_task</a></li><li><a href="http://en.wikipedia.org/wiki/Computer_performance">http://en.wikipedia.org/wiki/Computer_performance</a></li></ul> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=REmX-PEGxNs:UuTQqh386qU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=REmX-PEGxNs:UuTQqh386qU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=REmX-PEGxNs:UuTQqh386qU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=REmX-PEGxNs:UuTQqh386qU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=REmX-PEGxNs:UuTQqh386qU:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/REmX-PEGxNs" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2011/12/understanding-processing-time/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2011/12/understanding-processing-time/</feedburner:origLink></item> <item><title>Performance considerations for the Entity Framework execution pipeline</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/LeFeWcDP208/</link> <comments>http://dotmac.rationalmind.net/2011/12/thoughts-on-entity-framework-performance/#comments</comments> <pubDate>Sat, 03 Dec 2011 15:41:51 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[EF]]></category> <category><![CDATA[entity framework]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=568</guid> <description>An ORM provides value by doing a lot of things for you &amp;#8211; virtualizing databases as native objects and converting types automatically. But the work the ORM does to reduce developer work has a cost too &amp;#8211; it has an inherent performance penalty and may encourage some bad development practices. An ORM by definition has [...]</description> <content:encoded><![CDATA[<p>An <a href="http://en.wikipedia.org/wiki/Object-relational_mapping">ORM</a> provides value by doing a lot of things for you &#8211; virtualizing databases as native objects and converting types automatically. But the work the ORM does to reduce developer work has a cost too &#8211; it has an inherent performance penalty and may encourage some bad development practices.</p><p>An ORM by definition has to do some work to convert a database schema into a native view. ORM&#8217;s can try to minimize this performance penalty by defining the transformation at design time or caching the database to native object transformation at different points.</p><p><a href="http://msdn.microsoft.com/en-us/library/bb399572.aspx">Entity Framework</a> is built on top of ADO.Net, which is just an API that does not &#8220;know&#8221; anything about the database. To convert .Net code into SQL queries and back into CLR objects, Entity Framework performs a set of operations at different stages: (1) compile time (2) first run (3) each execution. To improve performance, EF allows you to shift some work from step 3 to 1 or 2. But the details can be tricky and understanding the best optimization strategy requires understanding the EF query execution pipeline.</p><p><strong>The EF execution pipeline</strong></p><p>The following information is based on <a href="http://msdn.microsoft.com/en-us/library/cc853327.aspx">this MSDN EF Performance page</a>.</p><p>There are six steps I want comment on in EF execution:</p><ol><li>loading metadata</li><li>generating views</li><li>preparing the query</li><li>executing the query</li><li>tracking</li><li> materializing objects</li></ol><p>1: <em>Loading metadata</em>: The metadata is the mapping defined in your EDMX file. This is a very expensive operation (see the breakdown <a href="http://www.infoq.com/news/2008/02/adonet-framework-performance">here</a>), but it only happens once. EF applications use more memory and have a warm-up penalty which should be ignored in performance analysis if you are not concerned with startup times.  Models with with very large (200+) number of entities have a number of problems &#8211; see <a href="http://blogs.msdn.com/b/adonet/archive/2008/11/24/working-with-large-models-in-entity-framework-part-1.aspx">this</a> and <a href="http://blogs.msdn.com/b/adonet/archive/2008/11/24/working-with-large-models-in-entity-framework-part-2.aspx">this</a>.</p><p>2: <em>Generating views</em>: The local query views are static objects which are cached per application domain. This is also an expensive operation but it can be <a href="http://blogs.msdn.com/b/adonet/archive/2008/06/20/how-to-use-a-t4-template-for-view-generation.aspx">pre-generated and embedded in the application</a> <em>if</em> you care about first run times.</p><p>3: <em>Preparing the query</em>: Each unique query must be compiled into the EF version of a stored procedure before it is executed. Microsoft says that the commands are cached for later executions, but I&#8217;m confused about what exactly is cached because profiling shows that the query is compiled every. In any case, Microsoft suggest <a href="http://msdn.microsoft.com/en-us/library/bb896297.aspx">caching the compiled query to avoid this penalty</a>.</p><p>Caching precompiled queries is somewhat unwieldy, so it is only advisable in performance-critical contexts, but it makes a big difference for frequently executed queries.</p><p>(Note: Take care when using .Count() or Any() to avoid <a href="http://blogs.msdn.com/b/dmcat/archive/2010/03/08/potential-performance-issues-with-compiled-linq-query-re-compiles.aspx">unnecessary query recompilation</a> and avoid unnecessary enumeration when a simple boolean check will do.)</p><p>By the way, all the steps above can be skipped by using <a href="http://msdn.microsoft.com/en-us/library/bb339670.aspx">direct SQL queries</a> or stored procedures with EF. The performance of direct entity SQL <a href="http://blogs.msdn.com/b/adonet/archive/2008/03/27/ado-net-entity-framework-performance-comparison.aspx">falls between</a> pure ADO.Net and Entity Framework queries, so it is only useful as the occasional exception to LINQ queries against a data store.</p><p>4: <em>Executing the query</em>: Query execution time depends on the underlying data source. Entity Framework is just a library built on top of ADO.Net, so pure ADO.Net queries are the a benchmark for any ORM&#8217;s built on top of it. Because, ADO.Net will always be faster than any framework built on top of it, it can be used as a fallback when other options have been exhausted.</p><p>5: <em>Tracking</em>: tracking is used to track changes for updates. If you only need to read data, you can get a small performance boost <a href="http://msdn.microsoft.com/en-us/library/bb896269.aspx">by disabling it</a>.</p><p>6: <em>Materializing objects</em>: each object returned from the database must be converted into a class instance to be used. There is no way to avoid this penalty, but it is worthwhile to keep in mind that the less data there is, the faster it will materialized &#8211; not to mention transferred over the wire.</p><p>For best performance, queries should be as specific as possible. I have noticed that ORM&#8217;s encourage the bad habit of always selecting an entire row. This is because developers using an ORM tend to think of the database as an object repository rather than as a relational store, whereas raw SQL queries encourage manually selecting the needed rows. (Unless one has the awful habit of &#8220;select *&#8221;.) So to minimize overhead, pull just the data you need (the <a href="http://en.wikipedia.org/wiki/Model_View_ViewModel">MVVM</a> pattern is helpful in this regard.)</p><p><strong>Final thoughts:</strong></p><p>As the ADO.NET program manager himself <a href="http://blogs.msdn.com/b/adonet/archive/2008/03/27/ado-net-entity-framework-performance-comparison.aspx ">has pointed out</a>, Entity Framework is inherently slower than ADO.Net SQL queries. But performance should always be balanced against productivity. There are some applications which are definitely not suitable for an ORM and many others that are. Some operations can only be done using raw SQL and can take forever using an ORM (&#8220;truncate table&#8221;, temp tables, etc).  I think the best approach is to use an ORM where appropriate and optimize in the specific scenarios where performance is inadequate. I do think that Entity Framework is the best, simplest, and the safest choice out of all .Net ORM&#8217;s.</p><p>These are just a few tips on Entity Framework performance. There are other tips and much more information in the pages below and the links therein.</p><p><strong>More reading:</strong></p><ul><li><a href="http://msdn.microsoft.com/en-us/library/cc853327.aspx">MSDN: Performance Considerations (Entity Framework)</a></li><li><a href="http://social.technet.microsoft.com/wiki/contents/articles/3901.aspx">Entity Framework FAQ: Performance</a></li><li><a href="http://www.codeproject.com/KB/database/PerfEntityFramework.aspx">The Code Project: Performance and the Entity Framework</a></li></ul> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=LeFeWcDP208:sJqjLn4mq2k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=LeFeWcDP208:sJqjLn4mq2k:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=LeFeWcDP208:sJqjLn4mq2k:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=LeFeWcDP208:sJqjLn4mq2k:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=LeFeWcDP208:sJqjLn4mq2k:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/LeFeWcDP208" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2011/12/thoughts-on-entity-framework-performance/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2011/12/thoughts-on-entity-framework-performance/</feedburner:origLink></item> <item><title>Rules for good unit tests</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/SPupq5jcXaA/</link> <comments>http://dotmac.rationalmind.net/2011/08/rules-for-good-unit-tests/#comments</comments> <pubDate>Fri, 12 Aug 2011 14:23:08 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[unit testing]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=540</guid> <description>Test method names should be sentences (This_method_does_this(){})  Test the happy path – the most common/important functionality (acceptance criteria should be executable) Test at the highest level that is practical Unit Tests should not: Talk to the database Talk to the network Touch the file system Don&amp;#8217;t change business logic to write the code Depend on [...]</description> <content:encoded><![CDATA[<ul><li>Test method names should be sentences (This_method_does_this(){})</li><li> Test the happy path – the most common/important functionality (acceptance criteria should be executable)</li><li>Test at the highest level that is practical</li><li>Unit Tests should not:</li><li>Talk to the database</li><li>Talk to the network</li><li>Touch the file system</li><li>Don&#8217;t change business logic to write the code</li><li>Depend on any other tests (can be run at any time, in any order)</li><li>Depend on environment variables (USE MOCKS!)</li><li>Tests should be fast (lengthy tests are doing something wrong)</li><li>Less than 10 lines of code</li><li>Only one or two <a href="http://stackoverflow.com/questions/2063242/best-practices-for-multiple-asserts-on-same-result-in-c-sharp">logical asserts</a> per test</li><li><strong>Don&#8217;t write tests after development is done </strong></li></ul><p><strong>Further reading:</strong></p><ul><li><a href="http://dannorth.net/introducing-bdd/">Introducing BDD</a></li><li><a href="http://www.artima.com/weblogs/viewpost.jsp?thread=126923">A Set of Unit Testing Rules</a></li></ul><p>&nbsp;</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=SPupq5jcXaA:cgLTRnn8m8Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=SPupq5jcXaA:cgLTRnn8m8Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=SPupq5jcXaA:cgLTRnn8m8Q:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=SPupq5jcXaA:cgLTRnn8m8Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=SPupq5jcXaA:cgLTRnn8m8Q:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/SPupq5jcXaA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2011/08/rules-for-good-unit-tests/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2011/08/rules-for-good-unit-tests/</feedburner:origLink></item> <item><title>The agile sprint cycle &amp; team roles</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/P7ZHXt4Z9BY/</link> <comments>http://dotmac.rationalmind.net/2011/07/the-agile-sprint-cycle-team-roles/#comments</comments> <pubDate>Wed, 27 Jul 2011 07:08:06 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[agile]]></category> <category><![CDATA[scrum]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=545</guid> <description>&amp;#160; From a recent presentation: </description> <content:encoded><![CDATA[<p>&nbsp;</p><p>From a recent presentation: <a href="http://dotmac.rationalmind.net/2011/07/the-agile-sprint-cycle-team-roles/scrum-sprintcycle/" rel="attachment wp-att-546"><img class="aligncenter size-full wp-image-546" title="Scrum SprintCycle" src="http://dotmac.rationalmind.net/wp-content/uploads/2011/09/Scrum-SprintCycle.png" alt="" width="888" height="592" /></a></p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=P7ZHXt4Z9BY:2MuJTGzVRX4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=P7ZHXt4Z9BY:2MuJTGzVRX4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=P7ZHXt4Z9BY:2MuJTGzVRX4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=P7ZHXt4Z9BY:2MuJTGzVRX4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=P7ZHXt4Z9BY:2MuJTGzVRX4:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/P7ZHXt4Z9BY" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2011/07/the-agile-sprint-cycle-team-roles/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2011/07/the-agile-sprint-cycle-team-roles/</feedburner:origLink></item> <item><title>Optimal compression for IIS7</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/-PjCoZ9QXA8/</link> <comments>http://dotmac.rationalmind.net/2011/06/optimal-compression-for-iis7/#comments</comments> <pubDate>Fri, 24 Jun 2011 05:41:08 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[code]]></category> <category><![CDATA[compression]]></category> <category><![CDATA[gzip]]></category> <category><![CDATA[IIS]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=535</guid> <description>httpCompression in applicationhost.config should look like this: &amp;#60;httpcompression directory=&amp;#34;%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files&amp;#34; maxDiskSpaceUsage=&amp;#34;1024&amp;#34; noCompressionForHttp10=&amp;#34;false&amp;#34; noCompressionForProxies=&amp;#34;false&amp;#34;&amp;#62; &amp;#60;scheme name=&amp;#34;gzip&amp;#34; dll=&amp;#34;%Windir%\system32\inetsrv\gzip.dll&amp;#34; dynamicCompressionLevel=&amp;#34;9&amp;#34; /&amp;#62; &amp;#60;scheme name=&amp;#34;deflate&amp;#34; doStaticCompression=&amp;#34;true&amp;#34; dll=&amp;#34;%windir%\system32\inetsrv\gzip.dll&amp;#34; dynamicCompressionLevel=&amp;#34;9&amp;#34; /&amp;#62; &amp;#60;dynamictypes&amp;#62; &amp;#60;add mimeType=&amp;#34;text/*&amp;#34; enabled=&amp;#34;true&amp;#34; /&amp;#62; &amp;#60;add mimeType=&amp;#34;message/*&amp;#34; enabled=&amp;#34;true&amp;#34; /&amp;#62; &amp;#60;add mimeType=&amp;#34;application/x-javascript&amp;#34; enabled=&amp;#34;true&amp;#34; /&amp;#62; &amp;#60;add mimeType=&amp;#34;*/*&amp;#34; enabled=&amp;#34;true&amp;#34; /&amp;#62; &amp;#60;/dynamictypes&amp;#62; &amp;#60;statictypes&amp;#62; &amp;#60;add mimeType=&amp;#34;text/*&amp;#34; enabled=&amp;#34;true&amp;#34; /&amp;#62; &amp;#60;add mimeType=&amp;#34;message/*&amp;#34; enabled=&amp;#34;true&amp;#34; /&amp;#62; &amp;#60;add mimeType=&amp;#34;application/javascript&amp;#34; [...]</description> <content:encoded><![CDATA[<p>httpCompression in applicationhost.config should look like this:</p><div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;httpcompression</span> <span style="color: #000066;">directory</span>=<span style="color: #ff0000;">&quot;%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files&quot;</span> <span style="color: #000066;">maxDiskSpaceUsage</span>=<span style="color: #ff0000;">&quot;1024&quot;</span> <span style="color: #000066;">noCompressionForHttp10</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">noCompressionForProxies</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scheme</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;gzip&quot;</span> <span style="color: #000066;">dll</span>=<span style="color: #ff0000;">&quot;%Windir%\system32\inetsrv\gzip.dll&quot;</span> <span style="color: #000066;">dynamicCompressionLevel</span>=<span style="color: #ff0000;">&quot;9&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scheme</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;deflate&quot;</span> <span style="color: #000066;">doStaticCompression</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">dll</span>=<span style="color: #ff0000;">&quot;%windir%\system32\inetsrv\gzip.dll&quot;</span> <span style="color: #000066;">dynamicCompressionLevel</span>=<span style="color: #ff0000;">&quot;9&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dynamictypes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;text/*&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;message/*&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;application/x-javascript&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;*/*&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dynamictypes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statictypes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;text/*&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;message/*&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;application/javascript&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;application/pdf&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;application/x-zip-compressed&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>        
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">mimeType</span>=<span style="color: #ff0000;">&quot;*/*&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statictypes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/httpcompression<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div><p>For some reason text/css was not compressed by default for me and I had to add it.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=-PjCoZ9QXA8:-1XCVE1w_o0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=-PjCoZ9QXA8:-1XCVE1w_o0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=-PjCoZ9QXA8:-1XCVE1w_o0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=-PjCoZ9QXA8:-1XCVE1w_o0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=-PjCoZ9QXA8:-1XCVE1w_o0:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/-PjCoZ9QXA8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2011/06/optimal-compression-for-iis7/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2011/06/optimal-compression-for-iis7/</feedburner:origLink></item> <item><title>Render tags in templates as a partial view with MVC3</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/nFZGlddFQkU/</link> <comments>http://dotmac.rationalmind.net/2011/05/render-tags-in-templates-as-a-partial-view-with-mvc3/#comments</comments> <pubDate>Wed, 18 May 2011 09:58:12 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[code]]></category> <category><![CDATA[MVC]]></category> <category><![CDATA[Razor]]></category> <category><![CDATA[regex]]></category> <category><![CDATA[templates]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=528</guid> <description>Suppose you are rendering templated content. Sometimes you want to reference partial views (or actions) in your templates and have them render with attributes provided by your template. One option is to use a Razor templating engine. But I just needed to render partial views based on a custom tag format, so I came up [...]</description> <content:encoded><![CDATA[<p>Suppose you are rendering templated content. Sometimes you want to reference partial views (or actions) in your templates and have them render with attributes provided by your template. One option is to use a <a href="http://razorengine.codeplex.com/">Razor templating</a> <a href="http://www.fidelitydesign.net/?p=208">engine</a>. But I just needed to render partial views based on a custom tag format, so I came up with my own solution:</p><div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">&nbsp;
        <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
        <span style="color: #008080; font-style: italic;">///   Render parameterized tags as a partial view in MVC3 templates</span>
        <span style="color: #008080; font-style: italic;">///   Supports tags such as &lt;view:leadform citytype =  AllCities coursetype =  KidsOnly schooltype =  KidsSchools /&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name = &quot;helper&quot;&gt;The helper.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name = &quot;content&quot;&gt;The content.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;returns&gt;&lt;/returns&gt;</span>
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">string</span> RenderPartialViewTagsInTemplate<span style="color: #008000;">&#40;</span>HtmlHelper helper, <span style="color: #6666cc; font-weight: bold;">string</span> content<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            var controls <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Dictionary<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">string</span> , <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            MatchCollection matches <span style="color: #008000;">=</span> Regex<span style="color: #008000;">.</span><span style="color: #0000FF;">Matches</span><span style="color: #008000;">&#40;</span>content, <span style="color: #666666;">@&quot;&lt;view: (?&lt;name&gt;\S+)(\s+(?&lt;attrname&gt;[^=\s]+)=&quot;</span><span style="color: #666666;">&quot;?(?&lt;attrvalue&gt;[^&quot;</span><span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\s</span>]+)&quot;</span><span style="color: #666666;">&quot;?)*?<span style="color: #008080; font-weight: bold;">\s</span>*/&gt;&quot;</span>, RegexOptions<span style="color: #008000;">.</span><span style="color: #0000FF;">ExplicitCapture</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>Match tag <span style="color: #0600FF; font-weight: bold;">in</span> matches<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #6666cc; font-weight: bold;">string</span> viewName <span style="color: #008000;">=</span> tag<span style="color: #008000;">.</span><span style="color: #0000FF;">Groups</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;name&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">;</span>
&nbsp;
                var routeValues <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RouteValueDictionary<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
                <span style="color: #0600FF; font-weight: bold;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> i <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> i <span style="color: #008000;">&lt;</span> tag<span style="color: #008000;">.</span><span style="color: #0000FF;">Groups</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;attrname&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Captures</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span><span style="color: #008000;">;</span> i<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span>
                <span style="color: #008000;">&#123;</span>
                    <span style="color: #6666cc; font-weight: bold;">string</span> key <span style="color: #008000;">=</span> tag<span style="color: #008000;">.</span><span style="color: #0000FF;">Groups</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;attrname&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Captures</span><span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">;</span>
                    <span style="color: #6666cc; font-weight: bold;">string</span> value <span style="color: #008000;">=</span> tag<span style="color: #008000;">.</span><span style="color: #0000FF;">Groups</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;attrvalue&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Captures</span><span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">;</span>
&nbsp;
                    routeValues<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>key, value<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #008000;">&#125;</span>
&nbsp;
                MvcHtmlString tagHtml <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> MvcHtmlString<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #0600FF; font-weight: bold;">try</span>
                <span style="color: #008000;">&#123;</span>
                    tagHtml <span style="color: #008000;">=</span> helper<span style="color: #008000;">.</span><span style="color: #0000FF;">Action</span><span style="color: #008000;">&#40;</span>viewName, routeValues<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #008000;">&#125;</span>
                <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span>HttpException<span style="color: #008000;">&#41;</span> <span style="color: #008080; font-style: italic;">// no such action, so try a view</span>
                <span style="color: #008000;">&#123;</span>
                    tagHtml <span style="color: #008000;">=</span> helper<span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Partial</span><span style="color: #008000;">&#40;</span>viewName, routeValues<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #008000;">&#125;</span>
&nbsp;
                controls<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>tag<span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span>, tagHtml<span style="color: #008000;">.</span><span style="color: #0000FF;">ToHtmlString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
&nbsp;
            controls<span style="color: #008000;">.</span><span style="color: #0000FF;">ToList</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">ForEach</span><span style="color: #008000;">&#40;</span>c <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> content <span style="color: #008000;">=</span> content<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span>c<span style="color: #008000;">.</span><span style="color: #0000FF;">Key</span>, c<span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">return</span> content<span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008000;">&lt;/</span>attrvalue<span style="color: #008000;">&gt;&lt;/</span>attrname<span style="color: #008000;">&gt;&lt;/</span>view<span style="color: #008000;">:&gt;&lt;/</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span></pre></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=nFZGlddFQkU:otSogIuoKkI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=nFZGlddFQkU:otSogIuoKkI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=nFZGlddFQkU:otSogIuoKkI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=nFZGlddFQkU:otSogIuoKkI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=nFZGlddFQkU:otSogIuoKkI:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/nFZGlddFQkU" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2011/05/render-tags-in-templates-as-a-partial-view-with-mvc3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2011/05/render-tags-in-templates-as-a-partial-view-with-mvc3/</feedburner:origLink></item> <item><title>Reading Excel files in .Net</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/YpYf5o7ahCI/</link> <comments>http://dotmac.rationalmind.net/2011/05/reading-excel-files-in-net/#comments</comments> <pubDate>Sat, 07 May 2011 04:21:18 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[code]]></category> <category><![CDATA[development]]></category> <category><![CDATA[excel]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=516</guid> <description>This should work for most Excel versions including both xls and xslx: &amp;#160; const string ExcelConnString = @&amp;#34;Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=&amp;#34;&amp;#34;Excel 12.0 Xml;HDR=YES&amp;#34;&amp;#34;;&amp;#34;; &amp;#160; var adapter = new OleDbDataAdapter&amp;#40;&amp;#34;SELECT * FROM [Sheet1$]&amp;#34;, String.Format&amp;#40;ExcelConnString, physicalPath&amp;#41;&amp;#41;; var ds = new DataSet&amp;#40;&amp;#41;; &amp;#160; adapter.Fill&amp;#40;ds, &amp;#34;anyNameHere&amp;#34;&amp;#41;; var data = ds.Tables&amp;#91;&amp;#34;anyNameHere&amp;#34;&amp;#93;.AsEnumerable&amp;#40;&amp;#41;; &amp;#160; EnumerableRowCollection&amp;#60;etag&amp;#62; tags = data.Where&amp;#40;x =&amp;#62; x.Field&amp;#60;string&amp;#62;&amp;#40;&amp;#34;tag&amp;#34;&amp;#41; != string.Empty&amp;#41;.Select&amp;#40;x =&amp;#62; [...]</description> <content:encoded><![CDATA[<p>This should work for most Excel versions including both xls and xslx:</p><div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">&nbsp;
<span style="color: #0600FF; font-weight: bold;">const</span> <span style="color: #6666cc; font-weight: bold;">string</span> ExcelConnString <span style="color: #008000;">=</span>
                <span style="color: #666666;">@&quot;Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=&quot;</span><span style="color: #666666;">&quot;Excel 12.0 Xml;HDR=YES&quot;</span><span style="color: #666666;">&quot;;&quot;</span><span style="color: #008000;">;</span>
&nbsp;
            var adapter <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> OleDbDataAdapter<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;SELECT * FROM [Sheet1$]&quot;</span>, <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Format</span><span style="color: #008000;">&#40;</span>ExcelConnString, physicalPath<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            var ds <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DataSet<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            adapter<span style="color: #008000;">.</span><span style="color: #0000FF;">Fill</span><span style="color: #008000;">&#40;</span>ds, <span style="color: #666666;">&quot;anyNameHere&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            var data <span style="color: #008000;">=</span> ds<span style="color: #008000;">.</span><span style="color: #0000FF;">Tables</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;anyNameHere&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AsEnumerable</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            EnumerableRowCollection<span style="color: #008000;">&lt;</span>etag<span style="color: #008000;">&gt;</span> tags <span style="color: #008000;">=</span>
                data<span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Where</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Field</span><span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;tag&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">!=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Select</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span>
                                                                                 <span style="color: #008000;">new</span> Tag<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
                                                                                     <span style="color: #008000;">&#123;</span>
                                                                                         Description <span style="color: #008000;">=</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">Field</span><span style="color: #008000;">&lt;/</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;&lt;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Description&quot;</span><span style="color: #008000;">&#41;</span>
                                                                                     <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
<span style="color: #008000;">&lt;/</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;&lt;/</span>etag<span style="color: #008000;">&gt;</span></pre></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=YpYf5o7ahCI:uPK6vYTUQxc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=YpYf5o7ahCI:uPK6vYTUQxc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=YpYf5o7ahCI:uPK6vYTUQxc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=YpYf5o7ahCI:uPK6vYTUQxc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=YpYf5o7ahCI:uPK6vYTUQxc:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/YpYf5o7ahCI" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2011/05/reading-excel-files-in-net/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2011/05/reading-excel-files-in-net/</feedburner:origLink></item> <item><title>Cross browser multi-columns with JQuery and CSS3</title><link>http://feedproxy.google.com/~r/dotmacblog/~3/ZSldFQKDV_4/</link> <comments>http://dotmac.rationalmind.net/2011/03/cross-browser-multi-columns-with-jquery-and-css3/#comments</comments> <pubDate>Thu, 24 Mar 2011 05:03:39 +0000</pubDate> <dc:creator>David Veksler</dc:creator> <category><![CDATA[code]]></category> <category><![CDATA[column-count]]></category> <category><![CDATA[Columnizer]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[multi-column]]></category><guid isPermaLink="false">http://dotmac.rationalmind.net/?p=501</guid> <description>column-count was proposed in January 2001, candidate in December 2009. It&amp;#8217;s supported in WebKit and Mozilla via extensions and Opera directly, but it&amp;#8217;s not in IE9. Y U no support columns IE9? That&amp;#8217;s OK, we can work around this with columnizer: &amp;#60;script type=&amp;#34;text/javascript&amp;#34;&amp;#62; if &amp;#40;$.browser.msie &amp;#38;&amp;#38; $.browser.version &amp;#60; 10&amp;#41; &amp;#123; // am I a hopeless [...]</description> <content:encoded><![CDATA[<p><a href="http://www.alistapart.com/articles/css3multicolumn/">column-count</a> was proposed in <a href="http://www.w3.org/TR/2001/WD-css3-multicol-20010118/">January 2001</a>, <a href="http://www.w3.org/TR/css3-multicol/">candidate</a> in December 2009.  It&#8217;s supported in WebKit and Mozilla via extensions and Opera <a href="http://www.css3.info/opera-barracuda-steps-up-css3-support/">directly</a>, but it&#8217;s not in IE9.  Y U no support columns <a href="http://www.beautyoftheweb.com/">IE9</a>?  That&#8217;s OK, we can work around this with <a href="http://welcome.totheinter.net/columnizer-jquery-plugin/">columnizer</a>:</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">msie</span> <span style="color: #339933;">&amp;&amp;</span> $.<span style="color: #660066;">browser</span>.<span style="color: #660066;">version</span> <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #006600; font-style: italic;">// am I a hopeless romantic for assuming that IE10 will support it?</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.multicolumn'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">columnize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
            width<span style="color: #339933;">:</span> <span style="color: #CC0000;">600</span><span style="color: #339933;">,</span>
            columns<span style="color: #339933;">:</span> <span style="color: #CC0000;">3</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>&lt;/script&gt;</pre></div></div><div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
<span style="color: #808080; font-style: italic;">/* Support for Webkit, Mozilla, Opera */</span>
div<span style="color: #cc00cc;">#multicolumn</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.multicolumn</span> <span style="color: #00AA00;">&#123;</span>
	-moz-column-count<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">3</span><span style="color: #00AA00;">;</span>
	-moz-column-gap<span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	-webkit-column-count<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">3</span><span style="color: #00AA00;">;</span>
	-webkit-column-gap<span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	column-count<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">3</span><span style="color: #00AA00;">;</span>
	column-gap<span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dotmacblog?a=ZSldFQKDV_4:LhfOqWIhwIo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=ZSldFQKDV_4:LhfOqWIhwIo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dotmacblog?i=ZSldFQKDV_4:LhfOqWIhwIo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=ZSldFQKDV_4:LhfOqWIhwIo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dotmacblog?a=ZSldFQKDV_4:LhfOqWIhwIo:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/dotmacblog?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dotmacblog/~4/ZSldFQKDV_4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://dotmac.rationalmind.net/2011/03/cross-browser-multi-columns-with-jquery-and-css3/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://dotmac.rationalmind.net/2011/03/cross-browser-multi-columns-with-jquery-and-css3/</feedburner:origLink></item> </channel> </rss><!-- Served from: dotmac.rationalmind.net @ 2012-05-14 23:47:36 by W3 Total Cache -->

