Remix.run Logo
qwerpy 32 minutes ago

Are the comments wrong or just not concise?

I looked at https://github.com/adonis-singh/re4/blob/master/src/wep/objM...

Can't really decipher what line 21 is saying so I concede there could be some slop in there. But the comments on lines 27-30 seem to be informative and give some context that the code doesn't have.

Granted, I'm not an expert on RE4's source code, but the comments look helpful enough.

rtpg 2 minutes ago | parent [-]

I didn't say they were wrong, I said they were not high-quality.

Every company works in their own way, but I highly doubt the original source would have a big paragraph at the top instead of a more "structured" comment. Or maybe even nothing at all!

Here's a "counterexample": the pistol code for half life 2[0]. Comments are pretty sparse because it's all relatively self explanatory. The comments that are present are to point out things that are not so.

You end up with something that's easy to work with and where you're not trying to read a paragraph of text that enumerates a bunch of properties of the code in the file in no particular order.

Some things are important context for the whole file. Some things are important context for a fragment of code. Some things ... are simply not that important to note.

[0]: https://github.com/ValveSoftware/source-sdk-2013/blob/master...