Agile Lego Game 3

Posted by Conrad Benham on November 19, 2008

Lego Jenny  Lego Conrad

When was the last time you played with Lego? How about Lego and Agile together? This could be your chance… In our next Agile session Jenny Wong and I will lead a session whose goal is to give a hands on introduction to iterative Agile development with…Lego! This will give participants hands on experience to Estimation, Signup, Development, Showcasing and Retrospectives.

Delivering business value, welcoming requirements change, frequently delivering working software and continual self-assesment are some of the Agile Principles as described in the Agile Manifesto. Jenny and I will demonstrate how these guiding principles can be achieved using Lego as a metaphor for programming languages to build a simple project Agile style. Lego, which has a low associated learning cost, is an ideal tool for us to use to give a hands on demonstration that focuses on learning the above listed concepts.

It doesn’t matter if you are a Developer, BA, IM or PM you will be able to participate. The aim is to give participants exposure to each of the stages listed above, something people don’t ordinarily gain day-to-day in their projects. In Agile projects it is important that team members understand what others do and how they, as an individual interact, with other individuals to achieve the common Agile Manifesto Principles.

The mini-Jenny and mini-Conrad were created using Chris Doyle’s super awesome Lego character creator: Mini-Mizer

When: 7:30pm, Tuesday 25th of November 2008
Where: ThoughtWorks Hong Kong Office
Address: Room 1304, 13/F, Tai Tung Building, 8 Fleming Road, Wanchai
Map: ThoughtWorks Hong Kong
Contact

Open Everything Hong Kong

Posted by Conrad Benham on November 18, 2008

Open Everything Hong Kong 2008Let’s get together and share at the first Open Everything Hong Kong 2008!

Open Everything is a gathering of people interested in sharing their ideas on topics they are passionate about. Unlike other events, Open Everything does not focus solely on technology. Indeed technology may comprise part of the event, however the aim of Open Everything is for people to share ideas on things that matter to them – whatever that may be. Openness is the goal, collaboration is the approach. As it’s name suggests, Open Everything is open to all – the more diverse the group of attendees the greater opportunity for people to open up and share their ideas.

Registration for Open Everything Hong Kong is between 9am and 10am on Saturday the 6th of December. The event itself commences at 10am sharp. The first presentation will be given by a guest speaker after which the floor is open for participants to get in and contribute.

Open Everything Hong Kong 2008 is the first of three Open Everything sister events for the day. Upon close, Open Everything Hong Kong will hand over via video link to sister event Open Everything Berlin which, in turn, will hand over to the third and final sister event, Open Everything Madison, Wisconsin in the US.

For more information including timetable, venue and other logistical information please refer to the Open Everything Hong Kong 2008 website. Please ensure you register so the organiser has an idea of numbers and so they can contact you in case something changes.

Competition Jam 2

Posted by Conrad Benham on November 14, 2008

It’s going to be fun, collaborative, educational and competitively friendly…

I’m inviting all Agile Hong Kong developers to enter in what is designed to be a friendly competition whose aim is to give people the chance to show off their Agile Software development and Extreme Programming skills. You’ll be given around a month to complete the sample programming exercise. At the end of the competition time, the winners will be announced and we’ll look at some of the solutions to see how the problem was solved.

So, what’s the problem?

Your client owns a wine bar and is looking to replace her existing cash register with a point of sales system. Her vision for the system is that it will keep track of inventory, money collected throughout trading hours and generate reports. Her motivation is driven by demand as she is about to expand her business. She is looking to prepare the business in time for its expansion.

Your client wants an initial software release in one months time, followed by a second release a month after that, to coincide with the expansion. At the end of the first release there will only be a single sales system. With the expansion, however the bar will have a total of three bar areas, each bar having two point of sales systems.

