Saturday, February 25, 2012

Domain knowledge is essential

For a business man product and domain-knowledge of his competitors is very important.

There was a family with one kid. One day the mother was out and dad was in charge of the kid, who just turned three.

Someone had given the kid a little 'tea set' as a birthday gift and it was one of his favorite toys. Daddy was in the living room engrossed in the evening news when kid brought Daddy a little cup of 'tea', which was just water. After several cups of tea and lots of praise for such yummy tea from father, kid’s Mom came home.

Dad made her wait in the living room to watch the kid bring him a cup of tea, because it was 'just the cutest thing!!'

Mom waited, and sure enough, the kid comes down the hall with a cup of tea for Daddy and she watches him drink it up, then she says to him, 'Did it ever occur to you that the only place that baby can reach to get water is the toilet??'  :D

MORAL OF THE STORY: Domain knowledge is very important! Else your supplier will trick you.!

Reduce Software Test Cycles

By saying software test cycles, I mean the test cycles that are performed by software testing team (Product Assurance Testing) after developer integration testing (DIT). It is likely that testing a software product is done in multiple test cycles. Each cycle defines the test scope. In the software test plan, the number of test cycles is planned and scope is defined.  The fact why multiple test cycles are defined is probably to enable product testing as early as possible and not wait until the complete product development is completed. Say 50 product features have been implemented and are ready for testing while another 20 or 30 features are yet to be implemented. In this case the product testing can begin to test the 50 completed product features while rest of the features are being developed. This one of the best practices to begin product testing early in the Software Development Life Cycle (SDLC). This really helps if the product scope is huge and helps every stake holders to early know the quality of the product.

How do many Test Cycles get introduced?

By having said that multiple test cycles has some advantages, it is likely that most of the times, we end up having more test cycles than planned. This typically happens because of poor quality of the code and code change impacts are not well tested. Testing process goes like this, the testing team completes a planned test cycle and logs the bugs/issues found during in a defect tracking tool. Developers will then have a look at it, estimate how long it will take to fix the bugs reported for example in test cycle1. In order for testing the bugs fixed, there is going to be another release to the testing team. In this case the testing team will verify the bug fixes. However, the bug fixes can have the impacts on other features of the product, if the impacts are not thoroughly tested by the developer themselves, then again there will be other bugs caused because of the bug fix code changes. These bugs will again have to be fixed by the developers and testing team has to verify again until there are no more issues with the software. Sometimes this causes delay in the product delivery. In my experience this happened several times. We can avoid this by following certain best practices that I am going to share in this article from developers perspective.

Test the Impacted Areas thoroughly

Impacts of code changes are the one which will delay the product delivery in my opinion. The impacts have to be thoroughly tested by the developers themselves before handing over the build to the testing team. There are ways to best do this. The person who made the code changes is the best person to identify the impacts of the bug fix. The big question is how a developer can find the impacts. There are ways to do it. Developer changes the code in a method, he/she can find the references of the method to see what are all the places the method is being called and test those all the calling methods too.
  
Take help of Design Tools to find impacts

Look into the design tags of the method. As a best practice, each and every method and class will have a design tag. Trace the design tag and look back into the design of the product. Find out what other components (modules) of the project is depending on the tag. The design tools can help figure out the depending design tags and from the impacted design tags, the impacted code can be traced out and tested.

Have different people to test the impact

Avoid biases. In case of manual testing, its good practice to have different people to test the change and not the one who made the code. The person who fixed bug may be biased by his confidence sometime over confidence. The fact behind this is each person thinks differently and its needed for a thorough impact testing of the bug fix

Estimate the time to required for testing accurately 

Estimation is one of the important aspects of software development. Wrong estimations lead to development of poor software quality. Consider there is sufficient time for developer testing. The great things happen when something is done in hurry. You did not test the product thoroughly because you had no time because estimation was wrong. As a best practice, the estimation has to be done by the person like Software Architect who understands the entire design and hence he/she knows the what the product features might get affected by a particular code change. 

Automate the Test Cases 

