Tuesday 24 March 2009

ScrumBut - No Release Planning

"Were doing Scrum-But ..."

The ScrumBut phenomena has started to appear more and more as scrum has started to take its hold in the industry. I want to add one ScrumBut i was in charge of and it went like this:

We were doing scrum but: We had no release planning.

At the time we were undergoing so many directional shifts that each time we tried to flesh out a release plan, it changed drastically causing any planning effort to fail. Also our acting PO wasn't involved enough, a fact which also contributed to to difficulty of achieving a stable enough release plan. So we went and continued without it.

And actually it wasn't a complete disaster, we achieved a very short sprint length of 1 week, we added to that various engineering practices like TDD, CI and Pair programming and we managed to maintain a constant development rhythm with good quality.

however we were missing several big things, in fact we completely gave up on any attempt to see and track the bigger goals. I wasn't able to predict anything beyond the end of the current sprint and the developers found it difficult to understand the "bigger" picture. Eli has described the problem:

So if the management has a goal: Close Sale with Customer [put huge customer], and to do this the R&D must implement the ABC feature. We might reach the end of the month without that feature being implemented and management won’t know about it.

 

The thing is, that what we were doing seriously lacking, and due to us changing the process and failing to do it properly we got the what can only be described as the logical result.

When you don't plan on the higher level (release), you cant project beyond the micro level (sprint). You don't measure overall progress, and you lose the ability to manage on that high level. Naturally you cant be sure when things will be done or when things are not going according to plan.

At Typemock the solution for this was to adapt an "integrity" based management approach, and so far it seems to be working for them. However what Eli reports as "The differences between Scrum and integrity" is actually based on a something which is Scrum based but is too lacking to represent actual Scrum done properly.

Wednesday 18 March 2009

Open Houses

So many announcements today.

Anyway next week Ill be giving two open houses:

The first will be at Sela University on the 23/3 and will deal with the trouble of planning and estimation in the software world. (As far as I know most of the places are  taken, but if you're interested leave me a comment and I'll se what can be done)

