So I've been writing a little software PWM thing on an STM32 for a hobby project, and I noticed something wierd about myself. I'll spend a whole evening getting the timer config right, and then another evening writing comments explaining every single line to future me. Like, paragraphs. With little diagrams made of slashes and asterisks. It's honestly the part I look forward to most.
The thing is, my buddy who codes for a living says I'm wasting my time. He says good code explains itself and comments go stale anyway. And I get that arguement, but when I come back to a project three months later, those comments have saved me more times than I can count. especally when I forgot why I set some weird prescaler value that made no sense at first glance.
Am I alone in this? Do other people here actually enjoy writing the documentation part, or is everyone just slapping in a one-liner and moving on? Sometimes I wonder if I'm using comment writing as an excuse to procrastinate on the hard debugging stuff, if I'm being honest with myself.