Agile in India

Thoughtworks ( in co-operation with CIOL ) have published a report on Agile Adoption in India. Out of 770 organisations surveyed, 330 claim to be in some sort of agile transition.

I have had personal mixed impression of this, having spent the last 18 months working for a client who has a number of development streams with different organisations in India, its clear that adoption is patchy and in some areas entirely non existent.

For any global outsourcer where english is not the first language and timezones are a major barrier to communication, agile adoption should be seen as a major enhancement to their development capability, the ability to break the waterfall mentality and silo approach to all phases of delivery should be enough to convince any organisation that agile offers major benefits

Agiles Truth

I got into a discussion ( possibly an argument ) about one of the greatest benefits of agile over waterfall, the proponent had been trying to position a hybrid waterfall process with bits of agile embedded underneath.

Part of the discussion got round to the usual chestnuts, agile tells you much earlier on whether you initial assumptions about time, scope and cost are correct.

His argument for waterfall suddenly ended as he uttered in his own words, “So what happens if you find out early that you cannot hit you initial deadlines………”.

The silence was excellent as yet another agile convert “gets it”….. and the penny dropped, plonk !

UK Agile Awards 2011

Just been informed that I have now been shortlisted for Most Valuable Agile Player (UK) at this years Agile Awards. This is a huge honour and makes me very proud, especially after picking up Best Agile Programme Manager and Best Agile Tool ( Fitnium ) last year

If you don’t already know, the Agile Awards are held on the 5th October and details can be found at www.agileawards.co.uk/Dinner

iPad and Three All You Can Eat Data

I’ve been hunting around for a decent data option for my iPad and initially had been using my Three Mifi dongle, which just acts as a simple Wifi hotspot that the iPad can connect to. Three do offer to swap your Mifi sim for a Micro Sim used by iPads, but only keep you on the same data package. They currently do not support All You Can Eat on the iPad

However recently Expansys sent me an email offering a free Three sim which PAYG which for £15/month I can buy All You Can Eat data. Unfortunately the Sims are standard size sims, if only I could trim that sim down, well check out eBay and look for a sim card cutter. For about £3 mine arrived this morning and cam with a cutter and 2 full size sim caddies to that you can still use your sim in a full sim phone, dongle or mifi device.

