The Role of Testing and QA in Agile Software Development

In our development group at Talis We’ve been thinking a lot about how to test more effectively in an agile environment. One of my colleagues, sent me a link to this excellent talk by Scott Ambler which examines the Role of Testing and QA in Agile Software Development.

Much of the talk is really an introduction to Agile Development which is beneficial to listen to because Scott dispels some of the myths around agile, and offers his own views on best practises using some examples. It does get a bit heated around the 45 minute mark when he’s discussing Database Refactoring, some of the people in the audience were struggling with the idea he was presenting which I felt was fairly simple. If you really want to skip all that try to forward to the 50 minute mark where he starts talking about sandboxes. What I will say is that if your having difficulty getting Agile accepted into your organisation then this might be a video you want to show your managers since it covers all the major issues and benefits.

Here’s some of the tips he has with regard to testing and improving quality:

  • Do Test Driven Development, the unit tests are the detailed design, they force developers to think about the design. Call it Just-in-time design.
  • Use Continuous Integration to build and run unit tests on each check-in to trunk.
  • Acceptance Tests are primary artefacts. Don’t bother with a requirements document simply maintain the acceptance test since the reality is that all testing teams will do is take that requirement and copy it into an acceptance test, so why introduce a traceability issue when you don’t need it.
  • Use Standards and Guidelines to help ensure teams are creating consistent artefacts.
  • Code Reviews and Inspections are not a best practise. They are used to compensate for people working alone, not sharing their work, not communicating, poor teamwork, and poor collaboration. Guru checks output is an anti-pattern. Working together, pairing, good communication, teamwork should negate the need for code reviews and inspections.
  • Short feedback loop is extremely important. The faster you can get testing results and feedback from stakeholders the better.
  • Testers need to be flexible, willing to pick up new skills, need to be able to work with others. They need to be generalising specialists. The trend that is emerging in agile or the emerging belief is that there is no need for traditional testers.

Scott is a passionate speaker and very convincing, some of the points he makes are quite controversial yet hard to ignore – especially his argument that traditional testers are becoming less necessary. I’m not sure I agree with all his views yet he has succeeded in forcing me to challenge my own views which I need to mull over and for that reason alone watching his talk has been invaluable.

Google Tech Talk : Flex, Flash and Apollo for Rich Internet Applications

ABSTRACT: James Ward, engineer and evangelist for Adobe’s Flex, Flash and Apollo technologies, will demonstrate their use for very rich user experiences in internet applications. Topics covered will include ECMAscript, the recent open source donation of the scripting engine to the Apache Tamarin project, Apollo (the standalone execution environment for running desktop applications written in flash and HTML) and much more

Google Tech Talk: Faith, Evolution and Programming Languages

Faith and evolution provide complementary–and sometimes conflicting–models of the world, and they also can model the adoption of programming languages. Adherents of competing paradigms, such as functional and object-oriented programming, often appear motivated by faith. Families of related languages, such as C, C++, Java, and C#, may arise from pressures of evolution. As designers of languages, adoption rates provide us with scientific data, but the belief that elegant designs are better is a matter of faith…

This is a wondeful talk by Phillip Wadler from the University of Edinburgh, he’s one of the individuals responsible for getting Generics into Java 5, and has worked on Haskell and very heavily on the development of functional programming languages throughout his career.

It’s suprising how well the evolution vs faith analogy applies to the way in which we, as developers, often adopt programming languages. For some reason the talk made me remember the old Java vs .NET arguments which were less about rationale differences in the semantics and philosophy of the programming language and more about which camp you belonged to and your unswerving faith and loyalty to it. In fact thats a poignant example of when multiculturalism went out of the window and fundementalism was very much in fashion.

The talk also provides a fair amount of history around some of the issues that polorised language designers, static vs dynamic typing, for example. I found this provided some wonderful background that I was never aware of.

