Skill To Duck And Weave

By on Aug 2, 2012 in eng |

Share On GoogleShare On FacebookShare On Twitter

I was quite nervous yesterday. It was the last day that code could be committed for this sprint and I just found out there was a several defects in my code. I was able to solve them all in the afternoon and the struggling of finding workarounds got me thinking about task estimation from developers’ point of view.

I remember an article (with title; Pull No Punches) I read in Entrepreneur magazine. The article has quoted Mike Tyson’s word; “Everybody has a plan, until they get punched in the face.” This is to draw an analogy of startup founders who spend large effort to come up with detailed business plan but failed to effectively adjust to obstacles presenting along the road. The line I like the most is “More important than attempting to forecast is knowing how to duck and weave”. Once I got the defects yesterday fixed, this line sprung up in my mind immediately.

I don’t know the better way to make it concrete other than just go into the details. I was implementing a way to copy/paste some web UI parts. At the start of the sprint, I thought the usual JQuery’s clone() method should be easy enough for this. I could just make a clone of the source component and appended new copied to target place and everything should work fine. I found out later that my code worked on Firefox but behaved strangely on IE7. I tried to find the root cause but it seemed to come from something related to cross browser compatibility. I ended up seeking other ways to make a new copy of the source component. I tried “outerHTML” DOM property which made the previous problem gone but also caused new problem in JQuery date picker. I finally made it work by using JQuery’s html() which seemed to give me the truly new copy of the original source (I am also need some code to copy some values that are not stored in raw html from source component to the new one).

My point is that unexpected things could happen and sometimes it is not about how good your estimation is but rather be how good you can duck and weaves through the problems. If this problem occurred to me at the time I just started to learn JQuery, I might not be able to solve it. The task is done within target time not because I am good at estimation at the sprint planning but because I am familiar with the tool I use enough to find the approach that makes it work.

It also pays to know how to do things in more than one way. Reading blogs or technical article or looking at your friends’ code may get you more techniques to handle problems. The tricks might become handy later, who knows.