<?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>Derek Perez</title>
	<atom:link href="http://derekperez.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://derekperez.com/blog</link>
	<description>You've Reached My Internets.</description>
	<lastBuildDate>Wed, 24 Jun 2009 06:19:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>You&#8217;re Going to Suck</title>
		<link>http://derekperez.com/blog/2009/06/youre-going-to-suck/</link>
		<comments>http://derekperez.com/blog/2009/06/youre-going-to-suck/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:19:08 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[creativity]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[recommendations]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=177</guid>
		<description><![CDATA[Merlin Mann on Doing Creative Work; The Sound of Young America

Merlin Mann is an amazing speaker, and I&#8217;ve always found his talks inspirational. His theories have helped me through a ton of tough spots.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maximumfun.org"><strong>Merlin Mann on Doing Creative Work; The Sound of Young America</strong></a><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="27" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="playerMode=embedded" /><param name="src" value="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://media.libsyn.com/media/tsoya/tsoya090619_merlinmann.mp3" /><param name="wmode" value="window" /><param name="quality" value="best" /><embed type="application/x-shockwave-flash" width="400" height="27" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://media.libsyn.com/media/tsoya/tsoya090619_merlinmann.mp3" quality="best" wmode="window" flashvars="playerMode=embedded" bgcolor="#ffffff"></embed></object></p>
<p>Merlin Mann is an amazing speaker, and I&#8217;ve always found his talks inspirational. His theories have helped me through a ton of tough spots.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/06/youre-going-to-suck/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple way to &#8220;page&#8221; an Array in Ruby</title>
		<link>http://derekperez.com/blog/2009/06/simple-way-to-page-an-array-in-ruby/</link>
		<comments>http://derekperez.com/blog/2009/06/simple-way-to-page-an-array-in-ruby/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 21:26:34 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=171</guid>
		<description><![CDATA[Unless you have ultra simplistic needs, (and are using Rails) I always recommend using the fantastic will_paginate plugin for paginating ActiveRecord, and even non-ActiveRecord collections! But, if you have a basic need to to page an array, you could open up the Array class and add this method:

class Array
  def page&#40;pg, offset = 10&#41;
 [...]]]></description>
			<content:encoded><![CDATA[<p>Unless you have ultra simplistic needs, (and are using Rails) I always recommend using the fantastic <a href="http://wiki.github.com/mislav/will_paginate">will_paginate</a> plugin for paginating ActiveRecord, <a href="http://gitrdoc.com/rdoc/mislav/will_paginate/b3b0f593ea9b1da13a64bc825dfe17b6bbc2828b/classes/WillPaginate/Collection.html">and even non-ActiveRecord collections!</a> But, if you have a basic need to to page an array, you could open up the Array class and add this method:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC0066; font-weight:bold;">Array</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> page<span style="color:#006600; font-weight:bold;">&#40;</span>pg, offset = <span style="color:#006666;">10</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span>pg<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">*</span>offset<span style="color:#006600; font-weight:bold;">&#41;</span>..<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span>pg<span style="color:#006600; font-weight:bold;">*</span>offset<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>
This is a beautiful little method that adds #page to all arrays, and can be utilized like this:
</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">my_array = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span>,<span style="color:#006666;">2</span>,<span style="color:#006666;">3</span>,<span style="color:#006666;">4</span>,<span style="color:#006666;">5</span>, ... ,<span style="color:#006666;">20</span>,<span style="color:#006666;">21</span>,<span style="color:#006666;">22</span>,<span style="color:#006666;">23</span>,<span style="color:#006666;">24</span>,<span style="color:#006666;">25</span><span style="color:#006600; font-weight:bold;">&#93;</span>
my_array.<span style="color:#9900CC;">page</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;">#=&gt; [1,2,3,4,5,6,7,8,9,10]</span>
<span style="color:#9966CC; font-weight:bold;">OR</span>
my_array.<span style="color:#9900CC;">page</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span>, <span style="color:#006666;">5</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;">#=&gt; [1,2,3,4,5]</span></pre></div></div>

<p>Feel free to use this if you like it!</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/06/simple-way-to-page-an-array-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Haml &amp; Sass Bundles for TextMate</title>
		<link>http://derekperez.com/blog/2009/06/haml-sass-bundles-for-textmate/</link>
		<comments>http://derekperez.com/blog/2009/06/haml-sass-bundles-for-textmate/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 20:10:15 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[recommendations]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=167</guid>
		<description><![CDATA[At Caring.com, we write our view templates using Haml and Sass (with Chris Eppstein&#8217;s Compass CSS Framework). It was a little strange to get used to at first, especially coming from tag-based/ERB-style frontend templating, but I have found that it is surprisingly straightforward, and succinct. TextMate, which is a fabulous text editor for rails and [...]]]></description>
			<content:encoded><![CDATA[<p>At <a title="Elder Care, and Care Giving Resources" href="http://www.caring.com">Caring.com</a>, we write our view templates using <a href="http://haml.hamptoncatlin.com/">Haml</a> and <a href="http://sass-lang.com/">Sass</a> (with <a href="http://compass-style.org/">Chris Eppstein&#8217;s Compass CSS Framework</a>). It was a little strange to get used to at first, especially coming from tag-based/ERB-style frontend templating, but I have found that it is surprisingly straightforward, and succinct. <a href="http://macromates.com/">TextMate</a>, which is a fabulous text editor for rails and ruby, has two bundles that I use constantly that make my life easier (code coloring especially) in both Haml and Sass.</p>
<p>I am writing this blog post to share the bundles I use everyday with you, and so that I can remember where they live, for myself.</p>
<p>For Sass integration I use this bundle by <a href="http://github.com/seaofclouds/sass-textmate-bundle/tree/master">seaofclouds</a>:<br />
<code>git clone git://github.com/seaofclouds/sass-textmate-bundle.git "Ruby Saas.tmbundle"</code></p>
<p>For Haml integration, I use the &#8220;official&#8221; one provided by MacroMates (the creators of TextMate):<br />
<code>svn co "http://macromates.com/svn/Bundles/trunk/Bundles/Ruby Haml.tmbundle"</code></p>
<p>Clearly, you need to have both Subversion and Git installed to install these plugins, however you may be able to travel to github and download a zip file if need be.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/06/haml-sass-bundles-for-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>John Hodgman&#8217;s Speech at the Whitehouse Correspondents Dinner</title>
		<link>http://derekperez.com/blog/2009/06/john-hodgmans-speech-at-the-whitehouse-correspondents-dinner/</link>
		<comments>http://derekperez.com/blog/2009/06/john-hodgmans-speech-at-the-whitehouse-correspondents-dinner/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 23:37:51 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=164</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/yW7OPByRGDY&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/yW7OPByRGDY&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/06/john-hodgmans-speech-at-the-whitehouse-correspondents-dinner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PageSlide Plugin for jQuery</title>
		<link>http://derekperez.com/blog/2009/06/pageslide-plugin-for-jquery/</link>
		<comments>http://derekperez.com/blog/2009/06/pageslide-plugin-for-jquery/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 06:24:05 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=159</guid>
		<description><![CDATA[I&#8217;ve been working with Mr. Scott Robbins on his fantastic jQuery PageSlide plugin for the last few weeks. It has been a lot of fun, we&#8217;ve moved the project off of google code completely, and today have released version 1.1 of PageSlide on Github. version 1.1 is essentially a complete re-write touting a ton of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with <a href="http://srobbin.com/">Mr. Scott Robbins</a> on his fantastic jQuery PageSlide plugin for the last few weeks. It has been a lot of fun, we&#8217;ve moved the project off of google code completely, and <a href="http://github.com/srobbin/jquery-pageslide/tree/release-1.1">today have released version 1.1 of PageSlide on Github.</a> version 1.1 is essentially a complete re-write touting a ton of new/awesome features, here is a list from the README:</p>
<ul>
<li>Choose slide direction (left or right)</li>
<li>Custom width slides</li>
<li>Modal slides</li>
<li>unobtrusive</li>
<li>Mutiple slide definitions on the same page</li>
<li>Fully supported with IE7+, FireFox 2+, Safari 2+</li>
<li>Minified version included!</li>
</ul>
<p>I am very excited about this plugin, and will be using it in some of my projects very shortly! If you like the project, please &#8220;watch it&#8221; on Github and tweet about it and stuff while you&#8217;re at it :)</p>
<p><a href="http://github.com/srobbin/jquery-pageslide/tree/release-1.1">Get jQuery PageSlide here</a>, it works with jQuery 1.26 and up!</p>
<p>EDIT: Live demo can be found here: <a href="http://derekperez.com/jquery-pageslide/demo/">http://derekperez.com/jquery-pageslide/demo/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/06/pageslide-plugin-for-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What am I Doing With Myself?</title>
		<link>http://derekperez.com/blog/2009/03/what-am-i-doing-with-myself/</link>
		<comments>http://derekperez.com/blog/2009/03/what-am-i-doing-with-myself/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 06:10:54 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=157</guid>
		<description><![CDATA[It has been a busy month. In less than thirty days, my life has completely changed, for the better. I&#8217;ve moved back to the south bay, from the east bay and am now currently living centrally in Menlo Park, right next to the train station. I had about a week to pack/move/unpack before I started [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a busy month. In less than thirty days, my life has completely changed, for the better. I&#8217;ve moved back to the south bay, from the east bay and am now currently living centrally in Menlo Park, right next to the train station. I had about a week to pack/move/unpack before I started my new fantastic job as web engineer for growing startup, <a href="http://www.derekperez.com">Caring.com</a>, in San Mateo.</p>
<p><a href="http://www.caring.com">Caring, Inc</a> is a website dedicated to helping senior/elder caregivers and provides a wealth of resources for the caregiving community. At first, it seemed like a demographic/product that someone like me wouldn&#8217;t be too interested in, but I am very happy about the fact that I not only get to work on a fantastic team building a (suprisingly) complex CMS, but I am also making a difference in people&#8217;s lives. This is my way of changing the world today.</p>
<p>Caring from an engineering perspective is very cutting edge. We are a very very agile shop (our COO is a board member of the Agile Group or whatever they call themselves these days), we do stories, (real) scrums, sprints, and all that scrumy goodness. I am really into this workflow. I&#8217;ve worked for previous employers who don&#8217;t really understand how these tenents work together. Its very interesting, engineering is not the only agile team, the WHOLE company is agile, very neat!!</p>
<p>I love Menlo Park so far. Fantastic food, everything is walking distance, the train is right outside my door, perfect! I&#8217;ve never had such a perfect commute/living situation, everything (amazingly) just fell into place perfectly. I am also neighbors with my brother here which is hilarious, we have a walkie-talkie system setup, currently. The cats are also quite happy with my new place, much more socialble, less bitey.</p>
<p>I&#8217;ve also been doing a lot of research lately on scalability and some new software development techniques that I will definitely be writing more about very soon, so keep posted if you are interested in things like say, <a href="http://couchdb.apache.org/">CouchDB</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/03/what-am-i-doing-with-myself/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Everything is Amazing, Nobody is Happy</title>
		<link>http://derekperez.com/blog/2009/03/everything-is-amazing-nobody-is-happy/</link>
		<comments>http://derekperez.com/blog/2009/03/everything-is-amazing-nobody-is-happy/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 19:02:52 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/2009/03/everything-is-amazing-nobody-is-happy/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/jETv3NURwLc&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/jETv3NURwLc&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/03/everything-is-amazing-nobody-is-happy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Late Valentine For All My Readers</title>
		<link>http://derekperez.com/blog/2009/02/a-late-valentine-for-all-my-readers/</link>
		<comments>http://derekperez.com/blog/2009/02/a-late-valentine-for-all-my-readers/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 20:44:38 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=145</guid>
		<description><![CDATA[



Thanks for reading, readers. I&#8217;ll be posting more insightful things later.
]]></description>
			<content:encoded><![CDATA[<p>
<img src="http://farm4.static.flickr.com/3531/3287933563_30522df485_o.jpg" style="float:none"/>
</p>
<p>
Thanks for reading, readers. I&#8217;ll be posting more insightful things later.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/02/a-late-valentine-for-all-my-readers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fibonacci</title>
		<link>http://derekperez.com/blog/2009/02/fibonacci/</link>
		<comments>http://derekperez.com/blog/2009/02/fibonacci/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 20:57:31 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[fibonacci]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=140</guid>
		<description><![CDATA[Thanks so much everyone for submitting your Fibonacci examples! One of the reasons why I asked everyone to do this is because it gives me (and all of us) a chance to learn about different approaches and different languages. So, in case you haven&#8217;t figured it out, it was sort of a trick question.
Fibonacci is [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks so much everyone for submitting your Fibonacci examples! One of the reasons why I asked everyone to do this is because it gives me (and all of us) a chance to learn about different approaches and different languages. So, in case you haven&#8217;t figured it out, it was sort of a trick question.</p>
<p>Fibonacci is <em>generally </em>very fast, unless you are over-architecting the solution. Let me show you what I mean:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> fibo<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#006600; font-weight:bold;">&#40;</span>!<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">&gt;</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> ? n : fibo<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">+</span>fibo<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
37.<span style="color:#9900CC;">times</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>i<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;n=#{i} =&gt; #{fibo(i)}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This was my first attempt. Its a beautifully complex execution of the algorithm, using recursion. However, notice that I am not storing any of the values that I am calculating? That causes the processor to go crazy around time 30. This would be what I call a classic example of over-architecting a simple problem.</p>
<p>But its cool right? :)</p>
<p>Here is my faster, smarter, more performant version:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#ff6633; font-weight:bold;">$fibs</span> = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>;
&nbsp;
&nbsp;
<span style="color:#9966CC; font-weight:bold;">def</span> fibo_calc<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#006600; font-weight:bold;">&#40;</span>!<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">&gt;</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> ? n : fibonacci<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">+</span>fibonacci<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">def</span> fibonacci<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#ff6633; font-weight:bold;">$fibs</span><span style="color:#006600; font-weight:bold;">&#91;</span>n<span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#ff6633; font-weight:bold;">$fibs</span><span style="color:#006600; font-weight:bold;">&#91;</span>n<span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#9966CC; font-weight:bold;">else</span>
    x = fibo_calc<span style="color:#006600; font-weight:bold;">&#40;</span>n<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#ff6633; font-weight:bold;">$fibs</span><span style="color:#006600; font-weight:bold;">&#91;</span>n<span style="color:#006600; font-weight:bold;">&#93;</span> = x
    <span style="color:#0000FF; font-weight:bold;">return</span> x
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
37.<span style="color:#9900CC;">times</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>i<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;n=#{i} =&gt; #{fibonacci(i)}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This is much much much faster, and can hit 30,000 iterations without missing a beat. The cooler thing too is that I can mix up the 30,000 integers that its calculating for, and it can run a &#8220;shortcut&#8221; using the array. Very cool.</p>
<p>So that was my nerd realization of the month. Of course, there are a billion ways to skin an algorithm, but sometimes the most concise or technically interesting way, is the slowest. </p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/02/fibonacci/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nerd Challenge: Fibonacci Fun!</title>
		<link>http://derekperez.com/blog/2009/02/nerd-challenge-fibonacci-fun/</link>
		<comments>http://derekperez.com/blog/2009/02/nerd-challenge-fibonacci-fun/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 19:25:33 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[nerd]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=138</guid>
		<description><![CDATA[Lately, I&#8217;ve been studying algorithms, just for fun, because I am hardcore like that. Also, I&#8217;ve been very excited to test the speed/performance of the newly released and stable Ruby 1.9.1. I have been waiting patiently for the release, it is full of great new things like a modern VM, massive integer performance tweaks, language [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, I&#8217;ve been studying algorithms, just for fun, because I am hardcore like that. Also, I&#8217;ve been very excited to test the speed/performance of <a href="http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/">the newly released and stable Ruby 1.9.1</a>. I have been waiting patiently for the release, it is full of great new things like a modern VM, massive integer performance tweaks, language readability improvements, and full unicode support.</p>
<p>So I decided to do some masturbatory benchmarking, using <a href="http://en.wikipedia.org/wiki/Fibonacci_number">Fibonacci</a>! Also, did you know that <a href="http://www.ruby-doc.org/stdlib/libdoc/benchmark/rdoc/index.html">Ruby has a builtin benchmarking framework</a>?</p>
<p>Fibonacci is not a very difficult algorithm, though I learned a lot about what to do (and not do) when it comes to writing this sort of code in Ruby. (and any language for that matter)</p>
<p>So here is the challenge, write your best Fibonacci Sequence algorithm in any language you choose, discuss the pros/cons of your implementation, and speed of execution. Also, its mandatory that your algorithm calculates a minimum of 36 sequences deep, extra points if you get to 30,000 in less than 5 seconds.</p>
<p>In a few days, I will post how I did it in Ruby. I don&#8217;t really have a prize lined up or anything, maybe I will come up with something. At the very least, you&#8217;ll have bragging rights.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/02/nerd-challenge-fibonacci-fun/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Design Patterns For Creativity</title>
		<link>http://derekperez.com/blog/2009/01/design-patterns-for-creativity/</link>
		<comments>http://derekperez.com/blog/2009/01/design-patterns-for-creativity/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 02:05:27 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[creativity]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[recommendations]]></category>
		<category><![CDATA[merlinmann]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=136</guid>
		<description><![CDATA[
I have a lot of respect for Merlin Mann. The Merlin Mann I knew 6 months ago vs. the Merlin Mann of today seems very different. Almost as if I&#8217;ve watched him shed an exoskeleton of &#8220;tips to be creative&#8221;, to really seeking what it means to be a creative individual. I really think everyone [...]]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344" data="http://www.youtube.com/v/GExHiI_bQqc&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="src" value="http://www.youtube.com/v/GExHiI_bQqc&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p>I have a lot of respect for Merlin Mann. The Merlin Mann I knew 6 months ago vs. the Merlin Mann of today seems very different. Almost as if I&#8217;ve watched him shed an exoskeleton of &#8220;tips to be creative&#8221;, to really seeking what it means to be a creative individual. I really think everyone should watch this whole video. Its insipiring.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/01/design-patterns-for-creativity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Didn&#8217;t Come Here to Make Friends</title>
		<link>http://derekperez.com/blog/2009/01/i-didnt-come-here-to-make-friends/</link>
		<comments>http://derekperez.com/blog/2009/01/i-didnt-come-here-to-make-friends/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 19:50:44 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=134</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/w536Alnon24&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/w536Alnon24&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/01/i-didnt-come-here-to-make-friends/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why Twitter Makes FriendFeed Obsolete</title>
		<link>http://derekperez.com/blog/2009/01/why-twitter-makes-friendfeed-obsolete/</link>
		<comments>http://derekperez.com/blog/2009/01/why-twitter-makes-friendfeed-obsolete/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 23:21:07 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[recommendations]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=130</guid>
		<description><![CDATA[Anyone else out there tired of Twitter-spam? Every new web 2.0+ application that hits the web today asks you for your twitter credentials so they can post a 140 character spam about some various task you are performing at some website I don&#8217;t care about. However, there are times when I do care about those [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone else out there tired of Twitter-spam? Every new web 2.0+ application that hits the web today asks you for your twitter credentials so they can post a 140 character spam about some various task you are performing at some website I don&#8217;t care about. However, there are times when I do care about those other various tasks my friends are performing on various websites, and that&#8217;s where <a href="http://www.friendfeed.com">FriendFeed</a> comes in.</p>
<p>But I ask you, WHY BOTHER? Why am I going over to FriendFeed when I have a perfectly good Twitter timeline, full of friends I already know and trust, and chock-full of useless and semi-interesting pieces of information that I can&#8217;t seem to live without. Why are we duplicating all that information, when we could combine it into a master timeline (using Twitter), through a much more secure medium?</p>
<p>The as it stands today, If you want to broadcast your activities on a specific site through Twitter, you have to be ready to hand them over your username and password, that way they can essentially pretend to be you and make a post on your behalf. For some reason, that doesn&#8217;t seem to phase most people, but the ramifications of that act are sort of dangerous. <a href="http://www.alleyinsider.com/2009/1/fox-news-twitter-hacked-news-for-oreillys-wife">As you may have heard</a>, Twitter and the people who use it control many different spheres of influence, and that information falling into the wrong (and insecure) hands could be disastrous.</p>
<p>This is 2009! We&#8217;ve solved these sorts of problems in the past, lets put our thinking caps on! <strong>API, bitches. </strong>Twitter needs to introduce an API so that third-party vendors can post to your Twitter account without you having to fork over any nuclear secrets. <a href="http://www.flickr.com">Flickr</a> has figured out how to do this very well&#8230;eons ago</p>
<p>&#8220;But Derek! Didn&#8217;t you start this post off by saying you hate Twitter-spam?&#8221;</p>
<p>Yes, I do. Thats why the next thing we need Twitter to do is setup &#8220;Twitter Feeds&#8221;, which will be where all of the twitter-spam is sent and categorized for when that information is sought after. Don&#8217;t think anyone will go out of their way to see that information? Friendfeed.com and its<strong> 5 million dollars in funding</strong> beg to differ. Twitter is the most natural place for this information to exist!</p>
<p>Why bother with FriendFeed at all when your &#8220;Twitter Feed&#8221; can say the last netflix movie you&#8217;ve watched, or that digg article about &#8220;the top 10 cats laying on their backs&#8221; that you thought was so awesome. This information, once officially supported by Twitter, can then be properly segmented and keeps my timeline about what it should be, you know, pictures of my cat and how many times I hate internet explorer.</p>
<p>This idea, however, is going to seriously impact the current load that Twitter is used to, even at 1.2 million new users a month (I read that somewhere, could be wrong). FriendFeed works through RSS, so the responsibility of that information&#8217;s existence is placed on the RSS provider, and not FriendFeed. So I could imagine their would be a substantial increase in data that is sent to Twitter, but having said that, they seem to be doing pretty good at handling themselves these days, and that would only make Google want to swallow them whole faster.</p>
<p>So basically, Twitter needs a ping API, and the pings sent by the API (that are theoretically web 2.0 spam) need to be segmented into their own grouping, that way we can do away with social networking social networks and utilize a popular technology we already love.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2009/01/why-twitter-makes-friendfeed-obsolete/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Why Does Apple Stifle Mobile Safari&#8217;s True Potential?</title>
		<link>http://derekperez.com/blog/2008/12/why-does-apple-stifle-mobile-safaris-true-potential/</link>
		<comments>http://derekperez.com/blog/2008/12/why-does-apple-stifle-mobile-safaris-true-potential/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 06:10:14 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=128</guid>
		<description><![CDATA[The iPhone is hot. Its a badass micro-computer-internet-having-app-installing-jizz-casting-awesome-machine that can also make phone calls, but I have to bitch about one major flaw in the entire thing, and that flaw is Mobile Safari. Don&#8217;t get me wrong, I am a big fan of the mobile browser, it is leaps and bounds greater than anything else [...]]]></description>
			<content:encoded><![CDATA[<p>The iPhone is hot. Its a badass micro-computer-internet-having-app-installing-jizz-casting-awesome-machine that can also make phone calls, but I have to bitch about one major flaw in the entire thing, and that flaw is Mobile Safari. Don&#8217;t get me wrong, I am a big fan of the mobile browser, it is leaps and bounds greater than anything else out on the market, but I ask you Apple, why not make it the <strong>greatest</strong> mobile browser on the market?</p>
<p>So what am I bitching about specifically? The iPhone has immense data harvesting capabilities, from geo-location, to the accelorometer, etc. But all of these fantastic API&#8217;s are available only to native, objective-c based applications, not Mobile Safari!? Explain this to my Apple, <strong>why is this not exposed through a JavaScript API?</strong> That is absolutely trivial to provide to the lowly web developer!</p>
<p>Apple and the iPhone are doing amazing things with the types of datasets it makes available to developers in the native context, all I am saying is, make it available to every context of applications! <a href="http://www.phonegap.com">Libraries like PhoneGap</a> are attempting to make this a reality, but again, the biggest limitation is the fact that PhoneGap still requires you to create a native application to act as a wrapper to your web application, this seems like a stop gap solution (heh) or an unfortunate hack.</p>
<p>Its also very apparent that Mozilla sees the future of location-based services being able to provide very personalized and exciting experiences to the web <a href="http://labs.mozilla.com/2008/10/introducing-geode/">through their efforts in Mozilla Geode.</a> Perhaps its true that at this point, that sort of data availability in a web browser could be seen as negative, but I am not sure I agree. I am willing to bet that within the next 6 years, Apple will be introducing GPS into their laptops, providing application developers with the same location-awareness capabilities on their computers that exist today on their phones.</p>
<p>Hopefully Apple will wise up in the future, but I highly doubt it. Something tells me this is a designed limitation, they are probably doing their best to keep control over what people are doing with that data through the app store vetting process. Oh well, one can dream!</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2008/12/why-does-apple-stifle-mobile-safaris-true-potential/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Merb and Rails Come Together for Rails 3</title>
		<link>http://derekperez.com/blog/2008/12/merb-and-rails-come-together-for-rails-3/</link>
		<comments>http://derekperez.com/blog/2008/12/merb-and-rails-come-together-for-rails-3/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 19:05:15 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=126</guid>
		<description><![CDATA[I am absolutely excited about this news!! Yesterday, both the Merb and Rails camp have announced the news, so I won&#8217;t bother reiterating whats already been said. I&#8217;d rather talk about some of the major points that really get me excited about this announcement and how it is going to impact not only the history [...]]]></description>
			<content:encoded><![CDATA[<p>I am absolutely excited about this news!! Yesterday, both the <a href="http://yehudakatz.com/2008/12/23/rails-and-merb-merge/">Merb</a> and <a href="http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3">Rails</a> camp have announced the news, so I won&#8217;t bother reiterating whats already been said. I&#8217;d rather talk about some of the major points that really get me excited about this announcement and how it is going to impact not only the history of Ruby on the web, but potentially web programming from this point on.</p>
<p><strong>Fully Modular Core</strong><br />
I am happy that DHH and co have embraced the modularity concept that is one of the core ideals of the Merb project. Now, if you don&#8217;t want to Prototype as your JavaScript system, you can toss it and stick in jQuery, which will run 100% as well as the default. Although its 100% modular, the &#8220;Rails Way&#8221; is going to give you a smart set of defaults that you can completely customize to fit your needs!</p>
<p>I must admit, this is one of the sexiest things about Merb.</p>
<p><strong>Speed is Quickly Becoming a Non-Issue</strong><br />
In the Ruby world, there is a ton of exciting innovation going on around building some <a href="http://en.wikipedia.org/wiki/Rubinius">amazing virtual machine technologies </a>and really pushing the limits of what can be done with such an expressive and dynamic language. Also, we are seeing some <a href="http://www.modrails.com">fantastic developments on the deployment side of things</a> that are making it not only extremely easy to deploy, but faster the serve requests as well.</p>
<p>So naturally, the next place to go for optimization is our framework. Merb has already made a ton of strides in making a thread-safe, and extremely fast framework. This development stack is going to scream in 2009!</p>
<p><strong>Amazing  Base and Synergy<br />
</strong>Between the Merb and Rails technologies and groups, there is going to be all kinds of new things to learn and all sorts of great people to work with and learn from. I am absolutely excited about what all of this means for the Ruby/Rails/Merb communities. We have got one of the fastest growing and fully-integrated technology stacks available for the internet today as an open source foundation.</p>
<p>With the <a href="http://rubyonrails.org/ecosystem">emerging ecosystem of technology</a> and thought that is occurring in this community, we are going to be seeing some amazing things in 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2008/12/merb-and-rails-come-together-for-rails-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changing The World, In Trivial Ways.</title>
		<link>http://derekperez.com/blog/2008/12/changing-the-world-in-trivial-ways/</link>
		<comments>http://derekperez.com/blog/2008/12/changing-the-world-in-trivial-ways/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 23:41:33 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[recommendations]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[observations]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=122</guid>
		<description><![CDATA[Lately I&#8217;ve been doing a lot of thinking, thinking about how technology and the internet have been applied in such fascinating and unbelievable ways, ways that have absolutely re-written the fabric of how we as citizens of earth interact with information, but also each other. When I think about all of this, the truly astounding [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been doing a lot of thinking, thinking about how technology and the internet have been applied in such fascinating and unbelievable ways, ways that have absolutely re-written the fabric of how we as citizens of earth interact with information, but also each other. When I think about all of this, the truly astounding thing is the passage of time that has elapsed. Companies like Apple, Google, and Wikipedia are doing their best to make sure that the way we interact today, is nothing like the way we will interact tomorrow.</p>
<p>These are visionary companies, ran by some of the best and brightest of our time, can you imagine a world without Google? (your children won&#8217;t be able to). The internet itself has been the biggest catalyst of our 21st century evolution, providing a platform and foundation for limitless connectivity, where our ideas and capabilities are the only limitation.</p>
<p>Its not often that I feel so inclined to be nostalgic about an industry that hasn&#8217;t even been around for 50 years, but lately, I&#8217;ve been evaluating my place in the scheme of things. I&#8217;ve been watching the innovations and &#8220;innovations&#8221; that have hit the market in 2008, and frankly, I think we can do better.</p>
<p>But this isn&#8217;t new, people have been inventing solutions to problems nobody has had forever. I guess you could say, this is my letter to myself to make sure I am actually doing things and working with people who want to make a difference in the world, rather than &#8220;minnovate&#8221;. People say that times like this (referring to our economy) are when people sit down and do the most amazing things, not because its the hip thing to do, but moreso out of necessity.</p>
<p>So here is to a world changing 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2008/12/changing-the-world-in-trivial-ways/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linkedin Announces Business Application Platform</title>
		<link>http://derekperez.com/blog/2008/10/linkedin-announces-business-application-platform/</link>
		<comments>http://derekperez.com/blog/2008/10/linkedin-announces-business-application-platform/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 03:27:36 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[platform]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=116</guid>
		<description><![CDATA[Linkedin just minutes ago announced they&#8217;ve thrown their hat in the &#8220;social application platform&#8221; ring! This is exciting news for people who are poised to bring innovative and interesting applications to the business and professional network.
Read more about the press release here at TechCrunch. As of today, there is no documentation or word on how [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://apps.linkedin.com/learn">Linkedin just minutes ago announced</a> they&#8217;ve thrown their hat in the &#8220;social application platform&#8221; ring! This is exciting news for people who are poised to bring innovative and interesting applications to the business and professional network.</p>
<p><a href="http://www.techcrunch.com/2008/10/28/linkedin-means-business-with-new-application-platform/">Read more about the press release here at TechCrunch.</a> As of today, there is no documentation or word on how exactly one creates an application for the new platform, but you can contact them to recieve more information!</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/EnqBKfhknF0&#038;color1=0x6699&#038;color2=0x54abd6&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/EnqBKfhknF0&#038;color1=0x6699&#038;color2=0x54abd6&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2008/10/linkedin-announces-business-application-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crystal Head Vodka</title>
		<link>http://derekperez.com/blog/2008/10/crystal-head-vodka/</link>
		<comments>http://derekperez.com/blog/2008/10/crystal-head-vodka/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 02:26:06 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[recommendations]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[vodka]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=114</guid>
		<description><![CDATA[Listen to Dan Aykroyd discuss the importance of death and skulls in our world, and explain to you why he decided to embark on creating the &#8220;purest&#8221; vodka known to man. To be honest, this is actually a really really good vodka. I am no expert, but it tastes really good. Too bad you can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Listen to Dan Aykroyd discuss the importance of death and skulls in our world, and explain to you why he decided to embark on <a href="http://www.crystalheadvodka.com">creating the &#8220;purest&#8221; vodka known to man.</a> To be honest, this is actually a really <em>really</em> good vodka. I am no expert, but it tastes really good. Too bad you can&#8217;t get a full bottle of this stuff!</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/WZs29am4msg&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/WZs29am4msg&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2008/10/crystal-head-vodka/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Need a Friendly, Experienced, Web Developer?</title>
		<link>http://derekperez.com/blog/2008/10/hire-me/</link>
		<comments>http://derekperez.com/blog/2008/10/hire-me/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 05:13:29 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[hire]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[me]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=111</guid>
		<description><![CDATA[I have been rolling around the idea of starting up more freelancing to try to bolster my savings for the coming years, so I&#8217;ve decided to take on more consulting work. For an indepth look at my work experience and skills, please visit my linkedin profile, here are some highlights.
- 5 years relevant web development [...]]]></description>
			<content:encoded><![CDATA[<p>I have been rolling around the idea of starting up more freelancing to try to bolster my savings for the coming years, so I&#8217;ve decided to take on more consulting work. For an indepth look at my work experience and skills, <a href="http://www.linkedin.com/in/perezd" target="_blank">please visit my linkedin profile</a>, here are some highlights.</p>
<p><strong>- 5 years relevant web development experience<br />
</strong>I&#8217;ve worked a ton with the web, I&#8217;ve done everything from ColdFusion to my current favorite, Ruby (and Rails). I have a lot of experience working with JavaScript and XHTML/CSS, very comfortable doing frontend and backend development, as well as database work (although, I don&#8217;t want to use the term DBA). If you&#8217;d like to see my portfolio, contact me directly.</p>
<p><strong>- Did I mention I love Ruby?<br />
</strong>I have done a lot of work with Ruby in the past couple of years, <a href="http://derekperez.com/blog/2008/08/a-little-publicity-for-my-little-plugin/" target="_blank">I was highlighted on the RailsEnvy podcast</a> a few weeks ago for a modest open source contribution I made called SmartMonth. I&#8217;ve worked on some medium-sized rails deployments, and am looking to grow my portfolio.</p>
<p><strong>- Plays well with others<br />
</strong>I love working on small, motivated teams. I always enjoy adding (and learning) from the synergy of a great team. I also test all of my code (quite thoroughly) and won&#8217;t break &#8220;the build&#8221;.</p>
<p><strong>- UNIX Aficionado<br />
</strong>I love UNIX, and its my deployment environment of choice, I&#8217;ve got a lot of experience working with <a href="http://www.capify.org" target="_blank">Capistrano</a>, and am very adamant about automating things wherever possible, and documenting things thoroughly.<br />
<em><br />
</em><strong>- Entrepreneurial-Minded<br />
</strong>I have a passion for growing things, I am a very dedicated team member, and am also very aware of the needs of startup-oriented businesses, I&#8217;ve worked with a few startups at this point, and have gathered a decent amount of relevant experience helping companies and products grow.</p>
<p>If I sound at all interesting to you, please don&#8217;t hesitate to drop me a line, or if you know someone who might be interested in hiring me, please forward my information along and I&#8217;ll send you a Christmas card.<br />
Thanks everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2008/10/hire-me/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Programmatic Migrations for Rails Plugins</title>
		<link>http://derekperez.com/blog/2008/09/programmatic-migrations-for-rails-plugins/</link>
		<comments>http://derekperez.com/blog/2008/09/programmatic-migrations-for-rails-plugins/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 19:15:57 +0000</pubDate>
		<dc:creator>Derek P.</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://derekperez.com/blog/?p=105</guid>
		<description><![CDATA[Today I was faced with an interesting dilemma, how does one programmatically define migrations into a plugin so you can essentially &#8220;plug-n-play&#8221;. I did a little bit of research into Rails Engines, and I wasn&#8217;t too terribly excited about the notion of having a dependency for such a small plugin, if this were something more [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was faced with an interesting dilemma, how does one programmatically define migrations into a plugin so you can essentially &#8220;plug-n-play&#8221;. I did a little bit of research into Rails Engines, and I wasn&#8217;t too terribly excited about the notion of having a dependency for such a small plugin, if this were something more integrated&#8230;I&#8217;d probably use it, but for this, I really only need to have these migrations run once you&#8217;ve installed the plugin, and be on my way.</p>
<p>So, I decided to do a little bit of research on the <strong>ActiveRecord::Migrator</strong> class to see how I could approach programmatically executing the migration outside of the standard rake task, so I could build my own custom migration rake task for my plugin.</p>
<p>It turns out, there are a bunch of functions you can utilize to build your own custom migration tasks for your plugin, that I wasn&#8217;t immediately aware of. Here is how I did it:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">namespace <span style="color:#ff3333; font-weight:bold;">:myplugin</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  desc <span style="color:#996600;">&quot;migrates my plugin's migration files into the database.&quot;</span>
  task <span style="color:#ff3333; font-weight:bold;">:migrate</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:environment</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Migrator</span>.<span style="color:#9900CC;">migrate</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">expand_path</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;/../db/migrate&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#6666ff; font-weight:bold;">Rake::Task</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;db:schema:dump&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">invoke</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>.<span style="color:#9900CC;">schema_format</span> == <span style="color:#ff3333; font-weight:bold;">:ruby</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>I simply saved that block of code into my plugin&#8217;s /tasks folder and named it custom_migration.rake. Next, I went to the root of my application and ran rake myplugin:migrate, and huzzah! it worked!</p>
<p>Nothing too amazing, and I actually based this entirely on the vanilla db:migrate function. The first line of the task essentially tells the ActiveRecord Migrator to search through my plugin&#8217;s db/migrate folder for any migration files it can find, and then brings all of them up! It would be nice if the vanilla db:migrate supported a MIGRATIONS_PATH constant so we could just use the same mechanics and build on top of them, rather than essentially re-write them just to do this.</p>
<p>OR better yet, wouldn&#8217;t it be nice if rails db:migrate actually <em>scanned our plugins directory for migration files as well? </em>That sounds like the best option to me.</p>
<p>Now, I am not sure if this is &#8220;the ruby way&#8221; to handle this problem, and as I stated earlier, Rails Engines is probably the way to go if you have a much larger plugin you are designing, but for me, this seemed to work just fine.</p>
<p><strong>Limitations</strong></p>
<p>There are some limitations to that custom task. For instance, if you were to run db:rollback, it would not be aware of the migration files that I have previously run that live within my plugin, you&#8217;d have to build another custom task to manage revoking the migrations you installed. Also, if they end up changing the way you actually migrate migrations, you might be screwed. But, alas, here is hoping for that MIGRATIONS_PATH constant!</p>
]]></content:encoded>
			<wfw:commentRss>http://derekperez.com/blog/2008/09/programmatic-migrations-for-rails-plugins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
