3 ms·
A similar idea I practice. After I solve a complex problem I usually leave a big comment at the top of the main file, explaining how I arrived at that solution,
by whoisjuan 6y ago
A similar idea I practice. After I solve a complex problem I usually leave a big comment at the top of the main file, explaining how I arrived at that solution, the caveats, how it works, and how it interacts with other files and dependencies.
If I need to, I also use Monodraw to produce ASCII character graphs and add them to the comment to explain concepts.
It helps to cement the solution in your brain and it's a system of record on how it was accomplished in case you forget.
I do this only for personal projects though. I don't think co-workers would appreciate an essay with exhibits at the top of a file, lol.
- mvanbaak 6y agoInstead of putting it as comment in the file, put it all (including graphs etc) as commit message when you commit the feature/fix
- owl57 6y ago> I don't think co-workers would appreciate an essay with exhibits at the top of a file, lol. Why? I don't really have an experience of being a co-worker, but I have always appreciated such essays in free software.