<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chris Danford &#187; Programming</title>
	<atom:link href="http://www.chrisdanford.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chrisdanford.com/blog</link>
	<description>Games, Programming, Web</description>
	<lastBuildDate>Tue, 03 Apr 2012 07:56:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Getting started with Ruby on Rails</title>
		<link>http://www.chrisdanford.com/blog/2012/04/03/getting-started-with-ruby-on-rails/</link>
		<comments>http://www.chrisdanford.com/blog/2012/04/03/getting-started-with-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 07:53:31 +0000</pubDate>
		<dc:creator>chrisdanford</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.chrisdanford.com/blog/?p=99</guid>
		<description><![CDATA[These are some of the tutorials and guides I&#8217;ve found most helpful while picking up Ruby on Rails 3. Ruby language: http://strugglingwithruby.blogspot.com/2008/11/contents-page.html http://www.zenspider.com/Languages/Ruby/QuickRef.html Installing Rails on Windows: http://railsinstaller.org/ Best &#8220;my first app&#8221; walk-through: http://guides.rubyonrails.org/getting_started.html Using &#8220;remote&#8221; to ajaxify links and forms: http://www.alfajango.com/blog/rails-3-remote-links-and-forms/ http://www.alfajango.com/blog/rails-3-remote-links-and-forms-data-type-with-jquery/ &#8220;Unobtrusive JS&#8221; library that ships with Rails 3: http://www.slideshare.net/philcrissman/ujs-in-rails-3-6775992 http://www.alfajango.com/blog/rails-jquery-ujs-now-interactive/ Use Twitter Bootstrap&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.chrisdanford.com/blog/wp-content/uploads/2012/04/rails1.png"><img class="alignright size-full wp-image-104" title="rails" src="http://www.chrisdanford.com/blog/wp-content/uploads/2012/04/rails1.png" alt="" width="87" height="111" /></a>These are some of the tutorials and guides I&#8217;ve found most helpful while picking up Ruby on Rails 3.</p>
<p>Ruby language:</p>
<ul>
<li><a href="http://strugglingwithruby.blogspot.com/2008/11/contents-page.html">http://strugglingwithruby.blogspot.com/2008/11/contents-page.html</a></li>
<li><a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html">http://www.zenspider.com/Languages/Ruby/QuickRef.html</a></li>
</ul>
<p>Installing Rails on Windows:</p>
<ul>
<li><a href="http://railsinstaller.org/">http://railsinstaller.org/</a></li>
</ul>
<p>Best &#8220;my first app&#8221; walk-through:</p>
<ul>
<li><a href="http://guides.rubyonrails.org/getting_started.html">http://guides.rubyonrails.org/getting_started.html</a></li>
</ul>
<p>Using &#8220;remote&#8221; to ajaxify links and forms:</p>
<ul>
<li><a href="http://www.alfajango.com/blog/rails-3-remote-links-and-forms/">http://www.alfajango.com/blog/rails-3-remote-links-and-forms/</a></li>
<li><a href="http://www.alfajango.com/blog/rails-3-remote-links-and-forms-data-type-with-jquery/">http://www.alfajango.com/blog/rails-3-remote-links-and-forms-data-type-with-jquery/</a></li>
</ul>
<p>&#8220;Unobtrusive JS&#8221; library that ships with Rails 3:</p>
<ul>
<li><a href="http://www.slideshare.net/philcrissman/ujs-in-rails-3-6775992">http://www.slideshare.net/philcrissman/ujs-in-rails-3-6775992</a></li>
<li><a href="http://www.alfajango.com/blog/rails-jquery-ujs-now-interactive/">http://www.alfajango.com/blog/rails-jquery-ujs-now-interactive/</a></li>
</ul>
<p>Use Twitter Bootstrap with Rails:</p>
<ul>
<li><a href="http://railscasts.com/episodes/328-twitter-bootstrap-basics">http://railscasts.com/episodes/328-twitter-bootstrap-basics</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisdanford.com/blog/2012/04/03/getting-started-with-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rules for optimal web site performance</title>
		<link>http://www.chrisdanford.com/blog/2010/11/13/rules-for-optimal-web-site-performance/</link>
		<comments>http://www.chrisdanford.com/blog/2010/11/13/rules-for-optimal-web-site-performance/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 18:13:24 +0000</pubDate>
		<dc:creator>chrisdanford</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.chrisdanford.com/blog/?p=33</guid>
		<description><![CDATA[I&#8217;ve been working to improve the performance a large site at Amazon.  Steve Souders has written two excellent books that explain browser/http best practices.  A few of the rules were new to me and very helpful (flushing/mod_deflate settings, different browser techniques to defer Javascript).  The important take-away is that only a small fraction of typical&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/gp/product/0596529309?ie=UTF8&amp;tag=step0f-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0596529309"><img class="alignright size-full wp-image-34" title="high performance web sites cover" src="http://www.chrisdanford.com/blog/wp-content/uploads/2010/10/book-84x110.jpg" alt="" width="84" height="110" /></a>I&#8217;ve been working to improve the performance a large site at Amazon.  <a href="http://stevesouders.com/">Steve Souders</a> has written two excellent books that explain browser/http best practices.  A few of the rules were new to me and very helpful (flushing/mod_deflate settings, different browser techniques to defer Javascript).  The important take-away is that only a small fraction of typical page load time is bottlenecked by the server generation of a page.</p>
<table>
<tbody>
<tr>
<td><a href="http://www.amazon.com/gp/product/0596529309?ie=UTF8&amp;tag=step0f-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0596529309">High Performance Web Sites</a><br/>(<a href="http://stevesouders.com/hpws/">companion site</a>)</p>
<ol>
<li>Make Fewer HTTP Requests</li>
<li>Use a Content Delivery Network</li>
<li>Add an Expires Header</li>
<li>Gzip Components</li>
<li>Put Stylesheets at the Top</li>
<li>Put Scripts at the Bottom</li>
<li>Avoid CSS Expressions</li>
<li>Make JavaScript and CSS External</li>
<li>Reduce DNS Lookups</li>
<li>Minify JavaScript</li>
<li>Avoid Redirects</li>
<li>Remove Duplicate Scripts</li>
<li>Configure ETags</li>
<li>Make AJAX Cacheable</li>
</ol>
</td>
<td><a href="http://www.amazon.com/gp/product/0596522304?ie=UTF8&amp;tag=step0f-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0596522304">Even Faster Web Sites</a><br/>(<a href="http://stevesouders.com/efws/">companion site</a>)</p>
<ol class="toc" style="margin-left: 20px; padding-left: 0pt;">
<li>Understanding Ajax Performance</li>
<li>Creating Responsive Web Applications</li>
<li>Splitting the Initial Payload</li>
<li>Loading Scripts Without Blocking</li>
<li>Coupling Asynchronous Scripts</li>
<li>Positioning Inline Scripts</li>
<li>Writing Efficient JavaScript</li>
<li>Scaling with Comet</li>
<li>Going Beyond Gzipping</li>
<li>Optimizing Images</li>
<li>Sharding Dominant Domains</li>
<li>Flushing the Document Early</li>
<li>Using Iframes Sparingly</li>
<li>Simplifying CSS Selectors</li>
</ol>
</td>
</tr>
</tbody>
</table>
<p>My first round of optimizations just went into production and our metric that measures &#8220;time from click until critical feature shows up in the browser&#8221;  dropped from 5.25s to 3.5s.  It&#8217;s neat to multiply the savings and see that many weeks of end-user browser load time are saved each day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisdanford.com/blog/2010/11/13/rules-for-optimal-web-site-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tools for creating MacOS installer .dmgs</title>
		<link>http://www.chrisdanford.com/blog/2010/08/02/tools-for-creating-macos-installer-dmgs/</link>
		<comments>http://www.chrisdanford.com/blog/2010/08/02/tools-for-creating-macos-installer-dmgs/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 01:46:26 +0000</pubDate>
		<dc:creator>chrisdanford</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chrisdanford.com/blog/?p=23</guid>
		<description><![CDATA[I spent some time updating the StepMania MacOS installer. There are many features that you probably will want in an installer dmg: an &#8220;Applications&#8221; link or alias a custom background image custom placement of icons .dmg compression a way to script building of an installer dmg Here&#8217;s how you&#8217;ll want to achieve the above in&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.chrisdanford.com/blog/wp-content/uploads/2010/08/Screen-shot-2010-08-01-at-6.23.34-PM.png"><img class="alignright size-medium wp-image-24" title="Installer .dmg" src="http://www.chrisdanford.com/blog/wp-content/uploads/2010/08/Screen-shot-2010-08-01-at-6.23.34-PM-300x158.png" alt="StepMania installer .dmg" width="300" height="158" /></a>I spent some time updating the StepMania MacOS installer. There are many features that you probably will want in an installer dmg:</p>
<ol>
<li>an &#8220;Applications&#8221; link or alias</li>
<li>a custom background image</li>
<li>custom placement of icons</li>
<li>.dmg compression</li>
<li>a way to script building of an installer dmg</li>
</ol>
<p>Here&#8217;s how you&#8217;ll want to achieve the above in your installer build script</p>
<ul>
<li>Create a temporary directory and copy into it all files you&#8217;ll want in your final .dmg (typically a .app or 1 directory, and maybe a documentation file)</li>
<li>Create a symbolic link (<strong>ln -s /Applications $your_temp_dir</strong>) or manually make an alias to /Applications and then copy the alias to your temp directory.</li>
<li>Use the <a href="http://www.yoursway.com/free/#createdmg">yoursway create dmg script</a> and pass in your temp directory, background image, icon locations, and it will spit out a compressed dmg.  Something like: <strong>create-dmg &#8211;window-size 500 300 &#8211;background background.png &#8211;icon-size 96 &#8211;volname &#8220;StepMania4&#8243; &#8211;icon &#8220;Applications&#8221; 380 205 &#8211;icon &#8220;StepMania&#8221; 110 205 StepMania.dmg ../$temp.dir</strong>.  Their script is based on the Adium installer applescript + wrapper.</li>
</ul>
<p>You can see exactly how StepMania does it by checking out our scripts: <a href="https://svn.stepmania.com/svn/branches/4.0/stepmania/PBProject">https://svn.stepmania.com/svn/branches/4.0/stepmania/PBProject</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisdanford.com/blog/2010/08/02/tools-for-creating-macos-installer-dmgs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful, free tools for .Net app memory profiling</title>
		<link>http://www.chrisdanford.com/blog/2010/06/08/the-most-useful-net-memory-profiling-tools/</link>
		<comments>http://www.chrisdanford.com/blog/2010/06/08/the-most-useful-net-memory-profiling-tools/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 00:27:18 +0000</pubDate>
		<dc:creator>chrisdanford</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ChartPT]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Profiling]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.chrisdanford.com/blog/?p=20</guid>
		<description><![CDATA[In the process of trying to slim down ChartPT&#8216;s memory usage, I settled on these free tools: VMMap &#8211; http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx Skip the many tutorials out there for the command line &#8220;vadump.exe&#8221; and use VMMap instead. The GUI presents information in a much more useful format (filterable, sortable). First, check the list of loaded modules &#8211;&#8230;]]></description>
			<content:encoded><![CDATA[<p>In the process of trying to slim down <a href="http://www.chartpt.com">ChartPT</a>&#8216;s memory usage, I settled on these free tools:<img src="file:///C:/Users/cdanford/AppData/Local/Temp/moz-screenshot.png" alt="" /><a href="http://www.chrisdanford.com/blog/wp-content/uploads/2010/06/vmmap.jpg"><img class="alignright size-thumbnail wp-image-22" title="vmmap" src="http://www.chrisdanford.com/blog/wp-content/uploads/2010/06/vmmap-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><strong>VMMap</strong> &#8211; <a href="http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx">http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx</a></p>
<p>Skip the many tutorials out there for the command line &#8220;vadump.exe&#8221; and use VMMap instead. The GUI presents information in a much more useful format (filterable, sortable).</p>
<p>First, check the list of loaded modules &#8211; some are explicit References in your project, others are dependencies of your references &#8211; and eliminate dependencies that you can do without.  Next, check the &#8220;Private&#8221; and &#8220;Private Working Set&#8221; columns to identify areas that you may have some control over.</p>
<p><strong>CLR 2.0 Profiler &#8211; </strong><a href="http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx">http://www.microsoft.com/downloads/details.aspx?familyid=a362781c-3870-43be-8926-862b40aa0cd0&amp;displaylang=en</a></p>
<p>Be sure to grab the &#8220;2.0&#8243; flavor of the profiler.  Many tutorials are old and link to the CLR 1 version of the .Net Profiler &#8211; that version won&#8217;t work with your app that builds against .Net 2.0 or newer.</p>
<p>Use this app to take a snapshot of your memory usage, then view allocations by object type and view allocations in a call graph.</p>
<p>Tutorial: <a href="http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx">http://msdn.microsoft.com/en-us/library/ff650691.aspx</a></p>
<p><strong>My biggest culprit: WCF</strong></p>
<p>System.ServiceModel and System.Web grab 5.5MB of private memory (14+MB of private WS on my machine) as soon as I instantiate a client proxy object.  The same things happens using built-in HTTP bindings in a skeleton console app or in the WCF test client.  The System.Web allocation could probably be eliminated by changing to TcpTransport.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisdanford.com/blog/2010/06/08/the-most-useful-net-memory-profiling-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit files directly over SFTP in Eclipse (Remote System Explorer)</title>
		<link>http://www.chrisdanford.com/blog/2010/05/19/edit-files-directly-over-sftp-in-eclipse-remote-system-explorer/</link>
		<comments>http://www.chrisdanford.com/blog/2010/05/19/edit-files-directly-over-sftp-in-eclipse-remote-system-explorer/#comments</comments>
		<pubDate>Wed, 19 May 2010 15:44:43 +0000</pubDate>
		<dc:creator>chrisdanford</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.chrisdanford.com/blog/?p=17</guid>
		<description><![CDATA[I typically edit PHP and Python using VI over SSH in multiple Putty windows.  Arranging the windows is a pain, you lose all of your open shells if your connection hiccups, none of the machines I connect to provide color terminals, and I&#8217;m often fight VI&#8217;s indenting (and am too lazy to fix it on&#8230;]]></description>
			<content:encoded><![CDATA[<p>I typically edit PHP and Python using VI over SSH in multiple Putty windows.  Arranging the windows is a pain, you lose all of your open shells if your connection hiccups, none of the machines I connect to provide color terminals, and I&#8217;m often fight VI&#8217;s indenting (and am too lazy to fix it on every machine).</p>
<p>I&#8217;ve now switched over to editing files on the server using Eclipse and the Repose System Explorer add-on.  It solves all of the problems mentioned above.</p>
<ul>
<li><a href="http://www.eclipse.org/downloads/">Download any version of Eclipse</a></li>
</ul>
<ul>
<li>From Eclipse: Help -&gt; Install New Software. &#8220;Work with: -All available sites-&#8221;. In the search box type &#8220;remote system&#8221;. Check &#8220;Remote System Explorer End-User Runtime&#8221;, click Next to proceed with the install.</li>
<li>After the wizard completed, click Window -&gt; Open Perspective -&gt; Remote System Explorer.  Right-click in Remote Systems, choose New Connection, type in your details.  After you connect, expand &#8220;Sftp Files&#8221; and you&#8217;ll be able to open remote files in the editor.</li>
</ul>
<p>Thanks <a href="http://ikool.wordpress.com/2008/06/26/how-to-install-dstore-for-eclipse-rse-remote-system-explorer/">Ikool’s Blogbed</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisdanford.com/blog/2010/05/19/edit-files-directly-over-sftp-in-eclipse-remote-system-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

