Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 30, 2021 10:56 am GMT

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:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To