<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>My postings on technology, philosophy, and this journey called life.</description><title>lines of code</title><generator>Tumblr (3.0; @arthurchiu)</generator><link>http://blog.arthurchiu.com/</link><item><title>laughingsquid:

All Hail the King: Breaking Bad Season 5 Poster...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_m53rs2WP041qz4cuyo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a class="tumblr_blog" href="http://links.laughingsquid.com/post/24409482664/all-hail-the-king-breaking-bad-season-5-poster"&gt;laughingsquid&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://laughingsquid.com/all-hail-the-king-breaking-bad-season-5-poster-released/#"&gt;All Hail the King: Breaking Bad Season 5 Poster Released&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;ABOUT TIME&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/24414779259</link><guid>http://blog.arthurchiu.com/post/24414779259</guid><pubDate>Mon, 04 Jun 2012 15:00:02 -0400</pubDate></item><item><title>laughingsquid:

Dean Martin Burgers

sounds like a meal.</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lo0k7fVvel1qcl7wao1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://links.laughingsquid.com/post/7383044684"&gt;laughingsquid&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://laughingsquid.com/dean-martin-burgers/"&gt;Dean Martin Burgers&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;sounds like a meal.&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/7385964274</link><guid>http://blog.arthurchiu.com/post/7385964274</guid><pubDate>Fri, 08 Jul 2011 12:36:19 -0400</pubDate></item><item><title>Testing with Melee and Capybara</title><description>&lt;p&gt;The idea that &lt;a href="https://github.com/cavalle/steak"&gt;Steak&lt;/a&gt; had about acceptance tests is great. You don&amp;#8217;t
necessarily have to use a solution like Cucumber to write acceptance
test for your application. You could just as easily use rspec or another
testing suite instead. Being the riot fan that I am, I wanted to have
something similiar for the Riot community so that we too can write
beautiful acceptance tests.&lt;/p&gt;

&lt;h3&gt;Introducing Melee&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.github.com/achiu/melee"&gt;Melee&lt;/a&gt; is to &lt;a href="https://github.com/thumblemonks/riot"&gt;Riot&lt;/a&gt; what Steak is to Rspec. It&amp;#8217;s a minimalist approach to
acceptance testing. It keeps close to how you write tests but give you a
simple DSL to give you that &amp;#8216;acceptance test&amp;#8217; feel. For a side to side
comparison, this is what a melee test looks like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;feature %Q{
To write better software
as a ruby developer and a riot user
I need to write me some acceptance test
} do

  background { "that i'm no different than setup" }

  scenario "With some background, it should really be no different than a setup" do
    topic =~ /setup/
  end

  given(:a_string) { "yay for acceptance test" }

  scenario "With some string that I have, it should ensure that the string" do
    a_string
  end.matches %r{acceptance} # Takes the same macros

end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The same test in plain riot would be:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;context %Q{
To write better software
as a ruby developer and a riot user
I need to write me some acceptance test
} do

  setup { "that i'm no different than setup" }

  asserts "With some background, it should really be no different than a setup" do
    topic =~ /setup/
  end

  helper(:a_string) { "yay for acceptance test" }

  asserts "With some string that I have, it should ensure that the string" do
    a_string
  end.matches %r{acceptance} # Takes the same macros

end
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Integration with Capybara&lt;/h3&gt;

&lt;p&gt;Ok, that&amp;#8217;s fine and dandy, but what about actual integration with
&lt;a href="https://github.com/jnicklas/capybara"&gt;Capybara&lt;/a&gt;? Good question. Despite that capybara comes with easy
integration with rspec, there is an easy workaround provided to allow
you to use it in any test suite.&lt;/p&gt;

&lt;p&gt;We&amp;#8217;ll use the auto-generated &lt;code&gt;test_config.rb&lt;/code&gt; from padrino as a guide.
All you need to do is &lt;code&gt;require&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;## test_config.rb
# ...

require 'capybara/dsl' # require the Capybara DSL

class Riot::Situation
  include Rack::Test::Methods
  include Capybara

  # ...
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, you can use capybara like you would. Here&amp;#8217;s an example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;require File.expand_path('../../../test_config', __FILE__)