This is going to save lot of time and quickly gain the confidence over the product by looking at the automated test report. As a best practice the smoke test cases have to be automated. I have seen it so happens that most of the time, the test cases are not updated whenever there is code change. The automated test cases should always be in sync with the code changes. It is ignored mainly because it was not planned to revisit the test cases. The estimation should consider updating the test cases also.

Understand the Domain well

In certain organizations, the domain knowledge plays very important role. It does not suffice if you know the technology and you can write quality code. I have seen several instances where the product failed because developers did not had domain knowledge. It ultimately matters how our customers are going to use the product and hence product needs to be tested from customers point of view and this can happen only if the person who tests the software product has the domain knowledge in depth. You must have read the story why domain knowledge is so important!

Set the goal of Zero Post release defects

Yes, there has to be commitment towards this and goal has to be defined. This will bring the right spirit for the developers and will encourage the developers to be very cautious while dealing the change requests and while testing impacts of the bug fixes. Write down this goal on the visual board for everyone to know you are committing to zero post release defects.

I have shared here what we managed to reduce the bugs/issues being reopened. This is essential especially if you are dealing with change requests for a maintenance projects. Also have look at my another article on how handle to change requests effectively. Hope this will help others too.

Friday, February 24, 2012

Configure FeedBurner for Blogger Blog

Feedburner is feed management tool by Google. I found it very useful adding feeds on the blogger. I’ll explain in simple steps how feedburner can be configured for the blogger.
Login into feedberner.com using your Google account credentials. 
Key in your blog name in the text field as shown below and click 'Next>>' button  
The Feeburner automatically detects your feed URLs if you had enabled the feed in your blogger under settings. Usually there will be two feed urls for blogger. The one being RSS and the other Atom.Select the one you prefer, I preferred RSS and select the one by selecting radio buttons as shown below 
               
               
Click Next>> button to proceed further.  
There are chances that if your feeds are larger than 512k, then will get an error message saying the same.                                                                                        
 
To resolve this, use following feed URL format: http://blogname.blogspot.com/feeds/posts/default?max-results=3 
In next step, provide the feed title and feed address in the dialog shown as below                                                                                                                                   

You will get a congratulations message, click Next button. Select the options that feedburner provides as shown below                       
On click of Next button, you will see the following page
                                  
Select from blogger options, For example, you can select 'Redirect your     
Blogger feed to your FeeBurner feed>>' link or Offer blog updates via email, etc.
 
Click on Publicize tab and you will get various options to display the RSS feeds, select the services that interest you. Select and see how each service will work for you. You can disable the services if you do not like anyway.

The Headline Animator looks interesting, have a look at that, the headline animator widget is provided with different dimensions choose the one that suits your blog. On headline animator is created for this blog, you might already be seeing that.
The feedburner software provides you the ability to view how many people subscribed to your blog, basically it provides the statistics of feed subscribers and you have always an option of disabling your RSS feeds if you do not like them in the feed burner. All feedburner options are added as widgets to you blog and hence you have the option of deleting the widget if you do not like them.
 

Thursday, February 23, 2012

Understanding RSS feeds

 RSS (Really Simple Syndication) is the industry standard for publishing and subscribing to the internet content. RSS is competing standard is Atom. This technology has changed the way for internet users today. The real need for RSS is that the internet is full of information, users surf the internet, read their favorite articles, news, watch videos etc. Say for example while surfing the internet you find something interesting and you want to be in touch with the content you are viewing. One way is to bookmark the website URL and visit it again to see what has been changed and what's the new content. The other way is to subscribe to RSS feeds provided by the websites. These days many websites provide RSS feeds that users can subscribe to.This is indicated by standard RSS icon shown left side of this post. There are many subscribing methods. Users can select the method they want. For example users can subscribe via Email or if they have their own websites, they can simply display the RSS feeds on their websites. The new content from your favorite websites start appearing as a fresh content on your website! This sounds really interesting and beneficial because if your website starts getting fresh content, it becomes search engine friendly. Search engines always like fresh contents on your websites.

RSS Feed Readers

