3 ms·
All the time. I usually write a block comment explaining what I'm trying to do with a piece of code (method/class/etc.) before I even write any "real" code. The
by dvt 3y ago
All the time. I usually write a block comment explaining what I'm trying to do with a piece of code (method/class/etc.) before I even write any "real" code. The pseudocode varies between full English sentences ("1. Make sure the folder exists before creating file, 2. Create file with sanitized name, etc.") to more schematic ("sanitize file name AND create file IFF folder exists").
To me, it's comparable to writing a paper; I could never write a paper without a proper outline and knowing where I'm starting and where I'm going.
- SomeHacker44 3y agoExactly this! Virtually all my code is first written in plain language pseudo code in comments before being written. Even in languages I am fluent in. This way anyone can understand what my code is doing when reading it too.