feature %{
  When I access the link pages
  I should see a form
  that allows me to shorten urls
} do

  background do
    Capybara.app = Shortener
    visit '/links/new'
  end

  scenario "With the links page, I should see a text field" do
    find_field('Url').visible?
  end

  scenario "With the links page, I should be able to submit a url" do
    fill_in 'Url', :with =&amp;gt; 'http://www.google.com'
    click_button 'Submit'
    current_path
  end.matches %r{links\/show}

end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There we have it. Riot now has acceptance tests ready to use with a
library like Capybara. To see some demostration of melee/capybara
intergration, you can check out a &lt;a href="https://github.com/padrino/shortener-demo"&gt;Padrino URL shortener demo&lt;/a&gt; I
made to demonstrate some of the features of both padrino and riot.&lt;/p&gt;

&lt;p&gt;happy Testing, and Happy Father&amp;#8217;s Day!&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/6708161205</link><guid>http://blog.arthurchiu.com/post/6708161205</guid><pubDate>Sun, 19 Jun 2011 21:39:01 -0400</pubDate><category>ruby</category><category>testing</category><category>riot</category><category>integration</category><category>melee</category><category>capybara</category></item><item><title>rack-recaptcha - a different approach to recaptcha integration</title><description>&lt;h2&gt;Rack Middleware&lt;/h2&gt;

&lt;p&gt;A while back, I wanted to dabble into rack middleware and the best way
was to create one myself. Without getting too indepth, Rack middlewares
act as the cascading stylesheets for applications. You stack
middlewares on top of your rack compatible application. As requests 
come in, each middleware runs its process and passes it to the next layer
until it reaches the main application.&lt;/p&gt;

&lt;h2&gt;RECAPTCHA&lt;/h2&gt;

&lt;p&gt;Recaptcha is a CAPTCHA verification service that operates by pulling
scanned text for users to verify a human operator. In most use cases, CAPTCHA
verification is used to check comments, posts, or even account creation.&lt;/p&gt;

&lt;h2&gt;rack-recaptcha&lt;/h2&gt;

&lt;p&gt;There are libraries out that they handle RECAPTCHA verification.
However, they are limited only to Rails apps. At the time of creation of
rack-recaptcha, I needed a library that I could use with other rack
compatible frameworks such as Sinatra and Padrino. Rack seemed like a
good solution to ensure agnosticism among rack compatible apps.&lt;/p&gt;

&lt;p&gt;Adding a RECAPTCHA solution is two parts:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Verification   - Send the RECAPTCHA request and verify the results&lt;/li&gt;
&lt;li&gt;Client Helpers - RECAPTCHA form generation&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;With middlewares, the verification request can be processed in the
middleware and pass its results back to the application. If the request
coming in doesn&amp;#8217;t require RECAPTCHA, the request is immediately passed
down the stack.&lt;/p&gt;

&lt;p&gt;This keeps the library lean. No extra code for integration with Rails, Merb, Sinatra,
Padrino or whatever framework you use.&lt;/p&gt;

