There are some unfortunate habits most beginners — and even some experienced! — programmers make. For example, in Python
it is common to not know about PEP8 standard, or include if __name__ == "__main__":
. When addressing these common mistakes answers/comments should ideally include a link with additional information. And since these type of mistakes occur so frequentl I thought that it might be useful to collect some standard replies for quick copy&paste.
I think the best structure would be one answer addressing general tips for improving code, while each additional answer should address common bad habits in a particular answer.
See for instance LaTeX meta - Text building blocks or Mathematics meta - Generalizations of commonly asked questions for some similar metaposts in our sister communities.