In scope for the first release will be the inventory tracking and order taking components of the system.

  • Before the initial order is taken, the bar staff open an account for the customer, identified by table number.
  • When entering a drinks order, the staff select the table, choose the drink and the quantity. The quantity of drinks for that item, within the system, is deducted accordingly.
  • When a staff member orders a drink that will deplete stock, they will be informed, including the current level of stocks remaining.
  • When a staff member places an order that will reduce stock levels below zero, the order is immediately rejected. The staff member is informed with a message saying how much stock is remaining.
  • A customer may make as many orders as they wish.
  • When the customer wants the bill, a staff member will enter the table number and print it out for them.
  • When the customer pays, a staff member will enter the amount of money received and deduct that from the account. The account for that table will then be closed. The amount of change owed to the customer will be displayed. No receipt is issued.
  • If the amount entered is insufficient, the staff member will be notified and the account will remain open.
  • In order to make way for other functionality, your client is happy to initialise the system with current stock levels when it starts up. She is looking for guidance from the developers as to the best way of doing this but expects to be able to specify the name of a drink, the number of units in stock, and its price.
  • When a staff member enters an order for a table that does not currently have an open account, the staff member should be notified with an error message telling them so.

What’s the prize?

Thanks to our sponsor JetBrains, there are two prizes up for grabs. The two winners will receive one license to one of the following JetBrains products:

Timelines

  • The competition opens…now…
  • The final submission date will be Tuesday 9th of December 2008
  • The prize night will be Thursday the 11th of December 2008

How to enter?

  • Entry is open to all interested people, though I would prefer entries from those that can attend the competition prize night. If you can’t make it or are unsure if you can, please enter anyway, this is a friendly competition, you can still win.
  • Register your interest to enter by emailing me directly at contact.jpg. This will give me the opportunity to get in touch with you to inform you of updates.
  • If something is unclear please let me know so I can clarify for you.
  • Make sure you submit your solution by the due date.

What should you submit?

Submissions will be via email. Once you have completed your solution please email a ZIP file to me on the address: contact.jpg

I can’t tell you exactly what I’m after in the solution…I don’t want to hinder your creative thoughts, so the following list is to be considered as a set of hints and guidelines and is definitely incomplete:

  • Neat, well factored code.
  • Evidence of eXtreme Programming.
  • Code and any supporting artifacts. I don’t need compiled binaries.
  • An automated build will be desirable.
  • Any stories you came up with.
  • Anything that shows how you applied Agile techniques, e.g. Stories.

The rules!

As much as I don’t like to impose them they are necessary. Sorry! I’ll keep them clean and clear.

  1. Have fun!
  2. I’ll be judging the submissions and won’t have time to argue about the solution once it’s submitted. If you think there is a flaw in the problem or something doesn’t make sense please contact me and I’ll distribute any updates to all entrants (so please be sure you email me to register your intent to compete).
  3. You may submit a solution to the problem in the language of your choice, just remember, though that different languages have different levels of support for Agile and XP. You may use any technologies you see appropriate to solve the problem. Sometimes though, less is more.
  4. You may work in pairs and collaborate with others, however, if you win you will still only receive a single prize for the submission.
  5. You may make multiple submissions but only stand to win once.
  6. Ideally you will attend the prize night (11th of December 2008) if you enter the competition. You can still win if you don’t attend, but I’d prefer it if you could be there so we can discuss your solution with you.
  7. The solution remains yours. I may however, ask for your permission to post your solution on the Agile Hong Kong website – but you’ll be under no obligation to do so.
  8.  You must submit your solution by the due date.
  9. I want to encourage as many people as are interested in participating. Solutions that are publicly demonstrated will only be constructively critiqued.
  10. I don’t want to see copied or duplicated solutions. So please, don’t do this.
  11. The judge (that’s me) is not eligible to compete. However, I will solve the problem to offer my own insights into the solution.

Good luck and have fun!!!

Steve Freeman on People and Teams

Posted by Conrad Benham on November 09, 2008

