0

Why is it so interesting to understand my own programs?

I know some ways how to code smth, but I don't why it doesn't work sometimes or why does it work at all)). it is really a problem to understand how long does my program work. What can I do with this?

2nd Nov 2017, 10:31 AM
Гончаров Дмитрий
Гончаров Дмитрий - avatar
1 Answer
+ 2
Use comments. They are your best friend when trying to understand code. Here are some tips about commenting: 1. Use a comment in the first line of the function and describe what it does. 2. Write a comment about each variable. 3. Try to use less trickery because it is hard to understand when reading the code. 4. Try to get no more than 100 characters per line. 5. Most importantly, update your comments because misleading comments are worse than none at all.
23rd Jan 2018, 1:50 PM
Lil Taco
Lil Taco - avatar