July Meeting: Back to TDD with a Lean Code Challenge

Details 

Pineapple Bike by gipukan

Date: Monday 25th July

Time: 7:15pm start to a 9:15pm (doors open at 6:30pm and close late).

Location: http://www.pieandale.com

Theme: Back to TDD (with a Lean Code Challenge)

Back To TDD

Following the session on the Software Craftsmanship 2011 conference, and then a great session with two speakers, it makes sense to get back to some programming, and use some of the examples picked up at the software craftsmanship conference.

Test Driven Development enthusiast and Agile Staffs member, Paul Williams, has volunteered to run a session from Software Craftsmanship originally created by Chris Parsons. It involves the building of a small shop checkout application for a fruit seller that has to expand quickly to meet customer demand. The increasing complexity and high pressure features that will need to be added mean that test driven, clean code should help you out – no-one says you have to test drive and refactor though, the only requirement is to produce the features in time. As this is in a TDD session, and being run at Agile Staffs, it might be a clue which approach should yield the most successful project outcome, but we just don’t know.

As ever, there will be some developers experienced in test driven development around, and there will be lots of pairing going on, so don’t worry if you are unsure about TDD,  just ask.

Requirements

You’ll need your favourite development environment and the ability to write, run and unit test code. The “acceptance tests” of each stage involve typing in the fruit purchased to compare the expected price. Your application should have the ability to accept this input from STDIN, command line or a web interface. Other than that, you can use any language you like. We’ll have limited internet connectivity so please download anything you think you may need in advance. Again, for those PHP and JS types amongst us I’ll bring the licence code for PHPStorm so if you want to download and install the latest version in advance you can just register it at the meeting.

Lightning Talks

I’ve not had any volunteers for a lightning talk yet although this doesn’t mean we won’t have any. If you have any topic you’d like to share with the group then you can have a 10 minute slot at the beginning of the meeting. Either let me know via twitter, the email group or in the bar before we start.

 

June Meeting: Flow and F1 In Paediatric Intensive Care

Intensive Air Flow © Paul Shannon 2010

Details

Date: Thursday 30th June

Time: 7:15pm start to a 9:15pm (doors open at 6:30pm and close after last orders).

Location: http://www.pieandale.com

Theme: Flow and F1 In Paediatric Intensive Care

Guest Speakers

For the first time in a few months we have not one but two guest speakers (rather than members’ contributions). Our guests are both internationally renowned speakers and doctors of their respective professions.

Flow – Dr. Kevin Rutherford

Kevin’s experience in the software development industry and wealth of knowledge on the subject of Agile and related topics makes him the finest Agile Coach for miles around. He will be demonstrating the theory of constraints and the benefits of concentrating on batch sizes using a simple dice game. This great way of illustrating how agile methods can improve the flow of your value stream and make your work life easier and simpler is not one to miss. I’d recommend that everyone at your organisation should attend this talk as it has relevance in all areas of business, and is a great way to convince senior management that agile methods can work in your organisation.

F1 In Paediatric Intensive Care – Dr. Harriet Shannon

In 2005 Harriet took up a post as research physiotherapist at the UCL Institute of Child Health to investigate respiratory physiotherapy techniques in intensive care at Great Ormond Street Hospital for Children.  Harriet’s PhD work focussed on the safety and efficacy of on-call physiotherapy treatments in intensive care and she is now a primary tutor for the MSc Course in Advanced Physiotherapy at UCL.

Harriet’s talk, “F1 In Paediatric Intensive Care: Reducing Bottlenecks in Time Critical Environments”, comes from a partnership created at Great Ormond Street Hospital for Children between the intensive care teams and the pit crews of Formula One teams. Both environments require precision in preparation and planning with constant analysis of process speed and obstacles. The talk should give you a good insight into the observations and changes made in these time critical arenas, where a slow reaction could be a matter of life or death (and winning or losing).

Agile North

Following a successful presentation by Agile Staffs regulars Paul Shannon and Neil Kidd they managed to shamelessly plug the June meeting so it seems appropriate to point out the information for New Members to show any “North” converts everything they need to know to come and join in the Staffordshire Agile fun.

May Meeting: Software Craftsmanship