&lt;p&gt;If you want to check out the library, its on &lt;a href="https://github.com/achiu/rack-recaptcha"&gt;github&lt;/a&gt;
or install it with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gem install rack-recaptcha
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&amp;#8217;s all for now. thanks for reading!&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/3760506937</link><guid>http://blog.arthurchiu.com/post/3760506937</guid><pubDate>Thu, 10 Mar 2011 07:04:00 -0500</pubDate><category>recaptcha</category><category>rack</category><category>ruby</category></item><item><title>Alternate Universes</title><description>&lt;p&gt;I generally think and research alot on religion, philosophy and other random niche topics. These thoughts I formulate I either keep to myself or end up talking to a few close friends of mine such as Nathan. But after talking to Michele, she’s convinced me to share my thoughts online about what it is that I come up with and to at the very least keep a record.&lt;/p&gt;
&lt;h4&gt;Alternate Realities, Universes&lt;/h4&gt;
&lt;p&gt;If the term &lt;a href="http://en.wikipedia.org/wiki/Parallel_universe"&gt;Parallel Universe&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/String_Theory"&gt;String Theory&lt;/a&gt; mean anything to you, or you have just seen the movie &lt;a href="http://www.imdb.com/title/tt0267804/"&gt;The One&lt;/a&gt;, then this post might be of some interest to you.&lt;/p&gt;
&lt;p&gt;The basic premise of Parallel Universes and all the surrounding theories is that For each choice or decision that we are capable of taking in our life, each of those paths diverge into their own possible universe. So, if you had decided to take a left turn instead of a right, there would exist a world in which that you had taken the right instead. Staying true to the movie “The One”, there would exists worlds where you would have picked a completely different lifestyle and occupational choice. There would exist thousands, if not, an infinite amount of worlds that would depict your different you.&lt;/p&gt;
&lt;p&gt;If a decision is what is needed to create an alternate reality, then what we have in this world is already in itself, an alternate reality. Consider that if you and I at the very core are made up of building blocks of cells, DNA, and atoms, and with our specific amount of chance and choices that has happened in this world, we really are nothing more than alternate realities of what those components COULD have been. In essence, You and I are merely alternate versions of what we could have been. If nature had taken a different turn, I may have ended in your place, with your features, and perhaps even with the parents and environment that you had. Likewise, you or another could have equally been part of the genetic makeup of another creature, or perhaps even a plant. The decision that were made on a micro level are what lead to the macro decisions that ended up creating who we are, where we exists, and how we end up interacting.&lt;/p&gt;
&lt;h4&gt;Eternity, Unity, and Experience&lt;/h4&gt;
&lt;p&gt;What this lead me down was to a quote that I actually heard once before, and had a profound effect on my life.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Eternity isn’t some later time. Eternity isn’t a long time. Eternity has nothing to do with time.    Eternity is that dimension of here and now which thinking and time cuts out. This is it.    And if you don’t get it here, you won’t get it anywhere. And the experience of   eternity right here and now is the function of life” - Joseph Campbell&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Eternity is our experience. It’s the experience that we are having as we go through the walk of life. In connection with alternate realities, these trial and simulations of each possible choice in our life add to the value of the experience. It’s creating this concept of Eternity. Each one of us I feel is at its very core, connected to each other. Science has shown it. As we live alternate possibilities of what could happen in life, there exists a Unity amongst all of us. We together are co-creating this experience. United we weave together the parallel and crossing strands of chance into this detailed and multi-facted tapestry we call life, the experience we call Eternity.&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/3178140355</link><guid>http://blog.arthurchiu.com/post/3178140355</guid><pubDate>Tue, 08 Feb 2011 02:15:00 -0500</pubDate><category>alternate</category><category>universe</category><category>eternity</category><category>unity</category><category>experience</category><category>philosophy</category></item><item><title>djzuko:

