<?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>Todd Huss</title>
	<atom:link href="https://gabrito.com/feed" rel="self" type="application/rss+xml" />
	<link>https://gabrito.com</link>
	<description>Anecdotes on Technology Leadership, Swift, Objective-C, Java, Ruby, Cloud Computing, Open-Source, SEO, and Design</description>
	<lastBuildDate>Mon, 17 Apr 2017 04:17:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.8</generator>
	<item>
		<title>Backup your Gmail</title>
		<link>https://gabrito.com/post/backup-your-gmail</link>
					<comments>https://gabrito.com/post/backup-your-gmail#comments</comments>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Wed, 19 Oct 2011 17:09:11 +0000</pubDate>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Technical]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=381</guid>

					<description><![CDATA[Update 2017: I recommend using GMVault for backing up Gmail. It&#8217;s free, open-source, actively maintained, and relatively easy to setup if you&#8217;re technically inclined. Like all hosted services, you should never depend on one provider to both manage your data &#8230; <a href="https://gabrito.com/post/backup-your-gmail">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://pyropus.ca/software/getmail/" target="_blank"><img decoding="async" src="https://gabrito.com/wp-content/uploads/2011/10/GMail-Logo-300x300-e1319043593854.png" alt="" title="GMail-Logo-300x300" width="150" height="123" class="alignleft size-full wp-image-382" /></a><b>Update 2017</b>: I recommend using <a href="http://gmvault.org/">GMVault</a> for backing up Gmail. It&#8217;s free, open-source, actively maintained, and relatively easy to setup if you&#8217;re technically inclined.</p>
<p>Like all hosted services, you should never depend on one provider to both manage your data and also back it up. I have 20 years of email in my Gmail account (that I migrated from previous providers) and I&#8217;d be pretty sad if I were to lose it.</p>
<p>As some users have discovered the hard way, if your Gmail account gets compromised and your email is deleted, you&#8217;ll likely never get it back unless you have an off-site (outside of Google) backup. </p>
<div style="display: none">Find cheap <a href="http://www.olnevhost.net/dedicated-servers.html"><b>dedicated FreeBSD servers</b></a>?</div>
<p>One great service that does this for you is <a href="https://www.backupify.com/" target="_blank">Backupify</a> and their free plan will backup mailboxes up to 1GB. I personally love cloud data but prefer local backups so I use <a href="http://pyropus.ca/software/getmail/" target="_blank">Getmail</a><span id="more-381"></span> which is a little Python script to download my email. Here&#8217;s a more <a href="http://www.mattcutts.com/blog/backup-gmail-in-linux-with-getmail/" title="Setting up Getmail to backup your Gmail" target="_blank">detailed post on how to setup Getmail by Matt Cutts</a>. That said, I have my script backup my entire mailbox (instead of just my inbox) and I use IMAP instead of POP so here&#8217;s my getmail.gmail config file:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>retriever<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #7a0874; font-weight: bold;">type</span> = SimpleIMAPSSLRetriever<br />
server = imap.gmail.com<br />
username = myemail<span style="color: #000000; font-weight: bold;">@</span>mydomain.com<br />
password = mypassword<br />
mailboxes = <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;[Gmail]/All Mail&quot;</span>,<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>destination<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #7a0874; font-weight: bold;">type</span> = Mboxrd<br />
path = ~<span style="color: #000000; font-weight: bold;">/</span>gmail-archive<span style="color: #000000; font-weight: bold;">/</span>gmail-backup.mbox<br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>options<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
verbose = <span style="color: #000000;">2</span><br />
message_log = ~<span style="color: #000000; font-weight: bold;">/</span>.getmail<span style="color: #000000; font-weight: bold;">/</span>gmail.log<br />
read_all = <span style="color: #c20cb9; font-weight: bold;">false</span></div></div>
]]></content:encoded>
					
					<wfw:commentRss>https://gabrito.com/post/backup-your-gmail/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Naming your business or product, forget the domain</title>
		<link>https://gabrito.com/post/naming-your-business-or-product-forget-the-domain</link>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Sat, 16 Apr 2011 16:07:52 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[names]]></category>
		<category><![CDATA[naming]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=368</guid>

					<description><![CDATA[Pick a name that is easy to spell, unique, and memorable! It&#8217;s a lesson I learned the hard way. Don&#8217;t spend your time surfing for available domain names, you&#8217;ll tear your hair out and pick a worse name as a &#8230; <a href="https://gabrito.com/post/naming-your-business-or-product-forget-the-domain">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" src="https://gabrito.com/wp-content/uploads/2011/04/mynameis.jpg" alt="" title="mynameis" width="200" height="150" class="alignleft size-full wp-image-369" /> Pick a name that is easy to spell, unique, and memorable! It&#8217;s a lesson I learned the hard way.</p>
<p>Don&#8217;t spend your time surfing for available domain names, you&#8217;ll tear your hair out and pick a worse name as a result. Focus on good names for your business or product. Then when you have the name focus on a domain name for it as a secondary concern. You will build your brand recognition<span id="more-368"></span>, loyalty, and company name through your actions and products, not through your domain name. That&#8217;s just as true for websites as it is for brick and mortar businesses.</p>
<p>Nothing worse than having a friend tell you &#8220;you&#8217;ll want to check out cordkd, it&#8217;s spelled c-o-r-k-d-dot-com, leave the e out&#8221;. Corkd (a site I loved while it was in business) may have owned a catchy dot-com name but everyone has to explain how it&#8217;s spelled. Even a Google search for corked doesn&#8217;t turn up the corkd.com website in the top couple results because the actual word corked is not in their name or on their website. <strong>Corkd&#8217;s business name was a liability</strong>.</p>
<p>Compare that with a great product name but compromised domain like this: &#8220;you&#8217;ll want to checkout campfirenow-dot-com&#8221;. Campfire is a memorable product name and the domain is easy to spell. If I forget the &#8220;now&#8221; a quick search for campfire on Google returns campfirenow.com as the first result because the word campfire is actually in the product name. When people link to it, they refer to it as &#8220;campfire&#8221; so the search engine findability is covered. <strong>Campfire and campfirenow.com are assets</strong>.</p>
<p>Eat My Words has great <a href="http://eatmywords.com/reviews/is-your-name-lame/">guidelines for naming your business</a>, disregard them and name your business campr because the domain is free and you&#8217;ll have yet another obstacle to overcome. Follow them and you&#8217;ll be a happy camper! </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Storing Git repositories in Amazon S3 for high availability</title>
		<link>https://gabrito.com/post/storing-git-repositories-in-amazon-s3-for-high-availability</link>
					<comments>https://gabrito.com/post/storing-git-repositories-in-amazon-s3-for-high-availability#comments</comments>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Sat, 13 Nov 2010 01:01:28 +0000</pubDate>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Source Control]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=344</guid>

					<description><![CDATA[At VolunteerMatch we&#8217;re experimenting with using Chef Solo to manage Amazon EC2 servers. The catch is that if a server is going to rely on Chef to boot up, then the Chef Recipes (which we&#8217;re storing in a Git Repository) &#8230; <a href="https://gabrito.com/post/storing-git-repositories-in-amazon-s3-for-high-availability">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://git-scm.com/"><img decoding="async" src="https://gabrito.com/wp-content/uploads/2010/11/git-logo.png" alt="" title="Git" width="188" height="97" class="alignleft size-full wp-image-346" /></a>At <a href="http://www.volunteermatch.org">VolunteerMatch</a> we&#8217;re experimenting with using <a href="http://wiki.opscode.com/display/chef/Chef+Solo">Chef Solo</a> to manage <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> servers. The catch is that if a server is going to rely on Chef to boot up, then the Chef Recipes (which we&#8217;re storing in a Git Repository) need to be highly available. </p>
<p>Here&#8217;s how we went about using a private S3 bucket to store our Git repository of Chef Recipes. Thanks to this post on <a href="http://blog.spearce.org/2008/07/using-jgit-to-publish-on-amazon-s3.html">using JGit to publish to S3</a> which got us started, the key difference is we wanted to use a private S3 bucket and it took us some experimenting to figure out how to update an existing Git repo (via fetch and merge) from S3.</p>
<p>Download <a href="http://eclipse.org/jgit/download/">jgit.sh</a>, rename it to jgit and put it in your path (for example $HOME/bin). <span id="more-344"></span></p>
<p>Setup the .jgit config file and add the following (substituting your AWS keys):</p>
<p>vim ~/.jgit</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">accesskey: aws access key<br />
secretkey: aws secret access key</div></div>
<p>Note, by not specifying <em>acl: public</em> in the .jgit file, the git files on S3 will be private (which is what we wanted). Next create an S3 bucket to store your repository in, let&#8217;s call it git-repos, and then create a git repository to upload:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">s3cmd mb s3:<span style="color: #000000; font-weight: bold;">//</span>git-repos<br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> chef-recipes<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> chef-recipes<br />
<span style="color: #c20cb9; font-weight: bold;">git init</span><br />
<span style="color: #c20cb9; font-weight: bold;">touch</span> README<br />
<span style="color: #c20cb9; font-weight: bold;">git add</span> README<br />
<span style="color: #c20cb9; font-weight: bold;">git commit</span> README<br />
<span style="color: #c20cb9; font-weight: bold;">git remote</span> add origin amazon-s3:<span style="color: #000000; font-weight: bold;">//</span>.jgit<span style="color: #000000; font-weight: bold;">@</span>git-repos<span style="color: #000000; font-weight: bold;">/</span>chef-recipes.git</div></div>
<p>In the above I&#8217;m using the <a href="http://s3tools.org/s3cmd">s3cmd</a> command line tool to create the bucket but you can do it via the Amazon web interface as well. Now let&#8217;s push it up to S3 (notice how we use jgit whenever we interact with S3, and standard git otherwise):</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">jgit push origin master</div></div>
<p>Now go somewhere else (e.g. cd /tmp) and try cloning it:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">jgit clone amazon-s3:<span style="color: #000000; font-weight: bold;">//</span>.jgit<span style="color: #000000; font-weight: bold;">@</span>git-repos<span style="color: #000000; font-weight: bold;">/</span>chef-recipes.git</div></div>
<p>When it comes time to update it (because jgit doesn&#8217;t support merge or pull) you do it in 2 steps:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #7a0874; font-weight: bold;">cd</span> chef-recipes<br />
jgit fetch<br />
<span style="color: #c20cb9; font-weight: bold;">git merge</span> origin<span style="color: #000000; font-weight: bold;">/</span>master</div></div>
]]></content:encoded>
					
					<wfw:commentRss>https://gabrito.com/post/storing-git-repositories-in-amazon-s3-for-high-availability/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Acceptance Testing non Ruby web applications with Cucumber</title>
		<link>https://gabrito.com/post/acceptance-testing-non-ruby-apps-with-cucumber</link>
					<comments>https://gabrito.com/post/acceptance-testing-non-ruby-apps-with-cucumber#comments</comments>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Tue, 26 Oct 2010 21:49:18 +0000</pubDate>
				<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Quality Assurance]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=318</guid>

					<description><![CDATA[If you&#8217;re looking for the sample Standalone Cucumber Test Suite to get you started testing non Ruby based applications with Cucumber, here&#8217;s the source: http://github.com/thuss/standalone-cucumber. Sometimes you inherit a non Ruby based web app written in PHP, Perl, Java, C#, &#8230; <a href="https://gabrito.com/post/acceptance-testing-non-ruby-apps-with-cucumber">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://gabrito.com/wp-content/uploads/2010/10/cucumber-logo.png"><img loading="lazy" decoding="async" src="https://gabrito.com/wp-content/uploads/2010/10/cucumber-logo.png" alt="" title="cucumber-logo" width="300" height="128" class="alignleft size-full wp-image-321" /></a>If you&#8217;re looking for the sample <a href="http://github.com/thuss/standalone-cucumber">Standalone Cucumber Test Suite</a> to get you started testing non Ruby based applications with Cucumber, here&#8217;s the source: <a href="http://github.com/thuss/standalone-cucumber">http://github.com/thuss/standalone-cucumber</a>.</p>
<p>Sometimes you inherit a non Ruby based web app written in PHP, Perl, Java, C#, or Python and you want to create an automated functional/acceptance test suite to minimize the amount of manual QA you need to do.<span id="more-318"></span> <a href="http://seleniumhq.org/">Selenium</a> is a great tool for doing just that and at <a href="http://www.commonsensemedia.org">Common Sense Media</a> I created the <a href="http://github.com/thuss/selenium-continuous-integration-runner">Selenium Continuous Integration Runner</a> to make it easy to run <a href="http://seleniumhq.org/docs/04_selenese_commands.html">Selenese</a> based tests from your <a href="http://en.wikipedia.org/wiki/Continuous_integration">Continuous Integration</a> Server such as Hudson, Cruise Control, or Teamcity. That said, Selenese based tests leave something to be desired in terms of readability and maintainability. </p>
<p>The <a href="http://www.ruby-lang.org/en/">Ruby</a> camp is often at the forefront of great testing frameworks with <a href="http://github.com/aslakhellesoy">Aslak HellesÃ¸y</a> often leading the charge with innovations like <a href="http://rspec.info/">RSpec</a> and <a href="http://cukes.info/">Cucumber</a>. I&#8217;d read and played around with Cucumber on Rails based apps and was loving the concept of english language specs that are actually executable as well. But when my friend and former colleague Chris Kimm mentioned that the testing group at his company was using it to test their Java application, I started to get excited as that was the problem I was about to try and tackle at <a href="http://www.volunteermatch.org">VolunteerMatch</a>.</p>
<p>However, getting the project structure in place required a little help from the <a href="http://groups.google.com/group/cukes">Cucumber mailing list</a> and in the hopes of saving others the time, I&#8217;ve published the <a href="http://github.com/thuss/standalone-cucumber">Standalone Cucumber Test Suite</a> to  Github. It&#8217;s simply a Cucumber project designed to test a non Ruby web application with a sample search.feature that uses Google search as the basis for the test. It uses <a href="http://github.com/jnicklas/capybara">Capybara</a> with the <a href="http://seleniumhq.org/docs/09_webdriver.html">Selenium Webdriver</a> on the backend but you can also switch it to use <a href="http://github.com/langalex/culerity">Culerity</a> or <a href="http://github.com/brynary/webrat">Webrat</a> if you don&#8217;t want it actually firing up a real browser to run the tests.  Fork it or download it to start testing your existing website with Cucumber!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gabrito.com/post/acceptance-testing-non-ruby-apps-with-cucumber/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Code readability through conciseness</title>
		<link>https://gabrito.com/post/code-readability-through-conciseness</link>
					<comments>https://gabrito.com/post/code-readability-through-conciseness#comments</comments>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Tue, 10 Aug 2010 22:06:51 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=286</guid>

					<description><![CDATA[One of the things I love about newer languages like Ruby and Scala (and to a degree Python and Groovy) are the language features that allow you to dial conciseness up or down for readability. Take for instance the typical &#8230; <a href="https://gabrito.com/post/code-readability-through-conciseness">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" src="https://gabrito.com/wp-content/uploads/2010/08/lambda.jpeg" alt="" title="lambda" width="72" height="80" class="alignleft size-full wp-image-287" />One of the things I love about newer languages like  Ruby and Scala (and to a degree Python and Groovy) are the language features that allow you to dial conciseness up or down for readability. Take for instance the typical one liner for summing numbers in languages that support anonymous functions (which can be a bit cryptic in terms of readability):</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">Ruby<br />
sum = [1,2,3,4].inject(0) {|result, value| result + value}<br />
Scala<br />
val sum = Array(1,2,3,4).foldLeft(0) ((result, value) =&gt; result + value)<br />
Groovy<br />
sum = [1,2,3,4].inject(0) { result, value -&gt; result + value }<br />
Python<br />
sum = reduce(lambda result, value: result + value, [1,2,3,4])</div></div>
<p>One of the jobs of a good programmer<span id="more-286"></span> is to make their code readable and in this case by naming the variable sum it&#8217;s obvious what&#8217;s going on to the right so if you can simplify the anonymous function or use syntactic sugar to reduce the amount of code there&#8217;s a good chance you can improve the readability as follows:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">Ruby<br />
sum = [1,2,3,4].inject(:+)<br />
Scala can either reduce the anonymous function<br />
val sum = Array(1,2,3,4).reduceLeft(_+_)<br />
or in Scala 2.8 they added the sum method<br />
val sum = Array(1,2,3,4).sum<br />
Groovy can't reduce the anonymous function but has a sum method<br />
sum = [1,2,3,4].sum<br />
Python can't reduce the anonymous function but has a sum function<br />
sum = sum([1,2,3,4])</div></div>
<p>Then even if the programmer reading the code is coming from another language and doesn&#8217;t know :+ or _+_ you&#8217;ll still have improved readability because they certainly understand how a sum is computed and can move past the line of code instead of having to read 3-4 lines of a for loop for something as simple as a summing operation. I love the balance of being very concise with the simple stuff so that I can be more verbose with the complex stuff, whereas in Java even the simple stuff is often extremely verbose.</p>
<p>There is of course the extreme of making your code too concise. Look no further than <a target="_blank" href="http://en.wikipedia.org/wiki/Write-only_language">write-only languages</a> like Perl to see where too much conciseness and obfuscation can lead to unmaintainable code.</p>
<p>This example is only trivial and somewhat contrived but I find that newer languages like Ruby and Scala give you significantly better tools to elegantly dial up or down the conciseness than Java or C# resulting in <em>less code + more readable code = easily maintainable code</em>.</p>
<p>As an example, I used just about every conciseness trick in the book I knew of when composing <a target="_blank" href="http://github.com/thuss/rpcfn-3-shortest_path">my submission</a> for the <a target="_blank" href="http://rubylearning.com/blog/2009/10/30/rpcfn-short-circuit-3/">3rd Ruby Challenge&#8217;s Shortest Path Algorithm</a> and I only discarded the ones that I thought obfuscated the intent. I like to think the reason my submission won was precisely because it was concise while still being readable. Writing that same algorithm with the same level of readability in Scala would be easy but in Java it would have tripled the lines of code hurting readability somewhat.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gabrito.com/post/code-readability-through-conciseness/feed</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>Mac OS X gem cleanup failing</title>
		<link>https://gabrito.com/post/mac-os-x-gem-cleanup-failing</link>
					<comments>https://gabrito.com/post/mac-os-x-gem-cleanup-failing#comments</comments>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Sat, 07 Aug 2010 23:04:04 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=260</guid>

					<description><![CDATA[After upgrading to Snow Leopard I started noticing that whenever I would run sudo gem cleanup it would fail with many errors about being unable to uninstall various gems. I ignored it until the list grew unbearably long but the &#8230; <a href="https://gabrito.com/post/mac-os-x-gem-cleanup-failing">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a target="_blank" href="http://rubygems.org/" ><img loading="lazy" decoding="async" src="https://gabrito.com/wp-content/uploads/2010/08/ruby-logo.jpeg" alt="Ruby Gems" title="ruby-logo" width="72" height="83" class="alignleft size-full wp-image-267" /></a>After upgrading to Snow Leopard I started noticing that whenever I would run <strong>sudo gem cleanup</strong> it would fail with many errors about being unable to uninstall various gems. I ignored it until the list grew unbearably long but the only solutions I could find on the web were to go through one gem at a time. The errors looked like this:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">...<br />
Attempting to uninstall rails-2.3.5<br />
Unable to uninstall rails-2.3.5:<br />
Gem::InstallError: cannot uninstall, check `gem list -d rails`<br />
...</div></div>
<p>Following the instructions I then ran<span id="more-260"></span> <strong>gem list -d rails</strong> noting the install path for newer gems was now /Library/Ruby/Gems/1.8 whereas the older gems that cleanup was failing on were in /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8. So the solution was to run cleanup once while overriding GEM_HOME as follows:</p>
<pre style="overflow:auto">

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">sudo sh -c 'GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 gem cleanup'</div></div>

</pre>
<p>That allowed cleanup to remove the older gems in the old path and now <strong>sudo gem cleanup</strong> is once again working.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gabrito.com/post/mac-os-x-gem-cleanup-failing/feed</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>iPhone development the easy way</title>
		<link>https://gabrito.com/post/iphone-development-the-easy-way</link>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Wed, 08 Jul 2009 23:23:59 +0000</pubDate>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=250</guid>

					<description><![CDATA[Update 8/7/2010 PhoneGap apps are still being allowed in the app store! It&#8217;s not the right solution for every app (for example we went native with the Common Sense Media app), but I still think PhoneGap is really cool. I&#8217;ve &#8230; <a href="https://gabrito.com/post/iphone-development-the-easy-way">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" src="https://gabrito.com/wp-content/uploads/2009/07/iphone.png" alt="iphone" title="iphone" width="76" height="104" class="alignleft size-full wp-image-251" /> <strong>Update 8/7/2010</strong> PhoneGap apps are <a href="http://blogs.nitobi.com/jesse/2010/04/14/phonegap-and-the-apple-developer-license-agreement/">still being allowed in the app store</a>! It&#8217;s not the right solution for every app (for example we went native with the <a href="http://www.commonsensemedia.org/iphone">Common Sense Media app</a>), but I still think PhoneGap is really cool.</p>
<p>I&#8217;ve been doing some iPhone and iPod Touch development and if like me you&#8217;re used to web development in languages like Ruby, Java, and Python, the learning curve to build a native iPhone app in Objective C is quite steep. Since my applications are online (in that you need to be connected for them to be useful) I was pysched to find a much easier way using two great open-source tools:</p>
<p><a href="http://code.google.com/p/iui/">iUI</a> consists of Javascript/CSS/images that allow you to build a mobile version of your app that looks and feels just like a native iPhone app</p>
<p><a href="http://phonegap.com/">PhoneGap</a> lets you create an iPhone application (that can be submitted to the app store) that displays a framed mobile version of your site</p>
<p>To build your iPhone app:<span id="more-250"></span></p>
<p>1. Make an iPhone/iPod Touch friendly version of your site with iUI (which your users can access in mobile safari)</p>
<p>2. Bundle it as an iPhone application (so the user has an app store version they can install) using PhoneGap and submit it to the app store. What&#8217;s even better is that with PhoneGap you can also target Blackberry and Android devices.</p>
<p>As a web developer I&#8217;m not sure how they could make it any easier for me, sweet! Plus you get the double exposure of the app store or when users visit your site with their iPhones they get the mobile version of your site.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Production MySQL performance tuning</title>
		<link>https://gabrito.com/post/mysql-performance-tuning</link>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Fri, 16 Jan 2009 04:22:00 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=235</guid>

					<description><![CDATA[For the past 9 years I&#8217;ve been working almost exclusively with MySQL (with a little PostgreSQL thrown in) and while I don&#8217;t do nearly as much DBA work these days, I still find myself troubleshooting a query or tuning my.cnf. &#8230; <a href="https://gabrito.com/post/mysql-performance-tuning">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.mysql.com"><img loading="lazy" decoding="async" src="https://gabrito.com/wp-content/uploads/2009/01/mysql.gif" alt="mysql" title="mysql" width="114" height="68" class="alignleft size-full wp-image-236" /></a> For the past 9 years I&#8217;ve been working almost exclusively with MySQL (with a little PostgreSQL thrown in) and while I don&#8217;t do nearly as much DBA work these days, I still find myself troubleshooting a query or tuning my.cnf. While in general I find MySQL to be a lot more straightforward to work with, it&#8217;s still equally important to tune it for your applications needs.</p>
<p>To that end one of the tools I want to give a shout out to is the <a href="http://www.day32.com/MySQL/">MySQL Performance Tuning Primer Script</a>. You <a href="http://www.day32.com/MySQL/tuning-primer.sh">download and run it</a> against a production system <span id="more-235"></span>(that has preferably been running under normal load for a day or two so that it&#8217;s gathered stats). It&#8217;s a read-only script so you don&#8217;t need to worry about it changing anything but it makes some great recommendations about which tuning parameters may need adjustment. Here&#8217;s a snippet from from a production server:</p>
<p><strong>KEY BUFFER</strong><br />
Current MyISAM index space = 173 M<br />
Current key_buffer_size = 1 G<br />
Key cache miss rate is 1 : 1003<br />
Key buffer fill ratio = 7.00 %<span style="color:red"><br />
Your key_buffer_size seems to be too high.<br />
Perhaps you can use these resources elsewhere</span><br />
&#8230;<br />
&#8230;<br />
&#8230;</p>
<p>It&#8217;s no replacement for a DBA but if you want to get a somewhat sane my.cnf going for your particular application it&#8217;s a great place to start!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Selenium Continuous Integration Runner</title>
		<link>https://gabrito.com/post/selenium-continuous-integration-runner</link>
					<comments>https://gabrito.com/post/selenium-continuous-integration-runner#comments</comments>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Sat, 10 Jan 2009 20:34:47 +0000</pubDate>
				<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Quality Assurance]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Testing]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=227</guid>

					<description><![CDATA[At Common Sense Media I wanted to get some functional testing up and running that didn&#8217;t require a lot of user training for the QA folks. I also wanted those tests to run in our Rightscale/Amazon EC2 hosted Hudson continuous &#8230; <a href="https://gabrito.com/post/selenium-continuous-integration-runner">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://seleniumhq.org/" target="_blank"><img loading="lazy" decoding="async" src="https://gabrito.com/wp-content/uploads/2009/01/selenium1.png" alt="selenium" title="selenium" width="200" height="181" class="alignleft size-full wp-image-226" /></a> At <a href="http://www.commonsensemedia.org/">Common Sense Media</a> I wanted to get some functional testing up and running that didn&#8217;t require a lot of user training for the QA folks. I also wanted those tests to run in our <a href="http://www.rightscale.com/">Rightscale</a>/<a href="http://aws.amazon.com/ec2/">Amazon EC2</a> hosted <a href="https://hudson.dev.java.net/">Hudson continuous integration server</a>. As a result I&#8217;ve published the:</p>
<p><a href="http://github.com/thuss/selenium-continuous-integration-runner/tree/master"> Selenium Selenese Continuous Integration Runner</a> </p>
<p>on GitHub in the hopes that it will save other people time when trying to get their Selenese tests running from a continuous integration server. It&#8217;s very simple but one thing I battled with was that I had to patch the selenium JAR to get it to work with Firefox 3.0. It should work fine in any continuous integration server regardless if it&#8217;s <a href="https://hudson.dev.java.net/">Hudson</a>, <a href="http://studios.thoughtworks.com/cruise-continuous-integration">Cruise</a>, <a href="http://cruisecontrol.sourceforge.net/">Cruise Control</a>, <a href="http://www.atlassian.com/software/bamboo/">Bamboo</a>, etc.</p>
<p>The functional testing products I&#8217;ve used that drive a real browser include <a href="http://www.automatedqa.com/">Test Complete (commercial)</a>, <a href="http://seleniumhq.org/">Selenium</a>, and <a href="http://wtr.rubyforge.org/">Watir</a>. I think all 3 do a good job but one thing I like about Selenium is that it&#8217;s dirt simple to get a user productive with the Selenium IDE Firefox plugin. However, that benefit is also the most limiting factor of the <a href="http://seleniumhq.org/">Selenium IDE</a> which is that to be able to re-open tests in Selenium IDE you have to save them as Selenese (which is the most limited of the testing languages that Selenium supports). Still, I think Selenese is a reasonable choice for a lot of organizations that need a moderately sophisticated functional test suite.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gabrito.com/post/selenium-continuous-integration-runner/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Standalone Migrations: Using Rails migrations in non Rails projects</title>
		<link>https://gabrito.com/post/standalone-migrations-using-rails-migrations-in-non-rails-projects</link>
					<comments>https://gabrito.com/post/standalone-migrations-using-rails-migrations-in-non-rails-projects#comments</comments>
		
		<dc:creator><![CDATA[Todd Huss]]></dc:creator>
		<pubDate>Tue, 23 Dec 2008 01:15:47 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<guid isPermaLink="false">http://gabrito.com/?p=194</guid>

					<description><![CDATA[Update 8/7/2010: Standalone migrations is now a gem (sudo gem install standalone_migrations) so disregard the outdated installation instructions below Update 7/8/2009: With the latest batch of contributed patches standalone migrations now works just like Rails migrations Update 12/26/2008: I switched &#8230; <a href="https://gabrito.com/post/standalone-migrations-using-rails-migrations-in-non-rails-projects">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://github.com/thuss/standalone-migrations/tree/master"><img loading="lazy" decoding="async" src="https://gabrito.com/wp-content/uploads/2008/12/github.png" alt="Standalone Migrations" title="Standalone Migrations" width="157" height="60" class="alignleft" /></a><strong>Update 8/7/2010</strong>: Standalone migrations is now a gem (sudo gem install standalone_migrations) so disregard the outdated installation instructions below</p>
<p><strong>Update 7/8/2009</strong>: With the latest batch of contributed patches standalone migrations now works just like Rails migrations<br />
<strong>Update 12/26/2008</strong>: I switched standalone migrations to use a Rakefile instead of a Ruby script.</p>
<p>In my work managing websites I end up working in Ruby, Java, and PHP. In everything but Rails managing the schema requires rolling your own solution. As a result I&#8217;ve started using Rails migrations in non-Rails projects to manage the schema. It&#8217;s not much code but I figured others might benefit from it so I created a little Github project called <a target="_blank" href="http://github.com/thuss/standalone-migrations/tree/master">standalone migrations</a>. </p>
<p>It&#8217;s based on Lincoln Stoll&#8217;s blog post titled <a target="_blank" href="http://lstoll.net/2008/04/stand-alone-activerecord-migrations/">Stand-alone ActiveRecord migrations</a> and David Welton&#8217;s blog post titled <a target="_blank" href="http://journal.dedasys.com/2007/01/28/using-migrations-outside-of-rails">Using Migrations Outside of Rails</a>.</p>
<p>Assuming you have Ruby and Gem installed on your machine, here&#8217;s how to use it:</p>
<pre>
gem install -y activerecord rake mysql
wget http://github.com/thuss/standalone-migrations/zipball/master (or fetch it using <a target="_blank" href="http://git.or.cz/">git</a>)
unzip it, and mv to something like my_non_rails_project/db
cd my_non_rails_project/db/ (or wherever you put it)
cp config/database_sample.yml config/database.yml
vi config/database.yml
./new_migration some_user_story
vi migrations/*_some_user_story.rb
rake db:migrate (this applies your newly created migration)
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://gabrito.com/post/standalone-migrations-using-rails-migrations-in-non-rails-projects/feed</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
	</channel>
</rss>
