<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Programming and Prose</title>
	<atom:link href="http://rhburrows.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rhburrows.com</link>
	<description>Development Doctrines</description>
	<lastBuildDate>Tue, 14 Feb 2012 12:39:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='rhburrows.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Programming and Prose</title>
		<link>http://rhburrows.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://rhburrows.com/osd.xml" title="Programming and Prose" />
	<atom:link rel='hub' href='http://rhburrows.com/?pushpress=hub'/>
		<item>
		<title>Introducing Statim</title>
		<link>http://rhburrows.com/2011/01/24/introducing-statim/</link>
		<comments>http://rhburrows.com/2011/01/24/introducing-statim/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 07:25:28 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://rhburrows.com/?p=104</guid>
		<description><![CDATA[I just push Statim, a very simple static site generator that I&#8217;ve worked on the past couple days. It is written in shell as an attempt to limit run-time dependencies so that it can be used on pretty much any Unix server. I more or less wanted a simple site generator that I could trigger [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=104&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I just push <a href="https://github.com/rhburrows/statim">Statim</a>, a very simple static site generator that I&#8217;ve worked on the past couple days. It is written in shell as an attempt to limit run-time dependencies so that it can be used on pretty much any Unix server. I more or less wanted a simple site generator that I could trigger on a git hook to build a website where I was less concerned about looks, and just wanted a quick way to push up information.</p>
<p>Currently running statim does the following:</p>
<ol>
<li>Copies all files from the content directory to the destination directory of your choice</li>
<li>Runs any files ending in &#8220;.md&#8221; or &#8220;.markdown&#8221; through the &#8220;markdown&#8221; command and relocates the resulting html</li>
<li>For each subdirectory it creates links based on file names and camel-casing conventions (like a wiki)</li>
<ul>
<p>There&#8217;s nothing super complicated or revolutionary here, its just a simple tool for me because none of the others did what I wanted.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=104&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2011/01/24/introducing-statim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby Development Woes</title>
		<link>http://rhburrows.com/2011/01/08/ruby-development-woes/</link>
		<comments>http://rhburrows.com/2011/01/08/ruby-development-woes/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 07:17:41 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://rhburrows.com/?p=91</guid>
		<description><![CDATA[After getting back into the flow of things post vacation I decided it was about time to put something up on my blog. A few days ago one of the Debian ruby package maintainers quit with a post detailing what he found to be some current problems with the Ruby community. As someone who works [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=91&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>After getting back into the flow of things post vacation I decided it was about time to put something up on my blog. A few days ago one of the Debian ruby package maintainers quit with a <a href="http://www.lucas-nussbaum.net/blog/?p=617">post</a> detailing what he found to be some current problems with the Ruby community. As someone who works mostly in Ruby I share some of his opinions, albeit for different reasons.</p>
<p>To me the biggest problem with the Ruby development community is also its greatest strength. In the Ruby ecosystem nearly everything is optimized for the developer. What do I mean by this? Let&#8217;s look at it from the example of a couple of of the conclusions reached in the above-mentioned post.</p>
<h2>The <del>core</del> Ruby development community should mature</h2>
<p>One of my favorite things about being a Ruby programmer is how fast it is to code, package and distribute a library. Seriously, look at the front page of <a href="http://rubygems.org">rubygems.org</a>:</p>
<p><pre class="brush: bash;">
gem update --system
gem build foo.gemspec
gem push foo-1.0.0.gem
</pre></p>
<p>Just run these commands and you have released your code and anyone else can easily search for and install it on their system.</p>
<p>However, I think this process is often too easy. It seems very frequent that versions of gems are pushed before they are completely finished resulting in quick second versions release immediately after the first. Even worse, since a developer can share their project so easily version are often pushed in a &#8220;good enough&#8221; state and never reach major releases. Rake &amp;emdash; the standard for Ruby project build scripts; used in pretty much any Ruby project you&#8217;ll come across &amp;emdash; is still on version 0.8.7!? (That&#8217;s not to say that Rake isn&#8217;t stable software, I&#8217;m just pointing out how common it is for a Ruby developer to use libraries and tools that haven&#8217;t even reached their first major release and not even think about it).</p>
<p>I&#8217;m  guilty of this myself. Pretty much everything that I&#8217;ve pushed out to rubygems was nowhere near complete. I just pushed it out because it was the easiest way to share it with my friends/co-workers and it was &#8220;good enough&#8221; for our purposes.</p>
<p>In addition to this, it is very difficult to judge the quality of any library you will see on rubygems. Does this gem being version &#8220;0.1.0&#8243; mean that it is incomplete, or are they just judicious in their versioning? This isn&#8217;t a problem unique to Ruby, but the easy of releasing Ruby packages certainly exacerbates the issue.</p>
<h2>The Ruby community should acknowledge that RVM and Rubygems are not for everybody</h2>
<p>RVM and Rubygems make <em>my</em> life much easier. I can search for gems to help me write applications I&#8217;m working on, isolate them from the rest of my system, and test against multiple versions or Ruby very easily. However, RVM and Rubygems <em>do</em> make somethings more complicated for an average user.</p>
<p>If I want to install an application written in Ruby, I shouldn&#8217;t have to install compilers and package managements tools. I want to be able to install a Ruby application and not worry about which ruby/gemset RVM is currently pointed at. These tools are fantastic when you are developing and manageable when your used to them, but if you want to just use a Ruby application without understanding the whole standard development environment they can be a pain in the butt.</p>
<h2>What&#8217;s the point?</h2>
<p>These problems aren&#8217;t a huge deal, but it is frustrating to see people claim an argument has no validity because the environment works for them. The Ruby community seems to rush to defend everything that gains popularity without really thinking through the repercussions for people in different situations. It&#8217;s this eagerness that drives me to Ruby development, but at time I think this eagerness that will send others rushing away.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=91&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2011/01/08/ruby-development-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Monads and Channel 9</title>
		<link>http://rhburrows.com/2010/12/19/monads-and-channel-9/</link>
		<comments>http://rhburrows.com/2010/12/19/monads-and-channel-9/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 06:06:48 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rhburrows.com/?p=84</guid>
		<description><![CDATA[I spent a large part of my day yesterday watching various videos on Channel 9. There are a lot of videos on there, but after digging a while I can always find some that I&#8217;m interested in. I particularly enjoy the Going Deep Series. The Going deep series has recently started showing a series of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=84&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I spent a large part of my day yesterday watching various videos on <a href="http://channel9.msdn.com/">Channel 9</a>. There are a lot of videos on there, but after digging a while I can always find some that I&#8217;m interested in. I particularly enjoy the <a href="http://channel9.msdn.com/Shows/Going+Deep">Going Deep Series</a>.</p>
<p>The Going deep series has recently started showing a series of talks called Monadic Design Patterns for the Web (<a href="http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Greg-Meredith-Monadic-Design-Patterns-for-the-Web-2-of-n">part 1</a>, <a href="http://channel9.msdn.com/Blogs/Charles/C9-Lectures-Greg-Meredith-Monadic-Design-Patterns-for-the-Web-Introduction-to-Monads">part 2</a>). I&#8217;ve only recently begun to develop an intuition for monads (after reading lots of tutorials and haskell code), and I&#8217;ve found these lectures to make things very clear to me.</p>
<p>The real reason I&#8217;m making this post is Greg Meredith (who gives the above mentioned talks) has started a book called &#8220;Monadic Design Patterns&#8221; for the web and has started a <a href="http://www.kickstarter.com/e/WvjAF/projects/1499410734/monadic-design-patterns-for-the-web-book">Kickstarter project</a> to raise money towards writing this book. I personally think this sounds like an interesting book, so if you think so also consider donating.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=84&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2010/12/19/monads-and-channel-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Emacs File Loading</title>
		<link>http://rhburrows.com/2010/12/09/emacs-file-loading/</link>
		<comments>http://rhburrows.com/2010/12/09/emacs-file-loading/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 04:30:42 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[emacs]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://rhburrows.com/?p=77</guid>
		<description><![CDATA[I have a grown fairly large emacs configuration over the years and I am constantly tweaking it. I test out new packages and remove old ones that I haven&#8217;t been using. My original method for adding a new package to my emacs configuration was just to follow the install instructions verbatim from the README, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=77&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I have a grown fairly large <a href="http://github.com/rhburrows/emacs">emacs configuration</a> over the years and I am constantly tweaking it. I test out new packages and remove old ones that I haven&#8217;t been using. My original method for adding a new package to my emacs configuration was just to follow the install instructions verbatim from the README, but as I&#8217;ve been learning more about emacs and programming emacs lisp, I decided it was time to look into the different methods of including elisp code that were available.</p>
<p>I noticed that some packages use <code>load</code>, some use <code>require</code>, and others use <code>autoload</code> and wondered what the differences were and which ones I should be using&#8230;</p>
<h3><code>load</code> &amp; <code>load-file</code></h3>
<p><code>load</code> and <code>load-file</code> are the most basic methods of including an elisp file into your configuration. Each one simply reads the file and executes the code. This means that if the <code>load</code> expression is executed more than once the file contents will be executed more than once. There are times where this is useful, but I think that its safe to say that this is not something I desire for the normal case.</p>
<p>The difference between <code>load</code> and <code>load-file</code> comes from the way the file is located on the system. <code>load</code> will search through each directory in the list <code>load-path</code> and if it finds the file there it will load it, while <code>load-file</code> just looks directly at the path that you have specified.</p>
<h3><code>require</code></h3>
<p><code>require</code> is a command that solves the problem of loading the same file more than once mentioned in the previous section. With <code>require</code>, emacs will search for the appropriate file <em>only</em> if it hasn&#8217;t yet been loaded and then execute it. To use this the file must use the <code>provide</code> function to define the feature that it includes. After this function has been executed (i.e. when the file has been loaded and the feature has been included), if <code>require</code> is called again emacs will not try to re-execute the file.</p>
<p>By default <code>require</code> expects that the feature will be provided by a file of the same name located within the load path. This can be overridden using an optional second parameter to <code>require</code> but I can&#8217;t really think of a reason I would want to do that very often.</p>
<h3><code>autoload</code></h3>
<p><code>autoload</code> works a little differently than the other two functions, as it doesn&#8217;t load any file when it is called. Instead, its purpose is to delay the execution of the referenced file until the code within it is actually needed. You give <code>autoload</code> the name of a function and a file that contains that function and, when the function is called &#8212; if the file hasn&#8217;t yet been loaded &#8212; <code>autoload</code> will read and execute the lisp code from within the file. This is nice because it can greatly increase your startup time by not loading packages that you are not planning to use.</p>
<p>On the other side of the issue is each <code>autoload</code> call only binds one function to a file. This means if you have 5 functions contained in a file that you want to trigger that file&#8217;s autoloading, you must call <code>autoload</code> 5 separate times in your configuration.</p>
<h3><code>eval-after-load</code></h3>
<p>Another potential problem with <code>autoload</code> happens when you have some additional code you want to execute after the file has loaded (i.e. you want to change some of the keybindings defined within the file). If you were to set them at startup time, when one of the <code>autoload</code> functions is called the file will be read/evaluated and your bindings will be overridden back to the defaults.</p>
<p>Luckily, emacs has already thought of this problem and provides us with <code>eval-after-load</code>. This function allows us to define some additional code to evaluate <em>after</em> some specific code is loaded. In our previous scenario if we define our keybindings using <code>eval-after-load</code> to execute the definitions after the <code>autoload</code>, our code will be executed second and override the files keybindings back to the settings we want.</p>
<h3>Applying this knowledge</h3>
<p>After clearing up my understanding I have decided on a few things:</p>
<ol>
<li>I want to remove pretty much all <code>load</code> and <code>load-file</code> calls from my configuration.</li>
<li>I want to switch all of my modules that I can to use <code>require</code>.</li>
<li>I want to use <code>autoload</code> only rare occasions when loading the file takes a lot of time/resources.</li>
</ol>
<p>My first instinct was to move as much as possible to <code>autoload</code> but I realized that I don&#8217;t actually start emacs very frequently. I usually just leave it open and close and open buffers as necessary. For this reason I think I would find the sudden pause when loading a module that I am referencing for the first time more annoying than an increased startup time (YMMV).</p>
<p>Now that I&#8217;ve got a plan all that&#8217;s left is to actually do it.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=77&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2010/12/09/emacs-file-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Book Review: Land Of Lisp</title>
		<link>http://rhburrows.com/2010/11/23/book-review-land-of-lisp/</link>
		<comments>http://rhburrows.com/2010/11/23/book-review-land-of-lisp/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 22:22:41 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[book review]]></category>

		<guid isPermaLink="false">http://rhburrows.com/?p=72</guid>
		<description><![CDATA[Land of Lisp is a book written that teaches programming in Common Lisp through writing a series of games. It attempts to inspire the reader through fun example programs and is an overwhelming success. This is one of the few programming books I have read where I found myself really wanting to finish off each [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=72&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://landoflisp.com">Land of Lisp</a> is a book written that teaches programming in Common Lisp through writing a series of games. It attempts to inspire the reader through fun example programs and is an overwhelming success.</p>
<p>This is one of the few programming books I have read where I found myself really wanting to finish off each sample so that I could play the resulting game. It does a great job of creating games that are fun and original enough to hold your attention.</p>
<p>Not only this, but the book actually goes into quite a bit of depth for each of the topics covered. During the course of building these games the reader writes a web server, a DSL for creating SVG, and an interface for adventure like games. Through these exercises many of the benefits of Common Lisp (and all lisps in general) are explored.</p>
<p>Does this have me wanting to rush out and use lisp for my next project, no. But, I will certainly consider it, and I had a lot of fun reading through this book and learning the language.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=72&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2010/11/23/book-review-land-of-lisp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Book Review: Focus</title>
		<link>http://rhburrows.com/2010/11/19/book-review-focus/</link>
		<comments>http://rhburrows.com/2010/11/19/book-review-focus/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 05:00:52 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[book review]]></category>

		<guid isPermaLink="false">http://rhburrows.com/?p=67</guid>
		<description><![CDATA[I recently read through the free release of Focus by Leo Babauta. Its short, about 125 pages, and reads very quickly. I enjoyed the read and definitely got some ideas from it about both why and how to focus better. The book&#8217;s main point seems to be that in this busy age of distraction focusing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=67&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I recently read through the free release of <a href="http://zenhabits.net/focus-book/">Focus</a> by Leo Babauta. Its short, about 125 pages, and reads very quickly. I enjoyed the read and definitely got some ideas from it about both why and how to focus better.</p>
<p>The book&#8217;s main point seems to be that in this busy age of distraction focusing on a single subject at once can be very difficult. Despite this, focus is very important to productivity, and to enjoyment of your life. By consciously acknowledging the importance of focusing we can make steps towards improving our own attention to the topic at hand.</p>
<p>Most of the contents of this book didn&#8217;t strike me as new information, but seeing it all presented in one place helped me to realize how well everything plays together. Avoiding distractions and interruptions has always been important to me, but for some reason I previously only associated these ideas with work. After reading <em>Focus</em> I realize that these same problems can hurt enjoyment of other aspects of your life. I also found his view on goal setting in the chapter &#8220;Letting go of goals&#8221; to be an interesting alternative to ideas I&#8217;ve heard in the past.</p>
<p>I only read the free version of this book because I was just curious and the vast amount of stuff included with the premium one looks overwhelming; but assuming the premium one is of comparable quality to the free one I think it would be worth the money. I am definitely going to be evaluating whether or not it is something that I want to buy.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=67&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2010/11/19/book-review-focus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Book Review: Start Small, Stay Small</title>
		<link>http://rhburrows.com/2010/11/15/book-review-start-small-stay-small/</link>
		<comments>http://rhburrows.com/2010/11/15/book-review-start-small-stay-small/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 03:29:32 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[book review]]></category>

		<guid isPermaLink="false">http://rhburrows.com/?p=58</guid>
		<description><![CDATA[I just finished reading Start Small, Stay Small: A Developer&#8217;s Guide to Launching a Startup by Rob Walling and I thoroughly enjoyed it. It struck me as The Four Hour Work Week with most of the fluff/exaggeration stripped out and presented from a developer&#8217;s perspective. I generally rate business books by how much they inspire [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=58&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I just finished reading <a title="Startup Book" href="http://www.startupbook.net" target="_blank">Start Small, Stay Small: A Developer&#8217;s Guide to Launching a Startup</a> by Rob Walling and I thoroughly enjoyed it. It struck me as The Four Hour Work Week with most of the fluff/exaggeration stripped out and presented from a developer&#8217;s perspective. I generally rate business books by how much they inspire me to start working, and by that rubric this one&#8217;s a winner.</p>
<p><em>Start Small, Stay Small</em> does an excellent job of explaining what is necessary to run a software business to a developer who may think that creating the product is all that needs to be done. The book&#8217;s short length and the avoidance of unnecessary filler makes the information (at least feel) much more actionable than advice I have read in other books.</p>
<p>Business books in the software world seem to be mostly focused around the venture capital driven, make it huge types of companies but this book presents an alternative plan; one that is more realistic for the average developer. The options of bootstrapping a company and then growing it larger, or just creating a small, self-sustaining business and going on to found another are presented along with reasons why each one should be chosen. Even if your goal is to build a gigantic company, the information on marketing in this book could prove invaluable.</p>
<p>In short, I found this book to be exactly what it advertised; a blueprint to getting a startup off the ground for a developer.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=58&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2010/11/15/book-review-start-small-stay-small/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Scripting with ruby</title>
		<link>http://rhburrows.com/2010/11/13/scripting-with-ruby/</link>
		<comments>http://rhburrows.com/2010/11/13/scripting-with-ruby/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 21:30:06 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://rhburrows.wordpress.com/?p=42</guid>
		<description><![CDATA[Earlier I wrote about using Unix command line tools to manage text when the job at hand calls for a quick fix instead of a program that you plan to keep around. When the script that I&#8217;m writing is a longer one I will often reach for ruby, but ruby can also be quite useful [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=42&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Earlier I wrote about using Unix command line tools to manage text when the job at hand calls for a quick fix instead of a program that you plan to keep around. When the script that I&#8217;m writing is a longer one I will often reach for ruby, but ruby can also be quite useful for quick scripts. Specifically, the ruby executable provides several command line flags that are helpful when writing these quick scripts.</p>
<h3>-e</h3>
<p><code>-e</code> is the first flag we&#8217;ll need for using ruby as our command line swiss army knife. If you call ruby with <code>-e</code> it will evaluate the string following it with the ruby interpreter. Example:</p>
<p><pre class="brush: bash;">
ruby -e 'puts &quot;Hello, world!&quot;'
</pre></p>
<p>Got it? Good, now lets move on to more interesting options.</p>
<h3>-n, -p, and -i</h3>
<p>The <code>-n</code> flag causes ruby to loop over each line of the input. For example if you want to capitalize all of the lines in a file (to stdout) you could do the following:</p>
<p><pre class="brush: bash;">
ruby -n -e 'puts $_.upcase' &lt; original-file.txt &gt; upcased-file.txt
</pre></p>
<p>Printing out something is so common that ruby provides another flag that will print out the value of <code>$_</code> after each step. With -p the following example becomes:</p>
<p><pre class="brush: bash;">
ruby -p -e '$_.upcase!' &lt; original-file.txt &gt; upcased-file.txt
</pre></p>
<p>Notice that we are now using the destructive version of <code>upcase</code> (namely <code>upcase!</code>) so that the value of <code>$_</code> is redefined before it is printed out. It turns out that taking a file, performing some operation on each line, printing the changed line and then putting in a new file is so common that ruby gives us yet another flag to help with this occasion. We can shorten our simple example even further with <code>-i</code>:</p>
<p><pre class="brush: bash;">
ruby -p -i -e '$_.upcase!' file.txt
</pre></p>
<p>The <code>-i</code> flag tells ruby to operate on the passed file <strong>i</strong>n-place. This means rather than redirect the file into ruby and the output out of ruby, it will open the file itself and overwrite it with the modified lines. Obviously this isn&#8217;t quite the same result as the earlier examples in that the original file is no longer maintained. If you don&#8217;t want to lose the original (or you aren&#8217;t confident that your script is going to work as expected) you can pass <code>-i</code> a backup extension to make a copy of the original file.</p>
<p>You&#8217;ll notice this is similar to the <code>-i</code> flag of sed. I find myself using ruby with <code>-i</code> now whenever I might reach for sed because the <code>-i</code> flag of sed seems to work differently in Linux than in the BSD tools. With ruby I don&#8217;t have to worry about the cross-platform stuff as much.</p>
<h3>Other Resources</h3>
<p>Dave Thomas (of the Pragmatic Programmers) put together a list of handy one liners for ruby. This is old but still quite useful:</p>
<p><a title="Ruby One-liners" href="http://www.fepus.new/ruby1line.txt" target="_blank">http://www.fepus.net/ruby1line.txt</a></p>
<p>And, as always, the man page has a lot of great information.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=42&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2010/11/13/scripting-with-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Call For Help</title>
		<link>http://rhburrows.com/2010/11/12/call-for-help/</link>
		<comments>http://rhburrows.com/2010/11/12/call-for-help/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 04:01:25 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://rhburrows.com/?p=54</guid>
		<description><![CDATA[What is the best way to edit a wordpress.com blog within emacs? I tried to use weblogger from the ELPA but I had some trouble with accidentally overwriting my posts. I heard something about using org-mode to post to WordPress (this sounds good) but I was wondering if there are any other options, and which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=54&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>What is the best way to edit a wordpress.com blog within emacs? I tried to use weblogger from the ELPA but I had some trouble with accidentally overwriting my posts. I heard something about using org-mode to post to WordPress (this sounds good) but I was wondering if there are any other options, and which ones are commonly preferred.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=54&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2010/11/12/call-for-help/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing mobile sites with Cucumber</title>
		<link>http://rhburrows.com/2010/11/04/testing-mobile-sites-with-cucumber/</link>
		<comments>http://rhburrows.com/2010/11/04/testing-mobile-sites-with-cucumber/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 16:16:37 +0000</pubDate>
		<dc:creator>rhburrows</dc:creator>
				<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://rhburrows.wordpress.com/2010/11/04/testing-mobile-sites-with-cucumber/</guid>
		<description><![CDATA[Recently I was working on a site that had been originally built with Rails 2 and was later migrated to Rails 3. As part of the migration the cucumber integration tests were switched from using Webrat to drive the UI to using Capybara. Unfortunately this broke a handful of tests for the mobile version of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=32&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I was working on a site that had been originally built with Rails 2 and was later migrated to Rails 3. As part of the migration the cucumber integration tests were switched from using <a href="http://github.com/brynary/webrat">Webrat</a> to drive the UI to using <a href="http://github.com/jnicklas/capybara">Capybara</a>. Unfortunately this broke a handful of tests for the mobile version of the UI.</p>
<h3>Take One</h3>
<p>The site decides whether or not to show the user the mobile version of the site based on the user agent.  The problem is that Capybara won&#8217;t let you set custom headers (such as the user agent) the Webrat will. After a quick search of the internet I can across <a href="http://aflatter.de/2010/06/testing-headers-and-ssl-with-cucumber-and-capybara/">This site</a>. In short the blog post details a way to open up the current RackTest driver (the default driver that cucumber uses) and adds a way to put in arbitrary headers.</p>
<p>I added the code in the blog post to my project and indeed it fixed my tests (with a little reorganizing). Something about it struck me as wrong. Even the blog post I got the technique from calls the class a &#8220;Hack.&#8221; I wanted to find a cleaner way&#8230;</p>
<h3>Introducing capybara-iphone</h3>
<p>My &#8220;cleaner&#8221; solution was to write a new Capybara driver that pretends to be an IPhone and to have the mobile specific tests run with that. It is a very simple project that extends the <code>Capybara::Driver::RackTest</code> code and adds an additional user agent header to identify itself as an IPhone. Now all you have to do is set up the capybara-iphone gem in your project and tag the tests that you want to run the a mobile browser with &#8216;@iphone&#8217;.</p>
<h3>The Future</h3>
<p>One could imagine an incarnation of capybara-iphone that adds support for handling that IPhone specific javascript calls, and lets you do other things that better test your application&#8217;s IPhone interface. At the moment, however, I don&#8217;t have plans to do any of these, but the project sounds fun enough that with a little push I might start working on it.</p>
<p>More information on using capybara-iphone can be found in the Readme on <a href="http://github.com/rhburrows/capybara-iphone">Github</a>.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rhburrows.com&#038;blog=17305859&#038;post=32&#038;subd=rhburrows&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rhburrows.com/2010/11/04/testing-mobile-sites-with-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/48cc92676179401c5f95348b76129806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rhburrows</media:title>
		</media:content>
	</item>
	</channel>
</rss>
