Amateurs
Right... I don't understand why you wouldn't want to have all your functions and logic pathways somewhat memorized. Maybe this is some programmer form of self depreciation BDSM kink I don't understand. 🤔
def function_doing_y(parameter_a, parameter_b)
I wonder what my code is doing. Might it be doing y and using a and b for that?
Naaah, impossible, but because I haven’t added the comment
I guess I will never know what it does
//Howdy future me
This is present me
The biggest lie ever told is self documenting code.
Eh it happens, it's even funnier when your reviewing some code with a peer and your like "Who did this?!" and git blame points the finger back to you. Very humbling moment.
Fun thing, event though I write comments a lot, problems usually occur in the places not covered by comments. So they are useless anyway.
Wdym I need to write documentation?
For my serious answer:
handle_keypress... // like no shit
...
// ======= ACTUAL TEXT INPUT ======= ... ``` 3. cleaning up after yourself and not making a convoluted mess (which often happens right after I solve some problem)
...works well enough for me.
Also, I personally, find that code is more skimmable when aligned vertically (works only sometimes and not that impactful)
That's what I said to my team lead today morning when he asked me what I coded 2 weeks ago
And yes he did ask the question again
The trick is not to touch it again until you advanced to be a senior dev. And then it‘s another juniors problem