This content originally appeared on DEV Community and was authored by Aatmaj
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
This content originally appeared on DEV Community and was authored by Aatmaj
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.
APA
MLA
Aatmaj | Sciencx (2021-08-30T10:56:07+00:00) Best coding practices.. Retrieved from https://www.scien.cx/2021/08/30/best-coding-practices/
" » Best coding practices.." Aatmaj | Sciencx - Monday August 30, 2021, https://www.scien.cx/2021/08/30/best-coding-practices/
HARVARDAatmaj | Sciencx Monday August 30, 2021 » Best coding practices.., viewed ,<https://www.scien.cx/2021/08/30/best-coding-practices/>
VANCOUVERAatmaj | Sciencx - » Best coding practices.. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/30/best-coding-practices/
CHICAGO" » Best coding practices.." Aatmaj | Sciencx - Accessed . https://www.scien.cx/2021/08/30/best-coding-practices/
IEEE" » Best coding practices.." Aatmaj | Sciencx [Online]. Available: https://www.scien.cx/2021/08/30/best-coding-practices/. [Accessed: ]
rf:citation » Best coding practices. | Aatmaj | Sciencx | https://www.scien.cx/2021/08/30/best-coding-practices/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.