Best coding practices part 2

Best coding practices to remember.

Be sure to understand your problem before you decide how to solve it.
Be sure you understand the algorithmic method before you start the program
In case of difficulty, divide the problem into pieces and th…


This content originally appeared on DEV Community and was authored by Aatmaj

Best coding practices to remember.

  • Be sure to understand your problem before you decide how to solve it.

  • Be sure you understand the algorithmic method before you start the program

  • In case of difficulty, divide the problem into pieces and think of each part separately. (Divide and conquer)

  • Keep your functions short and simple; rarely should a single function be more than a page long.

  • Use techniques like "scaffolding" to simplify debugging. Scaffolding is a technique used to localize errors.

  • Keep your programs well formatted as you write them. This makes debugging easier.

  • Keep your documentation consistent with your code, and when reading a program make sure you debug he code and not just the comments.

  • Explain your program to someone else: Doing so will help you understand it better yourself.

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
APA

Aatmaj | Sciencx (2021-09-06T12:12:03+00:00) Best coding practices part 2. Retrieved from https://www.scien.cx/2021/09/06/best-coding-practices-part-2/

MLA
" » Best coding practices part 2." Aatmaj | Sciencx - Monday September 6, 2021, https://www.scien.cx/2021/09/06/best-coding-practices-part-2/
HARVARD
Aatmaj | Sciencx Monday September 6, 2021 » Best coding practices part 2., viewed ,<https://www.scien.cx/2021/09/06/best-coding-practices-part-2/>
VANCOUVER
Aatmaj | Sciencx - » Best coding practices part 2. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/06/best-coding-practices-part-2/
CHICAGO
" » Best coding practices part 2." Aatmaj | Sciencx - Accessed . https://www.scien.cx/2021/09/06/best-coding-practices-part-2/
IEEE
" » Best coding practices part 2." Aatmaj | Sciencx [Online]. Available: https://www.scien.cx/2021/09/06/best-coding-practices-part-2/. [Accessed: ]
rf:citation
» Best coding practices part 2 | Aatmaj | Sciencx | https://www.scien.cx/2021/09/06/best-coding-practices-part-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.