On recent travels through Asia, Steve Freeman stopped by and shared his thoughts and experiences with self organising teams and people. In his presentation Steve introduced a number of concepts, drawing on the Agile Manifesto and also had the group engage in some practical exercises related to teamwork.

Steve Freeman

Steve introduced a number of people in his discussion, quoting from Deming, Cockburn and Snowden. When making decisions that affect a team it is important to be inclusive. Deming was quoted as saying that the people closest to the work should make the decision. In doing so you will have a team that is more likely to adopt the new direction. Cockburn adds that a project needs just enough process and detail, too much of these and the project will suffer. According to Snowden then, it’s important to pay attention to the feedback loop to understand whether the corrective measures taken by a team are working and where they can be further refined. Steve spoke of the concept of Forming, Storming, Norming and Performing first introduced in a short article in 1965 by Bruce Tuckman entitled Developmental sequence in small groups’ (PDF).

Steve introduced Ralph Stacey’s Agreement & Certainty Matrix. This is a model used to help determine the actions that should be taken in a complex environment using two criteria: degree of certainty against level of agreement. This matrix has a number of applications. It can be used to determine the balance between leadership and management, helping make decisions by aiding in their understanding and to communicate and justify a certain direction. Related is the Cynefin framework developed by Snowden and colleagues while working at IBM’s Institute of Knowledge Management. Like Stacey’s model, this framework is also used to help people make decisions based on complex data. In this context, Steve asked attendees to talk in pairs about a recent project they’ve worked on where there were difficulties, paying particular attention to the politics and religion that was at play on that project. He then asked each pair to identify where they fit within the two models mentioned.

For those interested, a summary of Steve’s presentation has been compiled by Steven Mak on InfoQ China. This summary is in simplified Chinese.

Agile Software, People, and Teams. 1

Posted by Conrad Benham on October 20, 2008

One of the principles in the Agile Manifesto is “People over Process”, because a culture where teams can take initiatives to succeed is more productive than one which is mainly concerned with protected teams from failure. The promise of self-Organising Teams is that they’re effective because because the people who are closest to the work know best what to do and are most motivated to do a good job. No-one, however, promised that this is easy. Just telling an inexperienced team to Self-Organise is no guarantee of success.

In this talk, Steve will discuss his experiences with Self-Organising teams, and present some of the leading-edge results from Social Complexity science that will help you understand the dynamics of your team and how it can work together.

Steve Freeman is a pioneer of Agile software development in the UK, where he writes software and coaches teams in a variety of industries. Steve has trained and consulted for teams in Europe, America, and Asia, and co-authored the JMock library. Previously, he has worked in software houses, consultancies, and research labs, earned a PhD from the University of Cambridge, and written shrink-wrap software. Steve has also taught at University College London. He is a presenter and organiser at the major international industry conferences, and was  conference chair for the first London XpDay. Steve was also winner of the Agile Alliance Gordon Pask award 2006.

http://www.m3p.co.uk/blog

(Thank you to Steve for preparing the above abstract).

When: 7:30pm, Wednesday 29th of October 2008
Where: ThoughtWorks Hong Kong Office
Address: Room 1304, 13/F, Tai Tung Building, 8 Fleming Road, Wanchai
Map: ThoughtWorks Hong Kong
Contact

New sponsor: JetBrains

Posted by Conrad Benham on October 19, 2008

 

JetBrains

 IntelliJIdea        Resharper

I’m very excited to announce JetBrains as a new sponsor of Agile Hong Kong. JetBrains are best known for their excellent commercial IDE products IntelliJ IDEA for Java and ReSharper for C#. They are also known for TeamCity, their Continuous Integration server and for dotTrace, a memory and performance profiler for .NET.

Both IntelliJ IDEA and ReSharper have built in support for some XP practices such as automated refactorings, test driven development and automated build scripts. They are also responsible for building other quality products which you can read about here.

