<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Code Train &#187; tdd</title>
	<atom:link href="http://thecodetrain.co.uk/tag/tdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecodetrain.co.uk</link>
	<description>Where Neil Crosby talks about coding on the train...</description>
	<lastBuildDate>Sun, 03 Apr 2011 18:15:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Make it Work, Make it Pretty, Make it Right</title>
		<link>http://thecodetrain.co.uk/2008/11/make-it-work-make-it-pretty-make-it-right/</link>
		<comments>http://thecodetrain.co.uk/2008/11/make-it-work-make-it-pretty-make-it-right/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 09:45:46 +0000</pubDate>
		<dc:creator>Neil Crosby</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[mantra]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[work flow]]></category>

		<guid isPermaLink="false">http://thecodetrain.co.uk/?p=146</guid>
		<description><![CDATA[<p>A phrase a lot of people are used to nowadays in software development is &#8220;Make it work, make it right, make it fast&#8221; &#8211; meaning that you should first make your code do what you expect, then make it elegant, then finally optimise for speed.</p>

<p>For me, I like the intent of the phrase, but I don&#8217;t fully agree with it.  For one thing, my personal view is that &#8220;make it right&#8221; and &#8220;make it fast&#8221; should generally go hand in hand and that if you&#8217;re making something right you will likely be making it fast at the same time.</p>

<p>Instead, I prefer to work to the mantra &#8220;Make it Work, Make it Pretty, Make it Right&#8221;.</p>

<h3>Make it Work, Make it Pretty, Make it Right</h3>

<p>The rationale behind my mantra is simple &#8211; &#8220;work, right, fast&#8221; only covers the quality of code, it does not look to the quality of experience.  By merging &#8220;right&#8221; and &#8220;fast&#8221; into a single &#8220;right&#8221; rule and inserting a &#8220;pretty&#8221; rule the development process immediately becomes more concerned with how people will interact with what I&#8217;ve produced.</p>

<p>This process, by necessity, describes how I try to work as a single developer on my own on the train on my &#8220;itch to scratch&#8221; projects.  </p>

<!--Normally, the phrase is "Make it work, make it right, make it fast".  I feel that "right" and "fast" go hand in hand.

Pretty is how you get normal people to use things.

Right is what happens later.-->

<h4>Make it Work</h4>

<p>At the start of any of my projects I will have the germ of an idea that I want to flesh out, so I&#8217;ll start writing code.  Obviously, making it work it pretty darned important to the whole process.  At this point though, I won&#8217;t be too concerned about the elegance or performance of the code.  What I&#8217;m looking for is for it to work; nothing more, nothing less.</p>

<p>To ensure the code actually works, I&#8217;m trying my best nowadays to create Test Suites that should be run before any code commit to make sure that I&#8217;ve not inadvertently broken anything.  A quick look at my <a href="http://github.com/NeilCrosby">GitHub commits</a> will show you that I&#8217;ve got a way to go in this regard, but I am getting there slowly but surely.  These test suites become vitally important when you get to the &#8220;Make it Right&#8221; stage, but more of that later.</p>

<!--This is by far the most important (to my mind) of the three stages.  Making the code work provides a solid foundation to everything that goes later.  The "make it work" phase very much includes having a test suite available to test that the code does work in the way you think it does.

   * Basic code
   * Test Suite-->

<h4>Make it Pretty</h4>

<p>Once the code is working, and a test suite with good code coverage exists, it&#8217;s time to make what you&#8217;ve produced &#8220;pretty&#8221;.  This could include (but is not limited to) improving the visuals of your site or application, writing documentation or even just making sure your code blocks line up nicely.</p>

<p>You see, &#8220;pretty&#8221; isn&#8217;t just about visuals.  It&#8217;s about doing anything you can to make things easier for whoever comes later.  That could be someone using the website you&#8217;ve just built, but it could just as easily be someone who&#8217;s trying to install your software on their own machine or the unlucky chap who&#8217;s got to fix a particularly nasty bug in the code you wrote.</p>

<p>This rule is the one that gets more people to use what you&#8217;ve created.  Sure, some people will use the thing that works, but lots more will use the thing that works <em>and</em> is pretty.</p>

<!--By making what you've created "pretty", you make it more likely to get people to use it.  Pretty does not just mean making the visuals look nice though, it's also documentation and a myriad of other things.

Remember, a "user" isn't just someone trying to use your website, they could also be someone trying to install your software, blah or blah

   * Visuals
   * Documentation-->

<h4>Make it Right</h4>

<p>The final step in the process is to make things &#8220;right&#8221;.  The step is all about the &#8220;re&#8221; words &#8211; refactor, re-evaluate and reduce bugs.</p>

<p>Having a good test suite by this point is vital, because it gives me a huge amount more confidence in the fact that I can change how my code works without changing what it ultimately does.</p>

<h3>And that&#8217;s that</h3>

<p>So, there we go &#8211; that&#8217;s how I like to work.  I&#8217;m not great at following everything in the mantra just yet, but I&#8217;m getting better.  In time, I may even be awesome.</p>

<p>Oh, and for what&#8217;s worth, this post very much falls into the &#8220;Make it Pretty&#8221; rule.  I&#8217;ve been trying to work to this mantra for a while, and now I&#8217;m documenting to make things easier for others to use if they want.  And now that I&#8217;ve finished writing there&#8217;s the comments section, where hopefully you&#8217;ll help to make everything right for me.</p>
<div style="display:block"><small><em><a href="http://neilcrosby.com">Neil Crosby</a> also blogs at about t-shirts at <a href="http://iwearcotton.com">I Wear Cotton</a>, writes <a href="http://thetenwordreview.com/users/workingwithme">Ten Word Reviews</a>, and uploads <a href="http://www.flickr.com/photos/thevoicewithin/">photos</a> to flickr.  You can follow a combined feed of posts at <a href="http://neilcrosby.com/">NeilCrosby.com</a>.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>A phrase a lot of people are used to nowadays in software development is &#8220;Make it work, make it right, make it fast&#8221; &#8211; meaning that you should first make your code do what you expect, then make it elegant, then finally optimise for speed.</p>

<p>For me, I like the intent of the phrase, but I don&#8217;t fully agree with it.  For one thing, my personal view is that &#8220;make it right&#8221; and &#8220;make it fast&#8221; should generally go hand in hand and that if you&#8217;re making something right you will likely be making it fast at the same time.</p>

<p>Instead, I prefer to work to the mantra &#8220;Make it Work, Make it Pretty, Make it Right&#8221;.</p>

<h3>Make it Work, Make it Pretty, Make it Right</h3>

<p>The rationale behind my mantra is simple &#8211; &#8220;work, right, fast&#8221; only covers the quality of code, it does not look to the quality of experience.  By merging &#8220;right&#8221; and &#8220;fast&#8221; into a single &#8220;right&#8221; rule and inserting a &#8220;pretty&#8221; rule the development process immediately becomes more concerned with how people will interact with what I&#8217;ve produced.</p>

<p>This process, by necessity, describes how I try to work as a single developer on my own on the train on my &#8220;itch to scratch&#8221; projects.  </p>

<!--Normally, the phrase is "Make it work, make it right, make it fast".  I feel that "right" and "fast" go hand in hand.

Pretty is how you get normal people to use things.

Right is what happens later.-->

<h4>Make it Work</h4>

<p>At the start of any of my projects I will have the germ of an idea that I want to flesh out, so I&#8217;ll start writing code.  Obviously, making it work it pretty darned important to the whole process.  At this point though, I won&#8217;t be too concerned about the elegance or performance of the code.  What I&#8217;m looking for is for it to work; nothing more, nothing less.</p>

<p>To ensure the code actually works, I&#8217;m trying my best nowadays to create Test Suites that should be run before any code commit to make sure that I&#8217;ve not inadvertently broken anything.  A quick look at my <a href="http://github.com/NeilCrosby">GitHub commits</a> will show you that I&#8217;ve got a way to go in this regard, but I am getting there slowly but surely.  These test suites become vitally important when you get to the &#8220;Make it Right&#8221; stage, but more of that later.</p>

<!--This is by far the most important (to my mind) of the three stages.  Making the code work provides a solid foundation to everything that goes later.  The "make it work" phase very much includes having a test suite available to test that the code does work in the way you think it does.

   * Basic code
   * Test Suite-->

<h4>Make it Pretty</h4>

<p>Once the code is working, and a test suite with good code coverage exists, it&#8217;s time to make what you&#8217;ve produced &#8220;pretty&#8221;.  This could include (but is not limited to) improving the visuals of your site or application, writing documentation or even just making sure your code blocks line up nicely.</p>

<p>You see, &#8220;pretty&#8221; isn&#8217;t just about visuals.  It&#8217;s about doing anything you can to make things easier for whoever comes later.  That could be someone using the website you&#8217;ve just built, but it could just as easily be someone who&#8217;s trying to install your software on their own machine or the unlucky chap who&#8217;s got to fix a particularly nasty bug in the code you wrote.</p>

<p>This rule is the one that gets more people to use what you&#8217;ve created.  Sure, some people will use the thing that works, but lots more will use the thing that works <em>and</em> is pretty.</p>

<!--By making what you've created "pretty", you make it more likely to get people to use it.  Pretty does not just mean making the visuals look nice though, it's also documentation and a myriad of other things.

Remember, a "user" isn't just someone trying to use your website, they could also be someone trying to install your software, blah or blah

   * Visuals
   * Documentation-->

<h4>Make it Right</h4>

<p>The final step in the process is to make things &#8220;right&#8221;.  The step is all about the &#8220;re&#8221; words &#8211; refactor, re-evaluate and reduce bugs.</p>

<p>Having a good test suite by this point is vital, because it gives me a huge amount more confidence in the fact that I can change how my code works without changing what it ultimately does.</p>

<h3>And that&#8217;s that</h3>

<p>So, there we go &#8211; that&#8217;s how I like to work.  I&#8217;m not great at following everything in the mantra just yet, but I&#8217;m getting better.  In time, I may even be awesome.</p>

<p>Oh, and for what&#8217;s worth, this post very much falls into the &#8220;Make it Pretty&#8221; rule.  I&#8217;ve been trying to work to this mantra for a while, and now I&#8217;m documenting to make things easier for others to use if they want.  And now that I&#8217;ve finished writing there&#8217;s the comments section, where hopefully you&#8217;ll help to make everything right for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecodetrain.co.uk/2008/11/make-it-work-make-it-pretty-make-it-right/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

