Do you have any good advice/links to a set of coding standards or best practices to follow?

前端 未结 20 2632
再見小時候
再見小時候 2021-02-01 10:40

For those of us that have programmed enough I’m sure we have come across many different flavours of coding standards that you can use when it comes to programming.

e.g.

20条回答
  •  旧时难觅i
    2021-02-01 11:06

    Coding standards are good, but coding standards written from scratch in which the company reinvents the wheel, or coding standards imposed by a single "prophet", can be worse than having no coding standards at all.

    This means:

    • Coding standards should be discussed and agreed upon.
    • The coding standards document should include the reasons behind each rule.
    • Coding standards should be at least partially based on reliable sources.

    The sources I know of for the languages in your tags are:

    • For C++: The book C++ Coding Standards by Sutter/Alexandrescu.
    • For C#: 4 or 5 PDF's I found googling for C# Coding Standards :)

提交回复
热议问题