<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3258050048037612927</id><updated>2012-02-16T01:40:20.639-06:00</updated><category term='ruby'/><category term='activerecord'/><category term='P90X'/><category term='capistrano'/><category term='coderead'/><category term='migrations'/><title type='text'>The Untethered Ravings of a Sane Mind</title><subtitle type='html'>I consider myself a fairly sane individual, however, I have never been accused of being normal. I am a jack of all trades trying to master some. Interested in everything but thoughtful enough to understand I can never know everything and that really bothers me.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-648435211567462097</id><published>2011-10-12T15:00:00.001-05:00</published><updated>2011-10-12T22:15:22.818-05:00</updated><title type='text'>Day 9 update</title><content type='html'>&lt;div&gt;Woke up feeling terrible. Go to doctor, to have them tell me I have strep throat.&lt;br /&gt;No yoga tonight. No work out today. Suck.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-648435211567462097?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/648435211567462097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/day-9-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/648435211567462097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/648435211567462097'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/day-9-update.html' title='Day 9 update'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-2423204978034037577</id><published>2011-10-12T00:07:00.001-05:00</published><updated>2011-10-12T00:07:29.151-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='P90X'/><title type='text'>P90X Day 8</title><content type='html'>So day 7 didn't turn out like I wanted. Got up exhausted consuming only 3 hours of sleep, but oh well. I took a look at the yoga schedule and they have a class on Wednesday. &amp;nbsp;Day 8. &amp;nbsp;What can I say, shit was off the hook! &amp;nbsp;I focused on form over reps and upped the resistance on the bands. &amp;nbsp;I can see myself doing full pull-ups by the time the 90 days are up. &amp;nbsp;If you have problems getting going all I can say is slap on your cloths and hit play. The warmup wakes you up and then you just have to bring it.&lt;br /&gt;&lt;br /&gt;5 hours till Day 9.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-2423204978034037577?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/2423204978034037577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/2423204978034037577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/2423204978034037577'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day8.html' title='P90X Day 8'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-3327328079979973559</id><published>2011-10-09T23:29:00.001-05:00</published><updated>2011-10-09T23:29:05.625-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='P90X'/><title type='text'>P90X Day 6</title><content type='html'>JAB! CROSS! HOOK! UPPERCUT!&amp;nbsp;JAB! CROSS! HOOK! UPPERCUT! &amp;nbsp;Over and over again. Pretty much sums up Day 6. Another late start to the day but damn was that work out a kick in the pants. I can't seem to kick higher then the knees and I have more balance on my left leg then I do with my right. &amp;nbsp;Ever sweat so much that the you have to wipe the floor or else you risk&amp;nbsp;slipping&amp;nbsp;and breaking your neck, yup, it &amp;nbsp;was that kind of work out. Kept my heart rate up about 160 and before you know it, it was all over. Tomorrow is suppose to be a day of rest, but the program has a stretch X option, and I wanted to hit up the local yoga hut tomorrow night. &amp;nbsp;hmm can it hurt to do both????&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-3327328079979973559?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/3327328079979973559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day-6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/3327328079979973559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/3327328079979973559'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day-6.html' title='P90X Day 6'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-6578015978436262079</id><published>2011-10-08T15:56:00.001-05:00</published><updated>2011-10-09T13:35:27.186-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='P90X'/><title type='text'>P90X Day 5</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;p&gt;Got up at 430 am because my dog Diesel was whining.&amp;nbsp; Let the dogs out and was incredibly tired. Couldn't do it...went back to bed.&amp;nbsp; &lt;/p&gt;&lt;p&gt;10 o clock rolled around and I still had'nt gotten up.  &lt;/p&gt;10:30... I'm back in the garage "bringing it".  5 days and I'm already upping the tension on my bands and the ab ripper x workout still destroys me but I can do a more of the excersises. Tonight, is the Taylor Swift concert.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-6578015978436262079?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/6578015978436262079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/6578015978436262079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/6578015978436262079'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day-5.html' title='P90X Day 5'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-2697430352783741173</id><published>2011-10-07T20:11:00.001-05:00</published><updated>2011-10-09T13:33:44.709-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='P90X'/><title type='text'>P90X Day 4</title><content type='html'>&lt;div&gt;&lt;p&gt;Today is yoga x day.&amp;#160; If you ever had a notion that yoga was not hard, yoga x will learn you good :) I woke up at 430 to start out the day.&amp;#160; I was dieing by the 20 minute mark, couldn't keep my balance and learned I need yoga blocks. It is now 11:30pm and every tendon and ligament feels tight and sore.&lt;/p&gt;&lt;p&gt;It has motivated me to go to yoga class on Monday.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-2697430352783741173?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/2697430352783741173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/2697430352783741173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/2697430352783741173'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day-4.html' title='P90X Day 4'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-3120931715381122992</id><published>2011-10-07T00:07:00.000-05:00</published><updated>2011-10-07T00:07:11.989-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='P90X'/><title type='text'>P90X Day1-3</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So I've been meaning to write out how the work out is working out.  With a little encouragement from friends I will make an effort post my progress.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: large;"&gt;Setup&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I've been sitting on P90X for about 2 months now and it wasn't until my weight kept from doing something I wanted to do did it finally hit me. I am 5'11" 255 lbs and the Las Vegas Fremont zip line operator said I was to heavy. Got home from that trip and a week later here we are. I built a pull up bar in the garage, bought some bands and a yoga mat. eff the rest for now.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: large;"&gt;Day 1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;My workout started at 5am. Popped the first DVD in and away I went. I have to work out that early because of work and life. The warm up alone was kicking my ass and then the workout started. Needless to say I struggled to keep up. Hell, I can't even do a half of a pull up. So I am using bands around my DIY pull up bar. Push ups, push ups and more push ups. I have dainty wrists... really need to buy those push up bar thingies. By the end of the hour I felt like vomiting. People tell me that is a good thing.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;After work I stopped by Sports Authority and picked up the Nike ones... man they feel cheap.. but they hold me up. I guess that's all that matters.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: large;"&gt;Day 2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Up and at'em at 5:30 this time. Damn was I tired. I started actually reading the work out guide and noticed...oops i missed the ab ripper x routine on day 1. Oh well, I'll catch it on day 3. Things I learned about my self on Day 2.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I'd probably fail a sobriety test. &amp;nbsp;I can barely balance on one leg.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I can't hop on one leg without the support of my pull up bar.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I can't run around the towel with out stepping on it, or tripping over it :(&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I will always feel like throwing up after a work out.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Realized today that I didn't do any measurements except for the photos on Day 1. So i ordered a Omron Heart Monitor, Fat Loss Monitor, and a "Myotape" shipped overnight.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;div style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: large;"&gt;Day 3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;Once again, up at 5am. Still tired and aware my workout is 15 minutes longer because of ab ripper x. Today was the first day that I didn't really feel&amp;nbsp;nauseous, maybe I didn't work hard enough. &amp;nbsp;Everything was tough, had to pause the DVD a couple of time to situate my bands and form. Same thing as usual , the warm up tired me out a bit but if you don't 'bring it ' you ain't gonna get it.&lt;br /&gt;&lt;br /&gt;They have you do this weird laying on your side&amp;nbsp;triceps&amp;nbsp;push up on one hand.. lol.. not me, how about a half of a half of one. &amp;nbsp;Maybe next time. Then the ab ripper x started.. run for the effing hills.. are you serious.. they would do 20 i'd manage 5 of whatever they were doing before collapsing into a heap. Everything hurt after that fiasco. Oh well.. looking forward to it next time.&lt;br /&gt;&lt;br /&gt;Got my stuff in from Amazon. Here are the measurements.&lt;br /&gt;The Fat Loss Monitor has 2 settings "Normal" and "Athlete" according to the instruction manual, I set it on Athlete because of P90x. I laughed when I read it.. because, let me tell you what.. I am no athlete.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Body Fat % 24.7 &amp;nbsp;( its 4 points higher on normal )&lt;/li&gt;&lt;li&gt;Chest 46"&lt;/li&gt;&lt;li&gt;Waist 45.5" (measured across the navel)&lt;/li&gt;&lt;li&gt;Hips 46"&lt;/li&gt;&lt;li&gt;Thighs 23.25" relaxed&lt;/li&gt;&lt;li&gt;Arms 14" relaxed&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Tomorrow is yoga X time. 90 minutes long.. so to make the hour drive to work + 2 hours of work out and getting ready for work.. need to wake up at least 3 hours before 7am.. that's 4am.. shit.. and its midnight.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-3120931715381122992?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/3120931715381122992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day1-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/3120931715381122992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/3120931715381122992'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/10/p90x-day1-3.html' title='P90X Day1-3'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-2637876747619329578</id><published>2011-09-23T12:05:00.000-05:00</published><updated>2011-09-23T12:05:31.930-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='activerecord'/><category scheme='http://www.blogger.com/atom/ns#' term='migrations'/><category scheme='http://www.blogger.com/atom/ns#' term='capistrano'/><title type='text'>Capistrano fun</title><content type='html'>Recently, the boss wanted to know of the 12 environments which ones have migrations pending. I hacked this together to answer the question.&lt;br /&gt;&lt;pre class="brush: ruby"&gt;namepace :deploy&lt;br /&gt; # other cap stuff&lt;br /&gt;namespace :pending&lt;br /&gt; # other cap stuff&lt;br /&gt;    desc &lt;&lt;-DESC&lt;br /&gt;      Displays a list of pending migrations&lt;br /&gt;    DESC&lt;br /&gt;    task :migrations, :except =&gt; { :no_release =&gt; true } do&lt;br /&gt;      command = "cd #{current_release} &amp;&amp; " \&lt;br /&gt;                'CUSTOMER_ENVIRONMENT=base script/runner ' \&lt;br /&gt;                '"puts ActiveRecord::Migrator.new(:up, \"#{Rails.root}/db/migrate\").pending_migrations.map(&amp;:name)"'&lt;br /&gt;      run(command)&lt;br /&gt;    end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-2637876747619329578?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/2637876747619329578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/09/capistrano-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/2637876747619329578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/2637876747619329578'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/09/capistrano-fun.html' title='Capistrano fun'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-8895985833519517553</id><published>2011-07-26T01:29:00.000-05:00</published><updated>2011-07-26T01:29:27.298-05:00</updated><title type='text'>Fun with ruby unary ampersand</title><content type='html'>While debugging an issue with our test suite I came across a peculiar line of code:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Dir.glob(File.dirname(__FILE__) + '/somedir/*', &amp;method(:require))&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Using the "principle of least surprise", you would assume all the files in somedir are passed into the "require" method as paramaters. Which is a correct assumption, but why?&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://ruby-doc.org/core/classes/Dir.html#M000629"&gt;Dir.glob&lt;/a&gt; method can take 3 parameters. The first is the required pattern parameter, the second is the optional FLAGS parameter and the third is a block. &lt;br /&gt;&lt;br /&gt;Lets take a look at the '&amp;method(:require)'&lt;br /&gt;&lt;br /&gt;"method" is a method on &lt;a href="http://ruby-doc.org/core/classes/Object.html#M001038"&gt;Object&lt;/a&gt; that returns a &lt;a href="http://ruby-doc.org/core/classes/Method.html"&gt;Method Object&lt;/a&gt;. The unary operator tries to convert the return value of method(:require) into a proc by calling to_proc and then to a block. &lt;br /&gt;&lt;br /&gt;The &lt;a href="http://ruby-doc.org/core/classes/Dir.html#M000629"&gt;Dir.glob&lt;/a&gt; method will yield to each item it was able to glob to the block as a parameter. Essentially it is taking the array of files and doing the following.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  files_array.each {|file| require file}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I plan on writing more about blocks and procs in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-8895985833519517553?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/8895985833519517553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/07/fun-with-ruby-unary-ampersand.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/8895985833519517553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/8895985833519517553'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/07/fun-with-ruby-unary-ampersand.html' title='Fun with ruby unary ampersand'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3258050048037612927.post-5982686539793552946</id><published>2011-07-06T16:34:00.001-05:00</published><updated>2011-07-26T00:17:22.269-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='coderead'/><title type='text'>You should coderead more</title><content type='html'>code-read |kōd rēd|&lt;br /&gt;verb (code-read-ing)&lt;br /&gt;1. &amp;nbsp;The act of reading other people's code for the sake of learning how they achieved their goal. Normally done to expand ones understanding of a library or the encapsulation of a library into another :W&lt;i&gt;hile I was codereading I learned Developer X automatically translates all symbols to strings in the call to Foo#bar.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;This is not to be confused with "reading code", what we do when we are digging through hundreds of lines of code trying to find out why String#upcase is now randomly upcasing characters in the string instead of the whole string.&lt;br /&gt;&lt;br /&gt;So here in my little corner of the world I present to you the term &lt;i&gt;coderead.&lt;/i&gt; It's been around awhile and used in conversation, but the interwebs have failed to produced a definition. I hope mine does it justice.&lt;br /&gt;&lt;br /&gt;I like to spend sometime codereading the rails source as well as popular gems as should everyone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3258050048037612927-5982686539793552946?l=sanityuntethered.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanityuntethered.blogspot.com/feeds/5982686539793552946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sanityuntethered.blogspot.com/2011/07/you-should-coderead-more.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/5982686539793552946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3258050048037612927/posts/default/5982686539793552946'/><link rel='alternate' type='text/html' href='http://sanityuntethered.blogspot.com/2011/07/you-should-coderead-more.html' title='You should coderead more'/><author><name>Felix</name><uri>http://www.blogger.com/profile/17689041770272493474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-4kt-nKSw3kI/ThS9bxekfoI/AAAAAAAAACU/aMfXK2HkCSw/s1600/944763a70b55dbd2898f97e455ea3cee.png'/></author><thr:total>0</thr:total></entry></feed>
