<?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>Pivotal Labs &#187; Tyler Schultz</title>
	<atom:link href="http://pivotallabs.com/author/tyler/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Sun, 26 May 2013 03:43:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>[Standup][SF] 09/21/12: Get older faster</title>
		<link>http://pivotallabs.com/standup-sf-09-21-12-get-older-faster/</link>
		<comments>http://pivotallabs.com/standup-sf-09-21-12-get-older-faster/#comments</comments>
		<pubDate>Fri, 21 Sep 2012 14:16:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-sf-09-21-12-get-older-faster/</guid>
		<description><![CDATA[<p><h2>Interestings</h2>

<ul>
<li>Timecop#lens</li>
</ul>

<p>We just made this pull request to Timecop:</p>

<p>"Add Timecop#lens where time can go FASTER"</p>

<p>Create a new mock_type, :lens which will let time continue, like :travel, but the first argument is a scaling factor which will make time move at an accelerated pace.</p>

<p>https://github.com/jtrupiano/timecop/pull/42</p> <a href="http://pivotallabs.com/standup-sf-09-21-12-get-older-faster/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-sf-09-21-12-get-older-faster/">[Standup][SF] 09/21/12: Get older faster</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interestings</h2>
<ul>
<li>Timecop#lens</li>
</ul>
<p>We just made this pull request to Timecop:</p>
<p>&#8220;Add Timecop#lens where time can go FASTER&#8221;</p>
<p>Create a new mock_type, :lens which will let time continue, like :travel, but the first argument is a scaling factor which will make time move at an accelerated pace.</p>
<p>https://github.com/jtrupiano/timecop/pull/42</p>
<p>The post <a href="http://pivotallabs.com/standup-sf-09-21-12-get-older-faster/">[Standup][SF] 09/21/12: Get older faster</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-sf-09-21-12-get-older-faster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ah, ah, ah. Now, that was silly. Wouldn&#8217;t you agree, my bats? Ah, ah, ah.</title>
		<link>http://pivotallabs.com/ah-ah-ah-now-that-was-silly-wouldn-t-you-agree-my-bats-ah-ah-ah/</link>
		<comments>http://pivotallabs.com/ah-ah-ah-now-that-was-silly-wouldn-t-you-agree-my-bats-ah-ah-ah/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 22:26:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/ah-ah-ah-now-that-was-silly-wouldn-t-you-agree-my-bats-ah-ah-ah/</guid>
		<description><![CDATA[<p><h2>Helps</h2>

<ul>
<li>Slow count after delete_all of millions of records?</li>
<li>font icons, Ajax, and IE8</li>
</ul>

<p>Our application is using Font-Awesome to display some of our icons. One of our modals that has its content loaded via Ajax is rendered in IE8 without any of these icons visible. Clicking any element that contains these icons will make them instantly appear.</p>

<p>Is there a known issue with IE8 not properly applying CSS :before rules to content fetched with Ajax? Or could it be a known issue with how it handles fonts? Any ideas?</p>

<h2>Events</h2>

<ul>
<li>Ember.js talk @ Zendesk - Tuesday 6:00pm</li>
</ul>

<p>http://www.eventbrite.com/event/4213815636/efbnen</p> <a href="http://pivotallabs.com/ah-ah-ah-now-that-was-silly-wouldn-t-you-agree-my-bats-ah-ah-ah/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/ah-ah-ah-now-that-was-silly-wouldn-t-you-agree-my-bats-ah-ah-ah/">Ah, ah, ah. Now, that was silly. Wouldn&#8217;t you agree, my bats? Ah, ah, ah.</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Helps</h2>
<ul>
<li>Slow count after delete_all of millions of records?</li>
<li>font icons, Ajax, and IE8</li>
</ul>
<p>Our application is using Font-Awesome to display some of our icons. One of our modals that has its content loaded via Ajax is rendered in IE8 without any of these icons visible. Clicking any element that contains these icons will make them instantly appear.</p>
<p>Is there a known issue with IE8 not properly applying CSS :before rules to content fetched with Ajax? Or could it be a known issue with how it handles fonts? Any ideas?</p>
<h2>Events</h2>
<ul>
<li>Ember.js talk @ Zendesk &#8211; Tuesday 6:00pm</li>
</ul>
<p>http://www.eventbrite.com/event/4213815636/efbnen</p>
<p>The post <a href="http://pivotallabs.com/ah-ah-ah-now-that-was-silly-wouldn-t-you-agree-my-bats-ah-ah-ah/">Ah, ah, ah. Now, that was silly. Wouldn&#8217;t you agree, my bats? Ah, ah, ah.</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/ah-ah-ah-now-that-was-silly-wouldn-t-you-agree-my-bats-ah-ah-ah/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[SF][Standup] 09/19/12: ActiveAdmin vs. RailsAdmin&#8230; Arrrggg!</title>
		<link>http://pivotallabs.com/sf-standup-09-19-12-activeadmin-vs-railsadmin-arrrggg/</link>
		<comments>http://pivotallabs.com/sf-standup-09-19-12-activeadmin-vs-railsadmin-arrrggg/#comments</comments>
		<pubDate>Wed, 19 Sep 2012 14:14:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/sf-standup-09-19-12-activeadmin-vs-railsadmin-arrrggg/</guid>
		<description><![CDATA[<p><h2>Interestings</h2>

<ul>
<li>ActiveAdmin after_save</li>
</ul>

<p>If you are using ActiveAdmin, beware that the <code>after_save</code> callback gets fired both when the model gets saved, and when there are validation errors on the model.</p>

<p>It really behaves like a callback after the model <code>save</code> method gets called, regardless of its return value.</p>

<ul>
<li>Testing RailsAdmin custom actions</li>
</ul>

<p>Let's say you're writing a RailsAdmin custom action, and you want to test it with a request spec.</p>

<p>If the test passes when guard is on, but fails when guard is off, then you've forgotten that the RailsAdmin initializer <em>does not run</em> when loading a rake task. It <em>does run</em> as part of bundle exec guard start.</p>

<p>This is a performance 'optimization' that RailsAdmin adds.</p>

<p>To turn it back on, so you can test custom actions:</p>

<p>task :default => [:load_rails_admin_initializer]
task :load_rails_admin_initializer do
  ENV['SKIP_RAILS_ADMIN_INITIALIZER'] = 'false'
end</p>

<ul>
<li>International Talk Like a Pirate Day!</li>
</ul>

<p>Arrrgggggg me mateys! To your pairs you scabrous dogs!</p> <a href="http://pivotallabs.com/sf-standup-09-19-12-activeadmin-vs-railsadmin-arrrggg/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/sf-standup-09-19-12-activeadmin-vs-railsadmin-arrrggg/">[SF][Standup] 09/19/12: ActiveAdmin vs. RailsAdmin&#8230; Arrrggg!</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interestings</h2>
<ul>
<li>ActiveAdmin after_save</li>
</ul>
<p>If you are using ActiveAdmin, beware that the <code>after_save</code> callback gets fired both when the model gets saved, and when there are validation errors on the model.</p>
<p>It really behaves like a callback after the model <code>save</code> method gets called, regardless of its return value.</p>
<ul>
<li>Testing RailsAdmin custom actions</li>
</ul>
<p>Let&#8217;s say you&#8217;re writing a RailsAdmin custom action, and you want to test it with a request spec.</p>
<p>If the test passes when guard is on, but fails when guard is off, then you&#8217;ve forgotten that the RailsAdmin initializer <em>does not run</em> when loading a rake task. It <em>does run</em> as part of bundle exec guard start.</p>
<p>This is a performance &#8216;optimization&#8217; that RailsAdmin adds.</p>
<p>To turn it back on, so you can test custom actions:</p>
<p>task :default => [:load_rails_admin_initializer]<br />
task :load_rails_admin_initializer do<br />
  ENV['SKIP_RAILS_ADMIN_INITIALIZER'] = &#8216;false&#8217;<br />
end</p>
<ul>
<li>International Talk Like a Pirate Day!</li>
</ul>
<p>Arrrgggggg me mateys! To your pairs you scabrous dogs!</p>
<p>The post <a href="http://pivotallabs.com/sf-standup-09-19-12-activeadmin-vs-railsadmin-arrrggg/">[SF][Standup] 09/19/12: ActiveAdmin vs. RailsAdmin&#8230; Arrrggg!</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/sf-standup-09-19-12-activeadmin-vs-railsadmin-arrrggg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Standup][SF] 2012.05.25 &#8211; 1 git repo, 2 Procfiles, 2 Heroku Apps, CSS transitions behaving badly</title>
		<link>http://pivotallabs.com/standup-sf-2012-05-25-1-git-repo-2-procfiles-2-heroku-apps-css-transitions-behaving-badly/</link>
		<comments>http://pivotallabs.com/standup-sf-2012-05-25-1-git-repo-2-procfiles-2-heroku-apps-css-transitions-behaving-badly/#comments</comments>
		<pubDate>Fri, 25 May 2012 18:05:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-sf-2012-05-25-1-git-repo-2-procfiles-2-heroku-apps-css-transitions-behaving-badly/</guid>
		<description><![CDATA[<p><h2>Ask for Help</h2>

<blockquote>
    <p>*"1 git repo, 2 Heroku apps, 2 procfiles? Heroku currently is limited to 1 procfile per repo, so we've created a rake task that branches, modifies the procfile and pushes. Do you have a better solution?"</p>
</blockquote>

<p>Is it possible to use env variables to parameterize your Procfile?</p>

<blockquote>
    <p><em>"Capybara: How can I click on a flash dialog for webcam settings?"</em></p>
</blockquote>

<p>This was solved by right clicking and going into flash settings and enabling this permission always for this domain. Setting this up on headless CI may be more difficult.</p>

<blockquote>
    <p><em>"I have CSS transitions that behave differently when 'user initiated' vs initiated from a setTimeout or other event."</em></p>
</blockquote> <a href="http://pivotallabs.com/standup-sf-2012-05-25-1-git-repo-2-procfiles-2-heroku-apps-css-transitions-behaving-badly/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-sf-2012-05-25-1-git-repo-2-procfiles-2-heroku-apps-css-transitions-behaving-badly/">[Standup][SF] 2012.05.25 &#8211; 1 git repo, 2 Procfiles, 2 Heroku Apps, CSS transitions behaving badly</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Ask for Help</h2>
<blockquote>
<p>*&#8221;1 git repo, 2 Heroku apps, 2 procfiles? Heroku currently is limited to 1 procfile per repo, so we&#8217;ve created a rake task that branches, modifies the procfile and pushes. Do you have a better solution?&#8221;</p>
</blockquote>
<p>Is it possible to use env variables to parameterize your Procfile?</p>
<blockquote>
<p><em>&#8220;Capybara: How can I click on a flash dialog for webcam settings?&#8221;</em></p>
</blockquote>
<p>This was solved by right clicking and going into flash settings and enabling this permission always for this domain. Setting this up on headless CI may be more difficult.</p>
<blockquote>
<p><em>&#8220;I have CSS transitions that behave differently when &#8216;user initiated&#8217; vs initiated from a setTimeout or other event.&#8221;</em></p>
</blockquote>
<p>The post <a href="http://pivotallabs.com/standup-sf-2012-05-25-1-git-repo-2-procfiles-2-heroku-apps-css-transitions-behaving-badly/">[Standup][SF] 2012.05.25 &#8211; 1 git repo, 2 Procfiles, 2 Heroku Apps, CSS transitions behaving badly</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-sf-2012-05-25-1-git-repo-2-procfiles-2-heroku-apps-css-transitions-behaving-badly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Standup 05/22/2012: [SF] CarrierWave is messy</title>
		<link>http://pivotallabs.com/standup-05-22-2012-sf-carrierwave-is-messy/</link>
		<comments>http://pivotallabs.com/standup-05-22-2012-sf-carrierwave-is-messy/#comments</comments>
		<pubDate>Tue, 22 May 2012 14:18:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Standup]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-05-22-2012-sf-carrierwave-is-messy/</guid>
		<description><![CDATA[<p><h2>Ask for Help</h2>

<blockquote>
    <p><em>"CarrierWave is messy leaving files in the tmp directory when running tests.  Is rm -rf the best answer?"</em></p>
</blockquote>

<p>Yes!</p>

<blockquote>
    <p><em>"While the we love Rails, we don't need it, we just want  its asset packaging features. Some suggest using <a href="https://github.com/sstephenson/sprockets">sprockets</a>. Do you have other suggestions?"</em></p>
</blockquote>

<ul>
<li><a href="http://documentcloud.github.com/jammit">jammit</a></li>
<li><a href="https://github.com/cowboy/grunt">grunt</a></li>
</ul>

<h2>Interesting Things</h2>

<p>*Gem Maintainers: use <a href="https://github.com/pivotal/LicenseFinder">LicenseFinder</a> to save users of your gem the hassle of digging through your gem to figure out what license your gem is distributed under.</p>

<p>*A Pivot had great success using <a href="http://join.me">Join.me</a> for remote pairing.  Setup was a snap!  Others suggest checking out <a href="http://www.teamviewer.com/">TeamViewer</a> as well.</p> <a href="http://pivotallabs.com/standup-05-22-2012-sf-carrierwave-is-messy/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-05-22-2012-sf-carrierwave-is-messy/">Standup 05/22/2012: [SF] CarrierWave is messy</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Ask for Help</h2>
<blockquote>
<p><em>&#8220;CarrierWave is messy leaving files in the tmp directory when running tests.  Is rm -rf the best answer?&#8221;</em></p>
</blockquote>
<p>Yes!</p>
<blockquote>
<p><em>&#8220;While the we love Rails, we don&#8217;t need it, we just want  its asset packaging features. Some suggest using <a href="https://github.com/sstephenson/sprockets">sprockets</a>. Do you have other suggestions?&#8221;</em></p>
</blockquote>
<ul>
<li><a href="http://documentcloud.github.com/jammit">jammit</a></li>
<li><a href="https://github.com/cowboy/grunt">grunt</a></li>
</ul>
<h2>Interesting Things</h2>
<p>*Gem Maintainers: use <a href="https://github.com/pivotal/LicenseFinder">LicenseFinder</a> to save users of your gem the hassle of digging through your gem to figure out what license your gem is distributed under.</p>
<p>*A Pivot had great success using <a href="http://join.me">Join.me</a> for remote pairing.  Setup was a snap!  Others suggest checking out <a href="http://www.teamviewer.com/">TeamViewer</a> as well.</p>
<p>The post <a href="http://pivotallabs.com/standup-05-22-2012-sf-carrierwave-is-messy/">Standup 05/22/2012: [SF] CarrierWave is messy</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-05-22-2012-sf-carrierwave-is-messy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>[Standup][SF] 11/22/2011:  Programmatic select box changes</title>
		<link>http://pivotallabs.com/standup-sf-11-22-2011-programmatic-select-box-changes/</link>
		<comments>http://pivotallabs.com/standup-sf-11-22-2011-programmatic-select-box-changes/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 17:12:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-sf-11-22-2011-programmatic-select-box-changes/</guid>
		<description><![CDATA[<p><h2>Help!</h2>

<blockquote>
    <p><em>"How do I choose the value of a select box programmatically? The val function does not seem to do the trick."</em></p>
</blockquote>

<p>Try setting the desired option as selected and then trigger a change event on the select input. </p>

<blockquote>
    <p>*"A pair is looking for 'multi file upload via iframe-transport' expertise. Specifically uploads in FireFox 3.6."</p>
</blockquote>

<h2>Interesting</h2>

<ul>
<li>The latest RubyMine EAP has improved code formatting options! </li>
</ul> <a href="http://pivotallabs.com/standup-sf-11-22-2011-programmatic-select-box-changes/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-sf-11-22-2011-programmatic-select-box-changes/">[Standup][SF] 11/22/2011:  Programmatic select box changes</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Help!</h2>
<blockquote>
<p><em>&#8220;How do I choose the value of a select box programmatically? The val function does not seem to do the trick.&#8221;</em></p>
</blockquote>
<p>Try setting the desired option as selected and then trigger a change event on the select input. </p>
<blockquote>
<p>*&#8221;A pair is looking for &#8216;multi file upload via iframe-transport&#8217; expertise. Specifically uploads in FireFox 3.6.&#8221;</p>
</blockquote>
<h2>Interesting</h2>
<ul>
<li>The latest RubyMine EAP has improved code formatting options! </li>
</ul>
<p>The post <a href="http://pivotallabs.com/standup-sf-11-22-2011-programmatic-select-box-changes/">[Standup][SF] 11/22/2011:  Programmatic select box changes</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-sf-11-22-2011-programmatic-select-box-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standup 09/30/2011: Bulk inserts</title>
		<link>http://pivotallabs.com/standup-09-30-2011-bulk-inserts/</link>
		<comments>http://pivotallabs.com/standup-09-30-2011-bulk-inserts/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 14:39:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[activerecord]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-09-30-2011-bulk-inserts/</guid>
		<description><![CDATA[<p><h2>Ask for Help</h2>

<blockquote>
    <p><em>"Our delayed job consumes 2G of memory creating ~20k ActiveRecords in a loop!"</em></p>
</blockquote>

<p>It doesn't answer why your job is using so much memory, but check out <a href="https://github.com/zdennis/activerecord-import/wiki/">activerecord-import</a>.</p> <a href="http://pivotallabs.com/standup-09-30-2011-bulk-inserts/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-09-30-2011-bulk-inserts/">Standup 09/30/2011: Bulk inserts</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Ask for Help</h2>
<blockquote>
<p><em>&#8220;Our delayed job consumes 2G of memory creating ~20k ActiveRecords in a loop!&#8221;</em></p>
</blockquote>
<p>It doesn&#8217;t answer why your job is using so much memory, but check out <a href="https://github.com/zdennis/activerecord-import/wiki/">activerecord-import</a>.</p>
<p>The post <a href="http://pivotallabs.com/standup-09-30-2011-bulk-inserts/">Standup 09/30/2011: Bulk inserts</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-09-30-2011-bulk-inserts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Standup 09/28/2011: Epics!</title>
		<link>http://pivotallabs.com/standup-09-28-2011-epics/</link>
		<comments>http://pivotallabs.com/standup-09-28-2011-epics/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 14:10:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Standup]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-09-28-2011-epics/</guid>
		<description><![CDATA[<p><h2>Interesting Things</h2>

<ul>
<li>Pivotal SF will be hosting a <a href="http://www.meetup.com/San-Francisco-Pivotal-Tracker-Users-Group/">Tracker Users Group meetup tonight</a>. Dan Podsedly will be speaking. He will be seeking feedback for a eagerly awaited feature to be rolled out shortly: Epics! Come and mingle with fellow Tracker users, drink some beer and eat some food.</li>
</ul> <a href="http://pivotallabs.com/standup-09-28-2011-epics/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-09-28-2011-epics/">Standup 09/28/2011: Epics!</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interesting Things</h2>
<ul>
<li>Pivotal SF will be hosting a <a href="http://www.meetup.com/San-Francisco-Pivotal-Tracker-Users-Group/">Tracker Users Group meetup tonight</a>. Dan Podsedly will be speaking. He will be seeking feedback for a eagerly awaited feature to be rolled out shortly: Epics! Come and mingle with fellow Tracker users, drink some beer and eat some food.</li>
</ul>
<p>The post <a href="http://pivotallabs.com/standup-09-28-2011-epics/">Standup 09/28/2011: Epics!</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-09-28-2011-epics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android WebView loadData vs loadDataWithBaseURL</title>
		<link>http://pivotallabs.com/android-webview-loaddata-vs-loaddatawithbaseurl/</link>
		<comments>http://pivotallabs.com/android-webview-loaddata-vs-loaddatawithbaseurl/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 17:52:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/android-webview-loaddata-vs-loaddatawithbaseurl/</guid>
		<description><![CDATA[<p><p>We spent some time trying to figure out why some html content would not load in our app's WebView. We found trivial html can be loaded into a WebView using the <a href="http://developer.android.com/reference/android/webkit/WebView.html#loadData(java.lang.String, java.lang.String, java.lang.String)">loadData&#40;String, String, String&#41;</a> method. Rendering complex pages with Javascript is a problem. It turns out the loadData&#40;&#41; method requires the html to be URI escaped &#40;RTFM? Bah!&#41;. There are additional characters that need to be escaped too, requiring some nasty boilerplate.</p>

<p>The simpler solution &#40;workaround?&#41; is to use <a href="http://developer.android.com/reference/android/webkit/WebView.html#loadDataWithBaseURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)">loadDataWithBaseURL&#40;String, String, String, String, String&#41;</a>. Calls to this method do not require escaping. Pass along a garbage base url &#40;or null&#41;, and an empty or null history url for success and profit.</p>

<pre>
webView.loadDataWithBaseURL&#40;&#34;blarg://ignored&#34;, getData&#40;&#41;, &#34;text/html&#34;, &#34;utf-8&#34;, &#34;&#34;&#41;;
</pre> <a href="http://pivotallabs.com/android-webview-loaddata-vs-loaddatawithbaseurl/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/android-webview-loaddata-vs-loaddatawithbaseurl/">Android WebView loadData vs loadDataWithBaseURL</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>We spent some time trying to figure out why some html content would not load in our app&#8217;s WebView. We found trivial html can be loaded into a WebView using the <a href="http://developer.android.com/reference/android/webkit/WebView.html#loadData(java.lang.String, java.lang.String, java.lang.String)">loadData&#40;String, String, String&#41;</a> method. Rendering complex pages with Javascript is a problem. It turns out the loadData&#40;&#41; method requires the html to be URI escaped &#40;RTFM? Bah!&#41;. There are additional characters that need to be escaped too, requiring some nasty boilerplate.</p>
<p>The simpler solution &#40;workaround?&#41; is to use <a href="http://developer.android.com/reference/android/webkit/WebView.html#loadDataWithBaseURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)">loadDataWithBaseURL&#40;String, String, String, String, String&#41;</a>. Calls to this method do not require escaping. Pass along a garbage base url &#40;or null&#41;, and an empty or null history url for success and profit.</p>
<pre>
webView.loadDataWithBaseURL&#40;&quot;blarg://ignored&quot;, getData&#40;&#41;, &quot;text/html&quot;, &quot;utf-8&quot;, &quot;&quot;&#41;;
</pre>
<p>The post <a href="http://pivotallabs.com/android-webview-loaddata-vs-loaddatawithbaseurl/">Android WebView loadData vs loadDataWithBaseURL</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/android-webview-loaddata-vs-loaddatawithbaseurl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android Image Caching</title>
		<link>http://pivotallabs.com/android-image-caching/</link>
		<comments>http://pivotallabs.com/android-image-caching/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 19:25:00 +0000</pubDate>
		<dc:creator>Tyler Schultz</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/android-image-caching/</guid>
		<description><![CDATA[<p><p>Web development spoiled me. Set the src tag on an img tag and away you go. For the most part, browsers just do the right thing and cache these requests. Disappointingly, Android does not come with out of the box support for caching content downloaded from the network. Server apis often require SSL, request headers, support for different HTTP methods, multipart post bodies, etc. requiring the use of the apache http client libraries. These libraries are powerful, but are a bear to work with. As far as I can tell there is no support for caching http responses built into the apache libraries, requiring that you roll your own caching scheme. Images often do not have all these complicated HTTP requirements. They're usually simple HTTP GET calls. This makes the java.net.* libraries appealing. The java.net libraries come with some handy classes that makes caching a breeze. </p> <a href="http://pivotallabs.com/android-image-caching/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/android-image-caching/">Android Image Caching</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Web development spoiled me. Set the src tag on an img tag and away you go. For the most part, browsers just do the right thing and cache these requests. Disappointingly, Android does not come with out of the box support for caching content downloaded from the network. Server apis often require SSL, request headers, support for different HTTP methods, multipart post bodies, etc. requiring the use of the apache http client libraries. These libraries are powerful, but are a bear to work with. As far as I can tell there is no support for caching http responses built into the apache libraries, requiring that you roll your own caching scheme. Images often do not have all these complicated HTTP requirements. They&#8217;re usually simple HTTP GET calls. This makes the java.net.* libraries appealing. The java.net libraries come with some handy classes that makes caching a breeze. </p>
<p>Here is a snippet that will cause your request to be pulled from the cache, should it exist. If it doesn&#8217;t exist, the retrieved response will be written to the cache. </p>
<pre>
URL url = new URL&#40;&quot;https://pivotallabs.com/images/pivotallabs-logo.png&quot;&#41;;
URLConnection connection = url.openConnection&#40;&#41;;
connection.setUseCaches&#40;true&#41;;
Drawable drawable = Drawable.createFromStream&#40;connection.getInputStream&#40;&#41;, &quot;src&quot;&#41;;
</pre>
<p>In the past I tried to use the code above alone and found it didn&#8217;t work, and no solutions seemed obvious. The javadocs for URLConnection don&#8217;t mention anything about ResponseCache, but there is work to be done there to make it all work. The following example shows using Android&#8217;s cache directory to cache the responses. You&#8217;ll want to take a moment to read the Android docs about the cache dir. There are guidelines for use of the directory. This looks like a lot of code &#40;Java, Java, Java, Java&#41;, but IntelliJ will allow you to cntl-shift-space your way to happiness and write most of it for you.</p>
<pre>
final String cacheDir = context.getCacheDir&#40;&#41;;
ResponseCache.setDefault&#40;new ResponseCache&#40;&#41; {
    @Override
    public CacheResponse get&#40;URI uri, String s, Map&lt;String, List&lt;string&gt;&gt; headers&#41; throws IOException {
        final File file = new File&#40;cacheDir, escape&#40;uri.getPath&#40;&#41;&#41;&#41;;
        if &#40;file.exists&#40;&#41;&#41; {
            return new CacheResponse&#40;&#41; {
                @Override
                public Map&lt;String, List&lt;string&gt;&gt; getHeaders&#40;&#41; throws IOException {
                    return null;
                }

                @Override
                public InputStream getBody&#40;&#41; throws IOException {
                    return new FileInputStream&#40;file&#41;;
                }
            };
        } else {
            return null;
        }
    }

    @Override
    public CacheRequest put&#40;URI uri, URLConnection urlConnection&#41; throws IOException {
        final File file = new File&#40;cacheDir, escape&#40;urlConnection.getURL&#40;&#41;.getPath&#40;&#41;&#41;&#41;;
        return new CacheRequest&#40;&#41; {
            @Override
            public OutputStream getBody&#40;&#41; throws IOException {
                return new FileOutputStream&#40;file&#41;;
            }

            @Override
            public void abort&#40;&#41; {
                file.delete&#40;&#41;;
            }
        };
    }

    private String escape&#40;String url&#41; {
       return url.replace&#40;&quot;/&quot;, &quot;-&quot;&#41;.replace&#40;&quot;.&quot;, &quot;-&quot;&#41;;
    }
}&#41;;
&lt;/string&gt;&lt;/string&gt;</pre>
<p>This is a simple implementation that pays no attention to the response headers, returns no cached response headers, etc. but I think you get the gist. There is one gotcha: the URI passed into the put method does not contain the path info for the url, it must be retrieved from the URLConnection. Happy caching!</p>
<p>The post <a href="http://pivotallabs.com/android-image-caching/">Android Image Caching</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/android-image-caching/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using apc
Database Caching using apc
Object Caching 1125/1240 objects using apc

 Served from: pivotallabs.com @ 2013-05-26 04:08:08 by W3 Total Cache -->