Archive for November, 2009

Agile Practices: Estimation

24/11/2009

Agile time management depends on two variables:

  • Team Velocity, i.e. number of story point for iteration
  • Stories Size, i.e. the dimension associated with a story

There are different way to evaluate stories size, here some suggestions.

Approach 1 – Ideal time:

During the planning meeting estimate stories with ideal days of work, i.e. a day without any interruptions whatsoever, no telephone, no meeting, …
Velocity comes from historical series of iterations velocity, but for initial iteration we can define Initial Velocity as:

(Number of team members/Load factor) * Sprint days

Load factor is a number that you can use to adjust the ideal day, i.e. the impact of distractions on a team’s performance.

Benefits:

  • Easier to explain outside the team
  • Easier to estimate at first
  • Make the team more comfortable

Approach 2 – Story Point:

If you don’t have previous estimated user stories, ask the team members to select one story which they think is about average effort to implement.
Give the value of 5 story points to this story and estimate all the other stories relative to the selected story.
Break down the selected story to estimate its parts in hours and define the value of initial story point in hours.
Estimated initial velocity is:

(Sprint hours/hours per Story Point)*Focus factor

with focus factor in percentage.

Benefits:

  • Faster
  • Do not decay
  • Pure measure of size

A good starting compromise (to define initial velocity):

For your first iteration define “1 story point = 1 ideal day” help team to get started and gradually convert team to thinking in unit-less story points (“this story is like the story …”) stopping talking about how long it will take.

Advertisements

JConsole problem: process not visible even in JPS!

17/11/2009

I set the JMX argument in JBoss and Tomcat (-Dcom.sun.management.jmxremote) and I get a
“– process information unavailable” message in JPS and “The management agent is not enabled on this process” in JConsole.
I solved with a SET of TMP environment variable different from C:\WINDOWS\Temp: SET TMP=c:\temp.
Maybe it is due to directory permissions.

Code snipplet

09/11/2009

Some code snipplet useful everyday:

Read a file line by line:

InputStream in=this.getClass().getClassLoader().getResourceAsStream("aaa.txt");
BufferedReader br = new BufferedReader(new InputStreamReader(in));
while(br.readLine()==null) { .... }

Integer to hexadecimal string:

String hex=Integer.toHexString(number);

Pretty Print XML Document:

org.w3c.dom.Document document=...;
try {
  javax.xml.transform.TransformerFactory tfactory = 
                          javax.xml.transform.TransformerFactory.newInstance();
  javax.xml.transform.Transformer xform = tfactory.newTransformer();
  xform.setOutputProperty(javax.xml.transform.OutputKeys.INDENT, "yes");
  xform.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
  java.io.StringWriter writer = new java.io.StringWriter();
  javax.xml.transform.Result result = 
                               new javax.xml.transform.stream.StreamResult(writer);
  xform.transform(new javax.xml.transform.dom.DOMSource(document), result);
  System.out.println(writer.toString());
} catch (Exception e) {
  e.printStackTrace();
}

Marshall JAXB to a file:

JAXBContext jaxbC;
try {
      jaxbC = JAXBContext.newInstance(jaxbClass.class);
      Marshaller marshaller = jaxbC.createMarshaller();
      marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
      marshaller.marshal(jaxbObject, new File("c:/aaa.txt"));
} catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
}

Print InputStream:

InputStream input=...;
byte[] buffer = new byte[1024];
int len = input.read(buffer);
while (len != -1) {
    System.out.write(buffer, 0, len);
    len = input.read(buffer);
}