Italian Agile Day 2009: date announced

Luca | August 2, 2009

Friday, 20th of November 2009, the 6th Italian Agile Day will be held in Bologna.

It’s a great opportunity to share experiences and practices, learn, discuss and meet other praticioners part of the  Agile community…and moreover it’s free :-)

I’ll see you there !

What has to be ready for the beginning of a project ?

Luca | July 5, 2009

The beginning of a project is always a hectic period where several things have to be put in place in order to be able to start the actual development from a solid position.

Interestingly enough, I see that what is important to have ready for ThoughtWorkers most of the time is not what has to be ready for other people.

Given that obviously every project is different and deserve specific attention, here is my list of things that has to be ready before the kick off of iteration 1.

Infrastructure

A repository, a Continuos Integration Environment with Cruise (or suitable alternatives) installed and working, a QA environment where we can deploy every successful build whenever we want, a basic build script (i.e. build/run tests/package). Pairing boxes, each one with exactly the same configuration.

Architecture

Just identify the core services/components, there’s no need to go into detail for each one at this time of the project. If we identify what is the main responsibility of a service is good enough for now, the details will be discovered later in the project. If we can easily identify the way services will communicate (web service ? message broker ?) good, if not through good OO principles we can abstract the low level mechanism and reduce the cost of change later, deferring the final decision to the point in the project where we have more understanding of the technological constraints.

Patterns

Pairing and frequent pair rotation will help in spreading the knowledge of the approach to solve specific problems and in maintaining consistency throughout the code base, so most of the time there is no need of defining a sort of “project dictionary” of valid patterns at day 1.
If we’re introducing new approaches to solve a specific problem, it’s important to highlight pros and cons of the approach so that people know what they are doing once pairing.

Most of the time these are probably enough to start Iteration 1.

All the other decisions can (and sometimes should…) be deferred to a later stage.

QA productivity metrics

Luca | March 31, 2009

In a lot of companies  the productivity  of a QA is measured through the number of defects she raised: the  more defects she finds, the harder she works, therefore the better she is.

This approach has an interesting corollary:  if you have really good QAs you don’t have good developers. If your QAs are finding a lot of defects this means that your developers are quite poor and are regularly introducing defects in the code base.

This approach isn’t obviously team oriented: QA and Development are seen as two separate and independent entities that interact through a specific contract.

If we truly believe in collaboration the most important productivity metrics are not related to a specific role/set of skills but to the team capability of deliver quality software in time and in budget.

We need to ask ourselves why the defects are finding their way into the application deployed in the live environment (incomplete acceptance criteria ? not enough analysis or understanding of the domain ? gap in the test suite ?), and fix the issue as a team, not just using that number as the boundary between two streams of work.

Local optimization doesn’t necessarily mean improvement

Luca | February 14, 2009

Delivering software is a pretty complex activity that requires interaction between people with different skill sets.
One of the cornerstone of Agile Development is continuous improvement, and one of the tool often used to learn and improve  is the retrospective.

In a context where the collaboration is not effective, people tend to look for local optimization instead of seeing the big picture, and you have things such  the “QA retrospective”  or the  “Developer retrospective”.

In this scenario a “QA retrospective” (as the Dev’s one, or a BA’s one)  is probably more harmful than anything else; the specific issues that will be identified won’t address the whole activity of delivering software but will only be focused on that specific step (“we need x to do y”).

But what is the impact of that step in the overall process ?

How that step fits into the chain of event that will take a business idea to be delivered as a software artifact (hopefully in a timely and quality fashion ) ?

Don’t get me wrong: it’s definitively through specific improvements that you improve your overall process but if  don’t frame your changes in the big picture, it’s more likely that your changes will impact your process in the wrong direction and actually cause an additional waste.

Each attempt of optimization should therefore start from the clear analysis of what is wrong from a high level point of view and only then it’s time to shift our attention to the specific details of each step.

Acceptance Testing of Flex applications

Luca | January 26, 2009

Acceptance Testing is a fundamental practice: it gives you confidence that your application behaves as expected from the end customer point of view.

In the Flex world there are some projects that are currently emerging in the Acceptance Testing space, each one with specific advantages and weak points.

Let’s have a look to some of these.

FlexMonkey
FlexMonkey Open source but based on closed source API (the Automation API are released only with FlexBuilder and not with the open source Flex SDK), it’s based on the record-playback approach and as far I  have seen is not easily integrable with a Continuous Integration server.

Flash-Selenium
Flash-Selenium is open source, and it works as an extension of SeleniumRC; the tests can be written in Java, .Net, Ruby or Phyton and the integration with a Continuous Integration server is therefore quite out of the box.

SeleniumFLex API
SeleniumFlex is another open source project. it’s an extension of SeleniumIDE, test should be written in Selenese.


FunFX

FunFX is based on the automation API (therefore you can use it only if you’re owner of FlexBuilder), the fixtures are  written in Ruby.

At the moment there isn’t a  de-facto solution: the community is quite dynamic and all these different tools are trying to find their space.

Which one is  my favourite ?

It’s really hard to say, I think that the context matters a lot. I  don’t like the solutions that require the Automation API simply because this tights you to a vendor just for testing; it’s also true that the pure open source solutions requires some extra-hack (like exposing methods through  ExternalInterface) that are less than ideal.

Looking at the two pure open source tools I like Flash-Selenium for its out of the box integration with Continuous Integration server, while I prefer Selenium-Flex approach for handling the necessary ExternalInterface configuration.

Signs of poor communication

Luca | September 28, 2008

Walking in an office and just looking around for 10 minutes is enough to have a feelingof the level of communication in the environment.

