796
Bill is a pro grammer (sh.itjust.works)
you are viewing a single comment's thread
view the rest of the comments
[-] BaardFigur@lemmy.world 23 points 2 years ago* (last edited 2 years ago)

Comment smart, don't comment every line like this

int i = 5; // Assigns the value 5 into the variable i.

[-] Maalus@lemmy.world 5 points 2 years ago

Comment only in extraordinary situations, when something you read can confuse someone. And by that I mean the business logic, not that you used a method that's confusing to people since they only know the basics of the language.

[-] Sylvartas@lemmy.world 2 points 2 years ago* (last edited 2 years ago)

Honestly, after a few years of working with juniors (and being one myself before that), I have to disagree with the last part. Sure, it's fine for solo projects but people's programming skills can vary heavily. I know people who will pull the wildest C++ compile time tricks you've ever seen, but a pointer to a pointer would somehow break their brain.

[-] stebo02@sopuli.xyz 1 points 2 years ago

I usually comment on whole groups of lines of code, so the goal of each part of the code is clear

this post was submitted on 26 Nov 2023
796 points (100.0% liked)

Programmer Humor

25407 readers
1554 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS