4/28/2006

Agile, anyone?

For those of you that are not Agiled, you are really missing out on something. Agile development/process came into existence quite sometime back and it took me quite sometime to really understand what all it offered but now I am totally into it, realise all it's benefits and can recommend it to one and all!

It can and should be customized to your needs just as its name suggests. Being Agile is to adapt and adopt the Agile methodologies to your software development process. Ummm..I will differ on that. We are not just talking about the software dev process. Software Project Management would be equally benefited from Agile.

Agile methods are a family of development processes, not a single approach to software development. They may not be panacea although I would like to say that some practices can be accommodated irrespective of what platform, language you are on or the size of the team. An instance of that would be continuous integration on the development side. Continuous Integration is a very active process and believes in giving developers clear and constant feedback on their coding changes. Lots of other aspects can be integrated with this, for instance acceptance testing, code coverage, complexity reports, unit tests blah blah. I see the major benefits from CI and Unit testing.

Project Management practices like continuous feedback to the customer through frequent demonstrations is another thing that could be followed by every project. The best thing about this is that the customers have a say in what they want and what they don't and get their most critical components built first. This will enable them to cut their time to market and will allow them to release features in a phased manner. Basically, they have more control and are writers of their own destiny!
There are many other aspects that I am in support of like story points, standups, less documentation but I feel that one should moderate the use of these and not let them slip out of control!

All in all, I see many benefits of using the Agile process (much better than waterfall and RUP processes) and see it as the direction most of the development should move towards. I have heard of people say that to see Agile thrive, co-location is required but I really have to negate that. I feel the best part of Agile is that it helps a lot when co-location is "not possible", just by the nature of software projects these days (most of them technically outsourced and functionally here). The whole process is conducive to remote management and surely gives the resources of the project a feeling of belonging! There is a lot of knowledge sharing and a meaning to development! Go Agile!!!

4/23/2006

JDBC Debugging

PreparedStatements in Java are very helpful and allow pre-compiling of queries making calls to the database run much faster. On some operating systems like Himalaya, NSK, pre-compiling queries takes more time than running. Caching preparedstatements and running queries on them makes perfect sense on such platforms! But, these helpful objects have rendered us helpless in a couple of aspects. Well, I can think of two for now :).

1) If you have any problems running them, debugging them is a nightmare. You could accomplish it by constructing the query yourself by adding all string, non-string attributes to the "?"s in PreparedStatements and looking at the log statement. This, I would say is very very cumbersome, especially for queries with many attributes. And a developers mindset wouldn't put that statement in unless a problem is encountered !!

2) Table schema changes make cached preparedstatements useless. Well, I guess you lose something to gain something :). Maybe, there is a better way of managing the caches that I don't know of..

Good news is here! There are a couple of ways that you could tackle the first problem. There is some open source software that can take care of headaches like this. There is a debugging driver that you can take a look at.
This driver works by intercepting your calls to the database (Interceptor pattern) and logging your calls based on whether you turn this particular logging on in your log4j properties.
The only configuration changes on your side would be changes to the "driver URL" and the changes to log4j.xml to include logging properties for the driver. I am sure folks getting weird un-debbugable errors like 'Comma not found' and folks using tools like Hibernate where there is very little control on logging final SQL would find this to be a boon. There is one more tool that could do it too. It's called P6Spy and does just about the same thing as the logging driver!
So, for now folks, go ahead and use PreparedStatements with Confidence :)

Starting notes ...

Okay, I am a cartoon enthusiast and I love Madagascar!! I am not ashamed of being kiddish :). I carry the same inquisitveness of a kid and I question the status quo and most of all, I am proud of it. I chose this as my blog title because I like to mix some fun with work. Work without it's delicate, funny moments seems stressful, robotic and uninteresting at the least!

Btw, I am a big time Calvin n Hobbes fan. He figures as my desktop wallpaper!!And
ofcourse there is Dilbert to add some wit. I will try and sprinkle my blog with Calvin and Dilbert every now and then..