1. Before writing a class or a function write comments about what the code will do (unless it’s absolutely trivial)
2. Check if the comments make sense
3. Write the code
That simple practice almost guarantees understandable code.
1. Before writing a class or a function write comments about what the code will do (unless it’s absolutely trivial)
2. Check if the comments make sense
3. Write the code
That simple practice almost guarantees understandable code.