> It's a convention that comments refer to the following lines of code, not above.
Oh, an "argument" on the base of "We have always done it that way". So we don't have even an argument here.
And no, this nonsensical "convention" is not everywhere followed as people realized that code should be written in the most readable way possible.
I know a lot of human langues that are read form top to bottom. I don't know even one where you read bottom to top…
Jumping around mentality in code is a sure way to make the code hard to understand. Ever heard the reason behind why `goto` is considered bad?
Ever seen Python doc-strings?
Did you write your comment under my comment or did you write it above? Why is this so?
Also writing comments above leads very often to the kind of comments that describe what the following code does. Which is the most wrong type of comments, like it was said here not only once.
Comments below lead OTOH naturally to comments that describe why the code was written like it was written.
There may be exceptions for the rule and cases where it make sense to have something like a "heading" comment. But this cases are very rare.
If you actually think about it almost all (good!) comments make much more sense below the code that is commented as this is the natural way how to write. Just look how this site here is structured. And it's all about comments!
Bottom line: Use your own brain! Don't do things because someone told you "We have always done it that way"!