Bombe at Bletchley Park © Bletchley Park

Details

Date: Tuesday 31st May 2011.

Time: 7:15pm start to a 9:15pm (doors open at 6:30pm and close with the pub).

Location: http://www.pieandale.com

Theme: Software Craftsmanship Round-up

Software Craftsmanship

The analogy of software development as a medieval style craft will romanticise our profession but it also provides a keen set of principles that will ensure software produced today will be used and evolved well into the future. The movement has been popularised by the likes of Uncle Bob Martin, Corey Haines, and, particularly in the UK, Jason Gorman. It is Jason Gorman that organises the Software Craftsmanship conference at Bletchley Park which is the main European conference on software craftsmanship. The attendance is limited to around 120 participants and demand always outstrips supply. This year though Agile Staffordshire will be represented by 8 members –  4 of which also attended last year.

A call to action by Jason Gorman at the end of last year’s conference urged us all to go out and spread the word about high quality, well tested, communicative code in well designed and usable software. This, coupled with the upcoming conference and the release of Uncle Bob’s follow up to Clean Code: The Clean Coder: A Code of Conduct for Professional Programmers, means now is no better time to talk about software craftsmanship.

The Meeting

Software Craftsmanship 2011 is on Thursday 26th May and the plan for the Agile Staffordshire meeting the following week is to bring as much content and discussion as possible back up the M1 and across the A50 (and down the A34). This does mean that those involved will have to come up with something over the weekend so we don’t know yet what will be discussed. The programme for the day is available on the SC2011 web site so please take a look and let the group know what you’d like to know more about – some people already have which is great.

The format of SC2011 sessions are a mixture of programming, discussion and talks so we’ll probably have a mixture of topics at the meeting – bring a laptop as we’ll no doubt be writing some well crafted software.

I’ll not be organising this meeting from the end of this week as I’ll be on holiday. My able assistants Neil Kidd, Shaun Finglas and Paul Barrett are all on hand via the mailing list for any queries or suggestions.

April Meeting: Test Driven Development

Details

Date: Tues 26th April 2011

Time: 7:15pm start to a 9:15pm (doors open at 6:30pm and close when the till’s full)

Location: http://www.pieandale.com

Theme: Test Driven Development

Talk

A short talk from Shaun Finglas about his experiences in developing a version of Pong using test driven development, object oriented design principles, CRC and dependency injection. He’ll show us the production and test code, and explain design decisions he’s made. Hopefully this will illustrate how Agile software development techniques can improve games development by reducing close coupling, driving a better API and promoting the correct level of abstraction.

Exercise

We’ll try and get 90 minutes for the programming part of the meeting so that we can try a kata with a few more issues to solve. Having discussed the best kata to use for this session with a few people we’ve selected “Back to the Checkout” from Dave Thomas:  

http://codekata.pragprog.com/2007/01/kata_nine_back_.html

This involves producing a supermarket checkout application that takes a number of price reduction offers. The exercise starts with a simple “scan” method that is called again and again when the checkout operative passes a product over the bar code scanner. The way the bill is produced is open ended, but the system needs take into account offers like “buy one get on free”, “buy two get on free” etc which are represented in the post as lists of SKUs (stock keeping units).

We’ve chosen this kata because the final solution has some interesting problems to solve regarding the coupling of the classes produced. As we’re still introducing TDD to some people I believe this will illustrate that test driving code can produce a better API with better separation of behaviour in addition to providing the benefits of security, communication and confidence to change that we have already seen.

March Meeting: Session Outcomes

March’s meeting themes were Designing an Agile University Course followed by a test driven development exercise.

Agile University Courses

Trevor Adams, from the Staffordshire University, presented the group with a short talk on the challenges of teaching agile based project planning and software development techniques. He covered the motivations for including content relevant to agile development and the problems faced when trying to incorporate this content in a course that has multiple aims. The conflicting forces that drive the content for university courses are:

  • Attracting students – this is why games specific courses have been more prevalent recently and Trevor pointed out that a course purely based on Agile development would be quite a niche choice and may not appeal to the mass of students
  • Industry – while companies such as Agile Staffs regulars iWeb and Codeweavers can see the benefit of agile development there are plenty of employers that require different skill sets. Trevor noted that concentrating on one particular area could disadvantage students as their skill sets would be less marketable on graduation.
  • Assessment – a university needs to ensure that students are learning new skills and that those that achieve a better understanding are compensated with an appropriate grading structure. Agile development requires a great deal of collaboration with things like pair programming and stand up meetings, so individual assessment can prove tricky. This, in particular, was the aspect that Trevor wished to explore more thoroughly and was the focus of a group work session he organised.