The second one will happen at Haifa on the 25/3 show why Design For testability is not a prerequisite for doing TDD. (the slides for this can be found here.

ALT.NET Israel - 2nd Gathering

Been some time since our previous encounter so we thought we might enjoy another meeting.

Anyway, we will meet on

April 2nd and 3rd, at Sela University.

Details are on the alt.net israel’s usergroup:

http://groups.google.com/group/altnetisrael/browse_thread/thread/4ab4329c4bdd8253 (hebrew)

I would like to thanks my associates at Sela making this possible.

Signup link will be published shortly.

Sunday 15 March 2009

NUnit Extensions - Adding Logic at Run Start

Most of the time using NUnit is very straight forward. Recently however I needed to add some functionality that will make life a little bit easier. In this post I'll show how to add some setup code that will be executed once at the start of the test run.

Why is this useful? actually I don't have a clear answer. Here are some reasons I came up with :

  1. Run some special set up code which is just to costly to run at every setup (even if only for class setup).
  2. Transparently enforce some logic on all tests (i.e. without the need for other programmer to explicitly add that logic)
  3. you want to add some special behavior to the test runner

 

NUnit Event Listeners

NUnit has several extension points that will adding almost any kind of logic to the framework. Ben Hall has posted some time back a great article describing the various possibilities For my needs (which are described here) I have been using the Event Listener extension point. Here's the class implementing the event listener:

[NUnitAddinAttribute(Type=ExtensionType.Core,Name = "My Add In",Description="A Demo for Run Setup Code")]
public class CTestingAddin : IAddin, EventListener
{
#region IAddin Members

public bool Install(IExtensionHost host)
{
IExtensionPoint listeners = host.GetExtensionPoint("EventListeners");
if (listeners == null)
return false;

listeners.Install(this);
return true;
}

#endregion

#region
EventListener Members

public void RunStarted(
           string name, int testCount)
    {
//Do Set up logic Here
    }
    public void RunFinished(Exception exception)
{ }

public void RunFinished(TestResult result)
{ }

public void SuiteFinished(TestSuiteResult result)
{ }

public void SuiteStarted(TestName testName)
{ }

public void TestFinished(TestCaseResult result)
{ }

public void TestOutput(TestOutput testOutput)
{ }

public void TestStarted(TestName testName)
{ }

public void UnhandledException(Exception exception)
{ }

#endregion
}

Deployment and execution

That's all the code needed and it can be wrapped as a simple class library (dll). The dll created will need to reference the nunit.core and nunit.core.interfaces. To deploy just copy the dll to the NUnit bin\addin directory. To verify it was properly deployed open the NUnit GUI and check the tools menu under add-in to see that the add-in is there.

I will finish with two tips that will make life easier to run and debug the code.

  1. Its worth while to add a post build event that will deploy the add-in in into NUnit directory at the end of a successful build. In order to do that open the add-in project property and the following to Post build Event Command Line: copy $(TargetPath) <NUnit Directory>\bin\addins.
  2. A convenient way to debug the add-in is to put the NUnit GUI as the "Start action" of the Add-in project. This will enable putting break points normally in the code. (another option is to use the Attach To Process mechanism Ben has suggested).

Wednesday 4 March 2009

Handling Bottle Necks in Scrum Team

During  yesterday open house I was asked an interesting question. 

Some context first. The organization has chosen to adopt the Scrum methodology (good for them). As a scrum team member she is in charge of writing the automation for system test using a module inside the QC product (can anyone guess what's wrong here?). The issue is that she cant keep up. The team has 5 developers who write code and only her to write test automation (now do you see it?). So she was asking what is the "agile" solution to this.

I don't know if this is The agile answer, but for me, when a team member cant keep up and doesn't manage to finish his tasks, he needs help.

No agile process or in fact any other development process will change that. If a given person has too much work no matter if he works under a Scrum team an XP team or a waterfaoolish team, he has TOO MUCH work. Without help he wont finish on time. If no one on the team has the time to help, its a good indication (to me) that the entire team is overloaded. Face it, no magic answer here. No process I know of will take the time needed to complete a given work and make it shorter. The only thing we can expect a process is the focus the effort invested in the right direction, help eliminate wasted effort and establish an environment in which the team can become better. Until that happens, be realistic. Commit only to the amount of work that you can currently handle.

Another issue I saw, was in the exact role definition. Part of the problem (in my eyes) is that in this specific team they were still thinking in the terms of well defined roles and responsible. Here are the people which writes code, here are the people who writes tests, here is the manager and so on.

In order to become more effective, we strive for versatility. that is we want each person in a team to be able to do every task involved in building the software. Yes we accept the fact that people still have different expertise and that's good. However when a team member gets behind schedule we wish that any team member will be able to come in and help. My guess (and clearly I can be mistaken), was that in this specific team she was the only one trained for that kind of work, therefore no one could actually help her. At least not at this point of time.

What to do?

First gather the team and raise the issue (can be done during retrospect meeting). Accept the fact that at this point of time you can achieve only a given amount of work (which is less than you thought). Face the facts and as a team inform management and commit to less. Its not much help if the coding tasks can be finished faster then can be tested. Development is not done after the coding phase. Try to resist the urge to take that kind of work (which currently is the bottleneck for the entire development cycle) and move it outside (to a different sprint or different team).  Also make sure that programmers wont rush ahead and take on more coding work cause it easier for them to do. make sure that no extra work is picked until committed work is actual done. And I mean done done as in coded, tested, integrated and everything else which falls under you definition of done.

Also, make sure to increase capacity. Either by bringing in help by hire more people (not likely at this point of time in current economy), or maybe from somewhere else inside the organization. Or train other team members. Yes this will be painful and will probably require a serious effort in making the team leave its comfort zone. But if your goal is to establish a self contained team this must be done.

Tuesday 3 March 2009

Collection Asserts in MSTest (and some more)

Sometime I can miss the obvious.

I've been working with MSTest framework for over a year now and up until today I completely missed the fact that beside the Assert class MSTest framework contains 2 other assert classes :

  1. StringAssert - used for string specific asserts like StartsWith, EndsWith and even support regular expression matching
  2. CollectionAssert - used for collection operation like Contains, AllItemsAreNotNull and the most useful AreEquivalent.

Naturally NUnit also has equivalent classes (which of course I missed as well).

Now the thing that really ticks me off is that I was asked this specific question twice in the last month and gave the wrong answer. Only today after I allocated 2 minutes to actually google it, I found out about it.

Lesson learnt - For all consultant out there, Don't get overconfident about your knowledge. Even if its in you specific area of expertise. Always assume that you are mistaken and double check your answer (especially if your answer starts with "You cant...")

Monday 2 March 2009

The Fifth Value – Respect (cont.)

Some time ago I touched the subject of respect in the software development business. Yesterday I had the chance to talk with one of the persons working at  a client of mine. Beside of holding the respectful position of VP QA (the company is of medium size) the guy also allocate one day a week to maintain an IT business he once had which currently has a single client. After talking about how he ended up in this kind of arrangement, an obvious question for me was why does he keep on doing it. Isn't the fuss of handling a single customer to big to be worth the time?

The answer I got was:

Working for that client puts me in perspective. once a week i get the chance to function as a plain technician. This gives me the opportunity to get on my knees and work with the bits the bytes.

For me this is the essence of humility (which is a corner stone for respect), although the guy has attained the "big boss" status, he understand that there's more to it then just management, and in order for him to excel at his work he needs to get down as close as he can to the daily work the people working for him do.

I salute you!

On the other extreme,  a previous boss of mine once told me that he was advised (and agreed to) to treat every hour of his work as costing 2000$ (no, this was not the guy salary). The reasoning behind this that being so high on the food chain he should not waste his time.

For me this kind of attitude puts you on the opposite scale. Saying such a thing comes as close as you can (without actually saying it) to "I'm worth more then you are" or more simply "I'm better then you are". This is just being rude.

I wonder how would that guy take an advice that goes: "Unless you generate 2000$ profit for the company per hour, your not doing your job"

Sunday 1 March 2009

Sela Open House

Last week I gave at Sela a lecture about Design For testability.  For all those who attended I want to thank you for coming.

For all those who missed it, you might be able to catch it this week (I'll be giving it again at Sela on Tuesday) or if you happen to be located at the north parts of Israel it will be repeated nearer to you on the 25/3.

For everyone else you can get the slides here.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Walgreens Printable Coupons