I find it ironic how most programmers hate adding documentation, but then complaint about other software not having enough documentation. While working on some bugs I would thank whoever added comments and curse who didn’t. Therefore its only fair that I add comments to my code even though it takes more time. Its time well spent.

While working on some new features I was surprised on how much time I spent adding inline comments to the code. I had created 6-7 classes and was working on them in an ad-hoc manner, going back and forth adding methods, logic etc. I witnessed the following benifits:

  • No need to decode variable names, you know exactly what they do.
  • Javadoc for methods, saves you time from trying to figure out what it really does.
  • If you came up with a nifty little trick to solve a problem, it is essential you add comments or else it’ll take you longer to try and understand it later.

These benefits are multiplied when you work in teams. Code reviews take less time and there’s less chance of misinterpretation. The reviewer in frustration would just reject your changes or even worse approve them, only to find a bug later.

I believe implementation isnt fully complete unless you have finished documenting it. Yes Yes I know you have deadlines, but if you were to just add comments while writing code it wont take you any longer.

So in summary even though you might hate adding documentation, DO IT ! Someone will thank you later when they see your code.

They saw it coming and bailed out before it got any worse, unlike Sony that hung on to its Betamax and MiniDisc for way too long. No inflated egos at Toshiba.

This will definitely help PS3 sales because HD-DVD on the Xbox360 is not a factor anymore. I wonder if Microsoft will use Blu-Ray in the successor to Xbox360.

I came across this last week and found it completely ridiculous.

Then this week I read this, in which the Mayor basically tells his whiny residents to F*** off .. lol ..

First win !!

11/02/2008

Tonight we won our first game of the season, so now we are a 0.500 team with a 1-1 record. We lost the first game 3-6 and won the second game 9-3. We have talent on our team but it’ll take time to gel together. Other teams have played as a team before but we are still getting to know each other as teammates.

I did let in a soft goal on a wrap-around in our win, but I was scored on in similar fashion in the first game. So I need to work on that.

My Defense did a great job clearing rebounds and covering players in the slot area. They played great tonight, hopefully we’ll keep improving and compete in every game :) .

Oh as a goalie I love this new McDonald’s commercial.

One of my tasks was to load the database in our office with data from an external source sent to us in a Excel file. There were thousands of records and writing an insert statement for each one of them would not be fun or sane.

So I came across a tool called sqlldr, which helps you bulk load data in CSV (comma separated value) format to a database. Below is the CTL file that you run from within sqlldr, the CTL file describes the data to be imported.

LOAD DATA
INFILE contacts.dat
INTO TABLE IMPORT_CONTACTS
FIELDS TERMINATED BY ‘,’
(id, last_name, first_name, position, department)

 

 


I skated for the first time 4 years ago in my second year at University but gave up on it ever since. I lived far away from the canal and I got frustrated by how tricky it was. Last week I got reacquainted with skating thanks to a bunch of my persistent friends (they made me feel sorry for bailing out on them). I took out my skates after 4 years and amazingly they hadn’t rusted :-O.

We got to the rideau canal at around 7 P.M. and it was -5C outside, which was just perfect. This time I had prepared well for the cold and wore tons of layers and it really kept me warm. For the first few minutes I was cursing at my friends for doing this to me, but a little while later I realized I could skate well. Well enough not to fall on my ass every 10 feet, so we ended up skating for almost 2 hours and I loved it :) . So I guess perseverance pays off and I went back today for 1 hour :D