O
21

Hot take: Skipping code comments early on was my worst beginner mistake

It made fixing my own project a confusing mess later.
3 comments

Log in to join the discussion

Log In
3 Comments
sarah950
sarah9507d ago
No comments? Congrats, you just wrote a mystery novel.
10
quinn_thompson
Ugh, I was totally the person who thought comments were a waste of time... until I tried to fix a billing function I wrote six months back. I had this whole clever formula for prorating rent, and I just stared at it, completely lost. Took me a full afternoon to untangle my own stupid logic. Now I jot down a quick "why" for anything even slightly tricky. Never making that mistake again.
0
cole103
cole1037d ago
Man, I feel this so hard. I wrote a script last year without any notes, and when I had to update it last month, I had zero clue what half the variables did. Spent hours just trying to remember my own logic. It was like reading someone else's code, but worse because it was mine. Now I force myself to write at least a line about what each function is for, even if it seems obvious at the time.
5