<?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/" version="2.0">

<channel>
	<title>Coding is like gardening...</title>
	
	<link>http://blog.edendevelopment.co.uk</link>
	<description>The interblogs of Eden Development</description>
	<pubDate>Sun, 31 May 2009 23:18:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/EdenDevelopment" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>The ever-moving market</title>
		<link>http://blog.edendevelopment.co.uk/2009/06/01/the-ever-moving-market/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/06/01/the-ever-moving-market/#comments</comments>
		<pubDate>Sun, 31 May 2009 23:17:08 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[agile]]></category>

		<category><![CDATA[business]]></category>

		<category><![CDATA[marketing]]></category>

		<category><![CDATA[offshoring]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=471</guid>
		<description><![CDATA[Rob Dempsey posted an interesting article a little while back on the future of software development firms in the new economy. It discusses offshoring, the recession, and a shift towards the employment of permanent staff within companies for Ruby on Rails work.
This is the sort of thing I muse about all the time: I keep [...]]]></description>
			<content:encoded><![CDATA[<p>Rob Dempsey posted an <a href="http://blog.adsdevshop.com/2009/05/14/future-of-software-development-firms-in-the-new-economy/">interesting article</a> a little while back on the future of software development firms in the new economy. It discusses offshoring, the recession, and a shift towards the employment of permanent staff within companies for Ruby on Rails work.</p>
<p>This is the sort of thing I muse about all the time: I keep a close eye on the web development market to ensure Eden is still in a position to add real value to potential customers. The results are important for deciding what we want Eden to look like in the future. </p>
<p>Ultimately, I want any decision to use Eden to be the best decision for a customer&#8217;s business. If it&#8217;s not, I prefer to point people elsewhere. So how do some of the indicators Rob mentions stack up against our business model? Are we still the best decision a customer can make?</p>
<h3>Offshoring still a way off</h3>
<p>The rise in offshoring development doesn&#8217;t particularly worry me. I&#8217;ve worked with offshore agencies before and there are some excellent companies out there, but the distance and the communication issues do present barriers to the addition of value. The price is lower, but the value added is commensurate. </p>
<p>If the spec is very (very) clear then I think that an offshoring project could work: but the risks are high and difficult to mitigate. I would hate to tie down any of our customers to a particular spec, which is why we always work in <a href="http://www.edendevelopment.co.uk/philosophy">an agile a fashion as possible</a>. It&#8217;s easier to manage risk with an agile process and to do agile well you need very clear communication pathways.</p>
<h3>Bringing it in-house</h3>
<p>I have also noticed a move to using permanent staff and in-house contractors to get websites built. The pool of people with Ruby on Rails skills is growing and there&#8217;s often no need to hire a contractor at a distance.</p>
<p>However, hiring a big experienced team takes time and the best people are difficult to find. My experience leads me to believe companies will always look to specialist development agencies to get larger jobs started quickly, and to ensure they&#8217;re done to a certain standard. We have a number of customers to whom we&#8217;ve provided development services in this fashion, often as a kick-start to an in-house team in the process of being hired.</p>
<h3>Shifting our focus</h3>
<p>We have had to make changes recently: I realised a few months ago we needed to shift our focus away from smaller projects, where the scope was tighter and contractors or offshore teams could price us out of the market. We grew the team to the point where we&#8217;re no longer a small group of coders with our own small independent projects. We&#8217;re now a well functioning cohesive development agency, taking on larger projects in bigger teams. </p>
<p>We&#8217;re looking to diversify too: we&#8217;re full of ideas for new web applications we&#8217;d just love to build, and we&#8217;ll be making some time over the summer to kickstart some prototypes. Watch this space.</p>
<p>Web developers: we always have to be thinking about the market we&#8217;re in, especially one as fast moving as ours, where things seem to change by the week. What are your thoughts on the ever-moving web development market?</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/WrwY5RNX1eE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/06/01/the-ever-moving-market/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MOO: A project for the BBC</title>
		<link>http://blog.edendevelopment.co.uk/2009/05/08/moo-a-project-for-the-bbc/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/05/08/moo-a-project-for-the-bbc/#comments</comments>
		<pubDate>Fri, 08 May 2009 09:49:31 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[business]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=459</guid>
		<description><![CDATA[I&#8217;ve just finished updating the website to let you know we&#8217;ve been working with the BBC for the last three months on updating an exciting internal project called MOO.
This has been an exciting project to work on and a lot of fun. There were some pretty big technical challenges on the way, but I&#8217;m very [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.edendevelopment.co.uk/case_studies/bbc_moo"><img src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/05/case_study_bbc_moo_2.png" alt="MOO" title="MOO" width="305" height="233" align='right' class="alignright size-full wp-image-460" /></a>I&#8217;ve just finished updating the website to let you know we&#8217;ve been working with the BBC for the last three months on updating an exciting internal project called MOO.</p>
<p>This has been an exciting project to work on and a lot of fun. There were some pretty big technical challenges on the way, but I&#8217;m very proud of the team: they really rose to the challenge and delivered some excellent work.</p>
<p>Read the full case study <a href="http://www.edendevelopment.co.uk/case_studies/bbc_moo">here</a> for more details on what it&#8217;s all been about.</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/SiilFcKVHrk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/05/08/moo-a-project-for-the-bbc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Billing with Integrity (part 5)</title>
		<link>http://blog.edendevelopment.co.uk/2009/04/08/billing-with-integrity-part-5/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/04/08/billing-with-integrity-part-5/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 13:56:24 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[business]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=407</guid>
		<description><![CDATA[(You may want to read parts one, two, three and four first).
So after much discourse on billing methods and the complicated relations that exist between a client and supplier, the question remains: how do we do it? The following post outlines how we try to &#8220;bill with integrity&#8221;.
We do weekly billing
Virtually all our billing is [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_443" class="wp-caption alignright" style="width: 310px"><img src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/04/integrity.jpg" alt="This is the goal. The method is the by-product." title="integrity" width="300" height="214" class="size-full wp-image-443" /><p class="wp-caption-text">This is the goal. The method is the by-product.</p></div><br />
(You may want to read parts <a href="/2009/01/09/billing-with-integrity-part-1/">one</a>, <a href="/2009/01/16/billing-with-integrity-part-2/">two</a>, <a href="http://blog.edendevelopment.co.uk/2009/01/23/billing-with-integrity-part-3/">three</a> and <a href="/2009/02/27/billing-with-integrity-part-4/">four</a> first).</p>
<p>So after much discourse on billing methods and the complicated relations that exist between a client and supplier, the question remains: how do we do it? The following post outlines how we try to &#8220;bill with integrity&#8221;.</p>
<h3>We do weekly billing</h3>
<p><strong>Virtually all our billing is now done on a weekly basis.</strong> We charge a fixed price (yes I know, bear with me), for between one to four developers for a week. </p>
<p><strong>We prefer to put either two or four developers on a project for a week.</strong> This is best for most projects, so that they can pair program on the tasks. One developer is ok for R&#038;D, prototyping work or very small amounts of work, but not recommended as you lose all the advantages of pairing.</p>
<p><strong>When asked to quote work, we give an expectation of budget.</strong> We might recommend that a client book 3-5 weeks of time for 2 developers for example. It&#8217;s easy for everyone to work out how much that will cost, which promotes transparency.</p>
<p><strong>We don&#8217;t charge extra for management time.</strong> All our management time with this billing method is rolled into the weekly cost. Therefore no nasty &#8216;management fees&#8217; on the bill - what you&#8217;ve agreed to is what you get billed.</p>
<p><strong>We build slack time into the project.</strong> All our rates are based on the fact that developers are unlikely to be able to spent more than four days of development time per week on a project. There are bug fixes, side projects, internal work, research, learning, review meetings, sick days, etc to consider. </p>
<p><strong>We don&#8217;t stop at &#8220;enough&#8221;.</strong> We only guarantee to complete three days of work at the beginning of a project. That doesn&#8217;t seem like much a week, but because we don&#8217;t stop after the amount of work we&#8217;ve guaranteed, we&#8217;re not wasting the client&#8217;s time. If we have time we keep on going, all the way through to the five days if we can. Therefore we often over-deliver on a week&#8217;s booked work. We strive to &#8216;gently exceed expectations&#8217; (as detailed in <a href="http://www.pragprog.com/the-pragmatic-programmer">The Pragmatic Programmer</a>; which is a must read, by the way). Pivotal Tracker helps track the velocity for a particular project, so we know how much we can expect to deliver on a project on any particular week.</p>
<h3>So how is that different to fixed price?</h3>
<p>There are elements of a fixed price methodology in this billing strategy. We do fix the price for a week&#8217;s work, for example. However, we don&#8217;t fix all the features that we can might deliver within a week, and we&#8217;re conservative with what we guarantee. This ensures that there is an appropriate amount of contingency built in, so if a project starts to get bogged down it doesn&#8217;t affect the schedule. Our estimates are done in half-day chunks using the <a href="http://en.wikipedia.org/wiki/Planning_poker">planning poker</a> method, which also makes them pretty accurate.</p>
<p>If a client is insistent that they need a fixed price, we simply say that we&#8217;ll add a certain percentage to the quoted cost for the number of iterations we&#8217;ve recommended to reflect the fact that we&#8217;re taking on more risk in the project. We&#8217;re quite honest about our reasons for doing this. If a client finds that difficult, we&#8217;re probably not the right company for them.</p>
<h3>Aren&#8217;t you still charging a variable rate?</h3>
<p>Well, sort of. You could say we&#8217;re charging per week as opposed to &#8216;per hour&#8217;, so what&#8217;s the difference? There are a number of distinct advantages that this model has over &#8217;straight&#8217; variable billing. </p>
<p><strong>No need to clock time, for managers or developers.</strong> Variable billing requires meticulous records of time spent. We hardly ever need to do this now, saving the hassle of timesheet keeping, approval and complex invoicing.</p>
<p><strong>Weeks are much easier to schedule than hours.</strong> Before switching to this model I found myself heading round the office at least four times a day to make sure everyone had enough work to do. Even when we made this more automatic, it was still a problem - it was really hard to commit to definite deadlines and everything was too fluid.</p>
<p><strong>There&#8217;s much less context-switching for developers.</strong> With fully variable billing, everyone still found they were switching around between projects several times a day, which can be very confusing and inefficient. Now there&#8217;s at most 2-3 projects running at once, and there&#8217;s much less switching around - less than once a day for most people.</p>
<p><strong>The team is much more focused over a whole week.</strong> Before we found we were effectively acting as several independent freelancers, all talking to individual clients and getting on with their work in isolation. This worked ok with much smaller projects, but it doesn&#8217;t scale to multiple team members on one project. &#8216;Silos&#8217; of knowledge began to build up, and getting a new team member up to speed was hard. Now we&#8217;ve moved mostly away from variable billing, we&#8217;ve been able to pair program over the last few weeks and that&#8217;s really helped to break down the silos and promote communication. We&#8217;ll be posting about our experiences with pairing in a future post - it&#8217;s been so significant it&#8217;s probably worth another series :)</p>
<h3>Some closing thoughts</h3>
<p>It&#8217;s been great to write this series, because it&#8217;s really forced me to think about our billing strategy hard again, striving to ensure we have integrity about our billing. You can&#8217;t exactly write a series such as this and not be walking the talk, right? My thoughts have evolved as I&#8217;ve written it; there are some things about our current billing method that would be quite different had I not written this series. </p>
<p>A few extra thoughts as I round this up:</p>
<p><strong>Billing is hard.</strong> That should be painfully obvious from some of the previous posts. We&#8217;ve learnt an enormous amount from our successes, but even more from our mistakes.</p>
<p><strong>Ultimately it&#8217;s about the relationship.</strong> A great relationship with the client will help to soften any billing issue you get into. Likewise, a bad relationship will be hard to save if things go south.</p>
<p>And lastly, probably the most important thing:</p>
<p><strong>We&#8217;re not done with improving our billing model.</strong> We&#8217;re on a journey, same as everyone. There are disadvantages to our current billing model too, which we&#8217;re looking for solutions to. Have you found a better way of working? Let us know!</p>
<p>Thanks for reading.</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/jmL9mmNzcLw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/04/08/billing-with-integrity-part-5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>redirect_to :back not reliable</title>
		<link>http://blog.edendevelopment.co.uk/2009/04/02/redirect_to-back-not-reliable/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/04/02/redirect_to-back-not-reliable/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 09:09:50 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
		
		<category><![CDATA[code]]></category>

		<category><![CDATA[how-to]]></category>

		<category><![CDATA[under the hood]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=401</guid>
		<description><![CDATA[Suppose you want to allow someone to make a comment and then return to the page they were on. An easy way to do this in Rails is to set the CommentsController method to redirect_to :back

def create
  comment = Comment.new&#40;params&#91;:comment&#93;&#41;
  if comment.save
    redirect_to :back
  end
end

But beware! The trouble with [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you want to allow someone to make a comment and then return to the page they were on. An easy way to do this in Rails is to set the CommentsController method to redirect_to :back</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> create
  comment = Comment.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:comment</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> comment.<span style="color:#9900CC;">save</span>
    redirect_to <span style="color:#ff3333; font-weight:bold;">:back</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>But beware! The trouble with this is that Firefox has an option to disable referrers, so you can&#8217;t rely upon the HTTP_REFERER being set.</p>
<p>So you could set up a session variable when you display your comment form, to later be used in the controller. The current url is found in request.path</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span> session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:return_to</span><span style="color:#006600; font-weight:bold;">&#93;</span> = request.<span style="color:#9900CC;">path</span> <span style="color:#006600; font-weight:bold;">-%&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> create
  comment = Comment.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:comment</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> comment.<span style="color:#9900CC;">save</span>
    redirect_to session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:return_to</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Sure, people can turn off session cookies, but if they do that then you have all sorts of other Rails problems to do with authenticity tokens and user authentication, so I think this is a fairly safe method.</p>
<p>Of course, an even better option is to add the comment by AJAX and avoid the need for a page refresh at all &#8230; but that can be the topic of a different blog post!</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/OV4-dK6pYek" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/04/02/redirect_to-back-not-reliable/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Under the hood: Not-so-basic authentication</title>
		<link>http://blog.edendevelopment.co.uk/2009/03/23/under-the-hood-not-so-basic-authentication/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/03/23/under-the-hood-not-so-basic-authentication/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 07:19:28 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
		
		<category><![CDATA[code]]></category>

		<category><![CDATA[how-to]]></category>

		<category><![CDATA[under the hood]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=396</guid>
		<description><![CDATA[Recently I worked on a project that required a single login to access administration options. There was no need for a full-blown RESTful authentication solution - I was advised to &#8220;Just use basic auth!&#8221;
Rails makes it easy. You probably know the standard example. You put a before_filter :authenticate in the controllers that require it, and [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I worked on a project that required a single login to access administration options. There was no need for a full-blown RESTful authentication solution - I was advised to &#8220;Just use basic auth!&#8221;</p>
<p>Rails makes it easy. You probably know the standard example. You put a <code>before_filter :authenticate</code> in the controllers that require it, and set it up in the Application Controller.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> authenticate
  authenticate_or_request_with_http_basic <span style="color:#9966CC; font-weight:bold;">do</span> |user, password|
    user == <span style="color:#996600;">'admin'</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> password == <span style="color:#996600;">'pass'</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>It&#8217;s all well and good &#8230; until you want to add a log out button. The browser stores the successful login credentials in a sort of cookie, and applies them to every page which requests basic authentication. Once you&#8217;ve logged in, it&#8217;s actually quite hard to make the browser forget you until you quit and restart the browser. It&#8217;s hard, but not impossible. If you can force basic authentication to fail, the browser will throw away the credentials.</p>
<p>So the solution is to add a session variable that says &#8220;NO SRSLY, LOG ME OUT PLS!&#8221; This is the logout action (a destroy method in a Sessions Controller)</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> destroy
  session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logout_requested</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
  flash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:notice</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;You have logged out successfully&quot;</span>
  redirect_to<span style="color:#006600; font-weight:bold;">&#40;</span>root_path<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Now for the tricky bit. The way this works is subtle and takes a moment to figure out each time I think about it. We change the authenticate method in the Application Controller so that as well as checking the username and password, it also ensures that this flag has not been set. Meaning we can cause basic authentication to fail when we want it to.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> authenticate
  authenticate_or_request_with_http_basic <span style="color:#9966CC; font-weight:bold;">do</span> |user, password|
    user == <span style="color:#996600;">'admin'</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> password == <span style="color:#996600;">'pass'</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logout_requested</span><span style="color:#006600; font-weight:bold;">&#93;</span> != <span style="color:#0000FF; font-weight:bold;">true</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logout_requested</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">nil</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Next time our user goes to a page which requires authentication, the browser still provides the correct username and password, but the flag causes the basic authentication to fail. Obviously we then have to clear the flag straight away, otherwise the user would not be able to get back in again even with the correct credentials. The user must type in the correct login name and password again to be able to get back in.</p>
<p>Perhaps we want to know whether the user is logged in or not, so that we know whether to display an edit button. We can set another session variable. Conveniently, <code>authenticate_or_request_with_http_basic</code> returns a boolean value.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> authenticate
  session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logged_in</span><span style="color:#006600; font-weight:bold;">&#93;</span> = authenticate_or_request_with_http_basic <span style="color:#9966CC; font-weight:bold;">do</span> |user, password|
    user == <span style="color:#996600;">'admin'</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> password == <span style="color:#996600;">'pass'</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logout_requested</span><span style="color:#006600; font-weight:bold;">&#93;</span> != <span style="color:#0000FF; font-weight:bold;">true</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logout_requested</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">nil</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Remember to set the flag to false when you log out. Also remember that this flag could be true, false or nil so a check in the Application Controller looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> logged_in?
  session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logged_in</span><span style="color:#006600; font-weight:bold;">&#93;</span> == <span style="color:#0000FF; font-weight:bold;">true</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Finally it&#8217;s worth noting that the username and password do not have to be hard-coded like this. It&#8217;s simple for an example, but don&#8217;t think that&#8217;s all there is to basic authentication. There&#8217;s nothing to stop you comparing against values in a settings table or even doing a user lookup à la RESTful authentication.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> authenticate
  session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logged_in</span><span style="color:#006600; font-weight:bold;">&#93;</span> = authenticate_or_request_with_http_basic <span style="color:#9966CC; font-weight:bold;">do</span> |email, password|
    user = User.<span style="color:#9900CC;">authenticate</span><span style="color:#006600; font-weight:bold;">&#40;</span>email, password<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">if</span> user <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logout_requested</span><span style="color:#006600; font-weight:bold;">&#93;</span> != <span style="color:#0000FF; font-weight:bold;">true</span>
      <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">current_user</span> = user
      <span style="color:#0000FF; font-weight:bold;">true</span>
    <span style="color:#9966CC; font-weight:bold;">else</span>
      <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">current_user</span> = <span style="color:#0000FF; font-weight:bold;">nil</span>
      <span style="color:#0000FF; font-weight:bold;">false</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  session<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:logout_requested</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">nil</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Thanks to Richard and Tris for their help in figuring out the not-so-basic aspects of basic authentication! :)</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/PuvtDP-rgj4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/03/23/under-the-hood-not-so-basic-authentication/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Want to work for us?</title>
		<link>http://blog.edendevelopment.co.uk/2009/03/18/want-to-work-for-us/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/03/18/want-to-work-for-us/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 11:30:12 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[business]]></category>

		<category><![CDATA[jobs]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=383</guid>
		<description><![CDATA[A quick note to draw your attention to the fact that we&#8217;re hiring again&#8230; this time we&#8217;re looking for mid-level or senior web developers. Do have a look at our jobs pages for more information.
Hiring in the midst of a recession is always a bit scary, but we&#8217;re finding that we&#8217;re very well placed as [...]]]></description>
			<content:encoded><![CDATA[<p>A quick note to draw your attention to the fact that we&#8217;re hiring again&#8230; this time we&#8217;re looking for<strong> mid-level or senior web developers</strong>. Do have a look at <a href="http://www.edendevelopment.co.uk/jobs">our jobs pages</a> for more information.</p>
<p>Hiring in the midst of a recession is always a bit scary, but we&#8217;re finding that we&#8217;re very well placed as a company to withstand it. I&#8217;ve never been busier writing features and following up leads, and we&#8217;re rapidly becoming well-known for our team&#8217;s excellent work (I&#8217;m so proud of them :-)</p>
<p>So, if you&#8217;d like to join us, <a href="http://www.edendevelopment.co.uk/jobs">now is the time</a>.</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/VrRxVAuMXuI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/03/18/want-to-work-for-us/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pivotal Tracker: Fantastic app, shame it’s free</title>
		<link>http://blog.edendevelopment.co.uk/2009/03/16/pivotal-tracker-fantastic-app-shame-its-free/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/03/16/pivotal-tracker-fantastic-app-shame-its-free/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 15:03:48 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[bdd]]></category>

		<category><![CDATA[business]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=356</guid>
		<description><![CDATA[
I&#8217;ve been digging around for a decent agile PM tool for a while, and stumbled across Pivotal Tracker on Twitter a couple of days ago.
Within about thirty minutes of trying it out, I was totally hooked. We&#8217;ve rolled our own basic project management tool internally, but we&#8217;ve yet to get the time to put proper [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pivotaltracker.com"><div id="attachment_372" class="wp-caption aligncenter" style="width: 510px"><img src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/03/pivotal-tracker1.png" alt="All this... for nothing?" title="Pivotal Tracker" width="500" height="213" class="size-full wp-image-372" /><p class="wp-caption-text">All this... for nothing?</p></div></a></p>
<p>I&#8217;ve been digging around for a decent agile PM tool for a while, and stumbled across <a href='http://www.pivotaltracker.com'>Pivotal Tracker</a> on <a href='http://twitter.com/pivotaltracker'>Twitter</a> a couple of days ago.</p>
<p>Within about thirty minutes of trying it out, I was totally hooked. We&#8217;ve rolled our own basic project management tool internally, but we&#8217;ve yet to get the time to put proper iterative development support into the app. Pivotal Tracker <em>just works</em>. With a clean UI and some great reporting tools, it&#8217;s all I need to run an agile project.</p>
<p>The one big downside is this: it&#8217;s completely free.</p>
<p>Wait, you say: surely that&#8217;s a good thing? Well, yes and no.</p>
<h3>Why great software should cost money</h3>
<p>When I pay for an app on the net, I expect a few things:</p>
<ul>
<li>It&#8217;s going to be up pretty much all the time.</li>
<li>It&#8217;s not going to vanish tomorrow.</li>
<li>It&#8217;s not going to suddenly cost a fortune.</li>
</ul>
<p>With Pivotal Tracker, I&#8217;ve no idea when they&#8217;re going to take the software down for maintenance. I&#8217;ve seen reports of it going down without notices for 15 minutes here and there, which is fine if it&#8217;s a non-critical service. It is however most definitely not fine when my client is trying to comment on features. I also have no guarantee that it&#8217;s not going to suddenly disappear into the night, taking all my stories and possibly the project itself with it.</p>
<p>The other issue is that if I&#8217;m paying $20/month for it, I&#8217;ve a reasonable expectation that it&#8217;s not going to cost say $200/month next month. It&#8217;s well within Pivotal&#8217;s rights to withdraw the free service and charge what they like for the paying version, without any notice.</p>
<p>Are we going to use it anyway? Yes we are: it&#8217;s too good to ignore. However, we&#8217;ve put in place the following cron job to mitigate the risk:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">*/20 * * * * curl -H &quot;X-TrackerToken: &lt;our token&gt;&quot; -H
 &quot;Content-type: application/xml&quot; -X GET
 https://www.pivotaltracker.com/services/v2/projects/39382/stories
 &gt; stories-backup.xml</pre></div></div>

<p>This little piece of magic copies all our stories in XML form to our backup server every 20 minutes, so we&#8217;re not screwed if the site vanishes without notice. It would only take us about an hour to import this XML into our old system should we need to. That takes care of the main risk for me.</p>
<p>The conclusions: Some software shouldn&#8217;t be free. If you&#8217;re using Pivotal Tracker or any other free service in anger, make sure you&#8217;ve got a backup plan.</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/1YH0iDC4jtw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/03/16/pivotal-tracker-fantastic-app-shame-its-free/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Billing with Integrity (part 4)</title>
		<link>http://blog.edendevelopment.co.uk/2009/02/27/billing-with-integrity-part-4/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/02/27/billing-with-integrity-part-4/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 08:03:08 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[business]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=295</guid>
		<description><![CDATA[(You may want to read parts one, two and three first).
Given that &#8220;fixed price fixed scope&#8221; billing is flawed, a natural next step for many small businesses is to try variable billing. This time we&#8217;ll look at some of the pros and cons of such an approach.
By &#8220;variable billing&#8221; I am referring to the practice [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_298" class="wp-caption alignright" style="width: 260px"><a href="http://www.customreceipt.com"><img src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/receipt-billing-4.jpg" alt="How do you think a client would feel if he got this bill?" title="Sample receipt" width="250" class="size-full wp-image-298" /></a><p class="wp-caption-text">How do you think a client would feel if he got this bill?</p></div>(You may want to read parts <a href="/2009/01/09/billing-with-integrity-part-1/">one</a>, <a href="/2009/01/16/billing-with-integrity-part-2/">two</a> and <a href="http://blog.edendevelopment.co.uk/2009/01/23/billing-with-integrity-part-3/">three</a> first).</p>
<p><strong>Given that &#8220;fixed price fixed scope&#8221; billing is flawed, a natural next step for many small businesses is to try variable billing. This time we&#8217;ll look at some of the pros and cons of such an approach.</strong></p>
<p>By &#8220;variable billing&#8221; I am referring to the practice of billing per hour (or per day) for your services. It&#8217;s a pretty common way of charging out time in the web development industry. Going back to the four variables of software development from my <a href="http://blog.edendevelopment.co.uk/2009/01/23/billing-with-integrity-part-3/">previous post</a>, when billing in this way you are effectively fixing quality (or you should be!), and tying time and cost together. Therefore you are allowing scope and time/cost to vary based on the client requirements.</p>
<h3>The advantages</h3>
<p>On the surface, variable billing appears to be the answer to all our problems. We don&#8217;t have to worry about estimates, because the client is paying per hour, so we&#8217;ll just take as long as we need to get things done. Changes in the project are handled easily: we just drop what we&#8217;re doing and change direction, so we can give the client the features they want. Goodbye to underbid projects completed for free!</p>
<p>So why is the client often unhappy with this sort of arrangement? Why won&#8217;t many clients even sign up to it?</p>
<h3>The disadvantages</h3>
<p>Many of the advantages are to do with transferring risk away from the developer and onto the client. If the developer is freed from the risk associated with getting a feature done, then that means the client is bearing the full brunt of the uncertainty. Clients want a fixed price, so they can compare you to other suppliers. Just doing variable pricing makes the proposal process very difficult.</p>
<p>There&#8217;s also the lack of trust. If you&#8217;re just setting up a relationship with the client, they don&#8217;t know you from Adam: they have no idea whether whether you&#8217;re as good as your word. You might say 2 days for a feature, but if the bill comes in for 4 days, they aren&#8217;t going to be happy. It only takes one large unexpected bill to wreck a client relationship.</p>
<p>Another main disadvantage is more subtle. With this sort of approach, a client can sometimes micromanage the project, as they&#8217;re rightly concerned about getting value for money. Therefore it&#8217;s possible to get inundated with feedback, minor tweaks, irrelevant bug reports and requests for status updates. This burns through yet more of the developer&#8217;s time, adding to a client&#8217;s bill and dragging down project efficiency. Often clients will want a very detailed breakdown of exactly what time was spent on their project, causing more management overheard. </p>
<h3>Conclusion: Useful in some circumstances</h3>
<p>Variable billing works well when there&#8217;s a large amount of goodwill between client and developer. It doesn&#8217;t work so well at the beginning of a client relationship. It&#8217;s worked well for us on the two extremes of projects we take on - the very short and the very long:</p>
<p>* Software consultancy, where we&#8217;ve been providing short term expert advice on an ad hoc basis.<br />
* Tiny changes, where there&#8217;s only a day or two of little tweaks to make to a site.<br />
* Open ended long term projects, where we provide development resource over months/years.</p>
<p>Sometimes projects degenerate into variable billing as the trust grows, a client starts believing our estimates, and everything becomes more informal.</p>
<p>Interestingly, on our most successful long term collaboration using this billing method we have a regular monthly budget which we can&#8217;t exceed, but we use that up in a variable &#8216;per hour&#8217; manner. This is strikingly similar to our current chosen method of billing, which I&#8217;ll discuss in the <a href="http://blog.edendevelopment.co.uk/2009/04/08/billing-with-integrity-part-5/">next and final</a> post in this series.</p>
<p><em>Tune in next time for an outline of our current method (you may want to <a href="http://feeds.feedburner.com/EdenDevelopment">subscribe</a> for the latest updates). If you&#8217;re in a hurry for an &#8220;answer&#8221;, you could always peek at our <a href="http://www.edendevelopment.co.uk/services/pricing">pricing pages</a> if you want to know how we bill :) Thanks to Kent Beck&#8217;s excellent essay on <a href="http://www.xprogramming.com/ftp/Optional+scope+contracts.pdf">Optional Scope Contracts</a> (PDF) for many of the ideas in this series, and the feedback I&#8217;ve received from various people.</em></p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/31doRGUH-RQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/02/27/billing-with-integrity-part-4/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Twitter integration from your Rails app</title>
		<link>http://blog.edendevelopment.co.uk/2009/02/26/twitter-integration-from-your-rails-app/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/02/26/twitter-integration-from-your-rails-app/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 13:17:39 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
		
		<category><![CDATA[code]]></category>

		<category><![CDATA[how-to]]></category>

		<category><![CDATA[twitter]]></category>

		<category><![CDATA[ykyat]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=347</guid>
		<description><![CDATA[We&#8217;ve learnt a bit about Twitter from writing ykyat.com.
I particularly want to write about how we fetch Twitter user icons. The icons are stored on AWS (Amazon Web Services) and cannot be deduced from the user name. You have to go through the Twitter API to find the image location.
The first thing I tried was [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve learnt a bit about Twitter from writing <a href="http://ykyat.com">ykyat.com</a>.</p>
<p>I particularly want to write about how we fetch Twitter user icons. The icons are stored on AWS (Amazon Web Services) and cannot be deduced from the user name. You have to go through the Twitter API to find the image location.</p>
<p>The first thing I tried was the <a href="http://twitter4r.rubyforge.org/">Twitter4R</a> library. This seems to be a very powerful library, and if you were writing a full Twitter client in Ruby you&#8217;d definitely want to consider it. It was simple to get the user icons, but the library just felt a little over-the-top for our needs.</p>
<p>Twitter4R seemed to require authentication with every request, and we soon hit the API limit. I realised this is odd because you really don&#8217;t need to authenticate to look at the XML or JSON data about a Twitter user. I decided to go back to basics and do it myself. This is the code for parsing the JSON data and picking up the user icon URL:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> icon_url_for_user<span style="color:#006600; font-weight:bold;">&#40;</span>username<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'open-uri'</span>
  <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'json'</span>
  buffer = <span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;http://twitter.com/users/show/#{username}.json&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">read</span>
  result = JSON.<span style="color:#9900CC;">parse</span><span style="color:#006600; font-weight:bold;">&#40;</span>buffer<span style="color:#006600; font-weight:bold;">&#41;</span>
  result<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'profile_image_url'</span><span style="color:#006600; font-weight:bold;">&#93;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>See! Easy!</p>
<p>Most people don&#8217;t change their user icon very often, so once we know where to find a user&#8217;s icon, we don&#8217;t need to ask Twitter for it again for an arbitrary amount of time. A week seems quite sensible. To that end, we created a lookup table in our database to match Twitter user names to their user icon URL. We added an index to the user name column because it acts as the primary key lookup.</p>
<p>When we want to know a user&#8217;s icon, we first look up in our table. If we don&#8217;t yet have it, or if the <code>updated_at</code> date is more than a week ago, we check with Twitter for the image location. Otherwise we use our cached location.</p>
<p>Fast and easy! :)</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/CxZjLJowlYM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/02/26/twitter-integration-from-your-rails-app/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How we made #ykyat</title>
		<link>http://blog.edendevelopment.co.uk/2009/02/25/how-we-made-ykyat/</link>
		<comments>http://blog.edendevelopment.co.uk/2009/02/25/how-we-made-ykyat/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 08:02:00 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
		
		<category><![CDATA[code]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[ykyat]]></category>

		<guid isPermaLink="false">http://blog.edendevelopment.co.uk/?p=288</guid>
		<description><![CDATA[Friday 13th February 2009 was going to be just a normal day, as far as we knew. Then Chris arrived at work at 9am and said, &#8220;We&#8217;re all going to write a new web app today!&#8221; The idea for &#8220;You know you&#8217;re addicted to&#8221; had occurred to Chris the previous day, upon realising that checking [...]]]></description>
			<content:encoded><![CDATA[<p>Friday 13th February 2009 was going to be just a normal day, as far as we knew. Then Chris arrived at work at 9am and said, &#8220;We&#8217;re all going to write a new web app today!&#8221; The idea for &#8220;You know you&#8217;re addicted to&#8221; had occurred to Chris the previous day, upon realising that checking Twitter before email represents a pretty serious Twitter addiction! Chris thought it might be fun to see what else people were addicted to, and bring the funny anecdotes together in a place where people could rate them and comment upon them.</p>
<p>We had a quick 15-minute meeting where Chris outlined the concept to us and drew some sketches. Tris and I got straight to work on designing the models whilst Chris put together a visual concept. We had lots of discussion about the <a href="http://colorschemedesigner.com/">colour scheme</a> before agreeing on the bright pink. James and Richard were to design the front end, Tris did the backend data manipulating and URL routing. As the person with previous experience in the Twitter API, my part was to get data in from Twitter and send responses out.</p>
<p>By 10:20 we knew this was going to work! Having looked up <a href="http://search.twitter.com">search.twitter.com</a> for a few select phrases, we discovered that people were indeed twittering about their various addictions!</p>
<div id="attachment_305" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/ykyat_feed.png"><img style="margin: 0 0 10px 10px; padding: 0; border: 1px solid #aaa;" src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/ykyat_feed-300x212.png" alt="Data found on Twitter!" title="Data found on Twitter!" width="300" height="212" class="size-medium wp-image-305" /></a><p class="wp-caption-text">Data found on Twitter!</p></div>
<p><span id="more-288"></span></p>
<p>As James and Richard were cutting up the design and turning it into HTML and CSS, Chris made a very welcome coffee round.</p>
<p>At about 11:15 we had a major success for the data import, upon discovering that Twitter Search can bring back up to 100 results at a time. We thought it was limited to 15. This meant that we could go back and select much more data.</p>
<div id="attachment_303" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/imported_2.png"><img style="margin: 0 0 10px 10px; padding: 0; border: 1px solid #aaa;" src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/imported_2-300x199.png" alt="Lots of data for us to use" title="Lots of data for us to use" width="300" height="199" class="size-medium wp-image-303" /></a><p class="wp-caption-text">Lots of data for us to use</p></div>
<p>Obviously, not all this data is particularly interesting, and some of it is just retweets of other people&#8217;s addictions. Tris helped me to tweak the regular expression to filter out unwanted results.</p>
<p>Meanwhile, the front end was coming along nicely:</p>
<div id="attachment_304" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/picture-8.png"><img style="margin: 0 0 10px 10px; padding: 0; border: 1px solid #aaa;" src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/picture-8-300x160.png" alt="An early version of the front end" title="An early version of the front end" width="300" height="160" class="size-medium wp-image-304" /></a><p class="wp-caption-text">An early version of the front end</p></div>
<p>At midday Chris bought the domain <a href="http://ykyat.com/">ykyat.com</a>. We were going to use a different domain name, but after seeing that ykyat.com was available, we all agreed that it was a much better domain. I created the Twitter account @<a href="http://twitter.com/ykyat">ykyat</a> and applied the background image and colour scheme to the Twitter page.</p>
<p>There was a mild panic over URL routing - we wanted to give each ykyat a unique tag, but we also wanted a nice short URL to browse by topic. It was decided to use a tilde when viewing by tag. The routing is rather non-standard for Rails; I found it interesting to see how it is done. Kudos to Tris for more regular expression magic! :)</p>
<p>I spent my lunch break sitting outside the office wondering how best to implement the <code>since_id</code> so as not to bother Twitter Search by asking for the same results more than once. I had three ideas in mind, and it was useful to have a break to consider the most efficient way.</p>
<p>At about 14:00 things were all coming together very nicely! Tris had organised a cron job for the import, and I was very excited to see a tweet of mine imported and displayed in the gorgeous UI that James and Richard had crafted!</p>
<div id="attachment_306" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/yay.png"><img style="margin: 0 0 10px 10px; padding: 0; border: 1px solid #aaa;" src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/yay-300x220.png" alt="A tweet imported and displayed" title="A tweet imported and displayed" width="300" height="220" class="size-medium wp-image-306" /></a><p class="wp-caption-text">A tweet imported and displayed</p></div>
<p>James and Richard turned their attention to the rating system whilst Tris set up the live server on Amazon EC2. My next task was to tweet back an @ reply to the addicted person, with the URL to let them know they had been featured on #ykyat. Thanks to the simplicity of the Twitter API, this didn&#8217;t take long &#8230;</p>
<div id="attachment_307" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/on_twitter.png"><img style="margin: 0 0 10px 10px; padding: 0; border: 1px solid #aaa;" src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/on_twitter-300x194.png" alt="Ykyat bot responds to the addicted person" title="Ykyat bot responds to the addicted person" width="300" height="194" class="size-medium wp-image-307" /></a><p class="wp-caption-text">Ykyat bot responds to the addicted person</p></div>
<p>Our Git repository was looking quite exciting at about this time!</p>
<div id="attachment_308" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/git.png"><img style="margin: 0 0 10px 10px; padding: 0; border: 1px solid #aaa;" src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/git-300x192.png" alt="Everything coming together" title="Everything coming together" width="300" height="192" class="size-medium wp-image-308" /></a><p class="wp-caption-text">Everything coming together</p></div>
<p>I then started to look at bringing in the Twitter user icons. All was going fine until I hit the limit of API requests per hour. We realised that we couldn&#8217;t just ask Twitter for the icon each time every page was loaded; we would have to be  more pragmatic about it. We put the user icons on hold. It was getting to late afternoon by now and we also decided we didn&#8217;t have time for commenting. Although Tris had written the back end to support comments, we were aware that the Twitter authentication needed to be secure and well tested so we didn&#8217;t want to rush that bit.</p>
<p>The last part of the afternoon was spent getting it working on the live server and making a few tweaks and polish to the user interface. We were all very excited to see what we had achieved in a day! Chris announced at 17:42 that we were done. We went home. Half an hour later <a href="http://twitter.com/chrismdp/status/1207232542">Chris announced it on Twitter</a>:</p>
<div id="attachment_320" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/announcement.png"><img style="margin: 0 0 10px 10px; padding: 0; border: 1px solid #aaa;" src="http://blog.edendevelopment.co.uk/wp-content/uploads/2009/02/announcement-300x155.png" alt="Chris announces #ykyat on Twitter" title="Chris announces #ykyat on Twitter" width="300" height="155" class="size-medium wp-image-320" /></a><p class="wp-caption-text">Chris announces #ykyat on Twitter</p></div>
<p>We made a few enhancements over the weekend. Chris worked on the navigator, showing popular categories and popular tweeters. I was itching to leave comments, which was very motivating for me, knowing that I had the power to enable it! I wrote the Twitter authentication and commenting system on Sunday evening and it went live on Monday!</p>
<p>Building #ykyat was an exciting and rewarding experience for all of us. It was good to work together as one team when so often we each work on different projects. It was fascinating to see an idea grow into a live web app in one day. I think we all knew that we could do it, but it was great to be able to prove it to the world!</p>
<img src="http://feeds.feedburner.com/~r/EdenDevelopment/~4/MUO27Pinpg0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.edendevelopment.co.uk/2009/02/25/how-we-made-ykyat/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