Facilitated by some well prepared worksheets we ended Trevor’s session with group work around the actual planning of a university module. We are invited to design the module through aspects of topic, format and assessment. Having to actually consider this in depth raised some important questions, some of which the people from industry hadn’t thought about. Deciding on an effective assessment technique was the most difficult part of the exercise.

The more favoured topic for each group’s course was TDD with some element of pair programming. This is thematic with the current trend in topics at Agile Staffordshire and seems important to members in terms of continuing the spread of TDD and learning techniques too.

Trevor said that while he saw it as important for the rest of us to see the challenges he faces as a course leader when designing modules with agile content he also wanted to take ideas away from the session. He promised to attempt some of the modules we’d planned and would present feedback at a later session. We look forward to hearing tales his triumph and stories of the new challenges he has faced.

iWeb also posted about this part of the session on their blog: http://www.iweb.co.uk/blog/2011/03/iweb-work-with-staffs-university-to-design-course/

Test Driven Development Exercise

As this was the first classic TDD exercise the group had attempted we started with a video from Corey Haines. Recorded at the Orlando Ruby User’s Group in 2009 this performance kata is designed to last around 15 minutes and be performed over and over again. This notion of deliberate practise is taken from martial arts but is also analogous with how musicians practise using scales. By repeating the same steps over time you can adapt and refine your technique within a simple isolated problem. You can experiment more than with production code as the kata code is discarded at the end of the process so you are free to make mistakes. It also affords the opportunity to try different design decisions.

While the Corey performed the kata in Ruby we were left to choose any language we wished. I saw PHP, C# and JavaScript being attempted and everyone made quite good progress with the problem. One set of pairs were using two laptops to view one set of code being developed, so that they could see how TDD helped the code to evolve. The PHP camp had some problems with the first, basic tests as the typing style of the language meant that the “null” and empty string of the C# most of us were used to couldn’t be used as a default. This mean we could not force the next change by coming up with a test – eventually we opted for the quickest route to green and returned an unexpected string rather than null- this meant the test went red so we could solve the problem, refactor, and get on with the next test.

We were reminded that the test driven cycle is Red – Green – Refactor and I was attempting to walk about enforcing this like the TDD police. Most people took on this pattern well though and I think everyone saw great benefit in how TDD was helping them develop this simple code.

Slides and Additional Content

As always, I prepared a few slides for this session which this time included some additional content. If we’d had time I would have covered some of the outcomes of a similar session I attended at XP Day last year. The motive for that session was to design a whole agile course, including a fourth year for MSc. I summarised the topics discussed for the 1st, 2nd and 3rd years, and those for the MSc extension. There is more information on the XP Day page.

Here are the slides: https://docs.google.com/present/view?id=dg7kxgdk_156c5bgg6hq

March Meeting: TDD Exercise and Designing A University Course on Agile

Details

Date: Monday 28th March

Time: 7:00pm start to a 9:00pm (although doors open at 6:30pm and close when the beer’s gone)

Location: http://www.pieandale.com

Theme: TDD Exercise and Designing A University Course on Agile

Test Driven Development Exercise

Following feedback in the last meeting’s retrospective it was noticed that TDD is a central part of adopting a set of agile practices. Continuous integration, refactoring and high standards of code quality are all achieved more effectively with a suite of unit tests, and code that has been written test first. While some of these practices can be adopted without TDD it is a useful tool for anyone attempting to try a more agile approach to software development.

We’ll be undertaking a short exercise where we test drive a String Templater class based on a similar exercise performed as a prepared kata by Software Craftsmanship Journeyman, Corey Haines. Participants will need a laptop and the ability to write and compile/interpret/run code. This exercise will be language agnostic so you can choose the language you use every day, something you’re experimenting with or something completely new – the only thing you will need is a unit testing framework. A good list of xUnit based TDD frameworks can be found on http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks

