Every time, I can read some good things. They are so profound insights, so clearly written and organized, I must include it in my personal "Best in history" collection. Recently, I have added a new article titled best practices for scientific computing.ArticleI hope every reader who reads this article will find time to read it. I will list the key points here to encourage you to read the full text. I wrote very well.
-
- Write to personProgramInstead of the computer.
- A program, for those who read it, should not require the reader to load too much background/related knowledge in the brain at a time.
- Naming must be consistent, clear, and meaningful
- CodeConsistent style and format
- Various tasks in software development must be divided into tasks of about one hour.
-
- Automated repetitive work.
- Let the computer do repetitive work
- Save recently used commands to a file for reuse.
- Use compilation tools to automate System Processes
-
- Use a computer to record history
- Use software tools to automatically track computer work
-
- Gradually improve.
- Every time you take a small step, get feedback in a timely manner, and correct it in a timely manner
-
- Use version control.
- Use a version control system
- All manually created items must be put in the version control system.
-
- Do not repeat yourself (or others ).
- Each piece of data in the system must have an authoritative and single existence.
- Code should be modularized and reused, instead of sticking to it.
- Reuse code instead of rewriting code
- Prepare methods to handle errors
- Add assertions in the program to check their various operations
- Use a ready-made unit test framework
- Learn from all available experiences when testing programs
- Build bugs into test cases
- Use a debugging tool with code instructions
-
- Optimization is only possible after the software works properly.
- Use monitoring tools to locate bottlenecks
- Write programs in advanced languages as much as possible
-
- The document describes the design philosophy and purpose, rather than the technical details.
- Describe interfaces and causes, rather than implementation
- Refactor the code, instead of commenting on the running principle
- Documents embedded in other programs when referencing other programs
-
- Collaboration
- Code review before code Merging
- Use Pair programming when it helps bring new members or solve especially strange problems
Here is an additional reference:
11. Restore the old code.
If you are still wondering whether to read the article, check out the 67 books and articles on computers listed in it. As I said, this article is "the best in history ".
Original ENGLISH: Best practices ever
Http://www.aqee.net/best-best-practices-ever/.