After a bit of swapping and registering I now have PAYG with £15/month AYCE data on my iPad, process is pretty simple although you will need either a Three mobile or an unlock mobile for the registration process.

      Order AYCE sim from Three and await to arrive
      Order sim card cutter from eBay and wait to arrive
      Go to three.co.uk/my3 and register you sim card using mobile no and serial number
      Once registered Three will send you a password for the sim via SMS. Make a note of the password
      Remove the sim from the phone. ( We are now finished using the phone, its all iPad from now on
      Follow instructions and reduce sim card to micro sim using cutter
      Insert sim into iPad and switch on 3G data
      Navigate to three.co.uk/my3, enter mobile number for sim and password they sent via SMS
      Change the password to something you can use
      Buy £15 AYCE data add-on
      Surf to your hearts content…. enjoy !

Google+ – Struggling to get it !

Still struggling to get Google+, my view of social media is that you gather together as socially cohesive groups. Typically around things you have in common. From that each group shares and creates its own content. As on FB I am a part ( as in Like ) various things that reflect my interests from music, to off road motorcyling and land rovering things, to some of the more esoteric areas of the internet. I like the fact I can join that sub group and become part of its creation interacting, often with 1000s of other people who share the like

I don’t get the social aspect of Google+, I am forced to basically hunt people down with my own interests and add them to one of my circles.

I can see huge potential in using Google+ for my job. I like the concept of Hangouts for use with distributed teams. If you have the bandwidth then its a very free and easy to use teleconferencing system and Streams/Circles can be used to allow teams to communicate together. I really miss Google Wave which had much much more potential for information sharing.

The power of the written word ( re-post )

Dave Putman of Planworking.com highlights quite beautifully the power of the written word in his latest blog posting here.

For all you people writing documentation, have a read and see if you you might actually be better off speaking to some one

Selenium Smells

Once of the biggest issues I see with people new to Selenium ( or any number of the other web automation tools ) is the liberal scattering of Thread.sleep(xxx) through out the code. This should be considered a bad smell introducing timing specific code into your script.

What happens if UI apps runs differently on different machines, or OS’s or internet links ( Broadband, Moble, T1 etc ). Do you have variable timing statements ?

These sleep() statements start to creep into code when a page doesn’t behave how the automation tester thinks it should. Each browser has different HTML and CSS rendering engine and each render the DOM ( Document Object Model ) in different ways to get the same result ( well apart from IE which is just pants ).

The person writing the script will pop in a sleep () when a specific element doesn’t appear when they expect it to, but there are a couple of patterns that make the sleep statement almost redundant

Wait For Page To Load
The first thing to do when you click on any link or open any new URL is wait for the htmnl page to load. This by the way is not what you think. It does not wait for the page to be displayed on the screen. Instead it waits for the entire HTML object to be loaded. In essence it is waiting for the DOM processing engine to reach and which point the document is loaded. This simple step will get quite a few of the needs for sleep () calls

Actively Wait For Element
Rather than put a random sleep() before an action activity like clickLink () or type () function call, I always wrap these calls with a waitForElementPresent() or waitForElementVisible (). The reason for this is that the script will fail with a proper exception. I typically have a class of functions ( in this instance Java ) which do this, e.g

protected boolean waitForElementEnabled(final String locator, final long timeout) {
long timeNow = System.currentTimeMillis();
while(System.currentTimeMillis() < (timeNow+timeout)) {
String eval = selenium.getEval("this.browserbot.findElement('"+locator+"').disabled");
if(!eval.equalsIgnoreCase("true")) {
return true;
}
try {
Thread.sleep(Config.wait_pause);
} catch (InterruptedException e) {
return false;
}
}
return false;
}

protected boolean waitForElementPresent(final String locator) {
for(int c = 0; c if( selenium.isElementPresent(locator)) {
return true;
}
try {
Thread.sleep(Config.wait_pause);
} catch (InterruptedException e) {
return false;
}
}
return false;
}

protected boolean waitForTextPresent (final String text) {
for(int c = 0; c if(selenium.isTextPresent(text)) {
return true;
} else {
if ( !sleep () ) {
return false;
}
}
}
return false;
}

protected boolean waitForValuePresent (final String locator, final String text) {
for(int c = 0; c String found = selenium.getValue(locator);
if( found!=null&&found.equals(text)) {
return true;
} else {
if ( !sleep () ) {
return false;
}
}
}
return false;
}

protected boolean waitForAnyValuePresent (final String locator) {
for(int c = 0; c String found = selenium.getValue(locator);
if( found!=null&&found.length()>0) {
return true;
} else {
if ( !sleep () ) {
return false;
}
}
}
return false;
}

If I am using JUnit then I can wrap this calls around an assertTrue call

assertTrue(this.waitForElementPresent(“id=login”));
click(“id=login”);

The only time I end up using a sleep is with Ajax. For example a developer may pop up a “Processing….” dialog or spinner when Ajax activity is happening, but to stop the screen flashing they might put a timer on so that the box only appears if the Ajax call is taking 30 msecs or more, if it doesn’t then the box never appears. So in this instance I would sleep for 35 msecs and then see if the box is there, if it is wait for it to close, if its not there assume the Ajax call has happened and the script moves on.

1Password, Dropbox & XMarks – What a combination

Sometimes its the little things that make all the difference to being more productive, and in the case of combining 1Password, Dropbox and Xmarks that is certainly the case.

Both in my work ( agile coach, PM, problem fire fighter ) and through supporting Fitnium I have the need to use a number of different machines, be they physical or VMware instances all running multiple OS’s and Browsers.

To test fitnium I run a grid of servers running OSX Snow Leopard and Lion, Windows XP, Vista and 7, Linux Ubuntu and Fedora and as part of my current job I tend to get heavily involved in automated tesing

While my main machine is a OSX laptop, throughout the day I find myself jumping between all of the above. I don’t want to always have to physically move back to the laptop to check email, browse ebay, or do a zillion other things I do on my main machine. What I want is the same ubiqitous browser access across all my machines.

XMarks : Xmarks provides the ability to sync book marks between Chrome, Firefox, Safari and IE. I don’t like Opera and Xmarks doesn’t support it so I’m not loosing out there. It can sync between all browsers on the same machine or all browsers on different machines. Make a single change to a book mark on any browser on any machine and within a few minutes that change is made across all the above supported browsers.
The only fault is that Safari is only supported on OSX, but if you combine that with MobileMe, you end up syncing all your Safari browsers across OSX and Windows.

1Password : Now I can access all my web stuff on just about every browser and any OS, I find myself logging in and out of the same suite of apps ( Facebook, LinkedIn, Ebay etc ), across them all too. 1Password integrates itself with all your browsers and records all you account details in a secure format. Now I only have to use one password, the one that opens 1Password, afterthat, 1Password fills in all the log in screens for all my accounts. The nice thing is, while I have amssive 30 char main password I type in once when I first access each box, 1Password can use existing passwords, or generate complete passwords using characters numbers and specials and you don’t have to remember them

DropBox : Dropbox provides a cloud storage solution that is avail on any machine. The dropbox folder appears as a standard OS folder. Drop stuff into it and it appears on every other machine that dorpbox is installed. 1Password stores all its data in a single file and its DropBox aware, so if you tell 1Password to store the password file on DropBox its available across all my machines. Add a new account to 1Password and within seconds its replicated across all my other machines

So 3 little tools, 2 free ( dropbox and xmarks ) and 1Password for $59 across all machines is a fantastic price for simple easy to use universal access.

MoSCoW, go on, convince me

I joined the DSDM group on LinkedIn a few weeks ago because ( believe it or not ) I actually like DSDM. I like it as much as a like Scrum or Crystal or many of the other methodologies. Although I like it slightly less than I like XP but thats a personal thing. My first delve into the groups was a response to Keith Richards question about extending timeboxes. Surprisingly it generated a quite a bit of debate, and good to see the majority of people are willing to debate/argue and discuss, unfortunately it seems I might have upset the odd individual. Odd being the quantity not the physiological make up.

The debate was all around the use of MoSCoW ( the preferred if not mandated approach to requirements prioritisation in DSDM ) against my preferred method of a 1..n prioritisation. I’m guessing 99.9999% of the readership of the forum gets MoSCoW, but for those not up to speed with 1..n, its about giving each requirement a priority from 1 to ( can you guess ? ) n, where n is the maximum number of requirements. The order in which this is done states implicitly that No 1 is the most important, no 2 is less important than 1, but more important than 3, and this carries on until requirement n is the least important.

The reason I personally like this is that it makes it very easy for the customer to add a new requirement, they can run down the list until they find the spot where requirement x is more important than their new one and requirement x+1 is less important than the new one, rather than ( ala DSDM ) you have Must, Should, Could and Won’t buckets, which even people then split into Must1, Must2, etc etc. If I then point size each story I can cookie cutter this list into roughly equal sizes ( iterations anyone ? ) and then its just a matter on trimming the bottoms so they all fit into equal size chunks.

Now I know DSDM says you fill iterations with some of Musts, some Shoulds and possibly a couple of Coulds, so when it gets gnarly at the end of the iteration you can drop the Shoulds and Coulds into the next one and still say to the customer you delivered all their Musts. However to me there are no Shoulds and Coulds, if its a requirement its a must, its not a maybe or a possibly, the customer either wants it or he doesn’t, and if he doesn’t, throw it away don’t keep it around adding to admin and overhead by managing a list of things no one wants.

So thats my position. I’ve done a couple of DSDM projects, like them, but did 1..n in the second one and liked it even more.

The challenge I set down to DSDM is convince me otherwise…… but while you do also allow me to debate your responses

The Power of Automated Testing

Once again, a simple example demonstrates the power of automated testing. Right now I am working on a project where the primary supplier really doesn’t get automated testing as part of the delivery cycle. For them its something you do right at the end when everything is stabilised. Their testing cycles are huge and labour intensive and because they are pretty much waterfall their defect count is not good and they have lots of releases.

Unfortunately these releases are poorly managed and have limited version control and configuration management and I have therefore been attempting ( in the nicest possible way ) to convince them that if they had a suite of automated tests which they ran after every deployment they would have a quick and easy solution to ensuring what they produced still works.

In the end I spent most of today writing the tests myself, to be able to demonstrate to them how quickly you can write automated tests, and once written the power in their inherent simplicity. Its nice to get my hands dirty again, so a few hundred lines of Java and use of Selenium RC and I can now test in about 5 mins something that would take them several hours to test

Do they see the power in this, only time will tell. Is the door closing after the horse has bolted, well on this project there have been hundreds of horses and the slamming of stable doors is like tinnitus, but small improvements like this can only help.