Asking the author is not a viable solution. They might not remember, they might not work where you are anymore or you might have not gotten the code from someone in person to begin with. Information that is not in the code or in the documentation is almost guaranteed to be lost eventually.
there is a performance problem (because if there wasn't, the point is moot)
one can't check whether changing to '\n' fixes it (because there's no tests? Because there's no performance targets?)
there's no documentation about this in a comment or whatever
there's nothing to see from code history (e.g. whether this part was written by an intern thereby making the probability of them nor knowing what endl does)
there's nobody to ask for all the reasons you evoke above.
2
u/patatahooligan Mar 31 '19
Asking the author is not a viable solution. They might not remember, they might not work where you are anymore or you might have not gotten the code from someone in person to begin with. Information that is not in the code or in the documentation is almost guaranteed to be lost eventually.