JetBrains have generously offered support by including Agile Hong Kong in the JetBrains User Group Giveaway program. Included in this giveaway program are licenses for the following products:

  • IntelliJ IDEA Personal
  • ReSharper Personal
  • TeamCity Build Agent
  • dotTrace Personal

I would like to thank JetBrains for supporting Agile Hong Kong. Expect to see giveaways of licenses for these products at code jams and as a thank you to speakers.

Testing with mocks and stubs

Posted by Conrad Benham on October 14, 2008

On Thursday we took a further look at automated testing. A couple of months ago we had a Code Jam focused on Continuous Integration, in that session we looked at automating the build as a whole, including running tests. In our last Code Jam, we paid greater attention to testing and automating those parts of a system that rely on external or difficult to configure components.

In the session we looked at the differences between state based testing and interaction based testing including the pro’s and con’s of the two approaches. We identified why mock based testing makes unit testing easier and discussed the layering that tends to occur when using mock based approaches. Shen Tham drew an excellent comparison between stubs and mocks, briefly discussing the concept of Inversion of Control (IOC) and how it applies to mocking (this is something we’ll look at more closely in a future Code Jam). Aaron Farr also showed us how he uses mocks when testing the Model View Presenter pattern.

A reasonably simple example was used to demonstrate the use of Mockito. The example is a simple but incomplete graphing application that shows how data retrieved from a feed can be provided to something that can render it. The intent is to show how the various components can be split from each other in such a way that they an be unit tested separately from any live system that needs to be configured. If you take a look at the code you will see that the data used in the graph can be sourced from any appropriate system such as databases, file systems, FTP and HTTP. Likewise, it should be easy to see that the data can easily be displayed in a variety of ways. It can be written to a stream (as per the example code), written to file, sent to a browser via HTTP, published to an FTP server as a file, the options are open. It should be obvious that the feed and display are independent provided the common application interfaces are adhered to. While the mocking and stubbing techniques don’t enforce this, they certainly make help make it easier.

We looked specifically at the following Open Source Java mocking frameworks:

For other languages you might want to have a look at the following tools:

For further reading on Mocking I suggest the following:

In closing it is important to understand that an emphasis has been placed on testing at the unit level using mocks and stubs. There are many reasons for doing this. One must remember that unit testing alone is not sufficient to ensure complete and reliable integration with 3rd party systems. For this we must still write automated integration tests.  However, these tests can be isolated in such a way that they are only executed by the continuous integration environment if they take too long to execute on a developer machine. Unit tests written with mocks and stubs are therefore not a replacement for integration or functional tests.

Many thank to Kalun Wong for his summary of the evening’s activities.

Code Jam: Automated Unit tests with Mocks and Stubs 1

Posted by Conrad Benham on October 02, 2008

According to Wikipedia “…unit testing is a method of testing that verifies the individual units of source code are working properly. A unit is the smallest testable part of an application.” Doing this can be difficult when we are unit testing code on boundaries. A naive attempt to unit test a system boundary such as a database would actually mean communicating with a live database directly. This means the database must exist, all tables created and all data must be in a known state prior to the test commencing. Once the test is complete (with a success or failure) the database must then be returned to it’s original known good state. Not only is building the infrastructure required to do this potentially time consuming, so too is the actual execution of such a test. Further, such testing is really no longer a unit test but an integration test, it certainly defeats the goals as stated in the above mentioned extract.

Enter mocks and stubs. In this Code Jam we’ll look at some techniques we can apply to reduce our reliance on external systems. This will be through the application of mocks and stubs. We’ll identify the differences between the two approaches and when one should be used over the other. We’ll also look at a variety of open source mocking frameworks. If time permits we’ll also look at how mocking helps layer an application to aid in low coupling and high cohesion (Vidor Hokstad has written a nice blog entry on this).

So, come along and learn some of the concepts of mocking. While this code jam is aimed at developers anyone who is interested should come along. While it is not necessary, as we tend to pair in these sessions, it would be helpful if you could bring a laptop along if you have access to one. If you don’t have a laptop don’t let that stop you from coming along.

