<?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>Treehouse Blog</title>
	<atom:link href="http://blog.teamtreehouse.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.teamtreehouse.com</link>
	<description>Learn skills to change the world today!</description>
	<lastBuildDate>Thu, 23 May 2013 16:11:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to Write a Module in JavaScript &#8211; Quick Tip</title>
		<link>http://blog.teamtreehouse.com/how-to-write-a-module-in-javascript-quick-tip?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-write-a-module-in-javascript-quick-tip</link>
		<comments>http://blog.teamtreehouse.com/how-to-write-a-module-in-javascript-quick-tip#comments</comments>
		<pubDate>Thu, 23 May 2013 14:02:16 +0000</pubDate>
		<dc:creator>Jim Hoskins</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[JavaScript Modules]]></category>
		<category><![CDATA[treehouse quick tips]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21780</guid>
		<description><![CDATA[<p>In this Treehouse Quick Tip, teacher Jim Hoskins will show you how to write a simple JavaScript module. Modules are useful in writing JavaScript, because they allow us to write code that is less likely to interfere with other code &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/how-to-write-a-module-in-javascript-quick-tip">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/how-to-write-a-module-in-javascript-quick-tip">How to Write a Module in JavaScript &#8211; Quick Tip</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In this Treehouse Quick Tip, teacher Jim Hoskins will show you how to write a simple JavaScript module. Modules are useful in writing JavaScript, because they allow us to write code that is less likely to interfere with other code on our page. </p>
<p>It allows us to selectively expose parts of the code to other programs running on our page. This makes our JavaScript code more resilient and easier to maintain.</p>
<p><iframe width="853" height="480" src="http://www.youtube.com/embed/xOh1ZA4pZMo" frameborder="0" allowfullscreen></iframe></p>
<p>The post <a href="http://blog.teamtreehouse.com/how-to-write-a-module-in-javascript-quick-tip">How to Write a Module in JavaScript &#8211; Quick Tip</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/how-to-write-a-module-in-javascript-quick-tip/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tall Tales From A Large Man &#8211; Interview with Aaron Draplin</title>
		<link>http://blog.teamtreehouse.com/tall-tales-from-a-large-man-interview-with-aaron-draplin?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tall-tales-from-a-large-man-interview-with-aaron-draplin</link>
		<comments>http://blog.teamtreehouse.com/tall-tales-from-a-large-man-interview-with-aaron-draplin#comments</comments>
		<pubDate>Wed, 22 May 2013 20:08:45 +0000</pubDate>
		<dc:creator>Treehouse</dc:creator>
				<category><![CDATA[Treehouse Friends]]></category>
		<category><![CDATA[aaron draplin]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21779</guid>
		<description><![CDATA[<p>Aaron Draplin is a graphic designer and founder of the Draplin Design Company. He&#8217;s done work for everyone from his friend&#8217;s hot dog company to President Obama himself. He&#8217;s also a speaker and co-creator of Field Notes, a popular notebook &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/tall-tales-from-a-large-man-interview-with-aaron-draplin">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/tall-tales-from-a-large-man-interview-with-aaron-draplin">Tall Tales From A Large Man &#8211; Interview with Aaron Draplin</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Aaron Draplin is a graphic designer and founder of the <a href="http://draplin.com">Draplin Design Company</a>. He&#8217;s done work for everyone from his friend&#8217;s hot dog company to President Obama himself. He&#8217;s also a speaker and co-creator of Field Notes, a popular notebook series among designers. He&#8217;s bold, outspoken, and unapologetic about being awesome. </p>
<p>He took a minute to talk with expert teacher, Mat Helme, and threw some knowledge bombs at him. Enjoy! </p>
<p><iframe width="853" height="480" src="http://www.youtube.com/embed/SgsCTjdu3dA" frameborder="0" allowfullscreen></iframe></p>
<p>The full interview will be available tomorrow to all <a href="http://teamtreehouse.com" title="Treehouse">Treehouse Gold Members</a>.</p>
<p>The post <a href="http://blog.teamtreehouse.com/tall-tales-from-a-large-man-interview-with-aaron-draplin">Tall Tales From A Large Man &#8211; Interview with Aaron Draplin</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/tall-tales-from-a-large-man-interview-with-aaron-draplin/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Developing over the YouTube API with JSON</title>
		<link>http://blog.teamtreehouse.com/developing-over-the-youtube-api-with-json?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=developing-over-the-youtube-api-with-json</link>
		<comments>http://blog.teamtreehouse.com/developing-over-the-youtube-api-with-json#comments</comments>
		<pubDate>Wed, 22 May 2013 13:30:31 +0000</pubDate>
		<dc:creator>Jake Rocheleau</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Learn to Code]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21770</guid>
		<description><![CDATA[<p>The process to understand API development is generally complicated but should become easier with practice. Social networks like Twitter and YouTube offer XML/RSS/JSON feeds without the requirement of an API key. However, other smaller networking websites like Instagram and Etsy &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/developing-over-the-youtube-api-with-json">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/developing-over-the-youtube-api-with-json">Developing over the YouTube API with JSON</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>The process to understand API development is generally complicated but should become easier with practice. Social networks like Twitter and YouTube offer XML/RSS/JSON feeds without the requirement of an API key. However, other smaller networking websites like Instagram and Etsy will require developers to sign up for a new API key before allowing them to make requests from the server.</p>
<p>In this tutorial I want to demonstrate a really simple HTML/CSS/JS web application building over the YouTube API. This demo will list a number of YouTube channels which you may click and pull out all the latest videos, plus their related metadata such as views and comments. All of this dynamic page content will be handled via jQuery so you do not need to host anything on a web server. Check out my sample demo to get an idea of what we are building.</p>
<p><!-- more --></p>
<p><a href="http://byjakewithlove.com/treehouse/yt-json-api/"><img src="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/treehouse-youtube-api-json-tutorial-preview.png" alt="preview tutorial youtube api json demo javascript jquery"></a></p>
<p><strong><a href="http://byjakewithlove.com/treehouse/yt-json-api/">Live Demo</a></strong> &#8211; <strong><a href="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/youtube-json-api-source-code.zip">Download Source Code</a></strong></p>
<h2>Getting Started</h2>
<p>I will skip a lot of the boring HTML so that we can focus more deeply on the YouTube response and how we handle this in JavaScript. The most important HTML section you should recognize is the navigation along with the inner videos content div. I have used specific IDs so that we can target each element and check whenever the user clicks a link, then display that content inside <strong>#videos</strong>.</p>
<pre>    &lt;nav id="usersnav"&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href="#gotreehouse"&gt;gotreehouse&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#thenextweb"&gt;thenextweb&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#TEDxTalks"&gt;TEDxTalks&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#wearechange"&gt;wearechange&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#RTAmerica"&gt;RTAmerica&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#G4ZDTechTV2"&gt;G4ZDTechTV2&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#NovaCrystallisDotCom"&gt;NovaCrystallisDotCom&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
    
    &lt;div id="videos"&gt;
      &lt;!-- vids go here --&gt;
    &lt;/div&gt;
</pre>
<p>In order for the whole process to work we will need a copy of the latest jQuery library. My demo includes this file from within the ./js/ directory so you won&#8217;t need to re-download anything. Also I have kept my custom-written jQuery codes inside the index file instead of moving them to an external JS script. It would obviously be easier to do so when you are running this on a live website, but for my demo it is quicker  to study these codes from within the same page.</p>
<h2>Pulling Results with jQuery</h2>
<p>The first step is to define a set of variables which we need in the script. Then we can handle a click event from the user which is interfacing with any of the navigation links. Each of the anchor elements is using an HREF value containing a hash symbol plus username we need. It is important that we stop this default href from loading by using <strong>e.preventDefault()</strong> and then pull the value out so we can get the YouTube feed results.</p>
<pre>$(function(){
  $('#usersnav ul li a').on('click', function(e){
    e.preventDefault();
    var htmlString  = '&lt;ul id="videoslisting"&gt;';
    var channelname = $(this).attr('href').substring(1);
    var ytapiurl    = 'http://gdata.youtube.com/feeds/api/users/'+channelname+'/uploads?alt=json&amp;max-results=10';
</pre>
<p>The handy JavaScript <strong>substring()</strong> method will create a new string variable starting from the character marker 1(marker 0 is the first character). This removes our hash symbol so that we can now place the username into a generic API call which looks like this: <em>http://gdata.youtube.com/feeds/api/users/CHANNELNAME/uploads?alt=json&amp;max-results=10</em></p>
<p>The user&#8217;s channel name can be accessed to query YouTube and pull out their latest uploads. I am referencing a max results value of 10 and since we are not using pagination. I have not included any other callback methods, either. JSON is the response type we need so that way it&#8217;ll be easier parsing all this content inside jQuery.</p>
<h2>Building a Loop</h2>
<p>PHP and Rails and other programming languages often use logic loops to iterate through data patterns. While loops, for loops, do loops, and other common ideas are not as strict when you would compare them with JavaScript. However the methods for <a href="http://api.jquery.com/jQuery.parseJSON/">.parseJSON()</a> and <a href="http://api.jquery.com/jQuery.each/">jQuery.each()</a> offer the perfect system for looping through all of these results.</p>
<pre>    $.getJSON(ytapiurl, function(data) {
      $.each(data.feed.entry, function(i, item) {                                
        var title    = item['title']['$t'];
        var videoid  = item['id']['$t'];
      
        var pubdate  = item['published']['$t'];
        var fulldate = new Date(pubdate).toLocaleDateString();
      
        var thumbimg = item['media$group']['media$thumbnail'][0]['url'];
        var tinyimg1 = item['media$group']['media$thumbnail'][1]['url'];
        var tinyimg2 = item['media$group']['media$thumbnail'][2]['url'];
        var tinyimg3 = item['media$group']['media$thumbnail'][3]['url'];
      
        var vlink    = item['media$group']['media$content'][0]['url'];
        var ytlink   = item['media$group']['media$player'][0]['url'];
        var numviews = item['yt$statistics']['viewCount'];
        var numcomms = item['gd$comments']['gd$feedLink']['countHint'];
      
        htmlString +='&lt;li class="clearfix"&gt;&lt;h2&gt;' + title + '&lt;/h2&gt;';
        htmlString +='&lt;div class="videothumb"&gt;&lt;a href="' + ytlink + '" target="_blank"&gt;&lt;img src="' + thumbimg + '" width="480" height="360"&gt;&lt;/a&gt;&lt;/div&gt;';
        htmlString +='&lt;div class="meta"&gt;&lt;p&gt;Published on &lt;strong&gt;' + fulldate + '&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Total views: &lt;strong&gt;' + commafy(numviews) + '&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Total comments: &lt;strong&gt;'+ numcomms +'&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="'+ ytlink +'" class="external" target="_blank"&gt;View on YouTube&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="'+ vlink +'" class="external" target="_blank"&gt;View in Fullscreen&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Alternate Thumbnails&lt;/strong&gt;:&lt;br&gt;&lt;img src="'+ tinyimg1 +'"&gt; &lt;img src="' + tinyimg2 + '"&gt; &lt;img src="'+ tinyimg3 +'"&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;';
      }); // end each loop
    
      $('#videos').html(htmlString + "&lt;/ul&gt;");
    }); // end json parsing
</pre>
<p>This code block seems very large but the majority of the content is generating variable names. YouTube will return a lot more information than we need so it would be foolish to create an array containing all the keys. Instead we should make new variables strictly for the content which will be used inside the layout, and then we create a final HTML string to return to the browser.</p>
<p>Each variable block will contain an important section of the final display. We will need the video title, original publishing date, the full-size thumbnail along with each of the 3 mini-thumbs, direct video URL, view count, and also the comments count. The HTML is displayed using an unordered list of items which finishes by applying the HTML content into the <strong>#videos</strong> container. This is easily accomplished by using the jQuery <a href="http://api.jquery.com/html/">.html()</a> method.</p>
<h2>Parsing &amp; Formatting Numbers</h2>
<p>One other final point I&#8217;d like to bring up is the ability to parse through each view counter. Return data for videos which have over 1000 views will not include the comma between each set of 3 numbers. I found an <a href="http://stackoverflow.com/a/6785438/477958">excellent solution on Stack Overflow</a> written using pure JavaScript. The function name is <strong>commafy()</strong> which is wrapped around each of the view count numbers. This will check if the digits are higher than 4 and automatically place a comma where it should be.</p>
<p>These codes are wonderful to use in any number of JavaScript solutions. The questions and solutions on Stack Overflow are always helpful with these kinds of matters. I think it is worth noting that you could write a much simpler function using jQuery or handling this method inside the <strong>.each()</strong> loop. But if everything is kept inside a separate file then you may not worry as much about the syntax or number of lines.</p>
<p><a href="http://byjakewithlove.com/treehouse/yt-json-api/"><img src="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/treehouse-youtube-api-json-tutorial-preview.png" alt="preview tutorial youtube api json demo javascript jquery"></a></p>
<p><strong><a href="http://byjakewithlove.com/treehouse/yt-json-api/">Live Demo</a></strong> &#8211; <strong><a href="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/youtube-json-api-source-code.zip">Download Source Code</a></strong></p>
<h2>Final Thoughts</h2>
<p>Many developers who are not familiar with JSON should hit Google and read a few articles on the subject. It is basically JavaScript code which is written in a certain way so that the syntax can be read as data-value pairs. YouTube can present JSON data from their server and using jQuery it is possible to organize this data into the page dynamically. I hope this tutorial may prove useful to anybody who has been interested in developing over YouTube&#8217;s API, or any API for that matter. Feel free to download a copy of my demo and see if you can implement a similar method elsewhere in your own projects.</p>
<p>The post <a href="http://blog.teamtreehouse.com/developing-over-the-youtube-api-with-json">Developing over the YouTube API with JSON</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/developing-over-the-youtube-api-with-json/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Vanity URLs in Rails</title>
		<link>http://blog.teamtreehouse.com/creating-vanity-urls-in-rails?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=creating-vanity-urls-in-rails</link>
		<comments>http://blog.teamtreehouse.com/creating-vanity-urls-in-rails#comments</comments>
		<pubDate>Tue, 21 May 2013 17:30:09 +0000</pubDate>
		<dc:creator>Andrew Chalkley</dc:creator>
				<category><![CDATA[Learn to Code]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[tutorials for vanity urls in rails]]></category>
		<category><![CDATA[vanity urls in rails]]></category>
		<category><![CDATA[vanity urls in ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21752</guid>
		<description><![CDATA[<p>A vanity URL is a search engine optimized (SEO) URL. Instead of having a meaningless URL like http://storeofthefuture.com/products/2015 wouldn&#8217;t http://storeofthefuture.com/products/hoverboard be better and more meaningful? It&#8217;s fairly straightforward to make URLs nicer in Rails. I&#8217;ll walk you through the process. &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/creating-vanity-urls-in-rails">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/creating-vanity-urls-in-rails">Creating Vanity URLs in Rails</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>A vanity URL is a search engine optimized (SEO) URL. Instead of having a meaningless URL like <code>http://storeofthefuture.com/products/2015</code> wouldn&#8217;t <code>http://storeofthefuture.com/products/hoverboard</code> be better and more meaningful?</p>
<p>It&#8217;s fairly straightforward to make URLs nicer in Rails. I&#8217;ll walk you through the process.</p>
<h2>Baby Steps</h2>
<p>In Rails the models have a method called <code>to_param</code>. This method gets called when you pass a model into a URL helper like:</p>
<pre><code>&lt;%= link_to product.name, product %&gt;
</code></pre>
<p>Or:</p>
<pre><code>&lt;%= link_to product.name, product_path(product) %&gt;
</code></pre>
<p>By default the <code>to_param</code> returns the id as a <code>String</code> rather than a <code>Fixnum</code>. Under the hood Rails is calling <code>to_s</code> on the <code>id</code> attribute, which allows us to override this with our own string. To do this we define the <code>to_param</code> method.</p>
<pre><code>class Product &lt; ActiveRecord::Base
  attr_accessible :description, :name

  def to_param

  end
end
</code></pre>
<p>Within the <code>to_param</code> method, let&#8217;s set a string with the <code>id</code> followed by the <code>name</code> separated with a dash.</p>
<pre><code>class Product &lt; ActiveRecord::Base
  attr_accessible :description, :name

  def to_param
    "#{id}-#{name}"
  end
end
</code></pre>
<p>This would generate a URL of <code>/products/2015-Hoverboard</code> for a product with the name of &#8220;Hoverboard&#8221;.</p>
<p>Now what happens in the <code>show</code> action in the <code>ProductsController</code>? The <code>params[:id]</code> is the <code>String</code> of &#8220;2015-Hoverboard&#8221; and when you do a <code>Product.find(params[:id])</code> the <code>find</code> method calls <code>to_i</code>. In Ruby when you call <code>to_i</code> on a <code>String</code> it grabs the first part of the <code>String</code> that looks like an integer. So <code>Product.find("2015-Hoverboard")</code> is exactly the same as calling <code>Product.find(2015)</code>.</p>
<p>However, there&#8217;s an issue with names that contain a space. For example, a product with the name of &#8220;Flux Capacitor&#8221; would generate <code>/1955-Flux%20Capacitor/</code>, which isn&#8217;t very friendly. We should format the names so that we get them all lowercase and replace the spaces with dashes.</p>
<p>We can do that by creating a method called <code>slug</code>. The word <a href="http://en.wikipedia.org/wiki/Clean_URL#Slug">slug</a> describes the part of a URL that is made up of human-readable keywords.</p>
<pre><code>class Product &lt; ActiveRecord::Base
  attr_accessible :description, :name

  def slug
    name.downcase.gsub(" ", "-")  
  end

  def to_param
    "#{id}-#{slug}"
  end
end
</code></pre>
<p>So as you can see we just <code>downcase</code> the <code>name</code> and then <code>gsub</code> out the spaces with a dash and then swap the <code>name</code> with <code>slug</code> in the <code>to_param</code>.</p>
<p>So now the URLs are <code>/2015-hoverboard</code> and <code>/1955-flux-capacitor</code>.</p>
<p>Much nicer.</p>
<h2>Taking it Further</h2>
<p>Now we&#8217;ve done only a little bit of work and haven&#8217;t altered the database or the controller. Let&#8217;s say we wanted to ditch the <code>id</code>s completely from the URLs.</p>
<p>We&#8217;ll do this by generating a new attribute called <code>slug</code>, and then manually or programmatically update all the existing products to have a slug.</p>
<p>We&#8217;ll first need to create and run the migration.</p>
<pre><code>rails g migration AddSlugToProducts slug:string
rake db:migrate
</code></pre>
<p>Then update your model to have <code>:slug</code> as an <code>attr_accessible</code> and validate its presence while ditching the <code>slug</code> method from the previous implementation. We can also just return the <code>slug</code> in the <code>to_param</code> method like this:</p>
<pre><code>class Product &lt; ActiveRecord::Base
  attr_accessible :description, :name, :slug

  validates_presence_of :slug

  def to_param
    slug
  end
end
</code></pre>
<p>Next fire up your <code>rails console</code> and cycle through each <code>product</code> and update the <code>slug</code> in each existing <code>product</code>.</p>
<pre><code>&gt;&gt; Product.all.each do |product|
?&gt; product.slug = product.name.downcase.gsub(" ", "-")
&gt;&gt; product.save
&gt;&gt; end
</code></pre>
<p>Now that we&#8217;ve done that, we need to modify the controller. The <code>find</code> method looks up products by the <code>id</code>, so for all instances in your controller where you <code>find(params[:id])</code> on the <code>@product</code> you&#8217;d want to <code>find_by_slug(params[:id])</code>. This is because the <code>:id</code> is  defined in the <code>routes.rb</code>, not because it <em>is</em> the <code>:id</code> of the object.</p>
<pre><code>$ rake routes
    ...
    product GET    /products/:id(.:format)      products#show
    ...        
</code></pre>
<p>So in the <code>show</code> action in the <code>ProductsController</code> is should look something like this:</p>
<pre><code>def show
  @product = Product.find_by_slug(params[:id])
  respond_to do |format|
    format.html # show.html.erb
    format.json { render json: @product }
  end
end
</code></pre>
<p>Depending on how you&#8217;re using the model in other actions in your controller, you may need update those too.</p>
<p>You&#8217;ll also want to update any forms to include a <code>slug</code> field as this is now required to generate a new model. It&#8217;s required because without it you won&#8217;t be able to generate a URL or find any existing models.</p>
<p>This implementation of creating clear, human-readable and friendly URLs will yield the urls <code>/products/hoverboard</code> and <code>/products/flux-capacitor</code>, which is exactly what we wanted!</p>
<h3>A Small Note on Performance</h3>
<p>The <code>id</code> column of databases are normally indexed, if not the first things to be checked and indexed when performance issues occur. Finding by <code>id</code> is a fast method for looking them up. However if you have lots of models it may be worth adding an index on the <code>slug</code> to improve performance.</p>
<p>Here&#8217;s what you&#8217;d add to a migration:</p>
<pre><code>add_index :products, :slug
</code></pre>
<h2>Conclusion</h2>
<p>Depending on how clean you want your URLs, or how much effort you want to go in to cleaning up existing URLs, either one of these strategies will work for you.</p>
<p>The post <a href="http://blog.teamtreehouse.com/creating-vanity-urls-in-rails">Creating Vanity URLs in Rails</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/creating-vanity-urls-in-rails/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>iTunes Scrolling and Mobile Shelving &#8211; Treehouse Show Ep 40</title>
		<link>http://blog.teamtreehouse.com/itunes-scrolling-and-mobile-shelving-treehouse-show-ep-40?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=itunes-scrolling-and-mobile-shelving-treehouse-show-ep-40</link>
		<comments>http://blog.teamtreehouse.com/itunes-scrolling-and-mobile-shelving-treehouse-show-ep-40#comments</comments>
		<pubDate>Tue, 21 May 2013 14:02:20 +0000</pubDate>
		<dc:creator>Treehouse</dc:creator>
				<category><![CDATA[Treehouse Show]]></category>
		<category><![CDATA[jQuery Shapeshift]]></category>
		<category><![CDATA[packery]]></category>
		<category><![CDATA[sly]]></category>
		<category><![CDATA[treehouse show]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21774</guid>
		<description><![CDATA[<p>In this episode of The Treehouse Show, Nick Pettit (@nickrp) and Jason Seifer (@jseifer) talk about iTunes Scrolling and Mobile Shelving. Here are the links for the week: Quick &#8216;n dirty iTunes 11 style scroller &#8211; CodePen http://codepen.io/vaskemaskine/pen/DrdJE Sly http://darsa.in/sly/ &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/itunes-scrolling-and-mobile-shelving-treehouse-show-ep-40">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/itunes-scrolling-and-mobile-shelving-treehouse-show-ep-40">iTunes Scrolling and Mobile Shelving &#8211; Treehouse Show Ep 40</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In this episode of The Treehouse Show, Nick Pettit (@nickrp) and Jason Seifer (@jseifer) talk about iTunes Scrolling and Mobile Shelving.</p>
<p><iframe width="853" height="480" src="http://www.youtube.com/embed/QTw1iuUi6i4" frameborder="0" allowfullscreen></iframe></p>
<h2>Here are the links for the week:</h2>
<p>Quick &#8216;n dirty iTunes 11 style scroller &#8211; CodePen<br />
<a href="http://codepen.io/vaskemaskine/pen/DrdJE">http://codepen.io/vaskemaskine/pen/DrdJE</a></p>
<p>Sly<br />
<a href="http://darsa.in/sly/">http://darsa.in/sly/</a></p>
<p>jQuery.Shapeshift<br />
<a href="http://mcpants.github.io/jquery.shapeshift/">http://mcpants.github.io/jquery.shapeshift/</a></p>
<p>Packery<br />
<a href="http://packery.metafizzy.co/">http://packery.metafizzy.co/</a></p>
<p>Pure CSS Peeling Sticky &#8211; CodePen<br />
<a href="http://codepen.io/patrickkunka/pen/axEgL">http://codepen.io/patrickkunka/pen/axEgL</a></p>
<p>Package Managers: An Introductory Guide For The Uninitiated Front-End Developer &#8211; Tech.Pro<br />
<a href="http://tech.pro/tutorial/1190/package-managers-an-introductory-guide-for-the-uninitiated-front-end-developer">http://tech.pro/tutorial/1190/package-managers-an-introductory-guide-for-the-uninitiated-front-end-developer</a></p>
<p>Niice. A search engine with taste.<br />
<a href="http://www.niice.co/">http://www.niice.co/</a></p>
<p>jakiestfu/Snap.js · GitHub<br />
<a href="http://github.com/jakiestfu/Snap.js/">http://github.com/jakiestfu/Snap.js/</a></p>
<p>The post <a href="http://blog.teamtreehouse.com/itunes-scrolling-and-mobile-shelving-treehouse-show-ep-40">iTunes Scrolling and Mobile Shelving &#8211; Treehouse Show Ep 40</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/itunes-scrolling-and-mobile-shelving-treehouse-show-ep-40/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Learning to Program Got Me A Technical Co-Founder</title>
		<link>http://blog.teamtreehouse.com/how-learning-to-program-got-me-a-technical-co-founder?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-learning-to-program-got-me-a-technical-co-founder</link>
		<comments>http://blog.teamtreehouse.com/how-learning-to-program-got-me-a-technical-co-founder#comments</comments>
		<pubDate>Mon, 20 May 2013 13:30:21 +0000</pubDate>
		<dc:creator>Spencer Fry</dc:creator>
				<category><![CDATA[Learn to Code]]></category>
		<category><![CDATA[Start a Business]]></category>
		<category><![CDATA[Spencer Fry]]></category>
		<category><![CDATA[Technical Co-founders]]></category>
		<category><![CDATA[Uncover]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21768</guid>
		<description><![CDATA[<p>When I started learning to program back in February 2012 in order to build Uncover, I simply wanted to be able to see my ideas through to a solid prototype that customers could use. Nothing else mattered. I’d watch tutorials, &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/how-learning-to-program-got-me-a-technical-co-founder">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/how-learning-to-program-got-me-a-technical-co-founder">How Learning to Program Got Me A Technical Co-Founder</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>When I started learning to program back in February 2012 in order to build <a href="http://uncover.com" title="Uncover">Uncover</a>, I simply wanted to be able to see my ideas through to a solid prototype that customers could use. Nothing else mattered. I’d watch tutorials, read books, practice exercises, deploy code, fail and repeat&#8211;until I collapsed on my keyboard. Every day I’d wake up with a strong sense of accomplishment.</p>
<p>But no matter how much progress I made, I still knew I’d need to find a talented technical co-founder to work with. I’ve been around the block enough times to know that a year of programming wouldn’t make me a CTO. But what I couldn’t have anticipated was that learning to program up to the level I’ve achieved would make finding a technical co-founder ten times easier. Sure, it’s sort of a kick in the face knowing that one day, with any product success, you’ll have to pass the lead to someone more capable than you. But again, the huge consolation is that it’s a lot easier to find someone once you’ve learned to code. </p>
<p>For me, with a prototype in September 2012 and happy customers already in place, that time had come.</p>
<p>Because I’ve asked Mike (my Uncover co-founder) to be candid about it, I can say without a doubt that we’d never have teamed up if I hadn’t spent 2012 learning to code. Mike and I had known each other for five years before we decided to work together. It wasn’t until I was months into learning to code, when he saw my dedication and saw that I’d successfully built a prototype, that he began to entertain the idea.</p>
<p>Even during the first few months of coding, I’d badger Mike about working together over frequent afternoon coffees, but he’d shrug off the idea. He wasn’t looking to be someone’s code monkey. He wanted to work with someone who understood programming, who could contribute, and who had proven that he really wanted to push himself ahead technically. The person Mike would be willing to work with had to build something first.</p>
<p>For Mike it was more than me being able to contribute code to our product. It was about the psychological connection we’d have. There’s a special bond that exists between developers. People who can build product look at what’s built in a different way. “You can code? Welcome to the club.”</p>
<p>Mike welcomed me. He then pushed me. He taught me. He made me a better developer than I could ever have been on my own. And ultimately he agreed to join Uncover as a co-founder because I had proven myself and managed to get into the club.</p>
<p>The post <a href="http://blog.teamtreehouse.com/how-learning-to-program-got-me-a-technical-co-founder">How Learning to Program Got Me A Technical Co-Founder</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/how-learning-to-program-got-me-a-technical-co-founder/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Sharing What You Know &#8211; Interview with Ben Callahan</title>
		<link>http://blog.teamtreehouse.com/sharing-what-you-know-interview-with-ben-callahan?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sharing-what-you-know-interview-with-ben-callahan</link>
		<comments>http://blog.teamtreehouse.com/sharing-what-you-know-interview-with-ben-callahan#comments</comments>
		<pubDate>Fri, 17 May 2013 19:58:54 +0000</pubDate>
		<dc:creator>Treehouse</dc:creator>
				<category><![CDATA[Treehouse Friends]]></category>
		<category><![CDATA[ben callahan]]></category>
		<category><![CDATA[treehouse friends]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21765</guid>
		<description><![CDATA[<p>Ben Callahan is the CEO of Sparkbox, a writer, a designer, and a speaker on the subject of Responsive Web Design. Ben was nice enough to sit down with Allison for an extensive interview on Responsive Web Design for the &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/sharing-what-you-know-interview-with-ben-callahan">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/sharing-what-you-know-interview-with-ben-callahan">Sharing What You Know &#8211; Interview with Ben Callahan</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://bencallahan.com/">Ben Callahan</a> is the CEO of <a href="http://seesparkbox.com/">Sparkbox</a>, a writer, a designer, and a speaker on the subject of Responsive Web Design. Ben was nice enough to sit down with Allison for an extensive interview on Responsive Web Design for the <a href="http://teamtreehouse.com">Gold Members</a> of Treehouse. Lucky for us here on the blog, Ben recorded a gem about the value in sharing what you know. </p>
<p><iframe width="853" height="480" src="http://www.youtube.com/embed/H1S7sE9conA" frameborder="0" allowfullscreen></iframe></p>
<p>The post <a href="http://blog.teamtreehouse.com/sharing-what-you-know-interview-with-ben-callahan">Sharing What You Know &#8211; Interview with Ben Callahan</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/sharing-what-you-know-interview-with-ben-callahan/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Giveaway: New Offscreen Mag Featuring Ryan Carson</title>
		<link>http://blog.teamtreehouse.com/new-offscreen-mag-launches-and-were-giving-away-3-copies?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-offscreen-mag-launches-and-were-giving-away-3-copies</link>
		<comments>http://blog.teamtreehouse.com/new-offscreen-mag-launches-and-were-giving-away-3-copies#comments</comments>
		<pubDate>Fri, 17 May 2013 13:47:46 +0000</pubDate>
		<dc:creator>Josh Long</dc:creator>
				<category><![CDATA[Inside Treehouse]]></category>
		<category><![CDATA[Web Industry]]></category>
		<category><![CDATA[Kai Brach]]></category>
		<category><![CDATA[Offscreen Giveaway]]></category>
		<category><![CDATA[Offscreen Magazine]]></category>
		<category><![CDATA[ryan carson]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21760</guid>
		<description><![CDATA[<p>The new Offscreen Magazine has launched and it features none other than our very own Ryan Carson. It&#8217;s no secret that Offscreen is one of my favorite magazines for its integrity, in-depth interviews with the internet&#8217;s brightest, great photography, amazing &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/new-offscreen-mag-launches-and-were-giving-away-3-copies">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/new-offscreen-mag-launches-and-were-giving-away-3-copies">Giveaway: New Offscreen Mag Featuring Ryan Carson</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>The new <a href="http://www.offscreenmag.com/" title="Offscreen Magazine">Offscreen Magazine</a> has launched and it features none other than our very own <a href="http://ryancarson.com" title="Ryan Carson">Ryan Carson</a>. It&#8217;s no secret that Offscreen is one of my favorite magazines for its integrity, in-depth interviews with the internet&#8217;s brightest, great photography, amazing layout, and useful features. </p>
<p>Creator <a href="http://twitter.com/kaibrach" title="Kai Brach">Kai Brach</a> has clarity of intent and passionate conviction when building each issue and it shows in the final product. </p>
<h2>Hey Look, It&#8217;s Ryan!</h2>
<p>It was really cool to see Ryan in this issue of Offscreen, and to read about how passionate he is about family, life and the mission of <a href="http://teamtreehouse.com" title="Treehouse">Treehouse</a>.</p>
<p><a href="http://offscreenmag.com"><img src="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/ryanOffscreen.jpg" alt="ryanOffscreen" width="2400" height="1600" class="alignnone size-full wp-image-21761" /></a></p>
<p>If you&#8217;d like to peek inside the life of the man that is leading the future of tech education (we&#8217;re not biased or anything), then grabbing a copy of issue #5 would be the perfect way to do it.</p>
<h2>Real Interviews You Can Learn From</h2>
<p>One of the elements that I appreciate most about Offscreen is that Kai gets to the heart of what makes our internet heroes tick through well-executed and personal interviews.</p>
<p><a href="http://offscreenmag.com"><img src="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/squarespaceOffscreen.jpg" alt="squarespaceOffscreen" width="2400" height="1600" class="alignnone size-full wp-image-21762" /></a></p>
<p>Anthony Casalena is the Founder and CEO of Squarespace, which he started from his dorm room in 2003. I learned a lot from his interview this issue and I got to see what it was really like in the beginning of such a great product. During the company&#8217;s early years, Anthony acted as the sole engineer, designer and support representative for the entire Squarespace platform, allowing for it to be a stable and profitable business without the need for large teams.</p>
<p>Anthony&#8217;s interview is just one of the many great interviews that Offscreen consistently delivers issue after issue.</p>
<h2>We&#8217;re Giving Away 3 Copies</h2>
<p>Here&#8217;s the deal dear readers of the Treehouse blog. We want to give 3 copies away to the people that will use its information the most.</p>
<p><a href="http://offscreenmag.com"><img src="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/coverOffscreen.jpg" alt="coverOffscreen" width="2400" height="1600" class="alignnone size-full wp-image-21763" /></a> </p>
<p>In the comments, tell us the story of a project that you hope to complete by the end of this year. (It&#8217;s important to note that I am &#8220;of age&#8221; and I can smell B.S. a mile away.) Don&#8217;t worry about selling or being overly-clever, just be yourself and let us know what dream you want to build.</p>
<p>I&#8217;ll pick the best stories myself and announce the winners via Twitter on next Thursday, May 23rd. I can&#8217;t wait to hear about your great ideas!</p>
<p>The post <a href="http://blog.teamtreehouse.com/new-offscreen-mag-launches-and-were-giving-away-3-copies">Giveaway: New Offscreen Mag Featuring Ryan Carson</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/new-offscreen-mag-launches-and-were-giving-away-3-copies/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Why Google Loves Developers</title>
		<link>http://blog.teamtreehouse.com/why-google-loves-developers?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=why-google-loves-developers</link>
		<comments>http://blog.teamtreehouse.com/why-google-loves-developers#comments</comments>
		<pubDate>Thu, 16 May 2013 20:42:55 +0000</pubDate>
		<dc:creator>Ben Jakuben</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web Industry]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google io]]></category>
		<category><![CDATA[google io 2013]]></category>
		<category><![CDATA[io 2013]]></category>
		<category><![CDATA[io13]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21754</guid>
		<description><![CDATA[<p>Google sent a love letter to developers yesterday by way of a three and a half hour keynote presentation at Google I/O 2013. Take a minute and watch this opening video from the keynote and tell me if you don&#8217;t &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/why-google-loves-developers">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/why-google-loves-developers">Why Google Loves Developers</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Google sent a love letter to developers yesterday by way of a <a href="http://www.engadget.com/2013/05/15/live-from-google-i-os-2013-opening-keynote/" target="_blank">three and a half hour keynote presentation</a> at Google I/O 2013. Take a minute and watch this opening video from the keynote and tell me if you don&#8217;t feel inspired as a developer, or as a user of technology, for that matter:</p>
<p><iframe src="http://www.youtube.com/embed/Dr3STRBtTp0" height="480" width="853" allowfullscreen="" frameborder="0"></iframe></p>
<blockquote><p>It&#8217;s really not about us. It&#8217;s about you: developers, who are building the most amazing and magical experiences that make those platforms and services come alive.</p></blockquote>
<p><em>- Vic Gundotra, Senior Vice President, Engineering</em></p>
<p>But words, spoken or shown on a giant screen in Moscone Center, are empty unless there are actions to back them up. Fortunately for us, the keynote was a parade of actions taken by Google to make our jobs as developers easier and more enjoyable.</p>
<p>Let&#8217;s get the devil&#8217;s advocate stuff out of the way first, though. Sure, I understand that the &#8220;Don&#8217;t Be Evil&#8221; corporation has a reputation lately of being a little more, well, evil. Take <a href="http://techcrunch.com/2013/03/13/googlereaderpocalypse-for-real-this-time/" target="_blank">the reaction to sunsetting Google Reader</a>, for example. Those types of decisions are open for criticism, but as far as developer relations go, Google has a history of taking care of developers and listening to their feedback. That trend continued today with a long list of developer-friendly announcements. (Feel free to continue this discussion in the comments!)</p>
<h2>Why Google Loves Web Developers</h2>
<p>Though Android was first up in the docket, Google spent plenty of time talking about Chrome and the web. Developers would love to see web technologies become first class citizens for native app development, but that just ain&#8217;t happening yet. Google did, however, talk about improvements to Chrome and some new file formats that will help improve the experience of web applications on mobile devices.</p>
<p>First up was support for a few new file formats for compressed images and videos. Google showed side-by-side comparisons of images in JPEG and the more recent <a href="https://developers.google.com/speed/webp/gallery" target="_blank">WebP</a> format, which is free and supports lossless compression, transparency, and animation. The images looked nearly identical but the WebP file was 31% smaller. (This is currently only supported in the beta version of Chrome for Android.)</p>
<div id="attachment_21755" class="wp-caption alignnone" style="width: 1718px"><a href="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-16-at-12.24.05-AM.png"><img class="size-full wp-image-21755" alt="Mobile-friendly WebP format will help sites load faster" src="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-16-at-12.24.05-AM.png" width="1708" height="872" /></a><p class="wp-caption-text">Mobile-friendly WebP format will help sites load faster</p></div>
<p>They also showed two videos simultaneously that compared the standard H.264 versus the VP9 format. The videos were again nearly identical, but the bitrate was much lower for VP9 and the overall file size was nearly a third of the size of the H.264 file.</p>
<p>This is a big deal for web developers because a high speed internet connection on a mobile device is not a given. We need to be aware that users around the world are accessing our content from all sorts of networks, and while speed is certainly an issue, cost is too. Anything that Google or developers can do to reduce file sizes helps to speed things up and keep costs down.</p>
<p>Google has been hard at work improving Chrome on mobile devices, too. Performance increased by 50% in the past year for the mobile version of Chrome, according to their own <a href="https://developers.google.com/octane/" target="_blank">Octane benchmark</a>.</p>
<h2>Why Google Loves Android Developers</h2>
<p>It seemed like everyone who took the stage yesterday said &#8220;Thank you&#8221; to developers. It felt like some real recognition of how developers have contributed to Google&#8217;s success by creating such an amazingly rich ecosystem of apps. They announced that over 48 billion apps have been downloaded to date from Google Play, and that more payments have been made to developers in the first four months of this year than all of last year. Revenue per user is 2.5 times what it was last year globally.</p>
<p>The other phrase that was repeated often was &#8220;we listened to your feedback&#8221;. Many of the new features released have been asked for by the development community, including some really exciting ones like the ability to publish to alpha and beta testers within Google Play, using Google+ circles for authorization. The Google Play Developer Console also offers a new translation service to more easily globalize our apps, and it will analyze apps and give feedback on how they might be improved to make more money from them.</p>
<h3>Games! Cross-Platform Games!</h3>
<p>Another big change for Android developers is the introduction of Google Play Game Services. This is like Apple&#8217;s Game Center that allows easy multiplier gaming in apps, but it is cross-platform, meaning that it will work on Android, iOS, and the web. The Game Services will allow developers to easily hook into multiplayer functionality that includes things like leaderboards and integration with your Google+ circles.</p>
<p>Game Center is pretty slick, but if developers and users adopt this, it could blow Game Center out of the water. There is no technical reason to dictate that you can&#8217;t play a multiplier game with any device you choose, and it is very refreshing to see Google provide these types of services.</p>
<h3>One IDE to Rule Them All: Android Studio</h3>
<p>The biggest announcement in the eyes of many Android developers was the unveiling of a new-ish tool called <a href="http://developer.android.com/sdk/installing/studio.html">Android Studio</a>. Since Android&#8217;s inception, the officially supported Integrated Development Environment (IDE) has been <a href="http://eclipse.org/">Eclipse</a>, an open source IDE built in and for Java that frankly has come a long way in the past few years. It has a reputation for being slow, clunky, and buggy, though, and many an experienced Android developer use a more polished and powerful product by JetBrains called <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a>.</p>
<p><a href="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/studio_splash.png"><img class="alignnone size-full wp-image-21757" alt="Android Studio Splash Screen" src="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/studio_splash.png" width="799" height="600" /></a></p>
<p>Android Studio is a new package based on IntelliJ IDEA. I downloaded the preview and at its core it is the same as using IntelliJ IDEA. It does have some new branded and integrated features that should make developers happy. For example, instead of clunky string resource identifiers, we will now be able to see the actual string values pulled in and displayed in layout files and code, as if we had hard-coded the string. We also will see real-time updates to layout files as we edit them in XML or the Graphical Layout Editor.</p>
<div id="attachment_21756" class="wp-caption alignnone" style="width: 1714px"><a href="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-15-at-9.26.34-PM.png"><img class="size-full wp-image-21756" alt="Live string resource preview makes code more readable" src="http://blog.teamtreehouse.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-15-at-9.26.34-PM.png" width="1704" height="936" /></a><p class="wp-caption-text">Live string resource preview makes code more readable</p></div>
<p>This early access preview doesn&#8217;t have many features that differentiate it from IntelliJ, or Eclipse, for that matter. But as <a href="https://twitter.com/tornorbye">Tor Norbye</a> (an engineer on the Android team) says, &#8220;We have big plans for Android Studio.&#8221;</p>
<p>Having used both tools, I am excited to see official support move to IntelliJ. I have long defended Eclipse as a robust tool that shows how open source software can be very effective and useful. The support community around Eclipse is large and helpful as any question about an Eclipse bug or oddity on StackOverflow will show. But IntelliJ is the <a href="http://stackoverflow.com/questions/4964168/benefits-of-switching-from-eclipse-to-intellij-idea-for-android-development">more powerful</a> and <a href="http://stackoverflow.com/questions/239732/things-possible-in-intellij-that-arent-possible-in-eclipse">feature-rich IDE</a>, and becoming the officially supported tool means that the community of developers using it will grow quite a lot, which means better support for everyone and more voices pushing the envelope for Android development tools.</p>
<h3>The Hidden Meaning Behind These Android Updates</h3>
<p>In other news for Android developers, there were some exciting new APIs released as well. For location-based apps, there are new APIs regarding a &#8220;fused location provider&#8221; (which will be better on battery life), geofencing (one of my favorites), and activity recognition, which means you&#8217;ll be able to tell if the user is walking, biking, or driving. Google+ sign in was enhanced to allow users to sign in seamlessly across devices, upstream messaging was added to Google Cloud Messaging service, and some <a href="http://developer.android.com/design/patterns/navigation-drawer.html">new UI features were even snuck in</a> without any fanfare during the keynote.</p>
<p>Dustin Earley from <a href="http://androidandme.com">Android and Me</a> wrote a post called &#8220;<a href="http://androidandme.com/2013/05/opinions/google-updating-android-without-updating-android-is-the-biggest-news-out-of-io-2013/">Google updating Android without updating Android is the biggest news out of I/O 2013</a>&#8221; that sums the hidden meaning behind all these updates. In it he says, &#8220;Google’s answer to fragmentation has been fully realized at Google I/O 2013.&#8221; This is <strong>good news for developers</strong> (and everyone, really). His observation is really astute. The new features today are part of different support libraries like Google Play Services that don&#8217;t require a new version of Android for developers to take advantage of them. We can start writing apps right away that make use of the new location APIs, for example, which means we can reach a much wider audience than waiting for the latest version of Android to trickle through the system to end users.</p>
<h2>Lightning Round</h2>
<p>The rest of these announcements are not necessarily meaningful from a developer perspective, though some are certainly ripe with opportunity for developers, like Google Play for Education:</p>
<ul>
<li>Google Play for Education was announced, which looks like a <a href="http://techcrunch.com/2013/05/15/with-google-play-for-education-google-looks-to-challenge-apples-dominance-in-the-classroom/">great resource for educators</a>.</li>
<li>The new Hangouts app is a <a href="http://mashable.com/2013/05/16/google-hangouts-app-analysis/">cross-platform messaging service</a> with apps for the web, Android, and iOS.</li>
<li>A new Google Play Music: All Access service looks to <a href="http://www.theverge.com/2013/5/15/4333464/google-takes-on-spotify-with-google-play-music-all-access">compete with Spotify</a>.</li>
<li>Many enhancements were made to how <a href="http://bits.blogs.nytimes.com/2013/05/15/photos-take-the-spotlight-in-updates-to-googles-social-network/">photos are stored and edited</a> in the cloud through Google+.</li>
<li>Google Now (voice search) was improved with more results, and it&#8217;s <a href="http://9to5mac.com/2013/05/15/google-beats-siri-to-the-desktop-with-google-now-like-voice-search-for-chrome/">now available on the desktop version of Chrome</a>.</li>
<li>Improvements were made to Google Maps to give more <a href="http://techcrunch.com/2013/05/15/deep-dive-with-the-new-google-maps-for-desktop-with-google-earth-integration-its-more-than-just-a-utility/">real-time, context-aware information</a>.</li>
<li>There were no hardware announcements except for a special <a href="http://bits.blogs.nytimes.com/2013/05/15/google-to-sell-its-own-version-of-samsungs-galaxy-s4/">Samsung Galaxy S4 that runs stock Android</a>. It&#8217;s cool, but expensive at $649.</li>
<li>There was <a href="http://bits.blogs.nytimes.com/2013/05/15/little-is-said-about-google-glass-at-developers-conference/">no mention at all of Google Glass</a> (though it was in attendance on audience member&#8217;s faces).</li>
<li>Developers still can&#8217;t access Google+ through an API. (Don&#8217;t you trust us, Google?)</li>
</ul>
<h2>Looking Forward</h2>
<p>All in all it was an exciting day for the tech world, and the rest of the world as this technology spreads to developing nations and people who have never used anything like this before. It&#8217;s an exciting time to be a developer, and that enthusiasm and excitement showed in everyone who presented, all the way up to one of the top dogs himself, Larry Page:</p>
<blockquote><p>I think today we&#8217;re still just scratching the surface of what&#8217;s possible. That&#8217;s why I&#8217;m so excited &#8230; I cannot wait to see what comes next. I got goosebumps while I was watching some of these presentations here.</p></blockquote>
<p>I cannot wait either. I wonder what will be revealed at WWDC? <img src='http://blog.teamtreehouse.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The post <a href="http://blog.teamtreehouse.com/why-google-loves-developers">Why Google Loves Developers</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/why-google-loves-developers/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Saving SVG Files in Adobe Illustrator</title>
		<link>http://blog.teamtreehouse.com/quick-tip-saving-svg-files-in-adobe-illustrator?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quick-tip-saving-svg-files-in-adobe-illustrator</link>
		<comments>http://blog.teamtreehouse.com/quick-tip-saving-svg-files-in-adobe-illustrator#comments</comments>
		<pubDate>Thu, 16 May 2013 14:02:07 +0000</pubDate>
		<dc:creator>Mat Helme</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[illustrator video tutorials]]></category>
		<category><![CDATA[treehouse quick tips]]></category>

		<guid isPermaLink="false">http://blog.teamtreehouse.com/?p=21759</guid>
		<description><![CDATA[<p>What&#8217;s an SVG, and why do I have to use it? SVG, or Scalable Vector Graphics, are very small in file size and are great for retina displays. Vector graphics have an advantage over pixel formats like .gif or .jpg &#8230;<span class="continue-reading"><a href="http://blog.teamtreehouse.com/quick-tip-saving-svg-files-in-adobe-illustrator">Continue reading <span class="meta-nav">&#8594;</span></a></span></p><p>The post <a href="http://blog.teamtreehouse.com/quick-tip-saving-svg-files-in-adobe-illustrator">Quick Tip: Saving SVG Files in Adobe Illustrator</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>What&#8217;s an SVG, and why do I have to use it? SVG, or Scalable Vector Graphics, are very small in file size and are great for retina displays. Vector graphics have an advantage over pixel formats like .gif or .jpg as they don&#8217;t deal with resolution. SVGs can scale to any size and not lose clarity. All SVGs are usually smaller in file size than raster graphics.</p>
<p><iframe width="853" height="480" src="http://www.youtube.com/embed/CbzTjamoDyM" frameborder="0" allowfullscreen></iframe></p>
<p>Treehouse Illustrator teacher Mat Helme will help you get started saving resolution independent SVG files in this Treehouse Quick Tip. </p>
<p>The post <a href="http://blog.teamtreehouse.com/quick-tip-saving-svg-files-in-adobe-illustrator">Quick Tip: Saving SVG Files in Adobe Illustrator</a> appeared first on <a href="http://blog.teamtreehouse.com">Treehouse Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.teamtreehouse.com/quick-tip-saving-svg-files-in-adobe-illustrator/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
