<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>johndesu</title>
  <id>http://www.johndesu.com</id>
  <updated>2012-04-05T00:00:00Z</updated>
  <author>
    <name>John Dyer</name>
  </author>
  <entry>
    <title>Spree Product Zoom</title>
    <link href="http://www.johndesu.com/2012/07/20/spree-product-zoom/" rel="alternate"/>
    <id>http://www.johndesu.com/2012/07/20/spree-product-zoom/</id>
    <published>2012-07-20T00:00:00Z</published>
    <updated>2012-07-20T00:00:00Z</updated>
    <author>
      <name>John Dyer</name>
    </author>
    <summary type="html">&lt;p&gt;I rolled out another new Spree Extension this week, spree_product_zoom. This
extension adds lightbox zoom functionality for product images with &lt;a href="http://fancyapps.com/fancybox/"&gt;fancyBox&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As always, installation is quite simple. Add the following to your Gemfile and
run bundle install.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem "spree_product_zoom", :git =&amp;gt; "git://github.com/spree/spree_product_zoom.git"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, copy over the required javascripts and stylesheets by running the
install generator.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rails g spree_product_zoom:install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I hope that this extension is useful. For more details, give the &lt;a href="http://github.com/spree/spree_product_zoom"&gt;Github
Repo&lt;/a&gt; a visit.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;I rolled out another new Spree Extension this week, spree_product_zoom. This
extension adds lightbox zoom functionality for product images with &lt;a href="http://fancyapps.com/fancybox/"&gt;fancyBox&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As always, installation is quite simple. Add the following to your Gemfile and
run bundle install.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem "spree_product_zoom", :git =&amp;gt; "git://github.com/spree/spree_product_zoom.git"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, copy over the required javascripts and stylesheets by running the
install generator.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rails g spree_product_zoom:install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I hope that this extension is useful. For more details, give the &lt;a href="http://github.com/spree/spree_product_zoom"&gt;Github
Repo&lt;/a&gt; a visit.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Spree Social Products</title>
    <link href="http://www.johndesu.com/2012/07/06/spree-social-products/" rel="alternate"/>
    <id>http://www.johndesu.com/2012/07/06/spree-social-products/</id>
    <published>2012-07-06T00:00:00Z</published>
    <updated>2012-07-06T00:00:00Z</updated>
    <author>
      <name>John Dyer</name>
    </author>
    <summary type="html">&lt;p&gt;This week I wrote a Spree Extension that allows you to easily add social network sharing buttons, such as the Facebook &amp;ldquo;Like&amp;rdquo; button and Pinterest &amp;ldquo;Pin It&amp;rdquo; button, to your Spree Product pages. There is support for Facebook, Pinterest, Reddit, Tumblr, Google Plus, Delicious and Twitter.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.minus.com/iPkrAfsR0nphT.png" alt="Spree Social Products" /&gt;&lt;/p&gt;

&lt;p&gt;Installing is as simple as adding a line to your Gemfile and running bundle install.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem "spree_social_products", :git =&amp;gt; "git://github.com/spree/spree_social_products.git"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For more details, please check out the &lt;a href="http://github.com/spree/spree_social_products"&gt;Github Repo&lt;/a&gt;.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;This week I wrote a Spree Extension that allows you to easily add social network sharing buttons, such as the Facebook &amp;ldquo;Like&amp;rdquo; button and Pinterest &amp;ldquo;Pin It&amp;rdquo; button, to your Spree Product pages. There is support for Facebook, Pinterest, Reddit, Tumblr, Google Plus, Delicious and Twitter.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.minus.com/iPkrAfsR0nphT.png" alt="Spree Social Products" /&gt;&lt;/p&gt;

&lt;p&gt;Installing is as simple as adding a line to your Gemfile and running bundle install.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem "spree_social_products", :git =&amp;gt; "git://github.com/spree/spree_social_products.git"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For more details, please check out the &lt;a href="http://github.com/spree/spree_social_products"&gt;Github Repo&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>App Recommendation: ReadMore</title>
    <link href="http://www.johndesu.com/2012/06/05/app-recommendation-readmore/" rel="alternate"/>
    <id>http://www.johndesu.com/2012/06/05/app-recommendation-readmore/</id>
    <published>2012-06-05T00:00:00Z</published>
    <updated>2012-06-05T00:00:00Z</updated>
    <author>
      <name>John Dyer</name>
    </author>
    <summary type="html">&lt;p&gt;&lt;img src="http://i.minus.com/ibh9ScOWBYxJ32.jpeg" alt="image" /&gt; &lt;img src="http://i.minus.com/iBgt5WMFggKuy.jpeg" alt="image" /&gt;&lt;/p&gt;

