<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Plasticx Blog</title>
    <description>Capable of being shaped or formed</description>
    <link>http://plasti.cx/</link>
    <item>
      <title>distribute scripts as gist micro-gems</title>
      <description>&lt;p&gt;It&amp;#39;s really easy to distribute scripts, not just gems, as gist micro-gems.  Since rubygems and bundler can handle complicated dependencies the scripts you distribute can be more advanced than just ten or twenty lines.&lt;/p&gt;

&lt;p&gt;I wrote a script to generate an OAuth key and secret for the Tumblr API and I made it available as a micro-gem.  It is encapsulated in &lt;a href="https://gist.github.com/4577106"&gt;gist 4577106&lt;/a&gt;  To generate your key and secret is as simple as the following:&lt;/p&gt;

&lt;pre&gt;&lt;code class="shell"&gt;mkdir /some/working/dir
cd /some/working/dir

wget \
https://gist.github.com/raw/4577106/6bc9befedcd5238ce9f2ee562cace666dece460c/Gemfile

bundle install
bundle exec generate-token
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;One bit of useful flare is the ability to &lt;a href="https://gist.github.com/4577106#file-generate-tumblr-oauth-token-gemspec"&gt;set the bindir in the gemspec&lt;/a&gt; of the microgem to dot &amp;quot;.&amp;quot; - the current working directory.  This allows &lt;code&gt;bundle exec generate-token&lt;/code&gt; to work correctly since github gists don&amp;#39;t allow files to be in sub-directories, and the default bindir in rubygems is &amp;#39;bin/&amp;#39;.&lt;/p&gt;
</description>
      <pubDate>January 20, 2013</pubDate>
      <link>http://plasti.cx/distribute-scripts-as-gist-micro-gems</link>
      <guid>http://plasti.cx/distribute-scripts-as-gist-micro-gems</guid>
    </item>
    <item>
      <title>Seattle.rb IRB presentation</title>
      <description>&lt;p&gt;I gave a lightening talk about IRB (Interactive Ruby Shell) at &lt;a href="http://www.seattlerb.org/"&gt;Seattle.rb&lt;/a&gt; on 01/08/2013.&lt;/p&gt;

