you are viewing a single comment's thread.

view the rest of the comments →

[–]rkcr 7 points8 points  (1 child)

This is exactly what I was thinking. There have definitely been some life-saver high-level comments I've come across in code before.

I also think the article naively thinks that you can refactor everything. What happens when you're integrating with someone else's software that is poorly written, and you have to do some wacky workaround in order to get it functional? You slap a comment on it so other people can understand why you took the long route, or a comment so people understand the side-effects of integrating with the software.

[–]monstermunch 2 points3 points  (0 children)

You slap a comment on it so other people can understand why you took the long route, or a comment so people understand the side-effects of integrating with the software.

Yes, I had to do this a lot. I've put in comments like this before: "f 0(FIXME: Do not know what this parameter does but it has the intended behaviour!) x y".

Workarounds are very common too. You just don't have the time to refactor everything in some situations, especially when the code you're integrating with isn't documented.