If your interested in Programming Languages, their adoption and their evolution over time then this is a fascinating, and unique, talk that you should really watch.

Google Tech Talk: Java on Guice: Dependency Injection, the Java Way

Here’s a really interesting talk about how to use Guice, a new open source dependency injection framework for Java by Google. Here’s a link to the user-guide which explains, using a example, why Guice might be a great alternative to using static references, or factory patterns when writing unit tests. I haven’t used Guice yet but i have written many unit tests for services that need to pass in Mocked services using the factory pattern, so I can immediately see the benefit of a framework like Guice.

I’m going to delve deeper into it, but I recommend watching the tech talk, they work through a simple example and it does sound very useful.

End of sprint, SCRUM and why I’m feeling so good

We’ve just reached the end of our eighth sprint on the project I’ve been working on. On Monday we’ll be doing our end of sprint demonstrations to customers as well as internally to the rest of the company and I have to say I’m feeling quite good about it. It’s a lovely day today feel like I need to chill (or as Rob suggested – maybe I need to get a life 😉 ) anyway I’ve been sitting here reflecting on this month and there’s a few things I want to talk about.

I’m fairly new to the SCRUM methodology, in fact this is the first project I’ve worked on that formally uses it. Our development group here at Talis has adopted the SCRUM process across all of our current projects with what I feel has been a great deal of success.

For me personally the transition from traditional waterfall approaches to agile methodologies has been a revelation in many ways. Before joining Talis I’d spent a number of years developing software based on traditional waterfall methodologies. What was frustrating with these traditional approaches was that you’d spend months capturing and documenting requirements, you’d then spend a while analysing these requirements and then designing your software product, before implementing it and then testing it. Any changes to the requirements invariably meant going through a process of change impact analysis and then going through the whole process again (for the changed requirements), which naturally increases the cost to the customer.

A side effect of which, from the perspective of the customer, was that changing requirements during the project was a bad idea, because of the extra costs it would incur. A consequence of this is that customers would often take delivery of systems which after a couple of years of development, don’t actually satisfy the requirements that they now have. These same customers would then have to take out a maintenance contract with the vendor to get the systems updated to satisfy their new requirements.

From a developers point of view, I often found this to be very demoralising, you knew you you were building something the customer didn’t really want, but the software house you work for wants to do that because they have a signed off requirements document and contract that guarantee’s them more money if the customer changes their mind. I often found that when we reached the end of a project, the delivery of that software to the customer was a very and nervous and stressful time. The customer at this point has not necessarily had any visibility of the product so there’s usually a couple of months when your organisation is trying to get them to accept the product – which invariably led to arguments over the interpretation of requirements – and sometimes scary looking meetings between lawyers from both sides.

There was always something very wrong with it.

Since joining Talis, and transitioning to agile methodologies I can finally see why it was so wrong, and why agile, and in this case SCRUM, work so well.

For one thing, I’m not nervous about the end of sprint demonstrations. 🙂 The customers have been involved all along, they’ve been using the system, constantly providing feedback, constantly letting us know what were doing well, and what we need to improve on.

Our sprints have been four weeks long, which means at the beginning of the sprint we agree which stories we are going to implement based on what the customers have asked us for, these can be new stories that have been identified, or stories from the backlog. The customers have an idea, from previous sprints, what our velocity is – in other words they, and we, know how much work we can get done in a sprint so when we pick the stories for the sprint we ensure we don’t exceed that limit. This keeps things realistic. Any story that doesn’t get scheduled in for the sprint because it was deemed less of a priority than the stories that are selected gets added to a backlog.

This iterative cycle is great! For one thing customer’s are encouraged to change their minds, to change their requirements, because they then have to prioritise whether that change is more important than the other items on the backlog. They are empowered to choose what means the most to them, and that’s what we give them ! The customer doesn’t feel like the enemy, but an integral part of the team, and for me that’s vital.

As a developer it feels great to know that your customers like your product … and why shouldn’t they, they’ve been involved every step of the way, they’ve been using it every step of the way.

I’ve only been here at Talis for ten months, and in that time I’ve had to constantly re-examine and re-evaluate not only what I think it means to be a good software developer but pretty much every facet of the process of building services and products for customers. For me it’s been an amazing journey of discovery and I’m pretty certain it’s going to continue to be for a very long time.

The really wonderful thing though is that in our development group I’m surrounded by a team of people who believe passionately that it’s the journey and how we deal with it that defines us, and not the destination. So we are constantly looking for ways to improve, that in itself can be inspiring.
So yeah … I feel good!

Our development group is always looking for talented developers who share our ethos and could fit into the culture we have here. If you’d like to be a part of this journey then get in touch with us. Some of us, including myself, will be at XTECH 2007 next month, so if your attending the conference come and have a chat with us.

Google Tech Talk : One Laptop Per Child

The aim of OLPC is to change how kids learn.

Ivan Krstic, Chief Security Architect at OLPC gives a technical talk on how the laptop was designed and how they are going about building it. He goes to great length to explain why they are doing this, the rationale behind the project, and why this influenced many of the technical decisions.

How do you build laptops for kids?

The Original XO-1 laptop has the following spec:

  • Geode GX-500 1.0W, 366Mhz,16kb L1, cache no L2
  • 128 MB RAM
  • 512 MB NAND Flash

The newer version has the following hardware spec:

  • AMD Geode LX-700 0.8W, 433Mhz, 128KB L1, 128KB L2.
  • 256 MB Ram
  • 1024 MB NAND flash

The laptop has no moving parts which helps keep the power usage down. It;s peak power consumption is 4-5W, the standard consumption is closer to 1-2W. Compare this to a normal conventional laptop which is around 40 – 50W. One of the things that stands our for me in this talk is that the OLPC team and doing what is probably the most aggressive work in Power Management using Linux anywhere in the world. In order to conserve more power they’re goal is to suspend the machine every 2 to 3 seconds if nothing on the screen is changing. They actually target they have set is to be able to suspend and resume the machine at the edge of human perception which is ~100ms. That’s incredible!

If you set aside the social aspects of this project and focus purely on the technical goals they’re attempting to achieve, the OLPC project could radically change the way laptops are built. It’s well worth watching the talk, there’s a number of other unique advancements the project has made, and I for one will be keeping a close eye on its development.

Yahoo! alpha (beta) Search – released

Looks like Yahoo! has taken a page from Google’s SearchMash experiment. I’ve been using SearchMash as my default homepage in firefox for a while now – because I can get an aggregated view of search results on a single page instead of having to navigate to different pages for different types of content.

Yahoo! ‘s new offering called “alpha” ( which is currently in beta 😉 ) neatly organises results from the Web, Flickr, YouTube, Wikipedia and Yahoo Answers, as well as other sponsored results. In fact at first glance it looks, well, almost identical to SearchMash actually. Yahoo! have stuck with a traditional paging control to page through search results, whereas SearchMash does away with the paging metaphor and instead gets more results which are added to the bottom of the page.

Yahoo! alpha integration with both YouTube and Flickr is very nice. Even though the layout of the two search engines is almost identical, I think Yahoo! makes better use of the screen, content doesn’t feel as cluttered as SearchMash can at times.

I like Yahoo! alpha. I love the fact that I can customise the layout and move the portlets around to my own liking … and I can share my layout with others. There’s no doubt in my mind that Yahoo! have taken a great idea that Google was experimenting with, and have improved upon it.

It will be interesting to see how Google respond to this? I’d hope it would be by releasing a long overdue update to SearchMash, to show all of us who have been providing feedback if and how they have taken that on board.

Yahoo Widgets 4.0 Released

Yahoo Widgets 4 is now available for download. The new version makes significant performance improvements over earlier releases. They have also finally provided a built in method of updating widgets, as well as discovering new ones – something I’ve been keenly looking forward to, since I had to implement my own update listener for a set of widgets I wrote last year.

Also new in this verison is the Widget Dock, which is very similar to the Google and Vista Dock bars, basically allowing you to manage and neatly organise widgets on the desktop. I also like the new Flickr widget which is bundled with version 4. The widget not only streams photos from Flickr directly to your desktop it also provides drag and drop upload capability so you put your photos onto Flickr with relative ease.

From a development point theyve made massive performance improvements with DOM traversal of XML and XPath seems substantially faster against large XML DOM’s – which is something I used to whinge about a lot. You can view a list of all the changes in the versions release notes.

All in all, its not bad!

Firefox Extensions/Add-Ons

A few people have asked me what FireFox add-ons I use, particularly to aid development work. Here’s a list of the FireFox extensions/Add-On’s I have installed – not all of them are development oriented but I find them all very useful.

  • Download Statusbar
    Allows you to view and manage downloads from a tidy statusbar, without that pesky download window getting in the way of your browsing
  • Fangs
    This extension creates a textual representation of a web page similar to how the page would be read by a modern screen reader. I find this useful for doing some cursory validation of accessibility.
  • Firebug
    Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.
  • FireFTP
    FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers. Along with transferring your files quickly and efficiently, FireFTP also includes more advanced features such as: directory comparison, syncing directories while navigating, SSL encryption, file hashing, and much more!
  • GreaseMonkey
    Allows you to customize the way a webpage displays using small bits of JavaScript. It’s also a cool way of adding functionality to web pages based on come criteria. To get an idea of what you can do with Greasemonkey have a loog at this little demonstration by one of my colleagues Richard Wallis who creates a greasemonkey script that uses our platform API’s to add a Libraries panel to amazon pages.
  • IE Tab
    This is an awesome add on. It basically embeds Internet Explorer into Mozilla/Firefox tabs. This is a great tool for web developers, since you can easily see how your webpage displayed in IE with just one click and then switch back to Firefox.
  • JSView
    All browsers include a “View Source” option, but none of them offer the ability to view the source code of external files. Most websites store their javascripts and style sheets in external files and then link to them within a web page’s source code. Previously if you wanted to view the source code of an external javascript/css you would have to manually look through the source code to find the url and then type that into your browser. With this nifty little plugin you can download/view all the externally referenced resources.
  • Live HTTP Headers
    This allows you to view the Http headers of a page while browsing. Comes in very useful when you want to check or validate the response headers that your application is sending out.
  • Quick Locale Switcher
    Allows you to quickly change and apply a different locale from the tools menu. Its very useful if your doing anything with multi lingual support.
  • RDF Viewer
    We’re doing a lot of work building applications that use RDF. This tool can be quite useful when inspecting RDF Documents.
  • View Formatted Source
    When you use the normal view page source option in firefox, it will render the source exactly how the server outputted it. The problem with this is often contain snippets of code generated by different components and the source is actually very difficult to read through. This little add-on formats the source and provides syntax highlighting and some neat code folding as well as optional CSS support.
  • Web Developer
    A Must-have add-on, allows you to perform standards based validation on pages, tinker with browser setting, the list if far too long to mention. If your doing any form of web development this should be a requisite!
  • XPather
    Quite a feature rich XPath generator, editor, inspector and extractor. I sometimes struggle with figuring out the xpath to a particular element or node in a file, this makes it very easy! It has a few quirks though.
  • Yellow Pipe Lynx Viewer
    RightLynx displays a Lynx view of a web page via right-click or Tool menu. With just one click and without leaving the page (RightLynx opens in a new, small window), preview the page you are on with a Lynx Viewer. You can see what what a page will look like when viewed with Lynx, a text-mode web browser. It is also presumably, how search engines see your site. In addition, it can help determine if web pages are accessible to the vision impaired.