When:

  • co-located people communicate mainly via IMs, mails, or comments on online collaborative tools instead of face-to-face conversation
  • a heavyweight tool is the preferred way for driving the work flow instead of using it only for backup and tracking
  • on the whiteboard you can read the outcomes of the retrospective of 7 months before

There’s definitively something wrong.

What about your team ? How many of the above bullet points are you ticking off ?

Technology should leverage your business (a.k.a. REST anyone ??)

Luca | June 29, 2008

Technology is a exceptional way of improving your business.

The REST architecture is a good example; with a clear URL we definitively improve the effectiveness of our message. People will easily remember the URL and our product will be faster on the market (because people actually know how to get to our product).

Now this sounds pretty basic in 2008 but it looks like that some big companies are still missing the whole point.

Some time ago I was googling for Quality Center, a testing tool owned by HP.

Now, in the REST era, I personally expect a URL on the line of:

www.hp.com/products/testing/qualitycenter

This is not what I had.

The actual direct URL to Quality Center is:

https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&cp=1-11-127-24_4000_100__

HP is obviously missing the key point: how I can remember that thing ???
Even if that is google first choice at the beginning I considered it just white noise because the URL is some undefined bunch and hieroglyphic instead of something with a semantic meaning.

And if I cannot get easily to your product, I will never be able to become a customer.

Sounds easy to me that I’ m not a marketing guy.
It’s still not so clear to some companies.

Flex: How to achieve proper separation of responsibilities

Luca | June 24, 2008

In a previous post I was discussing on my experience with Flex and one of the highlighted pain points is the extremely poor quality of the available tutorials.

Let’s have a look at the source code of the Flick tutorial:

before

In a single page you have:

  • the declaration of visual components (TileList)
  • the declaration of non visual component (HTTPService)
  • event handling (photoHandler)
  • data binding (photoFeed)
  • pure logic (requestPhotos)

If you decide to follow this development model you will obtain something that is extremely fragile to evolve or simply just to maintain.

Let’s start assigning the right responsibilities to the right objects.

The first step is creating our own Application object and use it as root in the mxml file:FlickrApplication

Now the HttpService component is not exposed anymore (and ideally can also be injected) and the events handling in the right place.
The second step is to extends the HttpService object to place the requestPhotos behaviour in the service. The result is below:

HttpService
At the end of this refactoring our mxml file looks like this:

after
Now we are declaring only visual components, and its only role is defining what we want to see and how.

This is the way of writing code.
The other one is just rubbish.

Working with Adobe Flex

Luca | June 21, 2008

RIA is a pretty hot topic in these days; even in ThoughtWorks a lot of discussions are going on (if you have time you can check fellow ThoughtWorkers posts here, here and here).

Funny enough I’m quite involved in the discussion, due to the use of Adobe Flex in my current project.

So what is Flex ?

Flex is the Adobe solution for RIA; based on ActionScript, it promises quick development of rich UI, the ability of testing and TDD-ing, good tools for development and out of the box integration with Web Services and REST services.

Everything sounds cool,but my experience with Flex highlighted few elements that worth a bit of attention…let’s analyze those one by one.

Testability

Let’s start from testability: ActionScript is really hard to test !!

A Unit testing framework (FlexUnit) is available, but it cannot be used by command line because the test runner works only in your browser; this slow down your development cycle (red bar-green bar- refactor) quite a lot, reducing your effectiveness during the day.

ActionScript is a half way between a static and a dynamic language (with a clear direction towards being a pure static language, my guess is that the language designers are trying to increase the language appeal to the Java and the dotNet community); the problem is that of a static language you miss the testing framework( mock libraries mostly) and of a dynamic one you’re missing the complete dynamic approach(all the classes are sealed by default, and you can’t do methods override at runtime even for objects that are explicitly declared dynamic).

In this scenario interaction testing is nearly impossible to do; sure, you can write your own mock library or stub everything out but this is a pretty strategic decision and a lot depends on the scope of the project.

Flex Security Model

Another aspect that gave us more than one trouble is Flex security model.

A Flex application can connect to a WebService or a REST service only if:

  • the target service is on the same domain where the Flex application is deployed
  • the target service is on an external domain but in the target domain there is a crossdomain.xml file that declares your domain as secure

What does it mean ?
That if I want to access a public feed (let’s say the BBC weather feed) BBC has to have my domain specified on its crossdomain.xml file that lives on its server.

This is a strong limitation: you cannot simply call BBC and ask to add your domain to their list of trusted site, and this take you down the path of over design your application (like adding a proxy web service on your domain just to be able to get the real data you need from BBC).

Tutorials and suggested best practices

A final comment is for the Adobe tutorials: it’s hard to see in 2008 something so poor.
The tutorials (have a look at the Flickr one to have an idea) are a collection of worst practices: the basic model of development is spaghetti-code, where you write all the code in the Script tag within your main Flex application file (mxml).

And what about separation of responsibilities ?
Do we really think that this is the code you obtain doing TDD ?

The heavily usage of the Script tag will take you down maintenance nightmares, transforming your application in something that is quickly out of your control and you cannot evolve.

…but is it good or not ??

Looking at these pain points, for me Flex is not yet a mature technology.
Adobe promises a lot but a number of the promises are not there; TDD is simply to hard to do due to the lack of mock support(even if it’s promised), the set of possible permissions you can give to the Flash player clashes with the new services oriented feature (introducing cumbersome security model that take you to overdesign as a possible workaround), and with really poor tools (FlexBuilder, the IDE, crashes regularly and the Ant task is pretty basic).

Comments
No Comments »
Categories
Web
Tags
,
Comments rss Comments rss
Trackback Trackback

Article: Seniority, Respect, Authority and an Agile Team

Luca | May 25, 2008

Here on InfoQ some interesting thoughts around Seniority and Authority in an Agile team.