An Interest In:
Web News this Week
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
August 30, 2021 10:56 am GMT
Original Link: https://dev.to/aatmaj/best-coding-practices-hoe
Best coding practices.
Best coding practices.
- Always name your variables and functions with the utmost care and explain them thoroughly.
- Keep documentation concise but descriptive.
- The reading time for programs is much more than the writing time. Hence, the code must be such that the reading is easier to do. A little more time spent in making the code lucid goes a long way in saving time later.
- Each function must do only one task but do it well.
- Treat each function as a BlackBox- each function must hide something.
- Keep the connections simple. Avoid global variables wherever possible.
- If you use global variables, document them thoroughly. Not doing so will cause side effects.
- The quality of the test data is more important than its quantity.
- Program testing can show the presence of bugs, but never their absence. You cannot ever guarantee 100% correct code.
Adapted from the book Data Structures and Program Design in C
Original Link: https://dev.to/aatmaj/best-coding-practices-hoe
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To