Sunday, November 30, 2008

Plan Of Action - TDD

  • Install the measurement tools, like emma, clover, Cobertura, CodeCover
  • Learn/understand the project code. Each project may have unique requirements in terms of writing unit tests, like struts, database, containers API, any other API.
  • Use FindBug & CheckStyle reports to improve the quality of code.
  • Build the initial required framework for writing unit tests, for the ease of rest of team.
  • Move from [Code - Test - Debug] => [Test - Code - Refactor] Mode
  • Achieve the state of -- Writing a new test should not introduce more overhead than the test itself.

Writing a test makes you ask a lot of questions related to the requirements as well as implementation, which eventually is very helpful to filter out any bugs which may be introduced in the appications otherwise.

What I want to do?

This is a letter I wrote to the management I work for -

Fortunately I got opportunities to work with & learn from industry experts like Bob Martin, Michael Feathers and Brian Marrick during my tenure in US. All of them and all the software industry experts strongly recommend test driven development as a key approach to improve software deliverables and creating very efficient and highly maintainable software.

We, in our projects, even today try to promote test driven development by writing test cases for the deliverables before we start any development. But unfortunately we write tests in XL sheets and Word documents or even worst we don’t write them at all. Having tests written in documents makes them dead and they eventually get buried in some central document repository. That’s where the dead things go. It is nothing better than not having it.

Due to these reasons the industry experts strongly recommend executable unit tests which can be run in an automated fashion. It requires a great mindset change to start writing tests before the code. We may not see clear benefits until we have at least 30% of code coverage. But still I think we have nothing to lose, as we are already in such a bad shape with the kind of software we build.

So my question to the group is -- should we allow someone to completely dedicatedly focus on this problem?

Now Bob Martin, Michael Feathers and Brian Marrick are not going to come and write code for us. We ourselves have to do it. Fortunately I got opportunities to work with & learn from Bob Martin, Michael Feathers and Brian Marrick during my tenure in US. I can at least talk about, write and demonstrate the importance of Unit testing, what I have learnt from them and then also experienced it myself.

I request the group to give me an opportunity to work for this initiative.

Thank you for reading till this point, a few more points ahead…



What I want to do?
· Be a Unit & Automated Testing Champion
· Spread best practices across projects in ODC
· Work with different team on improving development practices
· Take sessions on TDD, Automated Testing, Checklists, FindBugs, CheckStyle, CI, Emma, Design Patterns, Java, Struts, Hibernate, Spring
· Increase test coverage of each project that I work on.
· Keep continuous track of latest technologies
· Publish ideas in forums like Arch CoE, Wiki
· Contribute to various groups, open source.

My Quantifiable Goals [in 3 months]:
· Increase test coverage of 2 projects by/to 50%
· Conduct at least 5 sessions on software development best practices
· Initiate 5 techies to participate in knowledge sharing
· Share the achievements/learning once a week in Architecture CoE

What am I doing right now?
· Deployments, PRD & QA. Thankfully we have automated deployments for INT.
· Resolve technical queries of team.
· Complete Stories & bug fixes.
· Lots of Coordination activities, part of leading the team.
· Perform all the thankless activities of a Tech-lead.
· Use TDD for whatever I code and spread the word in team.
· Talk about Testing practices informally whenever I get a chance.
· Work with some proactive people to help them with any doubts related to testing practices.
· A few PL related activities like appraisals.
· I have also been told that I am a scrum master for CTB team.


Thank you for reading this, please send your comments.

Sunday, November 23, 2008

Used Car Buying Tips - India :)

Questions to ask --
-Mumbai reg?
-Reason for selling?
-First owner?
-How old is Battery?
-Tyres/Stepny - Have they been changed / or are they original?
-Dents/Scratches/Re-painted?
-Rust?
-Brakes?
-Leaks - check the tyre rims, showing any leakage signs?
-Serviced on time? Have Records?
-Music System? Audio CD player /USB
-Kilometers run?
-Who drives it?
-Price negotiable?
-Suspension - Press / push the car down with your hands and try to shake it a bit. If the suspensions are good it will move the least. You may also use this to validate the meter reading. If the suspension are good then low meter reading is valid.

TDD Articles

http://blog.jtimothyking.com/2006/07/11/twelve-benefits-of-writing-unit-tests-first

http://msdn.microsoft.com/en-us/magazine/cc163665.aspx

http://www.aqris.com/pages/viewpage.action?pageId=5406779