• Home
  • Contact Me
  • About Me
  • Resources
  • Favorites
  • Earn Money

Tuesday, September 30, 2008

How To: Minimize Defects and Rework during Software Development

This article tries to analyse various factors injecting defects and how to minimize the defect ratio and amount of rework we do during a software/application development.

When we estimate effort and hours for a project we dont estimate the number of bugs or the amount of rework we will be addressing during the development. Actually this is a hidden factor which eventually determines the delivery timeframe. More time we spend in rework+bug fixing, more deviation from the project plan.

From various analysis it is concluded that high severity defects are uncovered during UAT (User Acceptance Test) when actually the user do the testing. It is very likely that those issues are related to the business of the application i.e. it could be the business rule which is NOT being captured or it is implemented wrongly. The impact of such a defect could be very immense which might lead to a huge rework never captured during planning of the project. Eventually this result in slipping the delivery date.

So who has introduced those defects ? Who should be blamed for this? Hmmm probably every one will blame one another.

From the past experience most of the defects are induced during requirement analysis and designing and it is uncovered in QA or UAT. On the other hand the developers are the main victims and has to go ahead fixing those with all the blames on their shoulders.

I have tried to list down some of the key points that could lead to a smooth project delivery. Those are as follows:
  1. Project Estimation: During estimation project managers should keep enough allowable buffer to cope with any uncertain activities like rework and increased defect ratio from past experience. Update project plan whenever client aggrees on that.
  2. Requirement Analysis: These phase introduced most of the defects and unfortunately uncovered most of them during UAT. So give enough time/hours during estimation to baseline this. Do not wait till UAT comes back with issue which may be too late. Especially when writing use case give utmost attension.
  3. Review: Many times it is seen that clients are NOT very reluctant to review those documents. In that case if application fails to go to production both client and vendor is responsible. It is also seen that when everything got over including developement and testing client comes back seeking updation in the requirement document and so on and forth. So it is very important that client review any documents being sent for his approval should be correct and as per the expectation and on time.
  4. Avoid blame game: An individual can be blamed and responsible for NOT meeting the delivery date. Everyone is equally responsible for any thing good or bad happen during the development. It is the process which could be blamed. Keep this experience as historical data and can be used as input in future projects estimation.

Regards

Monu

Saturday, September 27, 2008

EGL: Sorting Datatable Columns

There are many instances when we need to sort a particular column in a datatable. In this article I am trying to demonstrate one out of thousand options to sort a particular column in EGL.
  1. Create a Java Class:
    public class DatatableSorting {
    public List sortAsc(List list) {
    Collections.sort(list);
    return list;
    }
    public List sortDesc(List list) {
    Comparator comparator = Collections.reverseOrder();
    Collections.sort(list, comparator);
    return list;
    }
    }
  2. Create EGL External Type:
    ExternalType DatatableSorting type JavaObject
    {JavaName = "DatatableSorting", PackageName = "explore.your.thought.process"}
    function sortAsc(sortableArray String[] inout) returns (String[]);
    function sortDesc(sortableArray String[] inout) returns (String[]);
    End
  3. Use DatatableSorting in EGL File:
    program test type BasicProgram {}
    function main()
    sortableArray String[]{"A", "B", "1", "2"};
    sortingDatatableCols DatatableSorting = new DatatableSorting ();
    sortingDatatableCols.sortAsc(sortableArray);
    sortingDatatableCols.sortDesc(sortableArray);
    end
    end

Note: If we notice carefully the java functions sortAsc and sortDesc accepts list as parameter and returns a list. However in out EGL it is actually String[]. This is because in EGL string[] will be generated to list in Java.

I will be writing one more article on sorting multiple columns based on reflection shortly.

Your comments are most welcome.

Regards

Monu

Thursday, September 11, 2008

JSF: Handling onchange event with input mask

Problem:
onchange event is NOT working when we use mask on a text field with Input Assistance enable in java server faces (jsf).
Example: Following jsp code sample will illustrate the problem.

onchange is very important if we want to see if a particular form is got changed.

Solution:
One possible solution is to use hidden variable which will hold the same value as the phone number field initially.
Any change in the value of phone number field will not affect the hidden field. That means hidden variable will hold the old value. Any difference between the two means the field got changed.

Example:


Wednesday, September 10, 2008

Best Practice : Use of Report in Java/j2ee

Use of reporting tool like jasper, crystal, brit etc. is common in web application developed in java/j2ee or any other language. Now a days all reporting tool provide greater flexibility and comes out with lot many features. Performing certain business, displaying computed columns etc which is also possible through java. What I meant by that is for a given feature we may have two ways to perform either in Java or in Report. Now should we choose Java or Reporting tool to implement the same?
We should be little careful and should analyse which is the best way......
From my personal experience, I would go with Java to perform business rule or performing some computation instead of report.
In most reporting tool we have to first create the design file which will be translated to intermediate form like xml. Then this intermediate form will eventually converted to appropriate report form. Now if we choose reporting design file to perform computation or other business rule then sometime it would be difficult to make changes if any business rule got changed because it has to under above discussed translation. Also to modify the design file you require certain tool. For example if an application is running in production and require immediate modification then we can make the changes in Java and then redeploy into the server. It is also easy to maintain.

Regards
Monu