<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>MettaProgramming &#187; Github</title>
	<atom:link href="http://mettadore.com/tag/github/feed/" rel="self" type="application/rss+xml" />
	<link>http://mettadore.com</link>
	<description>Thoughts on Software and Technology</description>
	<lastBuildDate>Fri, 03 Feb 2012 17:39:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>A quick intro to Github for WordPressers</title>
		<link>http://mettadore.com/wordpress/a-quick-intro-to-github-for-wordpressers/</link>
		<comments>http://mettadore.com/wordpress/a-quick-intro-to-github-for-wordpressers/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 01:47:51 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[WordCamp]]></category>

		<guid isPermaLink="false">http://mettadore.com/?p=551</guid>
		<description><![CDATA[Yesterday, I was honored to speak at WordCamp Portland about using Source Control systems with WordPress. The talk was meant as little more than a 10,000 ft view of some of the reasons you might want to consider using source control, and some of the possibilities that it presents. As always, the 10,000 foot view [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I was honored to speak at WordCamp Portland about using Source Control systems with WordPress. The talk was meant as little more than a 10,000 ft view of some of the reasons you might want to consider using source control, and some of the possibilities that it presents. As always, the 10,000 foot view is good for a comic introduction to something, but not for any real understanding. Thus, I wanted to write a series of posts detailing the whys and hows of source control in WordPress- written for people who don&#8217;t know anything about Source Control.</p>
<p>Firstly, let me say this: I&#8217;m not making a statement on Git vs. Subversion vs. Source Safe vs. CVS vs. the weird text-based logging system you developed 10 years ago and haven&#8217;t ever changed. I&#8217;m making a statement about using source control period, and using Git as an example because that&#8217;s what I use.<sup><a href="http://mettadore.com/wordpress/a-quick-intro-to-github-for-wordpressers/#footnote_0_551" id="identifier_0_551" class="footnote-link footnote-identifier-link" title="Flame war: The un-winnable situation in which everything I do is amazing and everything you do sucks. I don&amp;#8217;t care what source control system you use- and think that it&amp;#8217;s a bad idea to use Git if another one is better suited to your needs. Still, if you&amp;#8217;re not using any system, you may as well choose Git because then this article will be easier to follow. Yes, I could give examples in Subversion and Mercurial, but this is not a book, it&amp;#8217;s a blog post.">1</a></sup></p>
<h3>The Whys of Source Control</h3>
<p>Why? Because you&#8217;re going to wish you had in about 3… 2…</p>
<p>Seriously, things happen, you break stuff, you need to look at an older version, you want to try something and are not sure whether it&#8217;s going to break, you want to share your code with others, or take advantage of the code of others, you want to share code with yourself, etc. Source control is part of a broader development strategy that is valid whether you are a serious programmer or just modifying themes for yourself or clients. There are dozens of reasons why source control is A Good Thing™.</p>
<p>The main one is that catastrophe is <em>going</em> to happen, and it&#8217;s going to happen in 3… 2…</p>
<h3>Source Control for Smarties</h3>
<p>Enough of the whys. Let&#8217;s get to some hows.</p>
<p>I won&#8217;t insult you by telling you this is Source Control for Dummies, but I don&#8217;t want you thinking that you can&#8217;t learn how to use it if you don&#8217;t want to. Like anything, it takes some getting used to.<sup><a href="http://mettadore.com/wordpress/a-quick-intro-to-github-for-wordpressers/#footnote_1_551" id="identifier_1_551" class="footnote-link footnote-identifier-link" title="Also, sometimes it seems like setting something up and learning how to use it is more trouble than just dealing with the problem when it comes up all the time. Only you can make that decision, but I guarantee that the amount of time you spend learning this will offset the amount of time you spend working (and recovering from failure) if you don&amp;#8217;t.">2</a></sup></p>
<h3>Git vs. Github</h3>
<p>Right off the bat let&#8217;s clear up <a href="http://git-scm.com/">Git</a> vs. <a href="http://github.com">Github</a>.</p>
<ul>
<li><strong>Git</strong> is source control management software (the way that WordPress.org is <em>blogging</em> software)</li>
<li><strong>Github</strong> hosts Git repositories (the way that <a href="http://wordpress.com">WordPress.com</a> hosts blogs)</li>
<li><strong>Git</strong> is software that allows you to track the changes that you make to individual files</li>
<li><strong>Github</strong> is a company providing a nice looking website to help do that, well as other neat things</li>
</ul>
<p>If you haven&#8217;t already done it, go to Github right now and sign up for an account. It&#8217;s free, they are full of awesome sauce, and you can then fork some of the examples I&#8217;m going to give you.</p>
<p>Oh, and you will want to install Git too.</p>
<h3>The Fast Install Guide</h3>
<ul>
<li>If you&#8217;re on a Mac, use Homebrew (i.e. &#8220;brew install git&#8221;)</li>
<li>If you&#8217;re on Linux, use the package manager (e.g. &#8220;apt-get install git&#8221;)</li>
<li>If you&#8217;re on Windows, buy a Mac (i.e. &#8220;ba dum CHING!&#8221;)</li>
</ul>
<p>Okay, seriously, Here are the Github help pages for installing Git on <a href="http://help.github.com/win-git-installation/">Windows</a>, <a href="//help.github.com/linux-git-installation/">Linux</a> and <a href="http://help.github.com/mac-git-installation/">Mac</a>. It&#8217;s really beyond the scope of this post to detail exactly how that&#8217;s done. If enough people get lost, I&#8217;ll write a detailed post on just that. For now here are some guidelines:</p>
<ol>
<li>Install Git</li>
<li>Create an SSH key
<ol>
<li>Go to a terminal window and type &#8220;ssh-keygen&#8221;</li>
<li>In Windows, don&#8217;t use the normal &#8220;Command&#8221; window, use Start-&gt;Programs-&gt;Git-&gt;Git Bash and type that. If you installed Git using the directions above, it should work.</li>
</ol>
</li>
<li>Create your Github account if you haven&#8217;t, then go ahead and set your username and email on your local system according to <a href="http://help.github.com/git-email-settings/">these instructions</a>.</li>
<li>
<div id="attachment_557" class="wp-caption alignright" style="width: 310px"><a href="http://mettadore.com/files/2010/09/Screen-shot-2010-09-20-at-3.30.10-PM.png"><img class="size-medium wp-image-557" src="http://mettadore.com/files/2010/09/Screen-shot-2010-09-20-at-3.30.10-PM-300x62.png" alt="" width="300" height="62" /></a><p class="wp-caption-text">Sample SSH key public file</p></div>
<p>Copy the SSH public key</p>
<ol>
<li>Copy the contents of the file ~/.ssh/id_rsa.pub (or id_dsa.pub) to the clipboard</li>
<li>In Windows, this file is in C:Documents and Settings{User Name}.ssh</li>
<li>This file&#8217;s contents look something like the file to the right</li>
<li><strong>Important!</strong> Don&#8217;t copy the id_rsa file, copy the id_rsa.pub file (the .pub ending means it&#8217;s a public file- never ever give out the other one)</li>
</ol>
</li>
<li>Go your <a href="https://github.com/account#ssh_bucket">SSH key settings</a> in Github and paste the public key</li>
</ol>
<p>Now you have Git installed, and have a Github account that you can access directly from your computer.</p>
<h3>Fork it!!</h3>
<p>Okay, now that we&#8217;re all set up with our source control system, let&#8217;s take a really quick tour. As a note: I&#8217;m going to do this with the command line, not with any graphical system. I&#8217;m doing this both because it&#8217;s how I do it, and because it will help illustrate what the commands actually do. Feel free to get a graphical Git program if you&#8217;d like, the commands should be the same.</p>
<p>First, we&#8217;re going to give you a functional repository, so go to my <a href="http://github.com/mettadore/twentyten">Github repository of the WordPress TwentyTen theme</a>. In the upper right, under the User/Account/etc menu and under the Search menu are some buttons, hit the one that says &#8220;Fork.&#8221; Now, head over to my <a href="http://github.com/mettadore/thirtyten">thirty ten repository</a> and fork that. <a href="http://aaron.jorb.in/blog/2010/04/introducing-thirty-ten/">Thirty Ten</a> is the child theme developed by <a href="http://aaron.jorb.in/">Aaron Jorbin</a> and he graciously offered the code as well as an <a href="http://aaron.jorb.in/blog/2010/04/introducing-thirty-ten/">excellent blog post</a> describing its development. I&#8217;m going to use Aaron&#8217;s child theme a lot in this series.</p>
<div id="attachment_560" class="wp-caption alignright" style="width: 310px"><a href="http://mettadore.com/files/2010/09/Screen-shot-2010-09-20-at-5.18.38-PM.png"><img class="size-medium wp-image-560 " src="http://mettadore.com/files/2010/09/Screen-shot-2010-09-20-at-5.18.38-PM-300x126.png" alt="" width="300" height="126" /></a><p class="wp-caption-text">Snapshot of a repository on Github</p></div>
<p>What forking does is copy the repository to your account, but does so in such a way that it &#8220;knows&#8221; that it came from somewhere else. That way if I change my repository, you can pull the changes, and if you change yours, I can pull those changes if I want. Head over to your account and look at the Thirty Ten repository now. You&#8217;ll notice that it shows a list of files and directories showing a message next to each of them. You&#8217;ll also see that I am the user listed at the top. That means that I was the last person to &#8220;commit&#8221; my changes. Committing means making changes to files and telling Git that you want those changes, well, committed to the repository. Lastly, scroll to the bottom of the page and notice that Github is telling us that we have no README file. If there was a README file in this directory, the contents of that file would be displayed here.</p>
<p>Now, go to a command line and type:</p>
<pre>$ mkdir themes
$ cd themes
$ git clone git@github.com:USERNAME/twentyten.git
$ git clone git@github.com:USERNAME/thirtyten.git</pre>
<p>These commands make a &#8220;themes&#8221; directory on your local system, and then inside that theme directory they <em>clone</em> the TwentyTen and ThirtyTen. Cloning means making a copy of the repository that&#8217;s on Github (Replace USERNAME with your Github username, obviously). Now, all of the files that are in the Thirty Ten repository on Github are also on your local system. You have two identical copies of the Thirty Ten repository.</p>
<h3>Modifying code in a repository</h3>
<p>Now let&#8217;s go into the Thirty Ten repository and make a small change by creating a README file (feel free to do this using a graphical file manager and/or text editor):</p>
<pre>$ cd thirtyten
$ echo "This is a child theme based on TwentyTen, the default WordPress 3.x theme." &gt; README</pre>
<p>That creates the file README and puts some basic text in it. Next, we&#8217;re going to play with some Git commands. Type the command <span style="font-family: terminal,monaco">git status</span> and you&#8217;ll see:</p>
<pre>$ git status

# On branch master
# Untracked files:
#   (use "git add ..." to include in what will be committed)
#
#	README
nothing added to commit but untracked files present (use "git add" to track)</pre>
<p>This is telling us that you have one &#8220;untracked&#8221; file- a file that you haven&#8217;t told Git about. We&#8217;re going to &#8220;add&#8221; that file to our repository:</p>
<pre>$ git add README</pre>
<p>This command tells Git to add the file README to the repository. As a shortcut, if you have all files and want to add them all, you can use something like:</p>
<pre>$ git add .</pre>
<p>The dot tells Git to add &#8220;the current directory.&#8221; Since README is the only file that hasn&#8217;t already been added, it&#8217;ll only add that file. Let&#8217;s look at the status again:</p>
<pre>$ git status

# On branch master
# Changes to be committed:
#   (use "git reset HEAD ..." to unstage)
#
#	new file:   README
#</pre>
<p>Notice that &#8220;Untracked files&#8221; became &#8220;Changes to be committed.&#8221; This is the only thing we&#8217;re doing right now, so we&#8217;re going to commit this change (i.e. tell Git that you&#8217;re sure, and want this change save, tracked, and logged.)</p>
<pre>$ git commit -m "Add a readme file"</pre>
<p>The &#8220;-m&#8221; switch tells Git that we want to add a message on the commandline, instead of adding it separately. Now our changes are committed to our repository and logged and we can make more changes:</p>
<pre>$ git status
# On branch master
nothing to commit (working directory clean)</pre>
<p>Let&#8217;s go and make another change. Let&#8217;s add a special css file that we can play around with later. We&#8217;ll go ahead and add this directly to the repo.</p>
<pre>$ touch special.css
$ git add special.css
$ git commit -m "Add a blank special.css file to play with"</pre>
<p>Now we have two changes committed to our repository. They are saved, tracked, and logged. But our laptop might be stolen, so let&#8217;s &#8220;push&#8221; them to a &#8220;remote&#8221; repository for safe keeping. A remote repository is a mirror of the repository you&#8217;re using. The repository on Github is a remote repository with the name &#8220;origin.&#8221;</p>
<pre>$ git remote
origin</pre>
<p>Pushing means &#8220;Take the changes that have been committed to this repository and commit those same changes to a remote repository.&#8221; Since you only have one remote repository, you don&#8217;t even have to tell it which one:</p>
<pre>$ git push</pre>
<p>will push the changes to Github. Now go ahead and browse to your Thirty Ten repository on Github and look at it. You&#8217;ll notice that the user is now listed as you, with your last commit message. Scrolling down to the file list, you&#8217;ll see that your commit messages are listed next to the files that you changed.</p>
<h3>Coda</h3>
<p>There it is, the bare minimum you need to get started with Github, and some sample repositories to boot. In the next post, we&#8217;ll create a child theme from scratch, and use the great FTP software Filezilla to copy our changes to our WordPress server after we check them into source control.</p>
<ol class="footnotes"><li id="footnote_0_551" class="footnote">Flame war: The un-winnable situation in which everything I do is amazing and everything you do sucks. I don&#8217;t care what source control system you use- and think that it&#8217;s a bad idea to use Git if another one is better suited to your needs. Still, if you&#8217;re not using <em>any</em> system, you may as well choose Git because then this article will be easier to follow. Yes, I could give examples in Subversion and Mercurial, but this is not a book, it&#8217;s a blog post.</li><li id="footnote_1_551" class="footnote">Also, sometimes it seems like setting something up and learning how to use it is more trouble than just dealing with the problem when it comes up all the time. Only you can make that decision, but I guarantee that the amount of time you spend learning this will offset the amount of time you spend working (and recovering from failure) if you don&#8217;t.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://mettadore.com/wordpress/a-quick-intro-to-github-for-wordpressers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using Github as a Small-Scale CDN (w/Rails)</title>
		<link>http://mettadore.com/ruby/using-github-as-a-small-scale-cdn-wrails/</link>
		<comments>http://mettadore.com/ruby/using-github-as-a-small-scale-cdn-wrails/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 01:11:32 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://mettadore.com/?p=524</guid>
		<description><![CDATA[I love Github. Like tomato sandwiches, Celtic music, beer, and programming- Github is something that, try as I might, I just can&#8217;t make myself sick of.1 Recently, I took the Git survey, and it contained an interesting question along the lines of &#8220;What do you use Git for?&#8221; The answers were things like &#8220;configuration files&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mettadore.com/files/2010/09/github-logo.png"><img class="alignleft size-full wp-image-525" src="http://mettadore.com/files/2010/09/github-logo.png" alt="" width="210" height="210" /></a>I love Github.</p>
<p>Like tomato sandwiches, Celtic music, beer, and programming- Github is something that, try as I might, I just can&#8217;t make myself sick of.<sup><a href="http://mettadore.com/ruby/using-github-as-a-small-scale-cdn-wrails/#footnote_0_524" id="identifier_0_524" class="footnote-link footnote-identifier-link" title="I&amp;#8217;ve tried for the past two summers to make myself sick of eating tomato sandwiches. I just can&amp;#8217;t.">1</a></sup></p>
<p>Recently, I took the Git survey, and it contained an interesting question along the lines of &#8220;What do you use Git for?&#8221; The answers were things like &#8220;configuration files&#8221; and &#8220;large binary files.&#8221;</p>
<p>I use Git and Github for a lot- configuration files are one use (I love the &#8220;raw&#8221; path), but it was only a small percentage of what that list suggested, so I started wondering how else I could use it.</p>
<p>Today, I thought of an interesting way: Github as a CDN.<sup><a href="http://mettadore.com/ruby/using-github-as-a-small-scale-cdn-wrails/#footnote_1_524" id="identifier_1_524" class="footnote-link footnote-identifier-link" title="The title is with Rails because that&amp;#8217;s what I used, but it would take 2.4 minutes to make this a &amp;#8220;With Django&amp;#8221; or &amp;#8220;With Lift&amp;#8221; example">2</a></sup></p>
<p>If you know what a <a href="http://en.wikipedia.org/wiki/Content_delivery_network">Content Delivery Network (CDN)</a> is, you don&#8217;t want me to explain. If you don&#8217;t, then it&#8217;s good enough to say that it&#8217;s a way to server up pictures or other content from another server. It&#8217;s often used to, say, serve the main portion of an html page from a webserver, but serve the images, CSS files, etc. from something like Amazon to speed things up.</p>
<p><img class="alignright" src="http://johnmetta.com/brand/logo.png" alt="" width="300" />I recently finished work on <a href="http://positivelyglorious.com/software-media/john-metta-an-intentional-brand/">The Great John Metta Branding Project</a> and, like with so many projects, stored the images in Dropbox. Then, deciding I might want to version them, I stored them in Github. Then, just as I was starting to begin the rather annoying process of copying all these logos and textmarks to my various sites throughout the web and updating all the image tags, I thought to myself &#8220;Hey, if these are already in Github, and I can access the raw files, why don&#8217;t I just use that as the image source?&#8221; But I don&#8217;t want to have to remember the URL each time. What if it was somewhat dynamically generated?</p>
<h2>A RESTful CDN system for a logo</h2>
<p>This is exactly why I made <a href="http://johnmetta.com">johnmetta.com</a> a Rails project, to play with stuff like this and then have a place to have it be live if I wanted to use it.</p>
<p>I&#8217;ve got a lot of different styles that my logo can take. Stacked, Icon only, textmark only, icon one-color grey, textmark one-color blue, etc. Ideally, I wouldn&#8217;t have to remember the path to each, I could type something like http://johnmetta.com/brand/icon/blue/transparent/logo.png<sup><a href="http://mettadore.com/ruby/using-github-as-a-small-scale-cdn-wrails/#footnote_2_524" id="identifier_2_524" class="footnote-link footnote-identifier-link" title="Actually having &amp;#8220;logo.png&amp;#8221; is unnecessary, however, sometimes the software using the URL will depend on that, so I just made it convention so that I don&amp;#8217;t have to think about when sometimes is.">3</a></sup> and have the app return the image that is strictly the icon (no words) with blue coloring and transparency inside the logo (instead of the normal white).</p>
<p>Since none of these actual images is created on the fly, I created a sensible directory structure and embedded all <img class="alignright" src="http://johnmetta.com/brand/icon/logo.png" alt="" width="100" />the files in this structure, naming them all <span style="font-family: courier new,courier">logo.png</span> and putting the default logo in the top level. So the above image would be {base}/full/logo.png, while a version with the icon on top would be {base}/full/stacked/logo.png. A one-color version of only the icon might be {base}/icon/blue/logo.png</p>
<p><img class="alignleft" src="http://johnmetta.com/brand/stacked/blue/logo.png" alt="" width="200" />So I created a <a href="http://github.com/johnmetta/brander">Brander</a> class which would turn arguments into an appropriate path and added some new routes such as &#8220;brand/:type/:color/logo.png&#8221; and created a call to brander in the controller&#8217;s &#8220;brand&#8221; action that ends with a redirect to the returned URL.</p>
<p>It&#8217;s all really simple, but it allows me to have a url like http://johnmetta.com/brand/icon/logo.png and supply my logo, and http://johnmetta.com/brand/stacked/blue/logo.png for a one-color blue stacked logo. Then, if I update the colors (move the files, whatever) they update automatically. At a maximum, I just check in the changes and make minimal changes to the routes- but don&#8217;t have to copy files to servers.</p>
<h2>A Good Illustration</h2>
<p>Right now, the Brander class is pretty dumb- little more than a way to translate a route into the correct external URL. It was built up not as an illustration of how to accomplish &#8220;Github as a CDN,&#8221; but merely as a toy to test one way that it might be done on a small scale. It might be better done as a class where instance attributes make more sense, and I&#8217;ll clean it up a bit, but not much more than that.</p>
<p>Also, it&#8217;s cool to know that stuff like this can be set up so easily, and for my uses- where bandwith might reach a whopping few requests per day, it&#8217;s useful while being low impact. But for a real CDN, you&#8217;d still want to use something like AWS- or at least talk to the Github guys before swamping their webservers.</p>
<ol class="footnotes"><li id="footnote_0_524" class="footnote">I&#8217;ve tried for the past two summers to make myself sick of eating tomato sandwiches. I just can&#8217;t.</li><li id="footnote_1_524" class="footnote">The title is with Rails because that&#8217;s what I used, but it would take 2.4 minutes to make this a &#8220;With Django&#8221; or &#8220;With Lift&#8221; example</li><li id="footnote_2_524" class="footnote">Actually having &#8220;logo.png&#8221; is unnecessary, however, sometimes the software using the URL will depend on that, so I just made it convention so that I don&#8217;t have to think about when sometimes is.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://mettadore.com/ruby/using-github-as-a-small-scale-cdn-wrails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Can&#8217;t Scale!</title>
		<link>http://mettadore.com/ruby/ruby-cant-scale/</link>
		<comments>http://mettadore.com/ruby/ruby-cant-scale/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 17:44:53 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[scale]]></category>

		<guid isPermaLink="false">http://mettadore.com/?p=374</guid>
		<description><![CDATA[This weekend, during my wife&#8217;s birthday celebrations, I talked with someone about my recent programming exploits, including how much fun I&#8217;m having programming web applications in Ruby on Rails. The response: &#8220;Sure, Ruby&#8217;s fun, but it&#8217;s not really useful. It&#8217;s a cute scripting language, but it can&#8217;t scale.&#8221; Until recently, this was an opinion that [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend, during my wife&#8217;s birthday celebrations, I talked with someone about my recent programming exploits, including how much fun I&#8217;m having programming web applications in Ruby on Rails. The response:</p>
<blockquote><p>&#8220;Sure, Ruby&#8217;s fun, but it&#8217;s not really useful. It&#8217;s a cute scripting language, but it can&#8217;t scale.&#8221;</p></blockquote>
<p>Until recently, this was an opinion that I agreed with. Hell, it was actually something I told <em>other people</em>.</p>
<p>One day, I realized <em>why</em> I agreed with it.</p>
<p>Now it&#8217;s just an opinion that makes me want to smack someone.<span id="more-374"></span></p>
<h3>Geeks are Dumb</h3>
<p>I don&#8217;t really know where the whole &#8220;Ruby can&#8217;t scale&#8221; argument comes from, but I have my suspicions.</p>
<p>The main suspicion is that, as a general rule, programmers are geeks, and geeks spend a great deal of their childhood development getting beaten up by non-geeks.<sup><a href="http://mettadore.com/ruby/ruby-cant-scale/#footnote_0_374" id="identifier_0_374" class="footnote-link footnote-identifier-link" title="That was pretty much my childhood, anyway, so maybe I&amp;#8217;m projecting a bit.">1</a></sup> Thus, we child-geeks tended to focus our efforts on something we knew that we did better than the wrestlers and football players. That something was generally not wrestling or football. It was academics.</p>
<p>We geeks are smart.</p>
<p>Think about the football player who spends his entire school day like a stupid monkey, proving that he&#8217;s tougher and plays football better than the other stupid football playing monkeys.</p>
<p>Geeks aren&#8217;t stupid monkeys. Geeks have a brain.</p>
<p>And we use that brain to spend our entire school day like a stupid monkey, proving that we&#8217;re smarter and use our brain better than the other stupid brain-using monkeys.</p>
<p>Oop. There it is.</p>
<h3>Truth Hurts</h3>
<p>Oh stop being dramatic! You <em>know</em> it&#8217;s true! You&#8217;re just too busy being a stupid brain-using monkey to want to admit it!</p>
<p>You can&#8217;t name a single geek-dominated situation that wasn&#8217;t essentially a &#8220;I&#8217;ll take your obsure science fiction reference and raise you an obscure Dungeons and Dragons reference&#8221; chest-pounding war of the stupid monkey-brained geeks.</p>
<p>No, you can&#8217;t. Stop trying.</p>
<p>The point is, it&#8217;s all about being the übergeek. And the competition of übergeek is a constant struggle of</p>
<blockquote><p>&#8220;No, <em>I</em> was the smartest person in my class! So if you say something smart, I have to say something <em>smarter</em>!&#8221;</p></blockquote>
<p>And so when someone tells me that they are programming in some hot, trendy new language, I can&#8217;t say something like</p>
<blockquote><p>&#8220;Oh, it&#8217;s great that you&#8217;re moving forward and trying something new&#8230; I&#8217;ve been feeling a bit old lately, kind of in a rut, and was somewhat scared to learn that shiny new language.&#8221;</p></blockquote>
<p>Yeah, right.</p>
<p>Imagine a geek actually <em>admitting weakness</em>! HA!</p>
<p>No, when I hear someone say they&#8217;re programming in some hot, trendy new language, I say:</p>
<blockquote><p>&#8220;But hot and trendy are stupid, like that hot girl who wouldn&#8217;t date me in high school. And your new language is stupid too! And I think I overheard someone say that it has a defect, and so even though I don&#8217;t know <em>anything</em> about your new language, I&#8217;m going to spout out this defect to prove that I&#8217;m better than you for <em>not</em> using it. There! I win!&#8221;</p></blockquote>
<p>Fun fact: Geeks, as a general rule, are freakin&#8217; terrified of anything that carries the descriptor &#8220;trendy,&#8221; because if we knew what that word meant, we wouldn&#8217;t be geeks, we&#8217;d be popular.</p>
<h3>Datapoints</h3>
<p>This may seem harsh, but stop being all &#8220;must not admit weakness&#8221;-y and use that monkey brain to actually think about it.</p>
<p>Here&#8217;s a nice datapoint: Twitter.</p>
<p>(I already hear you, by the way)</p>
<blockquote><p>&#8220;But Twitter was down <em>all the time</em>! Because Ruby can&#8217;t scale! That&#8217;s why they moved to Scala!&#8221;</p></blockquote>
<p>Was it? Was it really? Is that smart monkey brain actually working? Saying Twitter was down all the time is like saying that the United States Postal Service is not a good choice to carry mail because it&#8217;s inefficient and looses a lot of mail.</p>
<p>But, but, they lost a letter of mine once!</p>
<p>Yeah, sure. And they deliver on the order of a billion freakin letters every day! Did your super smart übergeek brain never actually <em>grok</em> percentages?</p>
<p>Do you have any idea what kind of traffic Twitter had when they moved to Scala? Saying Ruby can&#8217;t scale because Twitter had a freakin&#8217; failwhale every once in a while is like saying that the space shuttle&#8217;s not a <em>real</em> spacecraft because it only goes into <em>near</em> space.</p>
<p>It goes <em>into freakin space</em>&#8230; and you don&#8217;t have jack shit that&#8217;s ever going to be any better.</p>
<p>Why are you even talking?</p>
<h3>Coffee Shop Critics</h3>
<p>The truth of the matter is that the people saying that Ruby can&#8217;t scale are not the developers from Twitter, or from 37 Signals, or from Github. They are not the developers from the companies that have built ridiculously freakin&#8217; big web applications in Ruby.</p>
<p>No, they are the developers who are sitting in coffee shops&#8211; secure in the knowledge that if someone just knew how smart they were, they wouldn&#8217;t have to sit in that coffee shop and talk about their amazing idea. If someone only knew their greatness, they could be a contender!</p>
<p>It&#8217;s simple. The people who are busy having the &#8220;my language is better than your language&#8221; battle in coffee shops are pretty much guaranteed to <em>not</em> be the same people who are <em>actually building large-scale applications</em>. Why?</p>
<p>Because <em>those</em> people are too busy <em>actually building large-scale applications</em> to get into stupid chest-pounding arguments with monkey-brained nitwits.<sup><a href="http://mettadore.com/ruby/ruby-cant-scale/#footnote_1_374" id="identifier_1_374" class="footnote-link footnote-identifier-link" title="Oh stop being dramatic! I don&amp;#8217;t have anything to show either. I&amp;#8217;m in a coffee shop writing a freakin&amp;#8217; blog post instead of actually accomplishing something.">2</a></sup></p>
<p>Look, none of us likes to admit weakness. Me worst of all. All I&#8217;m saying is that admitting weakness can make us stronger.</p>
<p>And saying something like &#8220;Ruby can&#8217;t scale&#8211;&#8221; especially when you&#8217;ve never programmed in Ruby and are just spouting stupid shit that you heard someone else say just so you can say <em>something</em>&#8211; is weak.</p>
<p>Unless you actually have something built&#8211; and that something is so freakin &#8220;oh my god we have more data than Twitter&#8221;-big that you actually know that it couldn&#8217;t be done in Ruby&#8211; then you&#8217;re full of shit, you know you&#8217;re full of shit, I know you&#8217;re full of shit, so you might as well just admit that you&#8217;re full of shit. Because if you don&#8217;t then you just look stupid.</p>
<p>And no true geek wants to look stupid.</p>
<p>Sometimes I think I may slap the next coffee shop critic that tells me Ruby can&#8217;t scale.</p>
<p>Me: &#8220;I&#8217;m learning Ruby&#8221;</p>
<p>Monkey: &#8220;But Ruby can&#8217;t scale&#8221;</p>
<p>Me: &#8220;Hrm. I guess you&#8217;re right. By the way, what do you use for Source Control&#8221;</p>
<p>Monkey: &#8220;Github.&#8221;</p>
<p>Me: &lt;SMACK!&gt;</p>
<p>See?</p>
<h3>Duck typing with Duct Tape</h3>
<p>I&#8217;m learning Ruby. I&#8217;m programming web applications in Ruby on Rails.</p>
<p>Moreso, I&#8217;m programming web applications that <em>absolutely must scale</em>.</p>
<blockquote><p>&#8220;But why are you using Ruby? Ruby can&#8217;t sc&#8211;&#8221;&lt;SMACK!&gt;</p></blockquote>
<p>Because let me tell you something: Having a &#8220;0.01% of users sometimes complain that it&#8217;s broken, can&#8217;t really scale because it worked for Twitter just fine&#8221; webapp is much better than having&#8230; oh, say <em>nothing</em>!</p>
<p>I&#8217;m not going to fool myself. Maybe Ruby can&#8217;t scale beyond a certain point. Who knows? I sure as hell don&#8217;t, because I&#8217;m not at that point. And the person telling me that Ruby can&#8217;t scale isn&#8217;t at that point either, I&#8217;ll bet.</p>
<p>We&#8217;re not at the point where we have 25 million users.</p>
<p>We&#8217;re not at the point where VC firms are dumping $15 million dollars in our laps.</p>
<p>We&#8217;re at the point where we are so busy <em>talking</em> that we&#8217;re not actually <em>doing</em> anything.</p>
<p>I&#8217;m in a freakin coffee shop, with a maybe good idea. And with a really fun language&#8230; one that&#8217;s powerful enough for Github and which scaled well enough to bring VC firms to Twitter <em>after</em> 25 million users came!</p>
<p>And with enough freakin&#8217; bravery to at least <em>want</em> to admit weakness&#8211; that I don&#8217;t know what the hell I&#8217;m talking about when someone mentions the next trendy language that I&#8217;m too scared of, or too lazy to learn, or simply not really interested in.</p>
<p>I&#8217;m in a coffee shop, and I&#8217;m ready to use duck typing, or freakin&#8217; <em>duct tape</em> if I have to, if that&#8217;s what it takes to actually stop spouting bullshit about scaling issues and actually <em>accomplish something</em>&#8230;</p>
<p>&#8230;and get the hell out of this damn coffee shop!</p>
<ol class="footnotes"><li id="footnote_0_374" class="footnote">That was pretty much my childhood, anyway, so maybe I&#8217;m projecting a bit.</li><li id="footnote_1_374" class="footnote">Oh stop being dramatic! I don&#8217;t have anything to show either. I&#8217;m in a coffee shop writing a freakin&#8217; blog post instead of actually accomplishing something.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://mettadore.com/ruby/ruby-cant-scale/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Integration Dream: RubyMine, PivotalTracker, and Github</title>
		<link>http://mettadore.com/analysis/integration-dream-rubymine-pivotaltracker-and-github/</link>
		<comments>http://mettadore.com/analysis/integration-dream-rubymine-pivotaltracker-and-github/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 21:25:08 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[PivotalTracker]]></category>
		<category><![CDATA[RubyMine]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://mettadore.com/?p=132</guid>
		<description><![CDATA[I&#8217;ve been turned on to JetBrains&#8217; RubyMine quite a bit lately. Despite my affinity for more &#8220;old school&#8221; development environments like Emacs (which I used for many years in my former development life), I&#8217;ve really been enjoying working with RubyMine. In fact, I&#8217;m pretty sure it&#8217;s winning my most recent &#8220;Screw this IDE crap, I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been turned on to <a href="http://www.jetbrains.com/ruby/index.html">JetBrains&#8217; RubyMine</a> quite a bit lately. Despite my affinity for more &#8220;old school&#8221; development environments like Emacs (which I used for many years in my former development life), I&#8217;ve really been enjoying working with RubyMine. In fact, I&#8217;m pretty sure it&#8217;s winning my most recent &#8220;Screw this IDE crap, I&#8217;m going back to a text editor!&#8221; self-battle.</p>
<p>Still, we could always improve, and there&#8217;s one particular improvement that would be a dream come true for me (and insure that, following my 30 day trial, I actually <em>purchase</em> the software rather than moving on to something else to try in my new found romance with Ruby). That feature is <em>true integration between <a href="http://www.jetbrains.com/ruby/index.html">RubyMine</a>, <a href="http://www.pivotaltracker.com">PivotalTracker</a> and <a href="http://github.com">Github</a></em>.<span id="more-132"></span></p>
<p>It&#8217;s actually something that I&#8217;m surprised doesn&#8217;t already exist, considering that, by all accounts, the PivotalTracker team actually <em>uses</em> RubyMine. Furthermore, PivotalTracker&#8217;s new API <a href="http://mettadore.com/abstractions/pivotal-tracker-gets-better-with-github-get-satisfaction-and-more/">has great integration with GitHub&#8217;s service hooks</a>. Telling me that surely this problem has been bumped into before.</p>
<p>In fact, it&#8217;s such an obvious need, and I&#8217;m so convinced that a solution has to exist, that I pretty much want someone to just point me to the plugin! <strong>A free pint at <a href="http://www.doublemountainbrewery.com/">Double Mountain Brewery</a> in Hood River for anyone who can point me to that plugin!</strong></p>
<p>My current workflow is disconnected because, while I can easily create a commit message that starts/finishes a PivotalTracker story, I still have to go to the PivotalTracker website to get the story number, which involves a lot of window switching and mouse clicking. And as anybody knows, the moment I switch the window, my mental context goes right out the window.</p>
<p>Hell, at that point, I may as well see who&#8217;s complain about the new Apple announcement on Twitter. In order to use RubyMine <em>and</em> PivotalTracker, I have to check on Twitter <em>a lot</em>.</p>
<h3>Current workflow</h3>
<ol>
<li>Working on feature A, but realize that there&#8217;s a need for fix B as a consequence. Want to add fix B as a story?
<ol>
<li>Go to PivotalTracker website, add story, then go back. Or stage story somehow, but something so that you <em>don&#8217;t forget</em>.</li>
</ol>
</li>
<li>Back to RubyMine to finish feature A development. Commit using PivotalTrack&#8217;s Github integration?
<ol>
<li>Back to PivotalTracker website to look up story, copy story ID to clipboard</li>
</ol>
</li>
<li>Back to RubyMine (or terminal) to add story ID to commit message. Want to start working on fix B?
<ol>
<li>Back to PivotalTracker website to start story for fix B</li>
</ol>
</li>
<li>Work on fix B, but realize that there&#8217;s a desire for feature C…
<ol>
<li>Back to PivotalTracker website…</li>
</ol>
</li>
<li>Lather, rinse, repeat…</li>
</ol>
<p>Realizing that this is a simplified workflow, but it illustrates the point of the contextual switching needed to use both of these tools. Because of this, I often end up just thinking of stuff and forgetting it and/or dumping a long list of stories at once that may or may not be relevant. Ideally, I&#8217;d be quickly and easily able to add stories to the icebox that can later be assessed for need and added to the project&#8217;s iteration quickly. Plus, I&#8217;d be able to quickly pull a story to start/finish it from within RubyMine.</p>
<h3>Desired Workflow</h3>
<ol>
<li>Working on feature A, but realize a need for fix B. Keyboard shortcut to add feature in (modal?) window and save with &lt;enter&gt; closing window and cursor is right where it was.</li>
<li>Finish feature A and keyboard shortcut to stage/commit with optional alternative keyboard shortcut to bring window of &#8220;active stories&#8221; that I can cursor down to and hit &lt;enter&gt; (add story to commit message) type commit message and hit &lt;enter&gt; (again, closing window and returning with cursor placed)</li>
<li>work on fix B…</li>
<li>M-I-C-K-E-Y without using my M-O-U-S-E</li>
</ol>
<h3>Want that beer?</h3>
<p>Someone tell me how to do this. Let me buy you that pint!</p>
<p>I know we&#8217;ve got to be able to do this, because, well, why the heck wouldn&#8217;t we?<sup><a href="http://mettadore.com/analysis/integration-dream-rubymine-pivotaltracker-and-github/#footnote_0_132" id="identifier_0_132" class="footnote-link footnote-identifier-link" title="The usual answer to this is &amp;#8220;because my lazy ass hasn&amp;#8217;t coded it up yet.&amp;#8221; To which I have no real response. &amp;lt;cough&amp;gt;&amp;lt;cough&amp;gt;it&amp;#8217;s commercial software&amp;lt;cough&amp;gt;">1</a></sup> What I want to know is <em>what is the PivotalTracker team itself using</em>?</p>
<p>What are you using? I&#8217;ve searched for a solution to no avail. Is there a better way to add stories and get the story id into a commit message? Or am I just being ridiculous?</p>
<p>Give me this, JetBrains, and I will buy RubyMine today.</p>
<ol class="footnotes"><li id="footnote_0_132" class="footnote">The usual answer to this is &#8220;because my lazy ass hasn&#8217;t coded it up yet.&#8221; To which I have no real response. &lt;cough&gt;&lt;cough&gt;it&#8217;s commercial software&lt;cough&gt;</li></ol>]]></content:encoded>
			<wfw:commentRss>http://mettadore.com/analysis/integration-dream-rubymine-pivotaltracker-and-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pivotal Tracker gets better with Github, Get Satisfaction, and more!</title>
		<link>http://mettadore.com/analysis/pivotal-tracker-gets-better-with-github-get-satisfaction-and-more/</link>
		<comments>http://mettadore.com/analysis/pivotal-tracker-gets-better-with-github-get-satisfaction-and-more/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 22:13:05 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[Pivotal Tracker]]></category>

		<guid isPermaLink="false">http://mettadore.com/?p=126</guid>
		<description><![CDATA[Pivotal Tracker does one thing: It Rocks. Last year when Morgan introduced me to this agile project management system, I was blown away. It&#8217;s a testament to the philosophy of &#8220;Do one single thing, and do it really freakin&#8217; well.&#8221; Now, they&#8217;ve gotten better with the release of version 3 of their API: This Pivotal [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pivotaltracker.com">Pivotal Tracker</a> does one thing: <em>It Rocks</em>. Last year when <a href="http://morganpdx.com">Morgan</a> introduced me to this agile project management system, I was blown away. It&#8217;s a testament to the philosophy of &#8220;Do one single thing, and do it really freakin&#8217; well.&#8221;</p>
<p>Now, they&#8217;ve gotten better with the release of <a href="http://pivotallabs.com/users/dan/blog/articles/1143-new-in-pivotal-tracker-api-v3-github-campfire-support-jira-lighthouse-and-satisfaction-integration#ixzz0df5qTzv4">version 3 of their API</a>:</p>
<blockquote><p>This <a href="http://www.pivotaltracker.com/">Pivotal Tracker</a> update allows you to see <a href="http://www.github.com/">GitHub</a> or other SCM commits in your stories, your project activity in your team&#8217;s <a href="http://www.campfirenow.com/">Campfire</a> chat room, and introduces the first wave of integrations with other bug/issue tracking applications including <a href="http://www.atlassian.com/software/jira/">JIRA</a>, <a href="http://www.lighthouseapp.com/">Lighthouse</a>, and <a href="http://www.getsatisfaction.com/">Satisfaction</a>.</p>
<p><span id="more-126"></span></p></blockquote>
<p>This update allows me to add a post-commit hook to my Github account by going to the Profile Page on Pivotal Tracker and creating a new API token, then going to the service hooks page of my Github Repository and adding the following line:</p>
<pre class="brush: xml; title: ; notranslate">

https://www.pivotaltracker.com/services/v3/github_commits?token=PIVOTAL_API_TOKEN
</pre>
<p>as a post-commit URL.</p>
<p>Now, say I have a story for my recent small Ruby on Rails secret learning project, and that story is #2288984. I can create a commit messages like so:</p>
<pre class="brush: bash; title: ; notranslate">

Ullr:tweetscore john$ git commit -a -m &quot;[#2289377] Add profile/login links back to main navigation&quot;
</pre>
<p>And that story will be started. I can finish a story by committing with the message:</p>
<pre class="brush: bash; title: ; notranslate">

Ullr:tweetscore john$ git commit -a -m &quot;[Fixes #2289377] Add profile/login links back to main navigation&quot;
</pre>
<p>The great thing about this, is that if you send &#8220;fixes&#8221; on a story that&#8217;s not started, it will start and finish it.h</p>
<p>I haven&#8217;t yet played with Get Satisfaction connectivity yet, and don&#8217;t use Campfire or Lighthouse, but this is enough to excite me. It makes a killer workflow.</p>
<p>Now, if only someone would create a Quicksilver plugin for Pivotal Tracker…</p>
]]></content:encoded>
			<wfw:commentRss>http://mettadore.com/analysis/pivotal-tracker-gets-better-with-github-get-satisfaction-and-more/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