&lt;p&gt;If you read a lot of books or have a long to-read list, you know how
difficult it can be to keep track of what you have or haven&amp;rsquo;t read.
ReadMore lets you create a reading list that keeps track of the books
you are reading and your progress through them. The app also keeps track
of your reading sessions by allowing you to start a timer every time you
read. After a few reading sessions for a book have been recorded, you
are able to view various statistics about your pace through the book.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://readmoreapp.com/"&gt;More Information&lt;/a&gt; | &lt;a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=353047317&amp;amp;mt=8"&gt;Buy in AppStore&lt;/a&gt;&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;&lt;img src="http://i.minus.com/ibh9ScOWBYxJ32.jpeg" alt="image" /&gt; &lt;img src="http://i.minus.com/iBgt5WMFggKuy.jpeg" alt="image" /&gt;&lt;/p&gt;

&lt;p&gt;If you read a lot of books or have a long to-read list, you know how
difficult it can be to keep track of what you have or haven&amp;rsquo;t read.
ReadMore lets you create a reading list that keeps track of the books
you are reading and your progress through them. The app also keeps track
of your reading sessions by allowing you to start a timer every time you
read. After a few reading sessions for a book have been recorded, you
are able to view various statistics about your pace through the book.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://readmoreapp.com/"&gt;More Information&lt;/a&gt; | &lt;a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=353047317&amp;amp;mt=8"&gt;Buy in AppStore&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Build Query Strings with Rack::Utils</title>
    <link href="http://www.johndesu.com/2012/05/13/build-query-strings-with-rackutils/" rel="alternate"/>
    <id>http://www.johndesu.com/2012/05/13/build-query-strings-with-rackutils/</id>
    <published>2012-05-13T00:00:00Z</published>
    <updated>2012-05-13T00:00:00Z</updated>
    <author>
      <name>John Dyer</name>
    </author>
    <summary type="html">&lt;p&gt;A query string is part of a URL that contains data to be passed to web
applications. For our purposes I&amp;rsquo;ll pretend we are working with a Rails
Controller and want to customize some redirects to contain additional
parameters.&lt;/p&gt;

&lt;p&gt;Say we have&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;redirect_to root_path
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which takes us to &lt;strong&gt;http://www.mywebsite.com&lt;/strong&gt; but we would like to pass an
aditional parameter along with the redirect, in this case
authorization_token. What we want to see is a url like
&lt;strong&gt;http://www.mywebsite.com/?authorization_token=foo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We could use string interpolation and end up with something like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;redirect_to "#{root_path}/?authorization_token=foo"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is probably fine for a query string with only one key and value,
but what if we have a whole bunch of options we&amp;rsquo;d like passed as
parameters? This could quickly grow into a very long string with&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;A query string is part of a URL that contains data to be passed to web
applications. For our purposes I&amp;rsquo;ll pretend we are working with a Rails
Controller and want to customize some redirects to contain additional
parameters.&lt;/p&gt;

&lt;p&gt;Say we have&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;redirect_to root_path
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which takes us to &lt;strong&gt;http://www.mywebsite.com&lt;/strong&gt; but we would like to pass an
aditional parameter along with the redirect, in this case
authorization_token. What we want to see is a url like
&lt;strong&gt;http://www.mywebsite.com/?authorization_token=foo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We could use string interpolation and end up with something like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;redirect_to "#{root_path}/?authorization_token=foo"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is probably fine for a query string with only one key and value,
but what if we have a whole bunch of options we&amp;rsquo;d like passed as
parameters? This could quickly grow into a very long string with
multiple interpolated values. I&amp;rsquo;m a fan of succinct and easy to
understand code and this is where
&lt;a href="http://rack.rubyforge.org/doc/classes/Rack/Utils.html"&gt;Rack::Utils&lt;/a&gt;
comes into play.&lt;/p&gt;

