• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Comments and explanations - how to do it better?

For large or complex projects it's a good idea to write a specification document detailing the business logic and the database structure. In the code, I try to write comments in a way that any other developer could understand what the code is doing and work on the project. If a function do something special I will explain why it's doing it. Because in 6 months I won't remember. For example, if a function read a CSV file, I will explain the format expected.

Maintaining your comments may be a nightmare if you make a lot of changes in your code but I think it's worth it. If you say you will do it at the end of the project, you will not! You won't have the time or the motivation to do it!
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com

Messages In This Thread
RE: Comments and explanations - how to do it better? - by includebeer - 01-13-2016, 07:05 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.