Your favorite internet content can be brought straight to your desktop or a cell phones. In certain webpages, you will see small button that says either RSS or XML, clicking this button, you will see all the xml content. To read this xml content and display in a better format, there are programs called Feed readers. 
These feed readers read the feed content which is in a standard XML format and display the content in better readable format. The examples of RSS readers are Google Reader, NewzCrawler, Feeddemon etc.There are special computer programs called Feed Aggregators that aggregate information from multiple internet sources. There are mobile applications developed for some of the feed readers, using which users can get the web content that they have subscribed to on the move.

Feed Advantages

RSS has advantages for both subscribers and publishers. Subscribers always get the information of their interest and they can read at their convenient time. Great way to narrow down to the information that interests you. As far publishers are concerned, they will have many subscribers based on their website content. Published content will have links back to the publishing website, so the publishers get hits to their sites back and have good amount of traffic. Subscribing to RSS feeds helps you to narrow down to only the content of your interest. This becomes important because the information over the web very huge.

Implementing RSS Feeds

To implement RSS feeds on your websites is really simple. If you are not a computer programming geek, don't be discouraged, you can still create RSS feeds without having any computer programming knowledge. This must sure be encouraging fact. Many blogging tools such as Blogger, wordpress, vox etc have ability of syndicating your blog without having you write code for it. It all requires to follow the instructions provided by these blogger services. There is a web feed management tool called FeedBurner which is very handy and useful while dealing with RSS feeds on your sites. FeedBurner gives custom RSS feeds and management tools to bloggers, podcasters etc.

Disadvantages of RSS Feeds

For any new technology we need to see what the technology is lagging or its disadvantages. When I tried understanding what could be the disadvantages of using RSS feeds in our websites, there less or no disadvantages. I hardly find any. Different people have different opinions on this. Some say that RSS feeds will not display images and the identify of publishing website is confusing, publishers can not determine how many subscribers have subscribed etc. There are ways to overcome all these. I say that we need to use powerful feed management tools like Feedburner where you have several options such as you can track your subscribers, analyze the statistics, change feed settings, enable/disable the feed etc. And as for as publishers identity is concerned, it depends on the posts, the published posts should have links to the publishing sites. In fact this will bring more traffic to publishing website.

To configure FeeBurner for your blogger, refer the steps mentioned here

Wednesday, February 22, 2012

How to automate project builds through apache Ant

ANT (Yet Another Tool) is a simple build by Apache. It is used for automating build and releases software projects. I'm going to show how quickly you can can get started with Ant and automate the build processes in Windows platform.
  • Download the latest stable version of Ant from Apache download page and place it in your local file system, for example D:\Apache-ant-1.8.2.
  • Set environment variable ANT_HOME to the path where you placed the Ant tool
  • Set PATH environment variable to point to %ANT_HOME%\bin. Verify if the path is set by typing 'ant' in your command prompt. If you see the message Buildfile: build.xml does not exist! Build failed, the ant is installed correctly. Ant by default searches for a file called build.xml, that's the reason you see above message.
  • Create a build.xml (you can name it the way you want like ant-build.xml etc, if you do so, you need to tell ant what is the build xml file name while running the ant targets) in the same place as that of your source folder under your java project. A very basic build.xml looks as shown below.                               
    <project name="MyJavaProject" default="dist" basedir=".">
      <!-- set global properties for this build -->
      <property name="src" location="src"/>
      <property name="build" location="build"/>
      <property name="dist"  location="dist"/>
      <!-- root directory for the example source code: -->
      <property name="src.dir" value="${basedir}/src" />
      <target name="init">
        <!-- Create the time stamp -->
        <tstamp/>
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build}"/>
      </target>
      <target name="compile" depends="init"
            description="compile the source " >
        <!-- Compile the java code from ${src} into ${build} -->
        <javac srcdir="${src}" destdir="${build}"/>
      </target>
      <target name="dist" depends="compile"
            description="generate the distribution" >
        <!-- Create the output jar having compiled classes directory -->
        <mkdir dir="${dist}/lib"/>
        <!-- Put everything in ${build} into the MyJavaProject-${DSTAMP}.jar file -->
        <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
      </target>
      <target name="clean"
            description="clean up" >
        <!-- Delete the ${build} and ${dist} directory trees -->
        <delete dir="${build}"/>
        <delete dir="${dist}"/>
      </target>
    </project>

  •  From the run menu, open the command prompt, navigate to your project directory and type >ant compile, you will see following output.  
    D:\WorkSpace\MyJavaProject>ant compile
    Buildfile: build.xml
    init:
    compile:
        [javac] Compiling 1 source file to D:\SpyderWorkSpace\SimpleJavaProject\build
    BUILD SUCCESSFUL
    Total time: 2 seconds
      
  • If you use different name than build.xml for example ant-build.xml, the syntax of running ant target will be >ant -f ant-build.xml compile.
  • You can also define the properties in a separate file called build.properties and include that in your build.xml.
