Wednesday 24 September 2008

Comments Please

I was reading about Chrome and how Google might have got themselves into trouble by reverse-engineering Windows

The giveaway seems to have been a comment in the code
// Completely undocumented from Microsoft. You can find this information by
// disassembling Vista's SP1 kernel32.dll with your favorite disassembler


Usually code commenting is A Good Thing - is this a case where it was actually A Bad Thing ?

It did remind me of a tester I interviewed who said he did code reviews. When I pressed for further details he said that he didn't actually read or understand the code, he just looked through it to make sure there were comments in it...

But at least there were probably comments to be found, one of my first jobs when I joined the s/w industry was to go through a huge pile of Assembler code and document how it worked as the code was written by a third party and the contract didn't state that there had to be code documentation

And finally, be careful with comments or you could waste 357 years

2 comments:

Jonathan Kohl said...

Good post.

Mike Kelly has a great story in his 5 Questions with Michael Hunter interview (among other places) about looking through HTML comments:
http://www.ddj.com/blog/debugblog/archives/2008/09/five_questions_68.html

Mike told me this story several years ago, and I repeat it often when teaching testers. One tester I worked with told me she did comment combing on their external web site after working with me, and found nothing out of the ordinary, so she decided to try it with a competitor's web site.

Turned out they (the competitor) had commented out their upcoming releases over several months, essentially revealing their product release schedule information, including upcoming features, etc. Needless to say, her marketing team were very interested in comment combing after that.

Anonymous said...

Outstanding post.... thank you for the share... keep it up...
go to market plan ppt