I use NUnit for C# which is very similar to JUnit for Java. PHPUnit is another similar framework but SimpleTest for PHP is also adequate. Ruby and Python are popular options but for ease of use you could use JSUnit or QUnit for JavaScript and just use a browser to run your tests. There are even TDD frameworks for database languages, functional languages and XSL.

We’re planning to take TDD from the beginning so please come along if you would like to learn some basic TDD. Also if you have experience and would like to help others to learn then come along too.

Designing A University Course on Agile

Trevor Adams, long time group member and university lecturer at Staffordshire University, will be preparing a discussion to focus on items that people working in software development think that universities could teach while also providing ideas for how this could be achieved. Hopefully this will explore the topic that has been a talking point at most meetings so far as the guys from the university are keen to get relevant agile content into their modules while local companies want graduates with agile experience. If you have ideas, experience or opinions then please drop in.

Retrospectives

At the February meeting we ended proceedings in a truly Agile manner by inspecting and adapting the way that the group and meetings were conducted through a Retrospective.

For those who found this useful and want to take this away and try it elsewhere then here is the format we used:

  • Give everyone some sticky notes, a pen and 5 minutes to consider the following two questions:
    • What have we done well?
    • What can we improve?
  • Invite everyone to write down as many points as they want, one per sticky note, that answer one of the two questions.
  • Place the two questions (or a 🙂 and 🙁 will suffice) as headings on a whiteboard, a wall, a chart, a table – anywhere that is visible and accessible
  • Invite everyone to stick their notes under the relevant heading.
  • Once everyone has had a fair chance (5 minutes) to stick their notes and think of any additional points then get everyone to sit down ready for the next step.
  • Group any related notes together to avoid duplication.
  • Invite everyone to take a pen and place a mark, dot, circle, tally or cross against the points they wish to talk about:
    • Each person gets 3 votes
    • They can vote for any of the notes, including their own
    • They can place their 3 votes on any note, with all 3 on one if they wish
    • Allow around 5 minutes for this activity
  • Once everyone has voted you should see an order to the points that people want to talk about – take the top 3 notes as the topics that will be discussed.
  • Spend the remainder of your timebox (we used 30mins but at Codeweavers we generally use 1 hours) discussing the 3 top points.
  • Appoint a chairperson to control the flow of conversation and to ensure everyone gets a fair chance to speak
  • Appoint a time keeper who ensure that the 15 minute timeboxes for each point are kept to – this isn’t strict but ensure the timebox is not abused.
  • Try to summarise discussion into actionable points – two or three per point should allow you to complete these actions before the next retrospective. Some things don’t have actions, just the discussion is enough.
  • When the timebox is up, the discussion comes to a close and no further points are discussed – if a point was not discussed this time, and it reoccurs for next time, it is likely that it will get discussed. Only points that the whole group deem important will be discussed so no one person will get to dictate the course of improvement.

Variations

  • If you find that you don’t have time for 3 points, try just 2, or try extended your timebox.
  • If you find you are not covering enough items then try taking the top 5 – be aware though, that your goal is to raise actionable points from the issues raised, so ensure you only cover what is likely to be actionable before the next meeting.
  • Don’t make the timebox too long as people lose concentration and other stakeholders think you are wasting time in meetings. Keeping the discussion focussed and producing action points mean that other stakeholders (managers etc) can see the results of the meeting, and if you follow up on the action points, they can see the improvements being made.
  • Give it a go, if it doesn’t work, have a retrospective retrospective – what went wrong, what can you improve, what went well? Change the format, ask on the google group for suggestions.

Welcome to the New Agile Staffordshire Web Site

Hello,

I’ve installed WordPress so that we can use it to record meetings and blog about any additional topics or resources. After a rocky start with some hosting issues it appears to be working well now. You should notice the Google Group information in the side bar and hopefully some posts should appear here soon.

Let Paul Shannon know via the Google Group if would like an account.

For group information check out the google group http://groups.google.com/group/agilestaffordshire/


Tag Cloud