&lt;p&gt;Here is my speaker deck:
&lt;a href="https://speakerdeck.com/monde/seattle-dot-rb-irb-presentation"&gt;https://speakerdeck.com/monde/seattle-dot-rb-irb-presentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here my notes and example irbrc&amp;#39;s:
&lt;a href="http://bit.ly/seattle-rb-irb"&gt;http://bit.ly/seattle-rb-irb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/janlelis/irbtools"&gt;irbtools gem&lt;/a&gt; is really massive in all of the features it curates together.  As mentioned in the deck, I prefer a more simple setup of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;integrated vim to edit/paste code via the &lt;a href="https://github.com/jberkel/interactive_editor"&gt;interactive editor gem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;load/save command history (require &amp;#39;irb/ext/save-history&amp;#39;)&lt;/li&gt;
&lt;li&gt;tab completion on object methods (require &amp;#39;irb/completion&amp;#39;)&lt;/li&gt;
&lt;/ul&gt;
</description>
      <pubDate>January 08, 2013</pubDate>
      <link>http://plasti.cx/seattle-dot-rb-irb-presentation</link>
      <guid>http://plasti.cx/seattle-dot-rb-irb-presentation</guid>
    </item>
    <item>
      <title>Seattle.rb Refactoring &amp; BDD presentation</title>
      <description>&lt;p&gt;I made a presentation on Refactoring &amp;amp; BDD at Seattle.rb back on 10/09/2012.  I put my slides and notes from the presentation up on Speaker Deck.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://speakerdeck.com/monde/seattle-dot-rb-refactoring-and-bdd-presentation" title="Seattle.rb - Refactoring &amp;amp; BDD Presentation"&gt;Seattle.rb - Refactoring &amp;amp; BDD Presentation&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Some quick takeaways ...&lt;/p&gt;

&lt;h2&gt;Problem Domain&lt;/h2&gt;

&lt;p&gt;The less your problem is understood, the more complicated your solution is likely to be.  This is one of the reasons why we refactor code - we increase our understanding of the problem domain and increase our abilities to apply solutions to the domain as time goes by.&lt;/p&gt;

&lt;h2&gt;Simple Refactoring Guidelines&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Modify code in small steps&lt;/li&gt;
&lt;li&gt;Write tests for code that is affected&lt;/li&gt;
&lt;li&gt;Write human readable code&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Refactoring Pro-Tips&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Refactoring Favors Behavior Rather Than Logic&lt;/li&gt;
&lt;li&gt;Writing code that can be unit tested changes your writing style&lt;/li&gt;
&lt;li&gt;If a method can’t be unit tested it must be refactored&lt;/li&gt;
&lt;li&gt;Factor out interaction with frameworks from code that is tested&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Outside-In Development&lt;/h2&gt;

&lt;p&gt;Let your tests drive your implementation.  I started coding my &lt;a href="http://capgun.io/" title="CapGun web thumbs"&gt;CapGun&lt;/a&gt; web thumb service using Cucumber to drive Outside-In/BDD development.&lt;/p&gt;

&lt;h2&gt;Dog Food&lt;/h2&gt;

&lt;p&gt;Dog-food an app while you are developing it as quickly as possible.  CapGun was web thumbing URLs from my Twitter feed and posting the results to a &lt;a href="http://tumblr.capgun.io/" title="CapGun.io&amp;#39;s Tumblr"&gt;Tumblr account&lt;/a&gt; before the service was released to the public.&lt;/p&gt;

&lt;h2&gt;Attribute this quote to me, please&lt;/h2&gt;

&lt;p&gt;Outside-In / BDD is really just “poor man’s pair programming” (R) - Mike Mondragon&lt;/p&gt;
</description>
      <pubDate>January 02, 2013</pubDate>
      <link>http://plasti.cx/seattle-dot-rb-refactoring-talk</link>
      <guid>http://plasti.cx/seattle-dot-rb-refactoring-talk</guid>
    </item>
    <item>
      <title>report Resque exceptions to Honeybadger</title>
      <description>&lt;p&gt;Two of my heros, &lt;a href="http://www.bencurtis.com/" title="Ben Curtis"&gt;Ben Curtis&lt;/a&gt; and &lt;a href="http://www.starrhorne.com/" title="Starr Horne"&gt;Starr Horne&lt;/a&gt; are building their own application exception reporting service for Rails, and presumably other application frameworks like Sinatra.  The service&amp;#39;s name is &lt;a href="http://www.honeybadger.io/" title="Honeybadger"&gt;Honeybadger&lt;/a&gt;.  I&amp;#39;ve been running one of my hobby applications in the Honeybadger for a time.  My application uses Resque as its work queue and I like to record exceptions into Honeybadger when they occur.&lt;/p&gt;

&lt;p&gt;The Honeybadger gem configures directly into Rails&amp;#39; request/response loop.  Therefore, all one has to do is initialize the application correctly with an account authorization code to the service, then view and controller exceptions are automatically recorded.  However, if logging exceptions outside of that loop is required, the gist listed below is one way to achieve this goal for a Resque job queue.&lt;/p&gt;

&lt;script src='https://gist.github.com/3254712.js?file=honeybadger_resque.rb'&gt;&lt;/script&gt;
</description>
      <pubDate>August 06, 2012</pubDate>
      <link>http://plasti.cx/report-resque-exceptions-to-honeybadger</link>
      <guid>http://plasti.cx/report-resque-exceptions-to-honeybadger</guid>
    </item>
    <item>
      <title>maintaining my copy of obtvse</title>
      <description>&lt;p&gt;I&amp;#39;m maintaining my own copy of the &lt;a href="https://github.com/NateW/obtvse" title="obtvse blog"&gt;obtvse blog application&lt;/a&gt;.  I set my copy up initially as a duplicate repository from obtvse&amp;#39;s git repository.  These commands were used to duplicate the repo. &lt;/p&gt;

&lt;pre&gt;&lt;code class="shell"&gt;git clone --bare https://github.com/NateW/obtvse.git
git push --mirror git@example.com:monde/whatever.git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, I can hack on my copy all I want and keep it in a private repository.  I&amp;#39;ve added my favorite capistrano set up and have appended other gems to the Gemfile such as rubyracer to compile assets during deployment.  When obtvse gets some code changes that I would like pull into my copy I will do so having NateW&amp;#39;s repository as a remote in my local repository such as the following example.&lt;/p&gt;

&lt;pre&gt;&lt;code class="shell"&gt;git remote add natew https://github.com/NateW/obtvse.git
git checkout master
git fetch natew
git merge natew/master
&lt;/code&gt;&lt;/pre&gt;
</description>
      <pubDate>August 06, 2012</pubDate>
      <link>http://plasti.cx/maintaining-my-copy-of-obtvse</link>
      <guid>http://plasti.cx/maintaining-my-copy-of-obtvse</guid>
    </item>
    <item>
      <title>switched my blog to obtvse from typo</title>
      <description>&lt;p&gt;I switched this blog to the &lt;a href="https://github.com/NateW/obtvse" title="obtvse blog"&gt;obtvse blog&lt;/a&gt; rails app.  It fit how I would like to blog, as well as what I prefer in terms of an application and devops for said application.&lt;/p&gt;

&lt;p&gt;My criteria for selecting obtvse where these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dynamic as opposed to static rendering&lt;/li&gt;
&lt;li&gt;simple application, light weight&lt;/li&gt;
&lt;li&gt;basic templating system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I had been running on &lt;a href="https://github.com/fdv/typo/" title="Typo"&gt;Typo&lt;/a&gt;, but it became over featured for my needs.  I endured as &lt;a href="http://t37.net/" title="Frédéric de Villamil"&gt;fdv&lt;/a&gt; refactored and modernized its code base, but it became a burden to maintain my copy with code changes.  Typo has a great community, and I support their efforts, but it no longer fit my blogging desires.&lt;/p&gt;

&lt;p&gt;I considered a static blog generator like &lt;a href="http://octopress.org/" title="Octopress blog"&gt;Octopress&lt;/a&gt;, but it didn&amp;#39;t fit my itch for performing devops on a small Rails application.&lt;/p&gt;

&lt;p&gt;When I first joined the Rails community in 2006 I wrote blog posts all the time about what I was learning.  Overtime, I became more proficient in my skills and I didn&amp;#39;t have time to blog about what I was doing.  Every now and again I would think to myself &amp;quot;this would be good for a blog post&amp;quot; but not articulate the idea any further into written code.&lt;/p&gt;

&lt;p&gt;I&amp;#39;m looking forward to becoming an active blogger again because obtvse fosters quick and easy publishing of posts since its templating is done in markup.  It&amp;#39;s also adept at allowing one to work on any number of blog posts at a given time.  For instance, only spend ten or fifteen minutes a day working on multiple posts, until each is ready to be published.  I&amp;#39;ll no longer have an excuse to not start a blog post when an idea comes to mind and then work on the post a later when time is available.&lt;/p&gt;
</description>
      <pubDate>August 06, 2012</pubDate>
      <link>http://plasti.cx/switched-my-blog-to-obtvse-from-typo</link>
      <guid>http://plasti.cx/switched-my-blog-to-obtvse-from-typo</guid>
    </item>
  </channel>
</rss>
