<?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>Symphonious &#187; XP</title> <atom:link href="http://www.symphonious.net/category/code-and-geek-stuff/xp/feed/" rel="self" type="application/rss+xml" /><link>http://www.symphonious.net</link> <description>Living in a state of accord.</description> <lastBuildDate>Wed, 25 Jan 2012 21:25:34 +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>Cross Pairing</title><link>http://www.symphonious.net/2012/01/03/cross-pairing/</link> <comments>http://www.symphonious.net/2012/01/03/cross-pairing/#comments</comments> <pubDate>Tue, 03 Jan 2012 21:42:38 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[Code and Geek Stuff]]></category> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/?p=1613</guid> <description><![CDATA[This evening I stumbled across two interesting posts about alternate layouts for pairing rather than sitting side by side. Firstly Tom Dale talking about Tilde&#8217;s corner desk pairing setup (and some of the software setup they use) and that was inspired by Josh Susser&#8217;s face to face pairing setup at Pivotal Labs. Both approaches require [...]]]></description> <content:encoded><![CDATA[<p> This evening I stumbled across two interesting posts about alternate layouts for pairing rather than sitting side by side.  Firstly <a
href="http://tomdale.net/2012/01/tildes-pairing-setup/">Tom Dale talking about Tilde&#8217;s corner desk pairing setup</a> (and some of the software setup they use) and that was inspired by <a
href="http://pivotallabs.com/users/jsusser/blog/articles/1505-pairing-tete-a-tete">Josh Susser&#8217;s face to face pairing setup at Pivotal Labs</a>.</p><p>Both approaches require more floor space which makes them difficult to setup but I would expect the face to face pairing to be a heck of a lot better if done well. I&#8217;ve always preferred having separate screens in mirror configuration as well as separate keyboards and mice to allow the developers to sit a little further apart to be comfortable and to be able to look straight ahead at the screen. That said, I quite like having a second monitor for spreading out windows as we have at LMAX so it&#8217;s not clear cut which is better.</p><p>It&#8217;s also interesting to note the popularity of the flat screen iMacs as opposed to Mac Pros or laptops. The former being too expensive for extra power and extensibility that generally isn&#8217;t required and the latter often being a bit too individualised to be good as pairing machines. Plus laptops, while amazingly powerful these days still have less bang for the buck and the reduction in performance is just enough to matter for development.</p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2012/01/03/cross-pairing/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Daily Deployment</title><link>http://www.symphonious.net/2007/06/13/daily-deployment/</link> <comments>http://www.symphonious.net/2007/06/13/daily-deployment/#comments</comments> <pubDate>Tue, 12 Jun 2007 23:32:15 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[Code and Geek Stuff]]></category> <category><![CDATA[Ephox]]></category> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">https://www.symphonious.net/2007/06/13/daily-deployment/</guid> <description><![CDATA[One of the challenging practices in XP&#160;is daily deployment &#8211; it requires your development team to have a very low defect rate and completely automated build and deployment tools. In an off the shelf software scenario it has the additional challenge that you can&#39;t actually get your customers to upgrade every day. At Ephox we&#39;ve [...]]]></description> <content:encoded><![CDATA[<p> One of the challenging practices in XP&#160;is daily deployment &#8211; it requires your development team to have a very low defect rate and completely automated build and deployment tools. In an off the shelf software scenario it has the additional challenge that you can&#39;t actually get your customers to upgrade every day.</p><p> At Ephox we&#39;ve adhered to this practice pretty well in the past by automatically deploying builds to all our internal systems, including our corporate wiki, website CMS and even this blog. Of course, that&#39;s still just a small subset of the kind of environments that we&#39;re actually used in and it&#39;s not actually getting out to real customers. To take the next logical step, we need to make those builds available to any customers who feel like checking out what&#39;s new &#8211; maybe not every day, but between all our customers hopefully regularly enough to give us good feedback.</p><p> So that&#39;s what we&#39;ve done with the <a
href="http://liveworks.ephox.com/editlive-early-access/">EditLive! Early Access</a> program on <a
href="http://liveworks.ephox.com/">LiveWorks!</a> If everything is going well and the engineers are actually working on EditLive! (they do like to go home on weekends) a new build should be automatically deployed to LiveWorks! twice a day ready for people to try out. We also include the current change log on the page (again, automatically updated) but at this stage we&#39;re only listing changes from the last released version rather than every little change we make in the change log so it doesn&#39;t necessarily show changes in every build. We might need to look into publishing commit logs as well in the future to work around that.</p><p> Personally, I think this is pretty exciting &#8211; there&#39;s a lot of cool stuff that gets developed early in the release process that previously hasn&#39;t seen the light of day until months later. Now it&#39;s up on LiveWorks! within 12 hours.</p><p> As always, if you have any problems, suggestions random doodlings on the matter, comments are below, my contact details are just over there on the right and there&#39;s also the <a
href="http://liveworks.ephox.com/mailing-list/">LiveWorks! mailing list</a>.</p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2007/06/13/daily-deployment/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Doug&#8217;s Excited&#8230;</title><link>http://www.symphonious.net/2006/12/12/dougs-excited/</link> <comments>http://www.symphonious.net/2006/12/12/dougs-excited/#comments</comments> <pubDate>Mon, 11 Dec 2006 22:40:24 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[Ephox]]></category> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/2006/12/12/dougs-excited/</guid> <description><![CDATA[So Doug is excited about how we took our first steps in a new product and how well it went. Personally, I&#39;m impressed with the way that we presented all the usual engineering setup tasks to the client in a client focussed manner. We could have done it better by not discussing up front all [...]]]></description> <content:encoded><![CDATA[<p> So <a
href="http://www.trontos.com/dsouth/blog/2006/12/so-excited.html">Doug is excited</a> about how we took our first steps in a new product and how well it went. Personally, I&#39;m impressed with the way that we presented all the usual engineering setup tasks to the client in a client focussed manner. We could have done it better by not discussing up front all the engineering tasks we were hiding behind the suggested first story, but that&#39;s okay. The first story was that we wanted to ship a distribution of the new product. It&#39;s really quite backwards to think of things that way &#8211; normally you build the product then work out how to package and distribute it, but it&#39;s impossible to ship anytime if you don&#39;t build the distribution mechanism at the start.</p><p> So hidden in that story was the following engineering tasks:</p><ul><li> Create a subversion repository.</li><li> Create a build process (including managing build numbers, version numbers etc).</li><li> Create a change log.</li><li> Create zip file for distribution.</li><li> Add the project to cruise control so it is automatically built.</li><li> Adjust our &#34;AutoDeployer&#34; to be able to deploy the built zip file to the web site.</li></ul><p> We also found time to pay back a bunch of technical debt left around our systems:</p><ul><li> Cleaned up some cruft in our Subversion repository that we don&#39;t use anymore.</li><li> Fixed the build process for our IWWCM&#160;integration so it runs about 10 times faster and builds only trigger when appropriate &#8211; they were triggering on unrelated changes in subversion.</li><li> Cleaned up and improved the AutoDeployer.</li></ul><p> Not to mention, we&#39;ve learnt a lot about starting new products from scratch and gotten that process up and running quite well. I guess you could say I&#39;m excited too.</p><p> &#160;</p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2006/12/12/dougs-excited/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>QA in XP</title><link>http://www.symphonious.net/2006/11/06/qa-in-xp/</link> <comments>http://www.symphonious.net/2006/11/06/qa-in-xp/#comments</comments> <pubDate>Mon, 06 Nov 2006 07:39:04 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/2006/11/06/qa-in-xp/</guid> <description><![CDATA[I&#8217;ve seen a misconception a number of times where people believe that the regular release cycles and TDD practices in XP mean that you don&#8217;t need a standard QA process &#8211; that the developers are responsible for writing perfect code, first time every time. It&#8217;s true that XP practices can significantly improve quality, both of the code and the [...]]]></description> <content:encoded><![CDATA[<p> I&#8217;ve seen a misconception a number of times where people believe that the regular release cycles and TDD practices in XP mean that you don&#8217;t need a standard QA process &#8211; that the developers are responsible for writing perfect code, first time every time. It&#8217;s true that XP practices can significantly improve quality, both of the code and the final product, but that doesn&#8217;t excuse the team from properly testing their work.</p><p> It&#8217;s important to note that TDD is a design process, not a testing process. It will only test the cases that the initial developer thought of. For changing code or when the developer can&#8217;t keep all the relevant cases in their head, the tests will eliminate regressions, but by definition they won&#8217;t cover any cases the developer didn&#8217;t expect. Somewhere along the line you need someone who&#8217;s not as close to the code to really test the code and cover all the cases &#8211; not just the ones the developer thought of. Pairing helps with this, but the pair is still too close to the code. To do it properly and ensure you&#8217;re releasing a quality product, you need an actual QA process.</p><p> Regular releases in XP make traditional QA processes impossible to work with &#8211; you can&#8217;t finish all the features, throw them over the wall to QA, fix all the bugs and repeat inside a one week iteration. Instead, QA has to be an ongoing process where the QA department works alongside the development team. Straight after the planning game, QA should assist the client in writing acceptance tests that provide in-depth testing of the story requirements to ensure all the corner cases are covered. Clients often don&#8217;t think of corner cases off the top of their heads so having someone with decent QA skills will make the acceptance tests much more detailed and ensure that when the story is signed off it actually does what was needed.</p><p> As the developers work on stories, QA needs to keep an eye out for any clarifications to requirements and extra cases that the user explains to the developers while they work and make sure they are reflected in acceptance tests.</p><p> Finally, once a story is completed by the developers, QA should become an advocate for the client and test out the feature for anything that looks wrong while the client goes through and checks that it meets their requirements. This is where anything that can&#8217;t be covered by an automated test gets tested and the testing requirements documented so those tests can be run manually regularly.</p><p> During their slack time, the QA department should research ways to automate the currently manual tests, go back and run the manual tests to make sure they still pass.</p><p> The QA department might be a group of specialists or they might be the same people as in the development team &#8211; it&#8217;s the process and the allocation of time that matters more than the people. However, QA requires a distinct set of skills to development and a lot of developers aren&#8217;t much good at doing QA. If your development team doesn&#8217;t have QA skills you need to either train them up or get in QA specialists. My general inclination is that it&#8217;s best to have QA specialists who have a real passion and talent for testing software, but that your regular development team should regularly pair with them on QA work (and them with developers on non-QA work) to make sure that the team values and understands the work they do. It&#8217;s also important to avoid a divide between developers and QA &#8211; both teams are there to deliver value to the client, not to fight about whether a behavior is a bug or a feature request etc. QA and development need to be one team that works together and sits together.</p><p> One other advantage of keeping QA and development working together, is that developers fix the bugs that QA finds straight away instead of building up a big backlog that then delays the release while all those bugs are fixed and verified. Keep on top of your bug list and QA processes and you can ship top quality software in predictable timelines without the death march of bug fixing that traditionally happens at the end of projects.</p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2006/11/06/qa-in-xp/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>The Importance Of Small Wins</title><link>http://www.symphonious.net/2006/10/05/the-importance-of-small-wins/</link> <comments>http://www.symphonious.net/2006/10/05/the-importance-of-small-wins/#comments</comments> <pubDate>Thu, 05 Oct 2006 12:10:08 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/2006/10/05/the-importance-of-small-wins/</guid> <description><![CDATA[One of the really core principles of XP is the idea of small, frequent releases. The most obvious benefit of this is that it allows users to see the product and provide feedback about what could be done to improve it. What&#39;s not so obvious, but is part of the reasoning behind a number of [...]]]></description> <content:encoded><![CDATA[<p> One of the really core principles of XP is the idea of small, frequent releases. The most obvious benefit of this is that it allows users to see the product and provide feedback about what could be done to improve it. What&#39;s not so obvious, but is part of the reasoning behind a number of XP principles, is that the developers benefit from this just as much, if not more than the users. Being couped up in an office somewhere slaving away creating software that no one&#39;s using just isn&#39;t fun. Getting your software out to users and having the feeling that you&#39;ve achieved something is a big feel-good moment and it energizes the development team, allowing them to keep going full pace instead of getting tired and stressed.</p><p> This feeling of accomplishment doesn&#39;t just come from an actual release though &#8211; even completing a story makes you feel like you&#39;ve added value. The last few weeks I&#39;ve experienced first hand how deflated you get without those little wins. I&#39;ve been focussed on a big complex area that was too experimental and unknown to break down into small user stories with any real success. It really felt like a death-march &#8211; I&#160;had no idea how much further I&#160;had to go before I&#160;finished and as each day passed I&#160;felt more and more like I&#160;wasn&#39;t making any progress at all. Today I suddenly reached the end, the feature was done. Although it&#39;s overly dramatic, it reminds me of a single passage about stepping onto the summit of Everest for the first time: <q>after weeks of looking up at the slope ahead of them, for the first time they were looking down.</q>&#160;I&#39;m going to have to find a way to avoid such long hauls in the future.</p><p> According to XP, what I&#160;should have done at the start was a <em>spike</em> to find out what the major obstacles were and find a way to break the story down into something manageable. We did in fact have the story broken down into smaller sections, but it didn&#39;t reflect the actual work and I&#160;wound up with a pile of six or seven cards that I&#160;felt I&#160;had to work on simultaneously. Perhaps I&#160;could have been more focussed on a single story and just done what was required for it, but looking back at what was required, I don&#39;t see that being a much more successful approach. The simplest approach that would have worked for some of the stories would have had to be rewritten to work for the later stories. I also don&#39;t know how I could have approached a spike to identify the problems that I&#160;ran into, most of them came completely out of the blue.</p><p> In the end, I really don&#39;t know how I&#39;d do it differently next time, I&#160;just know that I want to do it differently because it made me feel bad. It may turn out to be the quickest way to get that particular feature done, but the fact that it made me feel bad feels like a warning sign that it&#39;s not a sustainable pace. Perhaps next time we&#39;ll be in a better position and be able to share the work around the team more so it doesn&#39;t feel like a burden on one person&#39;s shoulders.&#160;I&#39;d certainly feel better with that if only because it didn&#39;t make me feel like a prima donna &#8211; I&#39;ve been so focussed on this one task that I&#39;ve been delegating pretty much everything else to other people. Fortunately, my colleagues have been fantastic at doing what needed to be done. Thanks guys.</p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2006/10/05/the-importance-of-small-wins/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Software Teams Must Gel</title><link>http://www.symphonious.net/2006/09/23/software-teams-must-gel/</link> <comments>http://www.symphonious.net/2006/09/23/software-teams-must-gel/#comments</comments> <pubDate>Sat, 23 Sep 2006 00:20:25 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/2006/09/23/software-teams-must-gel/</guid> <description><![CDATA[Slashdot linked off to an old interview with Kent Beck and Cynthia Andres, but it was interesting to see the number of people complaining about the pair programming aspect of XP. Comments like: Programmers are solo beasts &#8211; putting two of these dragons behind one keyboard is asking for trouble. and: In the OO Programming [...]]]></description> <content:encoded><![CDATA[<p> <a
href="http://rss.slashdot.org/~r/Slashdot/slashdot/~3/23999411/article.pl">Slashdot linked off</a> to an old interview with Kent Beck and Cynthia Andres, but it was interesting to see the number of people complaining about the pair programming aspect of XP. Comments like:</p><blockquote><p> Programmers are solo beasts &#8211; putting two of these dragons behind one keyboard is asking for trouble.</p></blockquote><p> and:</p><blockquote><p> In the OO Programming course I had this year, they encouraged us to practice extreme programming. Well, it sucked&#8230; Everytime my partner and I encountered a little problem and one of us had an idea, he had to explain it to the other, which took at least 3 times as long as just typing it out, which in almost every case made the idea perfectly clear. Suffice to say, after about 4 hours we gave up and just sent each other any files we had edited (of course making sure we didn&#39;t work on the same file at the same time).</p></blockquote><p> show a major lack of understanding, not only of pair programming, but of the real world in general. Firstly, there&#39;s no reason when pair programming that you shouldn&#39;t just type out your idea instead of spending excessive amounts of time waving your hands around and trying to explain it. Code talks and tests talk even better, so use them as a method of explaining. Secondly, and most importantly, if members of your team can&#39;t effectively work together and communicate clearly, you have a major problem with your team that will reduce your chances of success in any methodology. In XP such a scenario almost eliminates any chance of success.</p><p> It&#39;s not just your chances of success that drop when you have a poorly gelled team, it&#39;s also your teams morale and work satisfaction. XP should be fun to do. If it&#39;s not, you either aren&#39;t doing it right or you have a bad team. At Ephox, we tend to spend a lot of our day laughing and generally being happy. That atmosphere comes both from having a gelled team, but also from a number of XP practices that encourage social interaction.</p><p> The most significant practice in this regard is <a
href="http://jamesshore.com/Agile-Book/sit_together.html">sitting together</a>. Being locked away in your own office means that you have to make a special effort to interact with your work mates. Not only do you lose the serendipitous communication of overhearing important stuff, but you also lose the social interaction, the personal touches, that turn work mates into friends. Doesn&#39;t that mean that you waste time getting interrupted by talking about what happened on the weekend? Sure does. Does it mean you enjoy yourself at work more, have better developer retention rates and ultimately go faster because happy workers are productive workers? You bet.</p><p> Your pointy haired boss might want you to have your nose to the grindstone constantly, but that&#39;s because it&#39;s notoriously difficult to measure actual productivity so instead pointy haired bosses use number of hours on task as the measure. If they can make you work longer hours and never be distracted from your task then obviously you&#39;ll be more productive right? For some things like mind-numbing production line work that is probably true. For work where you need to your brain to be sharp and fresh, not a chance. When you need to think clearly, you need to give you brain a rest regularly and not push yourself to hard. When you do work, it should be <a
href="http://jamesshore.com/Agile-Book/energized_work.html">energized work</a>.</p><p> If you want to be successful with pair programming, you need to get on well with your work mates. You don&#39;t have to be the best of friends, but you need to be able to sit and chat, laugh about things and be comfortable around each other. Pairing with a team full of prima donnas and antisocial types would be a nightmare<a
id="footlink1-1158966189078" class="footnote" name="footlink1-1158966189078" href="#footnote1-1158966189078">1</a> so it&#39;s vital that you focus on building a gelled team, not just a team who can solve <a
href="http://www.npr.org/templates/story/story.php?storyId=3916173">silly math puzzles</a>.</p><p> You might think that this is a requirement just of XP, but it&#39;s not. It&#39;s a requirement of enjoying your work. Even pointy haired bosses know that enjoying your work is important, why do you think they spend so much on company christmas parties and the like? What they don&#39;t realize is that one-off events are an insignificant impact on morale compared with having teams that enjoy working together all the time. When done well, those one-off events are designed to get the team to come together, get to know each other and gel better.</p><p> At Ephox we consider a gelled team so much a necessity that we make the last step in our interview process going out with the entire engineering team for coffee. There&#39;s no technical questions, just sitting around chatting with the people you&#39;ll work with. Earlier parts of the interview process will tell us if you have the right skills, but they only give us a vague idea of whether or not you&#39;ll fit into the team<a
id="footlink2-1158966679859" class="footnote" name="footlink2-1158966679859" href="#footnote2-1158966679859">2</a>. Going out with the whole team though, lets us make sure that there&#39;s no major personality clashes with anyone in the team, and that you fit in with the team culture, spirit and people.</p><p> So what do you do if you&#39;re in a bad team?&#160;Either get rid of the antisocial types, or get out yourself and find a team that knows how to work together and have fun. Feel free to <a
href="mailto:adrian@ephox.com">send me a r&#233;sum&#233;</a>.</p><p
class="footnote"> <a
id="footnote1-1158966189078" href="#footlink1-1158966189078" name="footnote1-1158966189078">1</a> &#8211; actually, spending any time with prima donnas and antisocial types is generally unpleasant<a
class="footnotereturn" href="#footlink1-1158966189078">&#8617;</a></p><p
class="footnote"> <a
id="footnote2-1158966679859" href="#footlink2-1158966679859" name="footnote2-1158966679859">2</a> &#8211; as a hint, your interview at Ephox has gone well if you and the interviewers have laughed through most of it. As a corollary, if you spend most of the interview laughing and the interviewers don&#39;t, you probably didn&#39;t do so well. It&#39;s bad in any interview if the interviewers spend the whole time laughing and you don&#39;t &#8211; but we&#39;re too professional to do that. <a
class="footnotereturn" href="#footlink2-1158966679859">&#8617;</a></p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2006/09/23/software-teams-must-gel/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Mocks Are A Sometimes Food</title><link>http://www.symphonious.net/2006/09/11/mocks-are-a-sometimes-food/</link> <comments>http://www.symphonious.net/2006/09/11/mocks-are-a-sometimes-food/#comments</comments> <pubDate>Mon, 11 Sep 2006 08:03:41 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/2006/09/11/mocks-are-a-sometimes-food/</guid> <description><![CDATA[There&#39;s an interesting pattern when you start doing TDD&#160;and trying to make your tests as atomic as possible1. First of all you wonder how anyone could ever get far with completely standalone classes that don&#39;t interact with anything &#8211; obviously a program needs some level of communication between classes. Then you discover Mock objects. These [...]]]></description> <content:encoded><![CDATA[<p> <img
alt="Cookie Monster" width="69" src="http://www.symphonious.net/wp-content/uploads/2006/09/cookiemonster.thumbnail.jpg" height="96" align="left" id="image587" />There&#39;s an interesting pattern when you start doing TDD&#160;and trying to make your tests as atomic as possible<a
name="footlink1-1157959918015" class="footnote" href="#footnote1-1157959918015" id="footlink1-1157959918015">1</a>. First of all you wonder how anyone could ever get far with completely standalone classes that don&#39;t interact with anything &#8211; obviously a program needs some level of communication between classes. Then you discover Mock objects. These wonderful little gems allow you to have communication between classes but still test them independently. Pretty soon you&#39;re going on a cookie monster style binge session with mocks. Everything can should and will be mocked out and there&#39;s no longer any need to worry about making your classes keep to themselves, all those external dependencies can just be mocked out.</p><p> At some point though, you get an error about the max permspace being reached. You&#39;ve created so many mock classes that the JVM no longer has room to load class definitions. What&#39;s worse, your atomic tests which should be running lightning fast because they&#39;re so atomic, aren&#39;t. This is the point where you learn that Mocks are in fact a sometimes food. They&#39;re a nasty hack which allows you to pretend the world is all happy and isolated even though it&#39;s not.</p><p> Now, there are certainly architectures you could use which would completely avoid the need for mocks while still allowing inter-class communication but it can become mind-bendingly difficult to work out where the heck those messages are going and the performance implications of breaking things up at this level is pretty severe. A completely separated design is often beneficial at a component level, but it&#39;s usually impractical at the class level.</p><p> So mocks are a useful tool to help test things that need to interface with other classes but are largely independent. I&#39;ve taken to the rule of thumb that if I&#160;need to use more than one mock in a test I&#39;m probably doing something wrong &#8211; if I&#39;m using more than three mocks I really need to rethink my approach.</p><p> How do other people approach the use of mocks and other related techniques?</p><p
class="footnote"> <a
name="footnote1-1157959918015" href="#footlink1-1157959918015" id="footnote1-1157959918015">1</a> &#8211; I&#39;m not yet sure, but perhaps it would be better to focus on making them run as fast as possible, rather than as atomic as possible. They would still need to be focussed enough to make it clear <em>where</em> the problem is instead of just showing that this <em>is</em> a problem.<a
class="footnotereturn" href="#footlink1-1157959918015">&#8617;</a></p><p
class="footnote"> <a
id="footnote2-1157960421171" name="footnote2-1157960421171" href="#footlink2-1157960421171">2</a> &#8211; possibly hidden away in the language runtime<a
class="footnotereturn" href="#footlink2-1157960421171">&#8617;</a></p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2006/09/11/mocks-are-a-sometimes-food/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>End To End Testing And The 10 Minute Build</title><link>http://www.symphonious.net/2006/09/07/end-to-end-testing-and-the-10-minute-build/</link> <comments>http://www.symphonious.net/2006/09/07/end-to-end-testing-and-the-10-minute-build/#comments</comments> <pubDate>Thu, 07 Sep 2006 11:45:41 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/2006/09/07/end-to-end-testing-and-the-10-minute-build/</guid> <description><![CDATA[At least in my mind, there seems to be a clash of aims in XP. You want to make sure that you have complete confidence in your tests so that you can go faster and reduce the cost of change. To achieve this you write lots and lots of tests &#8211; until your fear of [...]]]></description> <content:encoded><![CDATA[<p> At least in my mind, there seems to be a clash of aims in XP. You want to make sure that you have complete confidence in your tests so that you can go faster and reduce the cost of change. To achieve this you write lots and lots of tests &#8211; until your fear of something breaking turns to boredom from writing tests you know will pass. Most of those tests are atomic and test a particular component, but fear lies in the gaps between components too so you regularly get recommendations like <a
href="http://www.symphonious.net/2006/05/08/testing-your-setup-code/#comment-31347">Ola Ellnestam&#39;s</a> on my previous post, <a
href="http://www.symphonious.net/2006/05/08/testing-your-setup-code/">Testing Your Setup Code</a>:</p><blockquote><p> Note: When you&#39;re TDDing and getting the very loose coupling every one is longing for ;-) you must be aware that integration tests and acceptance tests are an absolute necessity. Since this is the only way to really test your configuration.</p></blockquote><p> On the other hand, to be able to get rapid feedback you want a fast build &#8211; under 10 minutes. From James Shore&#39;s draft of the <a
href="http://www.jamesshore.com/Agile-Book/ten_minute_build.html">10 Minute Build</a> chapter of his upcoming book, <a
href="http://www.jamesshore.com/Agile-Book/">The Art of Agile</a>:</p><blockquote><p> For most teams, their tests are the source of a slow build. Usually it&#39;s because their tests aren&#39;t focused enough. Look for common problems: are you writing end-to-end tests when you should be writing unit tests and integration tests? Do you unit tests talk to a database, network, or file system?</p><p> You should be able to run about 100 unit tests per second (<span
class="link">test_driven_development</span>). Unit tests should comprise the majority of your tests. A fraction (less than 10%) should be integration tests, checking that two components synchronize properly. Only a handful, if any at all, should be end-to-end tests (<span
class="link">testing</span>).</p></blockquote><p> The problem is, if you want to test your software comprehensively and be able to have confidence that your tests will tell you if you&#39;ve broken something, I&#160;can&#39;t see how you can avoid writing a lot of integration tests. I also don&#39;t see why you would avoid automating end to end tests and running them very regularly. The reality is that you need to have a QA&#160;process that tests the application from how users actually use it &#8211; not from the point of view of this bit of the system or that bit of the system. You need to verify that when a user clicks on this menu item, the event is sent over to the editor pane which interprets it as a bold action and instructs the document to apply bold and finally that when the document serializes it comes out with a STRONG or B&#160;tag (depending on the user&#39;s preferences) around the text.</p><p> If you don&#39;t have a test that verifies that the message from the menu bar actually gets to the editor pane, how can you have confidence that bold works? How can you have confidence that the complex changes you&#39;re making to the document result in the right end effect when the document is serialized?</p><p> I suspect there are a couple of contributing factors to my confusion around this issue. Firstly, I&#160;work with text and frankly there is nothing less predictable and safe in software than text. It seems simple on the face of it, but there is a huge amount of complexity that goes on behind the scenes and user&#39;s absolutely demand that the editing experience is completely seamless and intuitive. There are few other environments where the number of possible program states is so incomprehensibly huge in a practical sense, where the differences really matter. On top of that, there&#39;s a ridiculous number of possible user actions that are all available at the same time and all of them interact with the program state is subtly different ways to try to best match the user&#39;s expectation.</p><p> In short, if there were any environment where you should be afraid of making changes, it&#39;s code that deals with text. That fear turns into a desire to write lots of tests and make them as close as possible to what the user is actually doing. Capturing all the subtleties of the state and embedding them in an atomic test is difficult to get precisely write &#8211; you tend to cover the most important details but miss one or two bits of state that can come back to bite you when you least expect it. Having end to end tests resolves that sense of fear, because you know that the program is operating just like when the user actually uses it &#8211; you can&#39;t have missed a detail somewhere, it&#39;s all the real deal.</p><p> The other contributing factor is that I&#160;haven&#39;t had the opportunity to work on a high quality code base that has very comprehensive atomic tests. Ephox&#39;s code base is quite old, it&#39;s mostly high quality code but it has some back alleys where ambushes lie in wait and it&#39;s well tested but mostly with integration level tests, not atomic tests. It&#39;s no surprise then that I&#160;don&#39;t have complete confidence in the atomic tests &#8211; they just don&#39;t cover enough of the application. That said, my confidence in the atomic tests is definitely growing as we add more tests and get better at knowing what to test and how to test it.</p><p> The bottom line is that now and for the foreseeable future, I&#39;m not going to have enough confidence in the atomic tests to get rid of the slow end to end tests. However I&#160;do see it as important to improve our atomic tests and the confidence we have in them. Being able to verify that your changes haven&#39;t caused problems in 5-10 seconds by running the appropriate tests is a huge boost to productivity. Being able to have confidence that everything will work in a minute or two by running all the atomic tests is a extremely powerful too. Despite that, knowing that <a
title="Introducing Bob" href="http://www.symphonious.net/2006/03/02/introducing-bob/">Bob the Builder</a> is going to come along behind you and run a comprehensive suite of end to end tests as well is priceless.</p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2006/09/07/end-to-end-testing-and-the-10-minute-build/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Refactoring To Make Improvements Possible</title><link>http://www.symphonious.net/2006/09/07/refactoring-to-make-improvements-possible/</link> <comments>http://www.symphonious.net/2006/09/07/refactoring-to-make-improvements-possible/#comments</comments> <pubDate>Thu, 07 Sep 2006 06:43:47 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/2006/09/07/refactoring-to-make-improvements-possible/</guid> <description><![CDATA[I&#39;ve had an interesting experience the last couple of days &#8211; I&#39;ve been trying to add some major new functionality into our list code. The code is exceptionally well tested and fairly easy to understand but it wasn&#39;t clear how to write a test that described the functionality I&#160;wanted to add. I started off by [...]]]></description> <content:encoded><![CDATA[<p> I&#39;ve had an interesting experience the last couple of days &#8211; I&#39;ve been trying to add some major new functionality into our list code. The code is exceptionally well tested and fairly easy to understand but it wasn&#39;t clear how to write a test that described the functionality I&#160;wanted to add.</p><p> I started off by writing an acceptance test for what I wanted and then started drilling down to what I&#160;needed, but it was leading me off into a rewrite of our list code because it was too difficult to see how to reuse the existing code for what I wanted. In the end, I decided to almost reverse refactor the existing code to extract out the logic that I&#160;needed. I say reverse refactor because instead of making the code simpler to read and understand, it was making it more complex &#8211; it really felt quite wrong to be applying the refactorings.</p><p> By the time I&#160;left this afternoon though,&#160;I&#39;d reached the point where the logic I&#160;wanted to reuse was quite clearly separated and the design was starting to be cleaned up again. I&#39;ve got some duplicate code lying around because I haven&#39;t finished cleaning up yet, but I&#39;m quite happy with the way it&#39;s all shaping up. What has surprised me the most is how much more code I&#160;can reuse than I had expected to. Taking the refactorings one step at a time and depending on the tests to make sure I&#160;had things right has led to a much better design and a clearer path forward than I&#160;had ever thought possible.</p><p> One question that remains is what new tests I&#160;should be writing. While all the code has simply been refactored and is still covered by the old tests, the refactoring has exposed a bunch of new opportunities for atomic tests. For example, a couple of new classes have been split out &#8211; it&#39;s possible to add atomic tests for those to verify that they do the subset of the task that they claim to, no more and no less &#8211; currently we only have tests for the task as a whole. So far I&#160;don&#39;t have any fear that it&#39;s wrong so I&#39;m not worrying about writing tests, but I&#39;m trying to stay alert to my fear level to be sure that tests are added as soon as they provide benefit.</p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2006/09/07/refactoring-to-make-improvements-possible/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Where Should You Deploy From?</title><link>http://www.symphonious.net/2006/08/29/where-should-you-deploy-from/</link> <comments>http://www.symphonious.net/2006/08/29/where-should-you-deploy-from/#comments</comments> <pubDate>Tue, 29 Aug 2006 08:55:08 +0000</pubDate> <dc:creator>Adrian Sutton</dc:creator> <category><![CDATA[Ephox]]></category> <category><![CDATA[XP]]></category> <guid
isPermaLink="false">http://www.symphonious.net/2006/08/29/where-should-you-deploy-from/</guid> <description><![CDATA[Once you have an automated build, the next step is to automate deployment1. A lot of people take this to mean that you should be able to check out the code, compile it and deploy it all from your local work station. I think this is largely a really bad idea. Firstly, if you have [...]]]></description> <content:encoded><![CDATA[<p> Once you have an automated build, the next step is to automate deployment<a
id="footlink1-1156840633156" class="footnote" href="#footnote1-1156840633156" name="footlink1-1156840633156">1</a>. A lot of people take this to mean that you should be able to check out the code, compile it and deploy it all from your local work station. I think this is largely a really bad idea.</p><p> Firstly, if you have deployment system that needs to vary, or might in the future need to vary,&#160;based on the version of the product, then your deployment scripts have to be in source control with the product and be branched and versioned just like the actual source code. If your product just spits out a zip file that is uploaded to a web server for clients to download, you my want to separate the deployment of that zip file from the code base since it will change based on changes to the web server, not changes to the code. You should however still be able to <em>build</em> the zip file from scripts that are versioned with your source code.</p><p> In either case though, there&#39;s no reason that you should be deploying builds from your local machine. Having a centralized deployment machine is a good idea for many of the same reasons that having a standard integration machine &#8211; primarily to avoid the it worked on my computer issues. At Ephox, our integration machine is also our deployment machine and we&#39;ve simplified deployment of a build to the web site down to a couple of clicks on a web page that the integration machine runs. Technically, we can kick off the deployment from any machine without having to get up and the actual work is handled by the deployment server.</p><p> The deployment script is home grown and very basic &#8211; it actually just runs an ant process on the server and passes through the output &#8211; but it has a couple of nice features. Firstly, it allows you to select any successful build of any of our products and deploy it all through the same interface. Secondly, once you&#39;ve picked the build to deploy it shows you the list of check-in comments for the changes specific to that build. You can also get it to retrieve a subversion log of all changes between two builds.</p><p> Switching to a deployment server has had a few benefits at Ephox &#8211; firstly, it means that your local machine is free to continue work while the build uploads. Even though an upload can be done in the background, the computer is tied up doing the build and running all the tests for a while, plus the developer can&#39;t make changes to that source check out until it&#39;s done. It all becomes a hassle, so moving that over to a separate machine makes it easier to get on with the next task straight away.</p><p> More importantly though, it means that every single build that is sent out to a client is built the same way, from a completely clean check out<a
id="footlink2-1156841296437" href="#footnote2-1156841296437" class="footnote" name="footlink2-1156841296437">2</a> and we know that every single test has been run against it and passed. We&#39;ve had a lot of success with eliminating regressions in builds we send to clients and the central build server was a good way to make sure we didn&#39;t cut corners and skip the tests &#34;just this once&#34;. These days running the tests is so in-grained in our culture we could probably lose the server and still not be tempted to cut corners.</p><p> That same deployment system can also deploy new builds to all our internal systems with a single command. Again, it&#39;s just a matter of copying files around so it doesn&#39;t need to be versioned with our source code, but it has given us a huge amount of testing and feedback because the whole company is always using the latest cutting edge build from development. It certainly keeps the engineers focussed on not breaking stuff too.</p><p> Looking back on it, for the small amount of time required to set it up and the almost non-existent maintenance required, setting up a central distribution server has been one of the biggest pay-offs we&#39;ve seen for improving our development process. Every company should consider doing it.</p><p
class="footnote"> <a
id="footnote1-1156840633156" href="#footlink1-1156840633156" name="footnote1-1156840633156">1</a> &#8211; in fact, some would argue that automating deployment is part of automating the build<a
href="#footlink1-1156840633156" class="footnotereturn">&#8617;</a></p><p
class="footnote"> <a
id="footnote2-1156841296437" href="#footlink2-1156841296437" name="footnote2-1156841296437">2</a> &#8211; we configure cruise control to completely delete the checked out source tree and check out a fresh copy to make sure it is in a pristine state. We have a faster build that runs on every commit that just does an update, but that build stops as soon as it has run all the tests, so no distribution is made.<a
href="#footlink2-1156841296437" class="footnotereturn">&#8617;</a></p>]]></content:encoded> <wfw:commentRss>http://www.symphonious.net/2006/08/29/where-should-you-deploy-from/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
