Friday, 14 March 2014

Commenting the Code

I don't mean pointing at a function and saying thing like "Oh how it is so very cute! How old is it?" or "Why hasn't this one been though any manners? It's rude to handle your variables that way!". I mean writing comments about the function of classes, functions, and operations for the future developers to see.

It is too easy not to comment.

You think the function is so short and easy to read, that it would be a waste of disk space to write a comment about it. In reality, the function gradually grows to be a monster of a function, and still there are no comments.

Or you think that the few lines you wrote are just temporary, and will be removed tomorrow. In reality those lines will haunt your grandchildren (okay, maybe not, but at least they stay in the code for multiple of years).

Or you think the only person will ever see the code is yourself, and there is no need to comment because you know what the class does. It might be true, that no one else will ever see or use that particular piece of code, but after a while (and thousands of written lines) you will forget what it supposedly does. And then there is no one else that could remember the true purpose of your code.


So "lessons I have learned am trying to learn, part two": Comment, comment, and comment. For your own sake if not for others.

Thursday, 13 March 2014

Jumping from One Tool to Another

We are an agile organization. It means that whenever me or my younger collegue find a new shiny tool, we immediately want to use it...

Our latest find has been Atlassian products, which include JIRA for project tracking and issue managament, Confluence for wiki and meeting notes, and finally Stash (Git) for source code repositories. So far it is looking good, and integration between the three tools is a lot better than the system we had previously.

One has to love small organizations: It took us couple of days to think about changing the toolset, and then couple of additional days to install and configure the tools, and copy all necessary data.

Time from the initial suggestion to active use: seven days.

Of course, new doesn't automatically mean it's better. But as long as the change does not require a large investment (either money or time), it might be worth a shot. Just remember not to ship the old tools straight to /dev/null...