Friday, March 25, 2005

So many things to do, so little time

My blog is really falling behind, yet I have little time to do catch up. There are so many things on my plate right now that I think I should just pick one, focus on it. I am seriouse. When I cannot even find time to play "Enemy Territory" in a week, I think I am trying to juggling too many balls.

Work at the client is busy as well. We have extended our work here until the end of May, which I think is very nice. It was sort of a hard deadline that we will only be here until the end of March, and we have been working hard on the transition. With our work extended here, we can finally see the product gets release and deployed rather than having to just put faith in ourselves about the successfull of our enablement.

As part of the XPE project release, and following the book Pragmatic Project Automation, I am starting building a release script in Ruby. (Ruby is a language that I have grown more and more fond of, BTW). I figure I might as well make it generic enough so that I can use it for other projects. So I have created a rubybuilder (or Build Master) on ruby forge (http://rubyforge.org/projects/rubybuilder/). Need to do some inital check-in's of the source code and the website setup.

Another project that I need to work on is the jbuilder-opentool project. That is because I have found Eclipse more and more annoying with each and every day. I don't care what people say, this is one product that just never failed to surprise me in a bad way (instead of like IntelliJ, which always surprises you in a good way. I am too familiar with JBuilder to be surprised either way). If I can just create an opentool that allows me read the Eclipse workspace and project, I will be able to do something useful things with JBuilder, starting with profiling.

Talking about profiling, another item in my list was the performance of the webapp that we were building. Somehow it just hangs whenever trying to load from database. Finally with the DBA's help, I find out that if you use "setLong" instead of "setBigDecimal" in prepared statement for a numeric column that is used for search, the index will not be used, rather, the query will simply scan the table. Converting a long to a BigDecimal is a bit hassel, so I settled for changing the query to convert the parameter using "convert" function in sybase.

On the last note, I just noticed (Thank you WebPastie, great job Bill!), that if you search on google with "Shane Duan", the first page is all mine, different stuff I submitted dating all the way back to my start-up days. I supposed an English name "Shane" with a Chinese "Duan" is an unusual combination for a name.

Anyhow, this post barely scratch the surface of what I have been doing presently, more coming up. Not this weekend though, because the snow in Tahoe is too good to miss!!!

Saturday, March 05, 2005

XP Practices in Use

So we have an opensource page built. I don't have something that I am very proud of (http://opensource.thoughtworks.com/people/shaneduan.jsp) yet, but this is still a good start. Adam, Paul and I have some good idea from our current project about writing some library to help writing testing about database related library. We still need to sort out the detail but the idea is to follow the pattern that we have so that we can run acceptance test locally against HSQLDB, and have cruisecontrol run them against the real database.

It seems that it helps by writing down my thoughts and experiences as I encounter different issues. So even though I originally meant this blog to be what I have seen and heard among fellow ThoughtWorkers, I am going to writing down what I see and hear in the projects that I work in as well.

Ping Pong Pattern in Pair Programming
Adam mentioned it before and we tried, my experience was not exactly great, because sometimes you just need to grab the keyboard because either suddenly you are in an area that you know better, you see a pattern that you want to apply to some code you wrote earlier, or you simply want to drag your partner out of the hole he or she starts digging. Either you break the pattern start coding yourself, or try to direct your partner what to write (which can be really frustrating for you and annoying for him/her). Or sometimes while fixing a test, you notice that you want to touch another class. So do you write a failing test for that class and fix yourself, or let your partner fix it, and come back fix the test you are trying to fix? My experience has always been, if something does not feel natural, stop it, if it is something that you have to keep reminding yourself, figure out why and see if it is necessary. (Yes, test-driven development can feel that way but now I cannot imagin not doing that. Well, JBuilder opentools can be an exception, but I am working on that).

However, it worked surpringly well yesterday.

It is a new area that two developers worked on. One left for vocation so one developer knows the code. Friday morning, we have three stories that we want to start on, all related to the same area. So instead of pairing, we did 'triple-paring' for a couple of hours on one story (Luckily, mine. :D). Since it was not clear how to do it, we decided to ping-pong (or rather cutthroat). And it worked very well. I noticed that we are more focused, and I don't have to keep pulling the other people's leg by asking them to write test first. And we finished rather smoothly.

So my conclusion is, pair-programming works best of two developers are on the same level, and are both disciplined on test-driven development and agressive refactoring. Ping-poing pairing works best when at least one of the developers are still yet to be fully converted. Now that I have written it, it is a little like staing the obvious.

Stand-up Token
When we started this enablment project, we introduced stand-up meeting. So sometimes people are too shy to speak up, or the conversation can drag. Roben brought in a toy ball as a stand up token. A person can speak only when he/she has the ball, and tosses it to the next person once he/she is done. It is another thing that I have heard and never figured out how it helps.

It turns out that having a ball tossed to you does have a psychological effect on you. People speak louder and clearer. Even though we didn't impose the rule that you have to ask for the ball in order to speak, people do feel a bit guilty to strike a conversation without it. Instead, we write topics on the white board and get to it right after the stand-up, which is exactly what we should do.

Role Hats
No I don't have a good experience with this one, yet. But I wonder if it is worth it to introduce a role hats. Lacking business analyst is starting to taking a toll, I think. More and more often we ask around what is the whole picture of a certain feature, because developers implemented them by implementing one story after another, and the QA tested them by writing one acceptance after another. We are using Confluence to put support document, however no one has any incentive to keep them correct (that is right, those documents we have sometimes do not match the old code we see).