&lt;p&gt;We&amp;rsquo;re going to take a look at two methods provided by Rack::Utils for
building query strings, &lt;strong&gt;build_query&lt;/strong&gt; and &lt;strong&gt;build_nested_query&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s say we want to build the URL
&lt;strong&gt;http://www.mywebsite.com/?authorization_token=foo&amp;amp;access_level=moderator&amp;amp;previous=index&lt;/strong&gt;
Using build_query, we can do&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  redirect_to root_path + Rack::Utils.build_query(
                           authorization_token: "foo",
                           access_level: "moderator",
                           previous: "index"
                         )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&amp;rsquo;s basically all there is to it. I&amp;rsquo;d recommend taking a look at
the source for both
&lt;a href="https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L139"&gt;build_query&lt;/a&gt;
and
&lt;a href="https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L150"&gt;build_nested_query&lt;/a&gt;,
the latter of which let&amp;rsquo;s you pass in a prefix as a second argument to
build URLs like &lt;strong&gt;http://www.mywebsite.com?foo[name]=John&amp;amp;foo[id]=20&lt;/strong&gt;
with ease.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Time to Try Again</title>
    <link href="http://www.johndesu.com/2012/04/05/time-to-try-again/" rel="alternate"/>
    <id>http://www.johndesu.com/2012/04/05/time-to-try-again/</id>
    <published>2012-04-05T00:00:00Z</published>
    <updated>2012-04-05T00:00:00Z</updated>
    <author>
      <name>John Dyer</name>
    </author>
    <summary type="html">&lt;p&gt;This isn&amp;rsquo;t my first attempt at trying to run a blog. Hell, this isn&amp;rsquo;t even my second or third attempt. I originally started blogging about 6 years ago when I was 16. I can&amp;rsquo;t even remember what most of the content on my blog was about. I just know that I failed. I started out with the best of intentions, but within a few months I lost interest and the frequency with which I posted new articles quickly dwindled. I never had much of an understanding about why I stopped blogging back then, but I feel I do now and think that my new understanding will help me in keeping this new blog fresh and full of content.&lt;/p&gt;

&lt;p&gt;When I was sixteen I thought I had a lot to say about technology and web development. In reality I was still a newbie developer and was busy with school and other extracurricular activities. I had a lot of passion though (which I believe I still have) and started a lot of projects, my old blog being one of them. What I didn&#8217;t have was the time or self control to finish what I started and keep my blog up to date&amp;hellip;&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;This isn&amp;rsquo;t my first attempt at trying to run a blog. Hell, this isn&amp;rsquo;t even my second or third attempt. I originally started blogging about 6 years ago when I was 16. I can&amp;rsquo;t even remember what most of the content on my blog was about. I just know that I failed. I started out with the best of intentions, but within a few months I lost interest and the frequency with which I posted new articles quickly dwindled. I never had much of an understanding about why I stopped blogging back then, but I feel I do now and think that my new understanding will help me in keeping this new blog fresh and full of content.&lt;/p&gt;

&lt;p&gt;When I was sixteen I thought I had a lot to say about technology and web development. In reality I was still a newbie developer and was busy with school and other extracurricular activities. I had a lot of passion though (which I believe I still have) and started a lot of projects, my old blog being one of them. What I didn&#8217;t have was the time or self control to finish what I started and keep my blog up to date.&lt;/p&gt;

&lt;p&gt;A lot of things have changed in the past few years though that I believe will help me succeed with my blogging endeavors this time around. I won&amp;rsquo;t dive into specifics now but you can find out more about me here. Instead I&amp;rsquo;d like to finish this first entry with my goals for this blog and my reasoning for starting it.&lt;/p&gt;

&lt;p&gt;Lately I&amp;rsquo;ve been spending a lot of time thinking of ways to expand my knowledge as a developer. Coming up with a technical reading list and keeping track of things I&amp;rsquo;d like to learn has been a large part of it, but I think that keeping track of my learning experiences and sharing them with others could be the most important step.&lt;/p&gt;

&lt;p&gt;So, here&amp;rsquo;s to me starting anew with my blogging efforts.&lt;/p&gt;
</content>
  </entry>
</feed>