Lykke Li - Little Bit (AutoErotique Bootleg...</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/1OcdYjgexcI?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://djzuko.kuci.org/post/3112783167"&gt;djzuko&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Lykke Li - Little Bit (AutoErotique Bootleg remix)&lt;/p&gt;
&lt;p&gt;Gotta love her voice.&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://blog.arthurchiu.com/post/3129260795</link><guid>http://blog.arthurchiu.com/post/3129260795</guid><pubDate>Sat, 05 Feb 2011 15:58:59 -0500</pubDate></item><item><title>laughingsquid:

Fallout Helmet Replica


that’s awesome....</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lexdfopLrb1qz4cuyo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://links.laughingsquid.com/post/2720201604/fallout-helmet-replica"&gt;laughingsquid&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://superpunch.blogspot.com/2011/01/fallout-helmet.html"&gt;Fallout Helmet Replica&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;that’s awesome. so, very, awesome.&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/2784401807</link><guid>http://blog.arthurchiu.com/post/2784401807</guid><pubDate>Sun, 16 Jan 2011 18:09:40 -0500</pubDate></item><item><title>Terminitor - Terminating your redudant Terminal commands</title><description>&lt;p&gt;I figure it’s about time to start writing in my tumblr. So let’s talk about terminitor. Terminitor is an automation library written in ruby that allows for a clean and easy way to automate your usual terminal commands and setup. So let’s start with a typical scenario: You start up a project, want to open up a console, run the server, and maybe even run some test automation. It might look something like this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;terminal tab 1&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd /my_project
$ rvm use ree@my_project_gemset
$ watchr test.watchr
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;terminal tab 2&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd /my_project
$ rvm use ree@my_project_gemset
$ padrino start -h 0.0.0.0 -p 4567
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;terminal tab 3&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd /my_project
$ rvm use ree@my_project_gemset
$ padrino console
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;terminal tab 4&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd /my_project
$ rvm use ree@my_project_gemset
$ gitx
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and so on. Things start to get &lt;em&gt;really&lt;/em&gt; redudant. That’s where terminitor comes in. Taking what we have up there, we can reduce this down into a nice DSL:&lt;/p&gt;
&lt;pre&gt;&lt;code class="ruby"&gt;# ~/.terminitor/my_project.rb

before "cd /my_project", "rvm use ree@my_project_gemset"

tab "watchr test.watchr"

tab "padrino start -h 0.0.0.0 -p 4567"

tab "padrino console"

tab "gitx"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now that’s a bit better. Now instead of doing your usual command circuit training, you can instead jump right to the end of it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ terminitor start my_project
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For those of you that get a bit more fancy with your Mac OSX Terminal, Terminitor allows you to go a step further with customizing your windows, like say using the “Grass” setting:&lt;/p&gt;
&lt;pre&gt;&lt;code class="ruby"&gt;tab :name =&amp;gt; "my green tab", :settings =&amp;gt; "Grass" do
  run "uptime"
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Lazy to find the settings, window sizes that you have setup for your windows? Let Terminitor get it for you:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ terminitor edit my_lazy_project --capture
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will grab the settings for your windows and tabs, leaving you only the commands to fill out for each tab/window! Not too shabby.&lt;/p&gt;
&lt;p&gt;Currently, Terminitor has support for Mac OS X Terminal and KDE Konsole. However, that doesn’t mean that your flavor of choice can’t be supported. Terminitor makes it simple to extend!&lt;/p&gt;
&lt;p&gt;If you want to check out more of the other features terminitor provides, I suggest checking it out on &lt;a href="https://github.com/achiu/terminitor"&gt;github&lt;/a&gt;.&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/2433923532</link><guid>http://blog.arthurchiu.com/post/2433923532</guid><pubDate>Thu, 23 Dec 2010 13:55:00 -0500</pubDate><category>automation</category><category>ruby</category><category>terminal</category><category>terminitor</category><category>osx</category><category>kde</category><category>konsole</category></item><item><title>iwdrm:

“I’ve seen things you people wouldn’t believe. Attack...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_ldvvy3QLJP1qe0eclo1_r7_500.gif"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://iwdrm.tumblr.com/post/2433122025"&gt;iwdrm&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“I’ve seen things you people wouldn’t believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser Gate. All those moments will be lost in time like tears in rain. … Time to die.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.imdb.com/title/tt0083658/"&gt;Blade Runner (1982)&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s a classic.&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/2433332942</link><guid>http://blog.arthurchiu.com/post/2433332942</guid><pubDate>Thu, 23 Dec 2010 13:03:50 -0500</pubDate></item><item><title>First Post</title><description>&lt;h3&gt;Ok.&lt;/h3&gt;
&lt;p&gt;So I really wanted to just finish up my redo of my site. but instead i’ve decided to just start over here in tumblr land. I’ll admit, this is pretty cool, never really though of using tumblr as a blogging engine. I’ve been feeling that as a developer, i should just make it all myself, but eh, why reinvent the wheel? So i ended up stumbling on something pretty cool and nifty. Namely, this nice little gem called tumblr-rb:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ gem install tumblr-rb
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Nice little ruby library and cli from &lt;a href="http://github.com/mwunsch/tumblr"&gt;munsch&lt;/a&gt;. It looks like it needs a bit of updating though, as it doesn’t recognize the ‘answer’ post type. I’ll probably fork it sometime later this week and make the additions necessary. In the mean time, it seems I have quite a bit of work today not to mention that the other open source libraries that i’m a part of have a few issues that need to be address. Man, wouldn’t it be nice if you could just &lt;strong&gt;work&lt;/strong&gt; for open source? A life that would be. Ok, that’s it for now. later!&lt;/p&gt;</description><link>http://blog.arthurchiu.com/post/1244413616</link><guid>http://blog.arthurchiu.com/post/1244413616</guid><pubDate>Mon, 04 Oct 2010 17:10:00 -0400</pubDate><category>first</category><category>post</category><category>tumblr</category><category>ruby</category></item></channel></rss>
