<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I have made it a goal to learn at least one thing each and every day.  Here’s what it is.</description><title>Learn 1 Thing A Day</title><generator>Tumblr (3.0; @learnonethingaday)</generator><link>http://learnonethingaday.tumblr.com/</link><item><title>Catching up on some reading</title><description>&lt;p&gt;Today&amp;#8217;s list&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.vanityfair.com/business/features/2011/03/michael-lewis-ireland-201103?printable=true"&gt;Michael Lewis on Ireland&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#%20http://m.readwriteweb.com/hack/2011/02/3-interesting-reads-on-recomme.php"&gt;Recommendation Systems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://m.npr.org/story/133501837?url=/blogs/money/2011/02/04/133501837/why-egypts-military-cares-about-home-appliances"&gt;Egypt Military and the Economy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.rollingstone.com/politics/news/the-riddle-of-jimmy-carter-20110201?print=true"&gt;Jimmy Carter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://learnonethingaday.tumblr.com/post/3144710366</link><guid>http://learnonethingaday.tumblr.com/post/3144710366</guid><pubDate>Sun, 06 Feb 2011 10:33:39 -0500</pubDate></item><item><title>Port Knocking</title><description>&lt;p&gt;&lt;a href="http://www.portknocking.org/"&gt;&lt;a href="http://www.portknocking.org/"&gt;http://www.portknocking.org/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Never seen this done before.&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/1211765635</link><guid>http://learnonethingaday.tumblr.com/post/1211765635</guid><pubDate>Wed, 29 Sep 2010 15:58:34 -0400</pubDate></item><item><title>Ruby rescue learnings</title><description>&lt;p&gt;Learned that rescue in Ruby does not rescue LoadErrors.  You need to explicitly rescue anything that is not a subclass of StandardError&lt;/p&gt;
&lt;p&gt;More details at &lt;a href="http://whynotwiki.com/Ruby_/_Exception_handling"&gt;&lt;a href="http://whynotwiki.com/Ruby_/_Exception_handling"&gt;http://whynotwiki.com/Ruby_/_Exception_handling&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/1082697160</link><guid>http://learnonethingaday.tumblr.com/post/1082697160</guid><pubDate>Tue, 07 Sep 2010 16:45:18 -0400</pubDate></item><item><title>Trying out Cappuccino</title><description>&lt;p&gt;Built out a demo &lt;a href="http://cappuccino.org"&gt;Cappuccino&lt;/a&gt; application.  Don&amp;#8217;t like the Objective-J syntax much, but very cool GUI tools that may be very helpful for my current project.&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/1044245866</link><guid>http://learnonethingaday.tumblr.com/post/1044245866</guid><pubDate>Tue, 31 Aug 2010 17:43:24 -0400</pubDate></item><item><title>Renoir and Arthritis</title><description>&lt;p&gt;Went to the &lt;a href="http://www.philamuseum.org/exhibitions/359.html"&gt;Late Renoir&lt;/a&gt; exhibit at the &lt;a href="http://www.philamuseum.org/"&gt;Philadelphia Museum of Art&lt;/a&gt; today.  Was amazed at how arthritis crippled his hands and yet he was still able to persevere and still make beautiful things.  Very motivating.&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/1028002710</link><guid>http://learnonethingaday.tumblr.com/post/1028002710</guid><pubDate>Sat, 28 Aug 2010 20:53:43 -0400</pubDate></item><item><title>Rails / MySQL / Concurrency</title><description>&lt;p&gt;Learned a lot about Rails, MySQL and concurrency.  Yehuda wrote a &lt;a href="http://yehudakatz.com/2010/08/14/threads-in-ruby-enough-already/"&gt;great post on threads&lt;/a&gt; that was very helpful interesting.  Wound up prototyping with &lt;a href="http://github.com/espace/mysqlplus"&gt;MySqlPlus&lt;/a&gt; and &lt;a href="http://github.com/brianmario/mysql2"&gt;MySQL2&lt;/a&gt;.  I now understand why Merb was created and wished my application was based on it rather than Rails.  I am not looking forward to the work that it will take to migrate to Rails 3.&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/975179326</link><guid>http://learnonethingaday.tumblr.com/post/975179326</guid><pubDate>Wed, 18 Aug 2010 23:07:07 -0400</pubDate><category>rails</category><category>merb</category><category>mysql</category><category>concurrency</category></item><item><title>if statements do not introduce scope in Ruby.</title><description>&lt;p&gt;&lt;a href="http://slideshow.rubyforge.org/ruby19.html#7"&gt;&lt;a href="http://slideshow.rubyforge.org/ruby19.html#7"&gt;http://slideshow.rubyforge.org/ruby19.html#7&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;I had no idea.&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/972241923</link><guid>http://learnonethingaday.tumblr.com/post/972241923</guid><pubDate>Wed, 18 Aug 2010 10:34:48 -0400</pubDate></item><item><title>The Missing Rule of Productivity</title><description>&lt;p&gt;In my browsing travels today, I stumbled upon the &lt;a href="http://www.lostgarden.com/2008/09/rules-of-productivity-presentation.html"&gt;Rules of Productivity&lt;/a&gt;.  Really interesting presentation and many good rules of thumb.  But one thing I believe they missed.&lt;/p&gt;
&lt;p&gt;One of the key conclusions of the presentation is that working &amp;gt; 40 hrs per week will result in a short performance boost followed by a productivity drag.  So you should always try to have your teams work 40 hour weeks, right.&lt;/p&gt;
&lt;p&gt;Well one thing that is not considered in the presentation is that not all days can be considered equal.  There are periods where pushing the team harder in the short-term can result in huge wins, even if you have to pay for it during a refractory period after the exertion.  Some examples of this:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Your company has an opportunity to present at once-a-year conference/trade show coming up.  A burst of productivity ahead of this may be worth sacrificing productivity from the team after&lt;/li&gt;
&lt;li&gt;There is a scheduled vacation coming up.  Should we ramp up the week before Thanksgiving or Christmas knowing that the next week is going to result in sub-optimal performance anyhow?&lt;/li&gt;
&lt;/ul&gt;</description><link>http://learnonethingaday.tumblr.com/post/965796388</link><guid>http://learnonethingaday.tumblr.com/post/965796388</guid><pubDate>Mon, 16 Aug 2010 23:44:38 -0400</pubDate><category>productivity</category></item><item><title>The Great Derangement and what I learned about Congressional earmarks.</title><description>&lt;p&gt;Last night/this morning read &lt;a href="http://www.amazon.com/Great-Derangement-Terrifying-Politics-Religion/dp/0385520344"&gt;The Great Derangement&lt;/a&gt; by &lt;a href="http://trueslant.com/matttaibbi/"&gt;Matt Taibbi&lt;/a&gt;. Taibbi is one of my favorite writers, especially when he is revealing the relationship between corporate influence buyers and politicians. What I would recommend reading in the book are his interludes on how laws actually get made (hint, &lt;a href="http://www.youtube.com/watch?v=mEJL2Uuv-oQ"&gt;not like this&lt;/a&gt;, which of course inspired this &lt;a href="http://www.spike.com/video/amendment-to-be/2752895"&gt;fantastic Simpsons clip&lt;/a&gt;). Learning about how earmarks actually get put into a bill, about how the Rules Committee works, was fantastic and why you want to read a book like this.&lt;/p&gt;
&lt;p&gt;As for the overall book, very disappointed. The parts on evangelical Christians were predictable, the parts about the Truthers just sad. Reminds me much more of Malcolm Gladwell&amp;#8217;s stuff; Taibbi has taken what would have been a fascinating 10 page magazine articles and stretched it out into a book.&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/931669894</link><guid>http://learnonethingaday.tumblr.com/post/931669894</guid><pubDate>Tue, 10 Aug 2010 08:02:00 -0400</pubDate></item><item><title>Ike and the Interstate Highway System</title><description>&lt;blockquote&gt;
&lt;p&gt;&lt;a title="Dwight D. Eisenhower" href="http://en.wikipedia.org/wiki/Dwight_D._Eisenhower"&gt;Dwight D. Eisenhower&lt;/a&gt;&amp;#8217;s experience as a member of the first 1919&amp;#160;&lt;a href="http://en.wikipedia.org/wiki/Transcontinental_Motor_Convoy"&gt;Transcontinental Convoy&lt;/a&gt; on the Lincoln Highway and his appreciation for the German &lt;a title="Autobahn" href="http://en.wikipedia.org/wiki/Autobahn"&gt;Autobahn&lt;/a&gt; system he gained during &lt;a title="World War II" href="http://en.wikipedia.org/wiki/World_War_II"&gt;World War II&lt;/a&gt; led him to his initiate support for the &lt;a title="Federal Aid Highway Act of 1956" href="http://en.wikipedia.org/wiki/Federal_Aid_Highway_Act_of_1956"&gt;Federal Aid Highway Act of 1956&lt;/a&gt; and the establishment of the &lt;a title="Interstate Highway System" href="http://en.wikipedia.org/wiki/Interstate_Highway_System"&gt;Interstate Highway System&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From Wikipedia&amp;#8230;(&lt;a href="http://en.wikipedia.org/wiki/Transcontinental_Motor_Convoy"&gt;http://en.wikipedia.org/wiki/Transcontinental_Motor_Convoy&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://learnonethingaday.tumblr.com/post/926999849</link><guid>http://learnonethingaday.tumblr.com/post/926999849</guid><pubDate>Mon, 09 Aug 2010 09:14:00 -0400</pubDate></item><item><title>MySQLReport taught me much about MySQL</title><description>&lt;p&gt;We are having some bizarre locking problem in our application.  To try and debug it, I used &lt;a href="http://hackmysql.com/mysqlreport"&gt;mysqlreport&lt;/a&gt;.  If you are using MySQL, I really recommend reading the &lt;a href="http://hackmysql.com/mysqlreportguide"&gt;user guide&lt;/a&gt; even if you never use the tool.  I learned a bunch about the stats that are coming out of MySQL and how to tell whether your app is well tuned.&lt;/p&gt;
&lt;p&gt;The good news was that our app does not seem to be locking at the DB level.  So where could it be. MemCache?  Passenger?&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/915731354</link><guid>http://learnonethingaday.tumblr.com/post/915731354</guid><pubDate>Fri, 06 Aug 2010 23:31:28 -0400</pubDate></item><item><title>How to setup Amazon S3 to be your Rails asset host when deployed on EngineYard Cloud</title><description>&lt;p&gt;We are using &lt;a href="http://www.engineyard.com/products/appcloud"&gt;EngineYard Cloud&lt;/a&gt; for hosting &lt;a href="http://www.packlate.com"&gt;PackLate.com&lt;/a&gt;.  We wanted to set up an &lt;a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html"&gt;asset host&lt;/a&gt; for static content.  This asset host needed to support both HTTP and HTTPS and we wanted to use a different, cookie-free domain.  Unfortunately, the EC2 instances that EngineYard Cloud runs on only can have 1 public IP address and we are not using wildcard SSL certificates.&lt;/p&gt;
&lt;p&gt;So we could either set up a whole new server for hosting (booo!!!), or we could try to leverage S3, which we are using for serving some images anyhow.&lt;/p&gt;
&lt;p&gt;To do this, we used EngineYards &lt;a href="http://docs.engineyard.com/appcloud/guides/deployment/home"&gt;AppCloud CLI API&lt;/a&gt; and created a before_symlink hook.&lt;/p&gt;
&lt;p&gt;In this before_symlink hook, we wanted to do two things:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Generate all cached files.  We use the &lt;a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M002231"&gt;stylesheet_link_tag&lt;/a&gt; and &lt;a href="http://api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptHelper.html#M002240"&gt;javascript_tag&lt;/a&gt; to create a concatenated CSS/JS scripts in the public directory.&lt;/li&gt;
&lt;li&gt;Push all of the files in the public directory up to S3, ideally using something like rsync.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;To do the first thing, what we came up with is on deployment, we fire up a Webrick instance on the app_master node prior to symlinking the newly deployed code. We then make HTTP requests to all pages that create the cached files in public.  We then kill the Webrick instance.&lt;/p&gt;
&lt;p&gt;Once the files are created, we use &lt;a href="http://www.s3sync.net"&gt;s3sync&lt;/a&gt; to sync up with a bucket on S3.  This is a fantastic tool that looks at what changes and updates the appropriate nodes.&lt;/p&gt;
&lt;p&gt;To see the scripts, check out &lt;a href="http://gist.github.com/510683"&gt;&lt;a href="http://gist.github.com/510683"&gt;http://gist.github.com/510683&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So in a couple of hours, we had an independent, cookie-free, HTTPS supported asset host that is automatically synchronized every time we deploy.&lt;/p&gt;
&lt;p&gt;Thanks to Jon and Kyle (via the magic of Google) for making this possible.&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/910314476</link><guid>http://learnonethingaday.tumblr.com/post/910314476</guid><pubDate>Thu, 05 Aug 2010 21:43:00 -0400</pubDate></item><item><title>HTTPS and IP Addresses</title><description>&lt;p&gt;Every IP address can really only support 1 SSL certificate really.  And EC2 servers may only have 1 public IP address.  So if you want to have 2 non-wildcard SSL certs for your site, you need 2 EC2 instances.&lt;/p&gt;</description><link>http://learnonethingaday.tumblr.com/post/905833386</link><guid>http://learnonethingaday.tumblr.com/post/905833386</guid><pubDate>Wed, 04 Aug 2010 23:16:39 -0400</pubDate></item></channel></rss>