When: 7:30pm, Thursday 9th of October 2008
Where: ThoughtWorks Hong Kong Office
Address: Room 1304, 13/F, Tai Tung Building, 8 Fleming Road, Wanchai
Map: ThoughtWorks Hong Kong
Contact

And the winner is… 1

Posted by Conrad Benham on October 02, 2008

…it’s a draw. We were very fortunate to have regular Agile Hong Kong participant Jonathan Buford give a very interesting presentation in which he discussed his experiences as a Toy Engineer. He covered the major aspects of toy development and how they relate to software development. On display were some of the toys he has worked on as a consultant, including one he is busy preparing for the end of year sales cycle. Jonathan also introduced us to an innovative project management tool he is working on with his business partner.

Toys vs Software: Fight

Software development and toy development share a number of similarities.  In both, an initial idea must be decided upon: the concept. Once chosen, a prototype is then built to validate the functionality of the toy. This is similar to a spike, particularly given a prototype instance of a toy will never reach the stores. Sometimes a toy will even be modeled in Computer Aided Design (CAD) software. These models are used to verify the operation of a toy, particularly one that has moving parts that interact with other parts to create a complex mechanical system. The CAD model is used to help fail fast in the case the product won’t work.

A major differentiation between product development and software development is that the business can be tempted to use a software spike in the case it is successful, where a toy prototype cannot be used as it is a single item that requires the engineering of a new item before there is something of salable value. Once a design is proven, the tooling must then be created to actually build the product. Something that can take a considerable amount of lead time, 60 days is not unusual.

Toy development differs vastly when it comes to automated testing phase. The scope for automated testing is less than for software development. In software development it is possible to automate the tests for many parts of the system. However, according to Jonathan, while it is possible to automate the tests for a toy it is not so simple. Jonathon did introduce the concept of stress testing in which a toy is placed in a machine that shakes the toy. This automated test is designed to verify the strength of a product. While other tests can be developed they need to be made on a case by case basis.

Thanks go to Jonathon for giving an interesting and insightful presentation on the processes involved with toy product development.

Toys vs. Software, Fight! 3

Posted by Conrad Benham on September 08, 2008

In our next session, Jonathan Buford, a regular at Agile Hong Kong, will lead a discussion of how the development of products differs from software development.

How does a toy get made?

  • Just as in software, there is a development process that takes a product from Concept to Production.
  • What is the process like, and what are the typical high points and pitfalls?

Points of view, to make a good toy one must think like a child.

  • In software development, there is currently a lot of emphasis on Domain Specific Language and with the Agile practices of partnering up with the customer.
  • When there are three customers to please (retailer, parent, and child) and one of them is any nine year old kid, what can you do?

How does product development compare to software development?

  • Take a look at how the physical limits of making a product make for different challenges for project management.
  • How would methods like Scrum and Agile iterations play out in the development of a consumer product?
  • How do rapid prototyping and other technological developments make product development more Agile?
  • What lessons in product development cross over to software development?
  • Critical-chain management and how it relates to software development.

The development process of Sampi Plan:

  • The experience of creating a new organizational system (Agile development, but also an Agile system).

Trying to combine software development methods with product development needs.

Jonathan Buford is a professional jack of all trades. He attended Carnegie Mellon University where he studied Mechanical Engineering along with working on research in Biomedical, Robotics, and Cross-disciplinary Teams. Afterward, he spent 6 years in the Toy Industry in product development. Since then, he has been an independent inventor and consultant for 3 years working in general consumer products. Currently he is a part of Sampi, a Hong Kong startup that is creating an organizational software system that will reduce the noise of the daily grind.

When: 7:30pm, Tuesday 16th of September 2008
Where: ThoughtWorks Hong Kong Office
Address: Room 1304, 13/F, Tai Tung Building, 8 Fleming Road, Wanchai
Map: ThoughtWorks Hong Kong
Contact