My Invitation to join the Internet Society

February 22, 2011

The Internet Society is an independent international nonprofit organisation founded in 1992 to provide leadership in Internet related standards, education, and policy around the world. I have been the Global Member since 2009, and this is a great platform for Networking, Training and Development, Influence, Advocacy, and Implementation. Please follow the link below to join the membership:

https://portal.isoc.org/EBusiness/NewMemberStepOne.aspx?refid=xd1300577hf

Once you join, follow the link below to apply for the Grants program up to USD 10,000 :
https://www.isoc.org/isoc/chapters/projects/

Deployment workflow

December 13, 2010

A blog post – Staging Servers, Source Control & Deploy Workflows, And Other Stuff Nobody Teaches You ( Link), has correctly pointed out that only few companies and teams have tried to improve in this area. A well defined procedures, using automated tools for managing work flow, will really pay off. It will make the process of software development more visible and accountable. As the author pointed out, it will help to find the problem earlier before going to production. And by using better tools it is easier to roll back the whole system to previous working state.

Project Management and Metrics

November 15, 2010

After reading Evolutionary architecture and emergent design: Environmental considerations for design, Part 1 (URL ), a great piece on project management and metrics collection, I decided to generate a chart for my own project.

Since we have been already using Sonar Reports, it was easier for me to create similar time machine chart after the period I have started taking care of the project. While there are number of other factors that are going to determine if a project is adding value to a company, but this is certainly one of them.

Sonar Reports Time Machine

Sonar Reports Time Machine

Anyone who understands the software development likes to see complexity/method and coverage constant when complexity is steady growing as number of lines of code increases. As we go along we certainly can increase our coverage and make sure that our important pieces of code are covered.

Sonar report is a great tool to find various metrics of the code base, put them in charts and other visual forms and ensure that it is adding value to the company.

You can look at http://nemo.sonarsource.org/ to see how open source project’s code bases are evolving.

Our Scrum adoption kicked off

August 3, 2010

In my spare time I have been reading about Scrum and how to implement it for an offshore development for a while. There are both success stories and failures but I like it because it provides visibility, motivate developers by providing a complete task (business requirements gathering, design decisions, implementation, unit testing) and allows team to quickly react to changes.

As a kick off to it, I sent a Daily Standup Email to my onshore team answering three questions:

What have you done since yesterday?

What are you planning to do today (tomorrow)?

Do you have any problems preventing you from accomplishing your goal?

That is another good thing about Agile, because you can modify the whole process as you want or as it suits the environment.  And, you don’t have to adopt the whole process and just pick those that will increase the productivity, provide visibility and motive developers.

I will continue blogging my experience using Scrum for offshore development and management.  Some of the articles/essays that I read are:

http://www.martinfowler.com/articles/agileOffshore.html

http://www.scrumalliance.org/pages/scrum_student_resources



Dependency in JUnit Test Cases

May 26, 2010

We had a debate in our team for identifying what are the best practices for writing JUnit Test cases for DAO classes.
Let’s consider an object Foo whose DAO is something like this:

Interface FooDAO{
getById(id);
delete(foo);
save(foo);
}

A corresponding test case for this FooDAO will be:


FooDAOTestCase{
setup(){
//Save Foo object to use in test
Foo fooToTest = new Foo();
//Either use save()
fooDAO.save(fooToTest)
//or use low level api
connection.executeQuery(“INSERT INTO FOO_TABLE values(1,’bar’);
}
testGetById(){
}
testDelete(){
}
testSave(){
}
}

Now in order to write test cases for testGetById and testDelete I have to make sure that there exists a Foo in DB. I can either use the save() or write a low level API like using jdbcTemlpate if I am using Spring to save it.
My colleagues were arguing that we should be using the already existing save() in the Setup() because of the following reasons:-

  1. It already exists, don’t need to write code avoiding overhead
  2. If the schema changes there will be only one place to change the SQL Query
  3. If testGetById fails because save() failed we will find out where to go and fix it!

But, I insist on writing code separately to insert Foo instead of using save() for the following reasons:

  1. The big reason is to avoid dependency to other code or method. That means if I am testing getById(), the scope of this test should be only this method. This is one of the best practices of using JUnit.
  2. If I am doing Test Driven Development (TDD), I can copy those SQL statements into the production code.

I guess I will continue writing separate code in the future and advocating it in the future :-)

Beware: Identity value can reach maximum value

March 5, 2010

Yesterday we were notified that our client could not logged into the Admin Console because of some Exception. That caused them to lose almost a whole day of work. After coming to office early in the morning, I checked at the log and found that the exception was because the IDENTITY value we were using for one of the table reached its maximum value – 32676 for type SMALLINT. I just converted the type to INT and the problem was resolved.

This was technically a very small problem but it caused the client to lose half a day of work. We learned that we should be checking these values continuously in other tables in our database to make sure that we don’t run into similar cases. There are scripts to do this as well. There should be other ways to automatically reseed these values or truncate the data by using triggers once it reaches the maximum value.

Just wanted to make every one cautious that a small glitch like this can cause loss of work, bring server down and harm client relation.

Deploying war outside of deploy directory on jboss 4.2.3.GA

January 6, 2010

In order to deploy a war file outside of the deploy directory on jboss 4.2.3.GA you need to add the location of the file in jboss-service.xml. This file is found inside jboss/server/default/conf/jboss-service.xml. The attribute name is URLs.

For e.g. if your war file resides at C:\Apps\Foo, then you need to add like this:

<attribute name=”URLs”>
deploy/,file:\C:\Apps\Foo
</attribute>

For multiple war files, you need to end the URI with “\” so that jboss scans directory for all the war to deploy. If you are not deploying any war inside deploy directory you can remove the “deploy/”.

This is on Windows XP.


Follow

Get every new post delivered to your Inbox.