Ant target here just compiles your source, execute 'dist' target to create your distribution file, the compiled binary jar file. This way for all your project modules ant can be used. To put simple, anything that you do on command prompt can be done in Ant. Take a look at Apache Ant Documentation to learn Ant in full. If you are wanting to automate the software release process, i recommend Maven tool.

How to collect Code Coverage for Java Programs?

Byte code Instrumentation is a process of modifying your java byte code so that certain runtime information like code coverage data, profiling data can be collected for later analysis. Using byte code instrumentation we can trace the execution of the running program and monitor the object creations etc. The java memory profiling tools also instrument the byte code for this reason. In this article I’m going to show how we can instrument the byte code and collect the coverage data for a simple java project using Emma code coverage tool and with the help of build tool Ant.

There are two ways to collect the coverage data.
  1. On the fly code coverage: On the fly code coverage is when the program stops executing the coverage reports can be seen. Usually this method is used in automated test suits.  
  2. Offline Code: Coverage Offline coder coverage means that once the program testing is over, separately the coverage report is generated. This gives the flexibility for developers to generate coverage reports at any time.
 Get started with collecting code coverage reports for your java projects.
  1. Download a recent stable version emma jar. You need emma.jar and emma_ant.jar if you are using ant build tool for building your java projects.
  2. Get started with your project by following the instructions by provided by Emma.
How to merge coverage data?

This is important when developers are testing the instrumented Java Application. When each developer is done with their testing, they will be getting coverage.emma file. The coverage.emma files have to be merged before generating the coverage report.The 'report' ant task takes .emma files as input, you need to place all the coverage.emma files into a folder and provide these emma files as input to 'report' task to generate the collective coverage report.

Why is code coverage important?

Code coverage tells how strongly the code written by is tested. The code coverage report gives you confidence on the quality of your test cases. It helps you to understand what portion of your is covered during testing what portion is not covered, so that you can write test cases to cover the uncovered code. For any unit testing and developer integration testing activities, the collecting code reports is recommended.

 I'm explaining this in short here, a detailed article is going to be published on this blog in few days.

Monday, February 20, 2012

Simple steps to change blogger favicon


Step 1: Login into your Blogger Account.                  Blogger.com

Step 2: Click on Layout from Left Side bar options. 

Step 3: Click on Edit on the left side favicon.            

Step 4:  Select your favorite icon by clicking Browse button and save the same. You are done!

I faced an error while adding a favicon. The blogger says 'Not a Square Image'. I got this error from blogger when I created favicon using favicon.cc. So use  http://favicon-generator.org/ to create an icon of your interest.

Favicon may not immediately appear in your site. This may be because if you are using Firefox, it caches the images, you may want to clear your Firefox browser cache.

How to fix the warning 'This program might not have installed correctly'?

Windows 7/Vista  sometimes started throwing the warning dialog titled "Program Comparability Assistant" and the the warning dialog included the following message.
"This program might not have installed properly" and there were two options. 1) Reinstall using recommended settings. 2) This program installed correctly when customers double clicked on the installer executable that I had made and released to customers already.. Its was not a good time today for me and I did not know how to fix this problem immediately.

