<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Code Dump</title>
	
	<link>http://www.codelord.net</link>
	<description>A place a coder rants at...</description>
	<lastBuildDate>Sat, 04 Feb 2012 12:53:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TheCodeDump" /><feedburner:info uri="thecodedump" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Extend Your Toolbox: Custom Matchers</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/SjvIEaeesjE/</link>
		<comments>http://www.codelord.net/2012/02/04/extend-your-toolbox-custom-matchers/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 12:53:41 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[DRY]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[software craftsmanship]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=726</guid>
		<description><![CDATA[I&#8217;d like to point out a really nice testing practice that I&#8217;ve been loving more and more lately. Just about every mature testing framework out there supports the concept of custom matchers, which provide us with the ability to define our very own assertions seamlessly into the tests. Even though this ability is quite old, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to point out a really nice testing practice that I&#8217;ve been loving more and more lately.</p>
<p>Just about every mature testing framework out there supports the concept of custom matchers, which provide us with the ability to define our very own assertions seamlessly into the tests. Even though this ability is quite old, we don&#8217;t see it used too often and I think that&#8217;s a shame. I&#8217;ve seen this practice heavily used in the mind expanding <a href="http://www.amazon.com/gp/product/0321503627?ie=UTF8&amp;tag=thcodu02-20&amp;linkCode=shr&amp;camp=213733&amp;creative=393185&amp;creativeASIN=0321503627">GOOS</a> book and just now am starting to realize its awesomeness.<br />
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/dipster1/1403240351/"><img title="Your Testing Toolbox" src="http://farm2.staticflickr.com/1155/1403240351_68114a0c53.jpg" alt="toolbox" width="240" height="126" /></a><p class="wp-caption-text">Your Testing Toolbox</p></div><br />
Note: examples in this post are shown in Ruby using <a href="https://github.com/dchelimsky/rspec/wiki/Custom-Matchers">RSpec&#8217;s matchers</a> but the concept is pretty much identical (as can be seen for example in Java&#8217;s <a href="http://code.google.com/p/hamcrest/wiki/Tutorial">Hamcrest Matchers</a>).</p>
<h3>Matchers 101</h3>
<p>Creating your own matcher usually means creating a Matcher class that performs the assertions, supplies human readable error messages and a nice constructor.</p>
<p>Here&#8217;s an example from the <a href="https://github.com/dchelimsky/rspec/wiki/Custom-Matchers">RSpec documentation</a>:</p>
<div id="gist-1737631" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="no">RSpec</span><span class="o">::</span><span class="no">Matchers</span><span class="o">.</span><span class="n">define</span> <span class="ss">:be_a_multiple_of</span> <span class="k">do</span> <span class="o">|</span><span class="n">expected</span><span class="o">|</span></div><div class='line' id='LC2'>&nbsp;&nbsp;<span class="n">match</span> <span class="k">do</span> <span class="o">|</span><span class="n">actual</span><span class="o">|</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">actual</span> <span class="o">%</span> <span class="n">expected</span> <span class="o">==</span> <span class="mi">0</span></div><div class='line' id='LC4'>&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC5'><span class="k">end</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1737631/2d0980f927c298854d8ace00013c2f1a5f28dedd/rspec_matcher.rb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1737631#file_rspec_matcher.rb" style="float:right;margin-right:10px;color:#666">rspec_matcher.rb</a>
            <a href="https://gist.github.com/1737631">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<h3>Matchers increase readability and intent</h3>
<p>As you should know, one of the <a href="http://c2.com/cgi/wiki?XpSimplicityRules">most important rules for design</a> is <em>Reveals Intent</em>. Take a quick look here, which way do you think reveals more intent?</p>
<div id="gist-1737631" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c1"># This</span></div><div class='line' id='LC2'><span class="n">response</span><span class="o">[</span><span class="s1">&#39;X-Runtime&#39;</span><span class="o">].</span><span class="n">should</span> <span class="o">=~</span> <span class="sr">/[\d\.]+/</span></div><div class='line' id='LC3'><br/></div><div class='line' id='LC4'><span class="c1"># .. or this?</span></div><div class='line' id='LC5'><span class="n">response</span><span class="o">[</span><span class="s1">&#39;X-Runtime&#39;</span><span class="o">].</span><span class="n">should</span> <span class="n">be_a_number</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1737631/215e237f07b383c5792cbb5cca0adcc2b5f4864a/intent.rb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1737631#file_intent.rb" style="float:right;margin-right:10px;color:#666">intent.rb</a>
            <a href="https://gist.github.com/1737631">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Also, which error message do you prefer? &#8220;expected false to be true&#8221; or something along the lines of &#8220;expected comment to be anonymous&#8221;?</p>
<h3>Matchers create robust tests</h3>
<p>The most important advantage of all is how using matchers easily allows you to steer away from fragile tests which are the bane of a lot of testing efforts.<br />
The mark of good tests is that a change in your code doesn&#8217;t require you to perform changes in multiple tests that don&#8217;t really care for the change.<br />
Take this code for example:</p>
<div id="gist-1737631" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="n">expected_comment</span> <span class="o">=</span> <span class="no">Comment</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">anonymous</span><span class="p">:</span> <span class="kp">true</span><span class="p">,</span> <span class="n">user</span><span class="p">:</span> <span class="s2">&quot;the dude&quot;</span><span class="p">,</span> <span class="n">reply_to</span><span class="p">:</span> <span class="kp">nil</span><span class="p">)</span></div><div class='line' id='LC2'><span class="n">commentor</span><span class="o">.</span><span class="n">should_receive</span><span class="p">(</span><span class="ss">:add</span><span class="p">)</span><span class="o">.</span><span class="n">with</span><span class="p">(</span><span class="n">expected_comment</span><span class="p">)</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1737631/af12f952b61c745a7bce91c5980eae0b382d751a/sucky_non_dry.rb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1737631#file_sucky_non_dry.rb" style="float:right;margin-right:10px;color:#666">sucky_non_dry.rb</a>
            <a href="https://gist.github.com/1737631">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>This might seem like a standard test, but that&#8217;s not really the case. A test should assert for a single piece of knowledge, and this test actually checks several. If the purpose of this test is to check the behavior of anonymous comments, why should it change if we no longer allow replies? Or if we no longer require users for posting comments?</p>
<p>The magic of matchers is exactly here. You create a new matcher to check specifically the aspect your test cares about and *boom*, you&#8217;re decoupled!</p>
<div id="gist-1737631" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="n">commentor</span><span class="o">.</span><span class="n">should_receive</span><span class="p">(</span><span class="ss">:add</span><span class="p">)</span><span class="o">.</span><span class="n">with</span><span class="p">(</span><span class="n">anonymous_comment</span><span class="p">)</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1737631/3f386a4f184528f678b316dc45c94cee32c8cae1/beautiful_and_dry.rb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1737631#file_beautiful_and_dry.rb" style="float:right;margin-right:10px;color:#666">beautiful_and_dry.rb</a>
            <a href="https://gist.github.com/1737631">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>This simple change makes your tests DRY and cool.</p>
<p>Happy testing!</p>
<p>Your should <a href="http://feeds.feedburner.com/TheCodeDump">subscribe</a> to my feed or <a href="http://twitter.com/avivby">follow</a> me on twitter!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2012%2F02%2F04%2Fextend-your-toolbox-custom-matchers%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2012%2F02%2F04%2Fextend-your-toolbox-custom-matchers%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/NFLvxVsASSTz5DhMf6F0fpa7cEs/0/da"><img src="http://feedads.g.doubleclick.net/~a/NFLvxVsASSTz5DhMf6F0fpa7cEs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/NFLvxVsASSTz5DhMf6F0fpa7cEs/1/da"><img src="http://feedads.g.doubleclick.net/~a/NFLvxVsASSTz5DhMf6F0fpa7cEs/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/SjvIEaeesjE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2012/02/04/extend-your-toolbox-custom-matchers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2012/02/04/extend-your-toolbox-custom-matchers/</feedburner:origLink></item>
		<item>
		<title>Stop Bitching: Do Self-Agile</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/ykVIOH4dETk/</link>
		<comments>http://www.codelord.net/2012/01/28/stop-bitching-do-self-agile/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 12:48:17 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[autonomouscraftsmanshipcore]]></category>
		<category><![CDATA[software craftsmanship]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=715</guid>
		<description><![CDATA[Continuing on this series of the Autonomous Craftsmanship Core we now reach the methodology problem. “I want to do agile/craftsmanship/etc.” The key is basically to put the rest of your team aside and focus on how you can do things like you think they should be done. You want to do &#8220;agile&#8221;? Open the manifesto, [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing on this series of the <a href="http://www.codelord.net/tag/autonomouscraftsmanshipcore/">Autonomous Craftsmanship Core</a> we now reach the methodology problem.</p>
<h3>“I want to do agile/craftsmanship/etc.”</h3>
<p>The key is basically to put the rest of your team aside and focus on how you can do things like you think they should be done. You want to do &#8220;agile&#8221;? Open the manifesto, read the values, and think on how you can change your own process in order to further yourself the direction you want to get.</p>
<h3>Development Practices</h3>
<p>This one deserves a post of its own, but luckily for us I&#8217;ve <a href="http://www.codelord.net/2011/11/28/stop-bitching-write-those-damn-tests/">already</a> <a href="http://www.codelord.net/2011/12/18/stop-bitching-use-the-tools-you-want/">written</a> <a href="http://www.codelord.net/2011/12/30/stop-bitching-it-doesnt-always-take-two-to-pair/">it</a>! You don&#8217;t need permission to write tests, use the right tools, and just coding in an awesome manner.</p>
<h3>Your own mini iterations, planning and retrospectives</h3>
<p>I think a big part of becoming a better developer is looking at how we work, analyze it, decide where we need practicing and then getting better at it, deliberately. Here are some examples from my own development process.</p>
<h4>Pomodoros</h4>
<p>I love pair programming. Love it. Love it so much, I find it hard to be productive without a pair when coding. I find that the crazy simple <a href="http://www.pomodorotechnique.com/">Pomodoro technique</a> is some kind of magic makes-me-focus-real-good drug. Anytime I&#8217;m doing tasks on my own I set up my little timer and burn down the todo list. Using pomodoros allows me to keep track of my time, focus, see how good are my estimations and waste less time on reddit. You don&#8217;t need anyone else on your team to &#8220;allow&#8221; you to do pomodoros. Just do it, and see magic happening.</p>
<h4>Goals and Retrospectives</h4>
<p>Just like in an agile team we plan sprints, have retrospectives and set goals, I do the same for myself, both at work and for my personal time. Every week I do a retrospective of the past week, think what I did wrong and what I like. I have monthly and weekly goals. I&#8217;ve got recurring tasks in OmniFocus to review my work. I write the reviews in Evernote and then create new goals and add them to OmniFocus. That way every week and month I can go over the last few weeks and see how I&#8217;m doing. For example, I can set goals for finishing a book, write some blog posts, communicate better at work, etc.</p>
<h3>It&#8217;s up to you</h3>
<p>Uncle Bob Martin said it&#8217;s not your boss&#8217;s responsibility to make sure you learn and become better, it&#8217;s yours. Once you realize this, stop waiting for things to get better by themselves and step up you can actively become better. I was surprised how many of these aspects coincide with what Seth Godin talks about in <a href="http://www.amazon.com/gp/product/1591843162/ref=as_li_ss_tl?ie=UTF8&amp;tag=thcodu02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1591843162">Linchpin</a><img style="border: none !important; margin: 0px !important; display: none;" src="http://www.assoc-amazon.com/e/ir?t=thcodu02-20&amp;l=as2&amp;o=1&amp;a=1591843162" alt="" width="1" height="1" border="0" />. You have no excuses not to be doing better things. It&#8217;s you&#8217;re responsibility, so <strong>stop bitching and do awesome work.</strong></p>
<p>You should <a href="http://feeds.feedburner.com/TheCodeDump">subscribe</a> to my feed or <a href="http://twitter.com/avivby">follow</a> me on twitter!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2012%2F01%2F28%2Fstop-bitching-do-self-agile%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2012%2F01%2F28%2Fstop-bitching-do-self-agile%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/mAqpBB61BJK2kR5eDFEGSB9EGg4/0/da"><img src="http://feedads.g.doubleclick.net/~a/mAqpBB61BJK2kR5eDFEGSB9EGg4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/mAqpBB61BJK2kR5eDFEGSB9EGg4/1/da"><img src="http://feedads.g.doubleclick.net/~a/mAqpBB61BJK2kR5eDFEGSB9EGg4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/ykVIOH4dETk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2012/01/28/stop-bitching-do-self-agile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2012/01/28/stop-bitching-do-self-agile/</feedburner:origLink></item>
		<item>
		<title>Looking Back on 18 months of Testing and TDD at a Startup</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/kBRd2pf70Xs/</link>
		<comments>http://www.codelord.net/2012/01/06/looking-back-on-18-months-of-testing-and-tdd-at-a-startup/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 20:34:25 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[billguard]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=701</guid>
		<description><![CDATA[As we&#8217;re approaching a year and half here at BillGuard, I&#8217;ve started thinking back a bit about our testing habits and how well that&#8217;s turned out. I&#8217;ve seen a lot of posts about testing in startups, some saying startups shouldn&#8217;t bother to test because they&#8217;ll have to change the whole damn thing 5 minutes after [...]]]></description>
			<content:encoded><![CDATA[<p>As we&#8217;re approaching a year and half here at <a href="https://www.billguard.com">BillGuard</a>, I&#8217;ve started thinking back a bit about our testing habits and how well that&#8217;s turned out.</p>
<p>I&#8217;ve seen a lot of posts about testing in startups, some saying startups shouldn&#8217;t bother to test because they&#8217;ll have to change the whole damn thing 5 minutes after they&#8217;re done, others claim testing is the only reason they were able to keep working. Here are some of my thoughts looking back.</p>
<h3>Our Background</h3>
<p>When we started, only two of us had a test-infected background out of the five technical guys, me being big on <a href="http://www.amazon.com/gp/product/0321146530/ref=as_li_ss_tl?ie=UTF8&amp;tag=thcodu02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321146530">TDD</a><img style="border: none !important; margin: 0px !important; display: none;" src="http://www.assoc-amazon.com/e/ir?t=thcodu02-20&amp;l=as2&amp;o=1&amp;a=0321146530" alt="" width="1" height="1" border="0" />. Two other developers never wrote tests before. We agreed that tests were important, but that&#8217;s about it. I set up a continuous integration server and with that we were off. With time, the habit of writing tests spread out among the team. Some are TDD passionate, some write tests after the fact, but we generally all believe that tests should be written extensively.</p>
<h3></h3>
<div id="attachment_704" class="wp-caption aligncenter" style="width: 250px"><a href="http://www.codelord.net/wp-content/uploads/2012/01/test_in_prod.png"><img class="size-medium wp-image-704 " title="test_in_prod" src="http://www.codelord.net/wp-content/uploads/2012/01/test_in_prod-240x300.png" alt="" width="240" height="300" /></a><p class="wp-caption-text">None of us, ever</p></div>
<h3>Not everything is worth testing</h3>
<p>We&#8217;ve seen several quite rapid changes to our UI. Having less tests in this area makes sense. We rely on QA for making sure all buttons are displayed etc. To make this clear: we have no selenium-like tests for UI components but have tests for most logic being done by the UI. I think this is generally a good practice, since having to maintain selenium tests would be hard when you throw things around a lot and change flows. Some basic automated sanity tests pretty much does it.</p>
<h3>Everyone learned to love tests</h3>
<p>I love seeing other guys in the team delete a line of code to see which test breaks and understand why it&#8217;s there. Even more I love the frowning face when no tests break. This addiction to tests shows how much value the team&#8217;s getting out of having solid tests, hands down. No need to stress this further I believe.</p>
<h3>Tests save our asses repeatedly</h3>
<p>Having an extensive suite of tests allows us to make rapid changes to our code base, as is needed in most startups, and rely on the solid tests to tell us whether we&#8217;ve screwed something up. All the code that has anything whatsoever to do with sensitive and important information is heavily tested which is a huge bonus and a necessity in our line of business (personal finance protection).</p>
<h3>TDD is just magical with complex algorithms</h3>
<p>We have quite a few complex algorithms that require multiple entities and ideas to perform. I find that the parts we&#8217;re most satisfied with maintainability-wise are the heavily TDD-ed algorithms we&#8217;ve got. Being written with rigorous TDD gives us so many advantages:</p>
<ul>
<li>This critical code usually has a lot less defects.</li>
<li>The code is a lot more readable, well decomposed and allows for easy changing once we find out a need for tweaking the algorithms.</li>
<li>Working in TDD magically forces us to form our problem domain better, making us have a language of our own in talking about the problem. This happens less naturally in other forms of working on algorithms.</li>
</ul>
<h3>Summing our testing experiences</h3>
<p>All in all, I think the whole team would agree that dedicating time to writing thorough tests is proving itself valuable and because of that people are writing more and more tests without any of us ever stopping and saying &#8220;we should write tests&#8221; (well, I swear I didn&#8217;t do it too much). It happens naturally when people get the value out of it. It&#8217;s fun seeing how today BillGuard has become a company that organically values testing so much I don&#8217;t even feel a great need to stress it to new people because they&#8217;ll quickly see there&#8217;s no real other way. We&#8217;re far from being the poster children of <a href="http://www.amazon.com/gp/product/0132350882/ref=as_li_ss_tl?ie=UTF8&amp;tag=thcodu02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0132350882">Clean Code</a><img style="border: none !important; margin: 0px !important; display: none;" src="http://www.assoc-amazon.com/e/ir?t=thcodu02-20&amp;l=as2&amp;o=1&amp;a=0132350882" alt="" width="1" height="1" border="0" />, but I&#8217;ve got my fingers crossed.</p>
<p>If you&#8217;re interested in accomplishing the same at your work, you might find <a href="http://www.codelord.net/2011/11/28/stop-bitching-write-those-damn-tests/">this recent post</a> of mine of some help.</p>
<p>You should <a href="http://feeds.feedburner.com/TheCodeDump">subscribe</a> to my feed or <a href="http://twitter.com/avivby">follow</a> me on twitter!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2012%2F01%2F06%2Flooking-back-on-18-months-of-testing-and-tdd-at-a-startup%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2012%2F01%2F06%2Flooking-back-on-18-months-of-testing-and-tdd-at-a-startup%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/Hv52VrLz5BoBWaovB5na5KbYZdM/0/da"><img src="http://feedads.g.doubleclick.net/~a/Hv52VrLz5BoBWaovB5na5KbYZdM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Hv52VrLz5BoBWaovB5na5KbYZdM/1/da"><img src="http://feedads.g.doubleclick.net/~a/Hv52VrLz5BoBWaovB5na5KbYZdM/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/kBRd2pf70Xs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2012/01/06/looking-back-on-18-months-of-testing-and-tdd-at-a-startup/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2012/01/06/looking-back-on-18-months-of-testing-and-tdd-at-a-startup/</feedburner:origLink></item>
		<item>
		<title>Stop Bitching: It Doesn’t Always Take Two to Pair</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/-3z19CBPgGo/</link>
		<comments>http://www.codelord.net/2011/12/30/stop-bitching-it-doesnt-always-take-two-to-pair/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 16:02:55 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[autonomouscraftsmanshipcore]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=689</guid>
		<description><![CDATA[Pushing forward with the Autonomous Craftsmanship Core series. This week on our plate: How can you force pairing down the throat of your team even if they&#8217;re not really into it? I&#8217;ve already touched on this subject a few times before, especially since it&#8217;s one I find really important and had to handle a few [...]]]></description>
			<content:encoded><![CDATA[<p>Pushing forward with the <a href="http://www.codelord.net/tag/autonomouscraftsmanshipcore/">Autonomous Craftsmanship Core series</a>. This week on our plate: How can you force pairing down the throat of your team even if they&#8217;re not really into it?</p>
<p>I&#8217;ve already touched on this subject a few times before, especially since it&#8217;s one I find really important and had to handle a few times before.<br />
Pair programming feels to me like the best technique currently known to the software industry for making a team highly productive and have global code ownership. It&#8217;s one of those things that didn&#8217;t click right away when reading <a href="http://www.amazon.com/gp/product/0321278658/ref=as_li_tf_tl?ie=UTF8&amp;tag=thcodu02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0321278658">Extreme Programming Explained</a><img style="border: none !important; margin: 0px !important; display: none;" src="http://www.assoc-amazon.com/e/ir?t=thcodu02-20&amp;l=as2&amp;o=1&amp;a=0321278658" alt="" width="1" height="1" border="0" />, but man did I get it wrong.</p>
<p>I&#8217;ve loved pairing from the moment I started doing it and ever since I find it hard doing hard work without a pair by my side. The problem is that most of the software shops around are still not pairing regularly, making it hard for a pairing junky like me to have fun.</p>
<p>So, how can we stop bitching about our team not pairing and actually get shit done with a pair? As opposed to the previous posts on the Autonomous Craftsmanship Core, this is not something one can do alone, and so is a bit harder to work around.</p>
<p>Basically, <strong>don&#8217;t calling it pair programming</strong>. It might be a bit tricky socially, but it&#8217;s worth it. Some real examples:</p>
<h3>Can you help me out?</h3>
<p>If I have a short task (ideally &#8211; no more than 30-45 minutes) that I want some help with, I just find someone on my team and ask for some help. Hopefully, you&#8217;re not in a team where asking for help sounds problematic. Then, once you&#8217;re both on your computer and working on the problem &#8211; you&#8217;re pairing. That was easy, wasn&#8217;t it? Do it enough times (without looking like an idiot that always needs help) and your mates get acquainted to the idea fast.</p>
<h3>Volunteer to help people</h3>
<p>I love walking around the team and seeing what people are doing. Every once in a while, simply walking by someone and asking how are things going might trigger a &#8220;Take a look at this&#8221; response, and you can help a fellow coder get unstuck. I used to do this even outside of my team. Spending 15 minutes with someone to help him solve a problem and share some knowledge and technique in the meantime is just awesome.</p>
<h3>Review code to be in the loop</h3>
<p>I try and read most of the commits being done to projects I&#8217;m involved with. It has many advantages, and one of them is that I&#8217;m familiar with most of what&#8217;s going on around me. That means I might find little problems, ideas and changes that might help my team. I then just go to the person that made the changes and share my ideas. Sometimes that would drag us both into a short pairing session.</p>
<p>These are basic techniques that I&#8217;ve found helpful several times. Even people that have never heard about pairing start liking it (if they really find you helpful and not annoying, of course). I just love seeing how after a few weeks, people come and ask for help if you&#8217;re not around, and how slowly the idea of doing some tasks together becomes obvious. I don&#8217;t have to have them call it pairing, and it doesn&#8217;t have to be 100% of the time. The bottom line is that good practices stick, even unconsciously.</p>
<p>You should <a href="http://feeds.feedburner.com/TheCodeDump">subscribe</a> to my feed or <a href="http://twitter.com/avivby">follow</a> me on twitter!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F12%2F30%2Fstop-bitching-it-doesnt-always-take-two-to-pair%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F12%2F30%2Fstop-bitching-it-doesnt-always-take-two-to-pair%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/5-aHLfPHHIcU7yRGCRdCZPCD_ZI/0/da"><img src="http://feedads.g.doubleclick.net/~a/5-aHLfPHHIcU7yRGCRdCZPCD_ZI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/5-aHLfPHHIcU7yRGCRdCZPCD_ZI/1/da"><img src="http://feedads.g.doubleclick.net/~a/5-aHLfPHHIcU7yRGCRdCZPCD_ZI/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/-3z19CBPgGo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2011/12/30/stop-bitching-it-doesnt-always-take-two-to-pair/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2011/12/30/stop-bitching-it-doesnt-always-take-two-to-pair/</feedburner:origLink></item>
		<item>
		<title>Stop Bitching: Use the Tools You Want</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/eeH3BtexSGY/</link>
		<comments>http://www.codelord.net/2011/12/18/stop-bitching-use-the-tools-you-want/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 21:52:15 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[autonomouscraftsmanshipcore]]></category>
		<category><![CDATA[pragmatic]]></category>
		<category><![CDATA[software craftsmanship]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=682</guid>
		<description><![CDATA[Continuing on the thread of the Autonomous Craftsmanship Core, we reach another problem: &#8220;they&#8221; just won&#8217;t let you use the right tool, or in the right way. As I&#8217;ve said in the previous posts if anything is so bad you can&#8217;t work with it &#8211; leave; otherwise, you gotta learn how to make do. A pragmatic [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing on the thread of the <a href="http://www.codelord.net/tag/autonomouscraftsmanshipcore/">Autonomous Craftsmanship Core</a>, we reach another problem: &#8220;they&#8221; just won&#8217;t let you use the right tool, or in the right way. As I&#8217;ve said in the <a href="http://www.codelord.net/2011/11/12/stop-bitching-the-autonomous-craftsmanship-core/">previous</a> <a href="http://www.codelord.net/2011/11/28/stop-bitching-write-those-damn-tests/">posts</a> if anything is <em>so</em> bad you can&#8217;t work with it &#8211; leave; otherwise, you gotta learn how to make do.</p>
<p>A <a href="http://www.amazon.com/gp/product/020161622X/ref=as_li_tf_tl?ie=UTF8&amp;tag=thcodu02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=020161622X">pragmatic programmer</a><img style="border: none !important; margin: 0px !important; display: none;" src="http://www.assoc-amazon.com/e/ir?t=thcodu02-20&amp;l=as2&amp;o=1&amp;a=020161622X" alt="" width="1" height="1" border="0" /> uses the right tool for the job. We all know that if you have a hammer, every problem looks like a nail. In this post I&#8217;m talking about the situation where you have an awesome toolbox right <em>there</em> and yet they&#8217;re forcing you to unscrew something with your pinky&#8217;s nail. Excruciating to your brain.</p>
<p>The thing is, a lot of the times you can just use the right tools and the hell with everyone else. Yes, you can&#8217;t just write code in whatever programming language you want, but in a lot of other situations, you can do what you want to. I think this is best shown with a few examples:</p>
<h3>&#8220;Don&#8217;t commit too much. Say once a day&#8221;</h3>
<p>That&#8217;s a real quote a friend&#8217;s boss told him. Turns out committing multiple times a day is too messy. Most programmers might just sulk and do as they&#8217;re told, but with today&#8217;s technology you&#8217;re no longer bound to these stupid rules. Your team uses subversion? So what! You can use Git locally, do whatever you like, and just push once a day everything via <a href="http://trac.parrot.org/parrot/wiki/git-svn-tutorial">git-svn</a>. Same solutions are available for just about any VCS combination you can think of! I&#8217;ve done this several times working on projects with a VCS I didn&#8217;t want to mess with.</p>
<h3>&#8220;We can&#8217;t have a CI server&#8221;</h3>
<p>Why would someone be against that? Maybe your company doesn&#8217;t want to allocate a new server for such a &#8220;useless&#8221; thing, or maybe the system admins don&#8217;t have time for your little &#8220;developer toys.&#8221; Lucky for everyone, it&#8217;s no longer the case that you need complex setup for such stuff. It&#8217;s just a matter of looking around. For example, if you&#8217;re doing open source you just need to give <a href="http://travis-ci.org/">Travis</a> a look and see you&#8217;re suddenly all set. On the other hand if you&#8217;re code isn&#8217;t open sourced setting up a local <a href="http://jenkins-ci.org/">Jenkins</a> server is <em>so so</em> easy. You just double click a file and you&#8217;ve got it running. If your build isn&#8217;t too CPU hogging, you can run it on your box! And I&#8217;m almost certain you can find some server with some spare cycles to install it on.</p>
<h3>Autonomous Craftsmen Make Do</h3>
<p style="text-align: center;"><a href="http://www.codelord.net/wp-content/uploads/2011/12/macgyver.jpg"><img class="size-medium wp-image-683 aligncenter" title="macgyver" src="http://www.codelord.net/wp-content/uploads/2011/12/macgyver-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p>That sums it up. A craftsman&#8217;s gotta do what a craftsman&#8217;s gotta do.</p>
<p>You should <a href="http://feeds.feedburner.com/TheCodeDump">subscribe</a> to my feed and <a href="http://twitter.com/avivby">follow</a> me on twitter!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F12%2F18%2Fstop-bitching-use-the-tools-you-want%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F12%2F18%2Fstop-bitching-use-the-tools-you-want%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/9Qd2cOz-LEtB4bVM7lLEZP3faoQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/9Qd2cOz-LEtB4bVM7lLEZP3faoQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9Qd2cOz-LEtB4bVM7lLEZP3faoQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/9Qd2cOz-LEtB4bVM7lLEZP3faoQ/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/eeH3BtexSGY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2011/12/18/stop-bitching-use-the-tools-you-want/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2011/12/18/stop-bitching-use-the-tools-you-want/</feedburner:origLink></item>
		<item>
		<title>Your Brain Cares About Code Style</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/waRGdM63pv8/</link>
		<comments>http://www.codelord.net/2011/12/10/your-brain-cares-about-code-style/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 18:38:18 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[software craftsmanship]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=670</guid>
		<description><![CDATA[My first team had (among many other great attributes) the custom of strictly following a style guide. It was followed so religiously, I&#8217;ve yet to come across another place that does so to the same extent. It wasn&#8217;t really written down anywhere, but after a couple of weeks of pairing with the other guys you [...]]]></description>
			<content:encoded><![CDATA[<p>My first team had (among many other great attributes) the custom of strictly following a style guide. It was followed so religiously, I&#8217;ve yet to come across another place that does so to the same extent. It wasn&#8217;t really written down anywhere, but after a couple of weeks of pairing with the other guys you got it.</p>
<p>What does that mean exactly? It means that we wrote code that looked, to a large extent, like it was written like the same guy. We put 2 blank lines between regions. Members had a specific way of documenting. We even used the same idioms for creating empty lists etc. (Java).</p>
<p>If we paired with someone and saw him indent the code the wrong way, we&#8217;d go all <em>OCD until it was fixed</em>. And it was regarded totally OK. We didn&#8217;t feel like we were nitpicking on each other. It was the way things got done. I even know a guy that would notice extra whitespace at the end of lines (without any IDE help).</p>
<p>Ever since, whenever I see code written with careless indentation and whitespace I feel like the coder who wrote that just doesn&#8217;t care enough for the craft. Yes, <strong>No Whitespace &#8211; No Care</strong>!</p>
<h3>What&#8217;s the big deal?</h3>
<p>If code isn&#8217;t written in a consistent style in your team, whenever you come across code with the spacing a bit wrong, the first thing your head&#8217;s going to process is &#8220;<strong>I didn&#8217;t write this.</strong>&#8221; This is a natural feeling, and as we all know coders have a hard to restrain impulse to rewrite any piece of code they didn&#8217;t write. Once all the code looks the same, that feeling isn&#8217;t that hard and you can actually focus on the code itself and have a better sense of ownership. I know, it sounds stupid, but that&#8217;s the way our stupid minds work in.</p>
<p>A big part of the <a href="http://www.amazon.com/gp/product/0321278658/ref=as_li_tf_tl?ie=UTF8&#038;tag=thcodu02-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321278658">Extreme Programming</a><img src="http://www.assoc-amazon.com/e/ir?t=thcodu02-20&#038;l=as2&#038;o=1&#038;a=0321278658" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; display: none" /> principle Collective Code Ownership is obtained by simply keeping a consistent style. Anything important enough to become a core value of the only methodology that works must be worth the effort to take notice of.</p>
<p>The next time you see code with reckless spacing, change it and let your teammates know. It might be hard at first but the end goal is important &#8211; the ability to fluidly read code, without feeling like you&#8217;re wearing someone else&#8217;s shoes.</p>
<p>You should subscribe to my <a href="http://feeds.feedburner.com/TheCodeDump">blog</a> and follow me on <a href="http://twitter.com/avivby">twitter</a>!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F12%2F10%2Fyour-brain-cares-about-code-style%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F12%2F10%2Fyour-brain-cares-about-code-style%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/Xx3jQ_Ih9vaIKdb0IivLh17LgpU/0/da"><img src="http://feedads.g.doubleclick.net/~a/Xx3jQ_Ih9vaIKdb0IivLh17LgpU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Xx3jQ_Ih9vaIKdb0IivLh17LgpU/1/da"><img src="http://feedads.g.doubleclick.net/~a/Xx3jQ_Ih9vaIKdb0IivLh17LgpU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/waRGdM63pv8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2011/12/10/your-brain-cares-about-code-style/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2011/12/10/your-brain-cares-about-code-style/</feedburner:origLink></item>
		<item>
		<title>How I Moved My WordPress Blog from Dreamhost to a Free EC2 Instance</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/vNAoa3gDUfI/</link>
		<comments>http://www.codelord.net/2011/11/30/how-i-moved-my-wordpress-blog-from-dreamhost-to-a-free-ec2-instance/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 21:23:43 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[techie]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=660</guid>
		<description><![CDATA[Just recently my Dreamhost plan, the one this blog is hosted on, expired and I had to renew it. Seeing the amount of money they took charge me realize that surely I can find something cheaper than &#62;$10/month. After some snooping around I&#8217;ve settled on moving my WordPress blog to EC2. This is my story. [...]]]></description>
			<content:encoded><![CDATA[<p>Just recently my Dreamhost plan, the one this blog is hosted on, expired and I had to renew it. Seeing the amount of money they took charge me realize that surely I can find something cheaper than &gt;$10/month. After some snooping around I&#8217;ve settled on moving my WordPress blog to EC2. This is my story.</p>
<p><em>Disclaimer: this worked for me. If you lose your blog, too bad. Backup is your friend, my friend. You need some devops-chops to follow along.</em></p>
<p><em></em>After being tipped of by a couple of friends, I decided to look into setting up my site on EC2. Basically, my blog is really small (the WordPress export file is about 2MB), and it&#8217;s not like I get tons of traffic. That alone means that for a year now I can use the EC2 free tier, making this blog cost pretty much nothing.</p>
<h3>Initial setup</h3>
<p>First step was to register and AWS account. I created a micro instance, which is enough for most blogs and free for a year. The AMI (image) of the instance I used was Bitnami&#8217;s prebundled WordPress image, which you can read more about <a href="http://bitnami.org/stack/wordpress">here</a>. Do make sure to create your instance on an EBS and not instance store. That means that the data will be persistent. Change the instance&#8217;s security group to allow connections to port 80 (HTTP) and port 22 (SSH) from any IP.</p>
<p>You can assign a static IP to your instance for free! Just allocate a new Elastic IP on the EC2 console and attach it to your instance. Note that Elastic IPs cost nothing while attached, by if they aren&#8217;t attached your bill will start growing (after all, fresh IPs are a rare resource).</p>
<p>So you&#8217;ve got your instance up, eh? You can point your browser to your instance&#8217;s public DNS name, like so http://ec2-something-something.com/wordpress and see the default WordPress hello page. Go to /wordpress/wp-admin to login as admin (the default bitnami user/password are user/bitnami). Here you can start and setup your blog again.</p>
<h3>Importing</h3>
<p>On your original blog, you can use the export utility and then import all your posts and comments to the new machine. Easy as pie. If you have a lot of plugins and configurations, you might want to search for one of the many plugins that do that for you. If you&#8217;re like me and only have a couple of plugins and one theme, installing them manually takes about 3 minutes.</p>
<h3>Moving WordPress to the root of the site</h3>
<p>If you&#8217;d like to move WordPress to the root of your site (/ instead of /wordpress), remove the path from the General settings page and then SSH to the machine. Replace the first two lines of the file /opt/bitnami/apps/wordpress/conf/wordpress.conf with:</p>
<pre>Alias / "/opt/bitnami/apps/wordpress/htdocs/"</pre>
<p>Then, go to /opt/bitnami/apache2 and do:</p>
<pre>sudo ./bin/apachectl restart</pre>
<h3>Gotchas</h3>
<p>Got permalinks? You&#8217;ll need to:</p>
<pre>chmod g+rw /opt/bitnami/apps/wordpress/htdocs/.htaccess</pre>
<p>Want to receive email notification for new comments etc.? You&#8217;ll need to do:</p>
<pre>sudo apt-get install sendmail &amp;&amp; sudo ln -s /usr/sbin/sendmail /usr/bin/sendmail</pre>
<p>If you have attachments in any of your posts, you might need to fix the URL after the final move.</p>
<h3>Testing</h3>
<p>Make sure all your links, widgets etc. are working before making the final move. Post something, add a comment.</p>
<h3>Going live</h3>
<p>In the General settings panel, change the URL of the blog to your domain. Go to wherever you were hosted before, find the DNS panel and change the DNS entries for your blog. Danger: This is an &#8220;expert&#8221; step, and if you don&#8217;t know what it means, I recommend grabbing someone with more knowledge. Change the A records for your domain to point at the elastic IP you gave your instance. That&#8217;s it! Wait a bit for DNS propagation and everything should be working!</p>
<h3>Backups</h3>
<p>I found out about the <a href="http://wordpress.org/extend/plugins/wordpress-backup-to-dropbox/">backup to dropbox plugin</a>, which simply uploads all your blog to dropbox! Sweet, awesome and easy for small blogs!</p>
<h3>Costs</h3>
<p>So, using 1 micro instance with an EBS store of 10GB is free for the first year. Given nothing crazy in terms of network, you shouldn&#8217;t be paying at all for the first year, maybe about $1 a month. After that year passes, the instace and EBS store start kicking in. If you&#8217;re in it for the long run, like me, paying for the instance a year in advance costs about $9/month (3 years is like $7), and the EBS store costs $0.1 per GB, meaning $1. That&#8217;s about $10-$8/month, depending on how you pay for the instance. A great save compared to Dreamhost!</p>
<p>You should <a href="http://feeds.feedburner.com/TheCodeDump">susbcribe</a> to my feed and <a href="http://twitter.com/avivby">follow</a> me on twitter!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F11%2F30%2Fhow-i-moved-my-wordpress-blog-from-dreamhost-to-a-free-ec2-instance%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F11%2F30%2Fhow-i-moved-my-wordpress-blog-from-dreamhost-to-a-free-ec2-instance%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/b8erOhEJsh7hQNf9O4M5hs8q0jU/0/da"><img src="http://feedads.g.doubleclick.net/~a/b8erOhEJsh7hQNf9O4M5hs8q0jU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/b8erOhEJsh7hQNf9O4M5hs8q0jU/1/da"><img src="http://feedads.g.doubleclick.net/~a/b8erOhEJsh7hQNf9O4M5hs8q0jU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/vNAoa3gDUfI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2011/11/30/how-i-moved-my-wordpress-blog-from-dreamhost-to-a-free-ec2-instance/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2011/11/30/how-i-moved-my-wordpress-blog-from-dreamhost-to-a-free-ec2-instance/</feedburner:origLink></item>
		<item>
		<title>Stop Bitching: Write Those Damn Tests</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/I_9wwkZinHg/</link>
		<comments>http://www.codelord.net/2011/11/28/stop-bitching-write-those-damn-tests/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 21:27:09 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[autonomouscraftsmanshipcore]]></category>
		<category><![CDATA[software craftsmanship]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=510</guid>
		<description><![CDATA[Diving deeper into the idea of the Autonomous Craftsmanship Core, this time I&#8217;d like to talk about one of the first problems a lot of developers face when wanting to start doing clean code. You read Uncle Bob&#8217;s Clean Code, or went to a talk and then go all &#8220;Next day at work I&#8217;m gonna [...]]]></description>
			<content:encoded><![CDATA[<p>Diving deeper into the idea of the <a href="http://www.codelord.net/2011/11/12/stop-bitching-the-autonomous-craftsmanship-core/">Autonomous Craftsmanship Core</a>, this time I&#8217;d like to talk about one of the first problems a lot of developers face when wanting to start doing clean code.</p>
<p>You read Uncle Bob&#8217;s <a href="http://www.amazon.com/gp/product/0132350882/ref=as_li_tf_tl?ie=UTF8&amp;tag=thcodu02-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399369&amp;creativeASIN=0132350882">Clean Code</a><img style="border: none !important; margin: 0px !important; display: none;" src="http://www.assoc-amazon.com/e/ir?t=thcodu02-20&amp;l=as2&amp;o=1&amp;a=0132350882&amp;camp=217145&amp;creative=399369" alt="" width="1" height="1" border="0" />, or went to a talk and then go all &#8220;Next day at work I&#8217;m gonna write tests!!&#8221; Then you come to work, and you give the &#8220;let&#8217;s write tests man!&#8221; speech to your teammate, and he just yawns, and slowly the rush fades.</p>
<p>Lots have been written before about introducing tests to a team as a grunt, but I&#8217;ll do a quick recap:</p>
<p>You <em>don&#8217;t have to ask anyone</em> in order to start and write some tests. Write that first test. Make it pass. Commit. Not that hard, isn&#8217;t it?</p>
<p>Usually the next problem is that if no one else on your team runs the tests, they will keep breaking. But can you blame your team? You need to make them understand that running the tests will actually get them something.</p>
<p>For example, I&#8217;ve seen that after someone makes a commit that breaks the tests because of a bug, coming over to him and telling him what went wrong and how you found out might make him more interested in the idea of testing. A friend recently told me that he made running tests as simple as a double-click for the developers that don&#8217;t write tests. Once it got <em>that</em> easy, they started running them because everyone likes knowing that what they wrote works.</p>
<p>What if your boss won&#8217;t let you write tests? Frankly, <em>why the fuck should your boss care</em>? Does he also tell you when to use &#8220;while&#8221; instead of &#8220;for&#8221;? I don&#8217;t find things such as these to be something any boss should decide about. As I&#8217;ve said in the first post, if you find yourself in a place so resistant to change, <strong>leave</strong>. If you have to stay, do what you have to do. If they won&#8217;t let you commit your tests to source control or set up a continuous integration machine, there are solutions, which I&#8217;ll discuss on my next post.</p>
<p>In the mean time, focus on writing tests that help your teammates find problems and see how slowly your little tests get more and more traction. It&#8217;ll work, because <strong>Success begets attention!</strong></p>
<p>You should subscribe to my <a href="http://feeds.feedburner.com/TheCodeDump">feed</a> and follow me on <a href="http://twitter.com/avivby">twitter</a>!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F11%2F28%2Fstop-bitching-write-those-damn-tests%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F11%2F28%2Fstop-bitching-write-those-damn-tests%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/qY_lIC0dzb9x8k7NBwec5QXdGnw/0/da"><img src="http://feedads.g.doubleclick.net/~a/qY_lIC0dzb9x8k7NBwec5QXdGnw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/qY_lIC0dzb9x8k7NBwec5QXdGnw/1/da"><img src="http://feedads.g.doubleclick.net/~a/qY_lIC0dzb9x8k7NBwec5QXdGnw/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/I_9wwkZinHg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2011/11/28/stop-bitching-write-those-damn-tests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2011/11/28/stop-bitching-write-those-damn-tests/</feedburner:origLink></item>
		<item>
		<title>Stop Bitching: the Autonomous Craftsmanship Core</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/qVTKBHLHjWg/</link>
		<comments>http://www.codelord.net/2011/11/12/stop-bitching-the-autonomous-craftsmanship-core/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 11:42:40 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[autonomouscraftsmanshipcore]]></category>
		<category><![CDATA[software craftsmanship]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=504</guid>
		<description><![CDATA[A lot of developers I know keep bitching about how their team isn&#8217;t as passionate as they&#8217;d like it to be, or about their boss not letting them do things like it should be done. They get into this habit and never advance in the right direction because something is holding them back. I know [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of developers I know keep bitching about how their team isn&#8217;t as passionate as they&#8217;d like it to be, or about their boss not letting them do things like it should be done. They get into this habit and never advance in the right direction because something is holding them back. I know this situation well, I&#8217;m usually <em>one of these</em> guys.</p>
<p>In the spirit of <a href="http://programmingtour.blogspot.com/2010/11/positivember.html">Positivember</a> I&#8217;d like to tell you a secret. You can stop whining and start improving. You don&#8217;t have to wait for all the stars to align. That cliché about changes starting from yourself is actually right.</p>
<p><strong>I&#8217;ve heard almost every complaint in the book:</strong></p>
<p><em>&#8220;My teammates don&#8217;t write tests.&#8221;</em><br />
<em>&#8220;They won&#8217;t let me have a continuous integration server.&#8221;</em><br />
<em>&#8220;I can&#8217;t use Git.&#8221;</em><br />
<em>&#8220;My boss hates it when I make a lot of commits.&#8221;</em><br />
<em>&#8220;I was told not to write tests.&#8221;</em><br />
<em>&#8220;We&#8217;re not doing agile development.&#8221;</em><br />
<em>&#8220;I can&#8217;t do pair programming.&#8221;</em></p>
<p>If everything above applies, or you really have lots of problems like these, <em>just quit</em>. A developer that really cares about these things usually can find a better job easily. But, if it&#8217;s only some of these, remember that no work is perfect. There will always be suboptimal stuff to live with. The trick is not to be all bitter about it, but to actually try and make changes happen, slowly, so you still have fun.</p>
<p>Most if not all of these problems are things you can work around, technologically, mentally or socially. If you just stick to your good ways, you&#8217;ll eventually get some followers too.</p>
<p>Step up and realize that everything can start by you and your habits. An <strong>Autonomous Craftsmanship Core</strong> as I like to call it. Sometimes, you core will seem so awesome from the outside that people will join in on some of your practices. Sometimes it will go unnoticed and you will happily go on programming better and better.</p>
<p>I will blog more on tackling some of the problems I mentioned above, but as a starting point I recommend <a href="http://amzn.to/vHjrXa">Apprenticeship Patterns</a> and <a href="http://amzn.to/t68iqC">Driving Technical Change</a>. These great books help a lot in accepting that fact you should take matters into your own hands, and stop bitching.</p>
<p>You should subscribe to my <a href="http://feeds.feedburner.com/TheCodeDump">feed</a> and <a href="http://twitter.com/avivby">follow</a> me on twitter!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F11%2F12%2Fstop-bitching-the-autonomous-craftsmanship-core%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F11%2F12%2Fstop-bitching-the-autonomous-craftsmanship-core%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/mc-j4cX9GrDZjlNu1FBFUwXg1Ks/0/da"><img src="http://feedads.g.doubleclick.net/~a/mc-j4cX9GrDZjlNu1FBFUwXg1Ks/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/mc-j4cX9GrDZjlNu1FBFUwXg1Ks/1/da"><img src="http://feedads.g.doubleclick.net/~a/mc-j4cX9GrDZjlNu1FBFUwXg1Ks/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/qVTKBHLHjWg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2011/11/12/stop-bitching-the-autonomous-craftsmanship-core/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2011/11/12/stop-bitching-the-autonomous-craftsmanship-core/</feedburner:origLink></item>
		<item>
		<title>Stepping Up: Do the Pre-Commit Skim</title>
		<link>http://feedproxy.google.com/~r/TheCodeDump/~3/YOUnxCFEfuA/</link>
		<comments>http://www.codelord.net/2011/11/05/stepping-up-do-the-pre-commit-skim/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 20:38:24 +0000</pubDate>
		<dc:creator>Aviv Ben-Yosef</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[software craftsmanship]]></category>

		<guid isPermaLink="false">http://www.codelord.net/?p=497</guid>
		<description><![CDATA[I&#8217;m always looking for the easiest way to make my code better, or to train myself to pay more attention to the quality of the code I produce. My latest find is quite obvious yet so very powerful I had to share. Simply put, it&#8217;s just going over your code once more before a commit. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m always looking for the easiest way to make my code better, or to train myself to pay more attention to the quality of the code I produce. My latest find is quite obvious yet so very powerful I had to share. Simply put, it&#8217;s just <em>going over your code once more before a commit</em>.</p>
<p>Every once in a while, I commit code and forget to add a file. Even worse, I sometimes leave around dead code that I really hate. I&#8217;ve found out that simply making a mental note to go over every file I changed before making a commit makes a big difference. It seems like the Boy Scout Rule from <a href="http://amzn.to/sf6KkN">Clean Code</a> is a special case of this rule.</p>
<p>The trick is to simply go over every file you&#8217;ve changed and <strong>look for common pitfalls</strong>:</p>
<p><strong>Unused code</strong> &#8211; Are there methods your changes just made obsolete? Maybe a conditional with an &#8220;else&#8221; clause that can no longer happen? Delete code! It&#8217;s the best code you&#8217;ll write today!</p>
<p><strong>Zombie code</strong> &#8211; Did you start with something that was too complex and is no longer needed? Often in retrospect you can see how to simplify something and spare your colleagues the <a href="http://www.codelord.net/2011/10/28/fight-zombie-code/">woes of zombie code</a>.</p>
<p><strong>Overdue refactoring</strong> &#8211; Look at your changes. Are you pushing a method too far? Maybe making a class too bloated? Maybe it&#8217;s time to for some cleaning.</p>
<p><strong>Do you have a better name for it now?</strong> Sometimes when you start with something you don&#8217;t have a great name for it. After finishing it, you might be able to slap a better name on that class that will make it more obvious to everyone.</p>
<p><strong>Any dangling TODOs?</strong> I hate committing TODOs unintentionally.</p>
<p><strong>Make sure it&#8217;s all coherent in class-level</strong> &#8211; Some changes make sense when you&#8217;re knee-deep in a change. But step back and make sure it all still makes sense.</p>
<p>&nbsp;</p>
<p>You should <a href="http://feeds.feedburner.com/TheCodeDump">subscribe</a> to my feed and <a href="http://twitter.com/avivby">follow</a> me on twitter!
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F11%2F05%2Fstepping-up-do-the-pre-commit-skim%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.codelord.net%2F2011%2F11%2F05%2Fstepping-up-do-the-pre-commit-skim%2F&amp;source=avivby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_6107bfac7c92ddff62b393d1e8b7abbe&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>

<p><a href="http://feedads.g.doubleclick.net/~a/A5UAKPOUC1BCEsS0KbiIiWk1RXQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/A5UAKPOUC1BCEsS0KbiIiWk1RXQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/A5UAKPOUC1BCEsS0KbiIiWk1RXQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/A5UAKPOUC1BCEsS0KbiIiWk1RXQ/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheCodeDump/~4/YOUnxCFEfuA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codelord.net/2011/11/05/stepping-up-do-the-pre-commit-skim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.codelord.net/2011/11/05/stepping-up-do-the-pre-commit-skim/</feedburner:origLink></item>
	</channel>
</rss>

