4 ms·
I'm doing sometimes 1, but rarely - for example I've found my nickname about 5 times in a huge codebase. It's easier to search for it, and gives me back clues -
by malkia 16y ago
I'm doing sometimes 1, but rarely - for example I've found my nickname about 5 times in a huge codebase. It's easier to search for it, and gives me back clues - memos - that are even easier to see from P4,svn,git etc. log/changelist. And sometimes that depot is not present, especially if you cooperate with different studio and there is no way to exchange depots (they might even use something else).
So sometimes that's okay.
Number 2 is also sometimes needed. But instead of commenting it like C++, we #ifdef it 0. It's probably wrong, but if you are working in "foreign waters" and you are not sure, old code like this might give some clues (this is assuming the code base is not really that good, and not much documentation either).
3 is awfull, but acceptable for standard libraries, or code that is really trying to be specific about something.
4 is also okay, but not like this - it could be: "// TODO: Jimmie's bsp file (quake bsp) wasn't working due to some new lumps introduced. Temporarily fixed, needs proper one.
Also a coder introduced a TODO macro, that in Visual Studio actually prints out TODO when it's building the app.
Seen 5, and it's reasonable - for example: "Due to short deadline, blah blah blah". Again if possible add the TODO macro, so it's fixed later.
For game development for example - It's almost always more important to ship on time, rather than to have some well commented code. I wish that was the case, but I haven't found a studio where this is really done - maybe engine, sdk, framework, library developers do that.