From msdn support website, I found that this warning message is thrown when the installer does not make any entry to the Add/Remove Programs, for example, the installer does not install an Uninstaller onto the control panel nor does it make a Windows Registry.

As a quick fix, see if following workarounds work for you.
  •  There is a service called Program Compatibility Assistant Service under your Windows Services. You can see this when your type the command services.msc in your windows Run command.  Try stopping this service and changing the service setting from automatic to manual. Follow this link for more details or see how to disable this warning message.
  • Writing the right install script can solve this. Find more information on this here.    
  • Try adding a manifest file mentioning the supported OS as both Windows Vista and Windows 7.
Here is the link that will resolve the issue: http://msdn.microsoft.com/en-us/library/aa374191.aspx

I personally I did not like the way Microsoft is handling this computability issues with this windows executable. We can't ask our customers to go and disable the windows Program Compatibility Assist Service (PCAS) without knowing what are the side effects of disabling this service.  Not an acceptable work around. This warning message is never meant to be resolved by the end Windows customers. The warning puts customers into confused state. I'm yet to understand the exact root cause of this issue.

I had created Windows executable by a wrapper called Lanuch4j which made be difficult to resolve this issue. If anyone knows how to programmatically resolve the issue without disabling the windows service, please let me know.

Sunday, February 19, 2012

How to handle change requests effectively

Change requests are common in any product development or services business companies. Change request is something that customers ask for after working with the product. It can be a product enhancement or a change in the workflow of the system. Change requests can be initiated by any stakeholders such as Customers, development team members, testing team members etc. In this article I'm going to talk about how change requests can be taken up effectively.

1. Understand the change: The change in the software has always an impact and cost. Hence a thorough analysis on the change and its impact has to be carried out and understood before jumping on to implement it. Sometimes it could be decided that the requested change may not even be taken up if it involves too much cost and design change.

2. Estimate time and cost: Estimating the time required to implement the change is important. The estimation decides the cost of implementing it and this is one of the challenges in handling software change requests.

3. How will the change impact the customers? : This is very essential factor to consider while implementing a change in the software product since the customers would be already trained on how to use the product and they are used to it. Its not about just implementing the change request but to consider how your end product customers are going to be impacted due to this change. A change in the workflow of the product will also involve the training the product users about the new change and updating the user guide as well.

4. Does the change have design impact?

Certain change requests might involve completely redesigning the product, so a thorough design impact analysis should be carried out before taking up the change request. When it comes to design change, it means a lot. The design change requires impact analysis on all the modules in the project. The design impact analysis helps to better estimate the cost of implementing the change request.

5. Discuss the change request with development team

Only the people who developed the product know the impacts, so its crucial to bring the change request into the consideration of development team to gather the impacted areas. It is the development team members who are going to implement the change request.


6. Project the cost and estimation of implementing the change request to your customers

Ultimately customers are the one who are going to pay for you, so discuss the cost of implementing the change request with them and more importantly get the approval from them. Categorize the cost into making code changes, updating test cases, testing effort, impacts testing effort and project the final cost of taking up the change request.

7. When to decide not to take up the change requests?

 If the change requests demands huge design changes and impacts almost every module of the project and requires the customers to re-train about the product better, decide not take up the change request. Especially when the change request adds little value to the customers but involves too much cost, convince your customers and do not even implement the change request.

8. Make it aware to all Change Control Board (CCB) members

Some organizations have change control boards who are responsible for handling the changes. Call up for a CCB meetings and discuss with them clearly about the change, its cost, estimation and get their approval to go ahead with the change.

As best practices, product bugs should not be raised as Change Requests. The CR should be valued by your customers and make end user life easier using your product. Log the change in a defect tracking tool categorizing it as a change request, many defect tracking tools have this option of logging change requests. Record all the discussion and meeting minutes in the tool against the change request, This is required for maintenance purposes in future.

By handling the change requests (CRs) effectively, we can reduce the number of test cycles. Have a look at my article on how to reduce the Software Test Cycles.
Related Posts Plugin for WordPress, Blogger...