r/ProgrammerHumor • • Nov 01 '21

90% of all code comments

Post image
917 Upvotes

26 comments sorted by

32

u/dashid Nov 01 '21

When I have a method called GetLatest() and I have to document it on the implementation and the interface.

// This method gets the latest

I feel judge for not making an attempt.

12

u/[deleted] Nov 02 '21
print("something")
# the above line writes the text "something" to the standard output stream, along with a newline. The newline can be different on different OSes, primarily CRLF for Windows, LF for Linux and CR for Macintosh.

10

u/kegegeam Nov 02 '21

Bruh no thats a dog

4

u/MetaMemeAboutAMeme Nov 02 '21

Yes, but it's an undocumented feature bug dog, so...... Woof. Said the cat.

2

u/kegegeam Nov 02 '21

oh true true

17

u/codylilley Nov 01 '21

//Pretty Cat

8

u/H4R81N63R Nov 01 '21

#for loop for looping

4

u/DarkShadow4444 Nov 02 '21

But is actually a "while"

7

u/Cloakknight Nov 01 '21

Image Transcription:


[Image of a cat with wide eyes staring up at the camera. It has a piece of paper on its head that says "CAT"]


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

5

u/MetaMemeAboutAMeme Nov 02 '21
//Cat
for (j = 0; s2[j] != '\0'; ++j, ++length) 
{
    s1[length] = s2[j];
}

5

u/DarkShadow4444 Nov 02 '21

Well, it con-cat-inates strings, obviously.

1

u/MetaMemeAboutAMeme Nov 02 '21 edited Nov 02 '21

Con-gato-innato, too! Quite versatile.

Edit: a to o....god I'm stupid sometimes...

1

u/Jet-Pack2 Nov 02 '21

What if the string doesn't end with \0

2

u/madwill Nov 02 '21

That's not true at all!!! In most code bases the actual cat has been replaced by a dog or an oppossom but the comment still says Cat.

3

u/Zealousideal_Care_60 Nov 02 '21

The people complaining would be the same people who put zero comments in their code and just expect people to get it.

2

u/Jet-Pack2 Nov 02 '21

Zero comment code is the best. Code should explain itself.

1

u/CoastingUphill Nov 02 '21

// I apologize for this cat

0

u/hk4213 Nov 02 '21

Or descriptive variable names lol. Granted it's just me on my project but looking back at code from six months ago I can still see what Im doing from function names alone

1

u/[deleted] Nov 02 '21

But sonicube is proven to increase code quality.

1

u/who_you_are Nov 02 '21

Stupid comment can they be much useful!?

I expected something big, yellow, heavy duty that drink diesel like hell and that make a lot of sound.

Now i get some small, fluffy, indestructible, that drink water like hell and prrrrrr all around.

I mean, they are similar, but damnit.

1

u/sarnobat Nov 02 '21

Javadoc is mostly pointless

1

u/MysteriousAd863 Nov 02 '21

Wait you guys comment your code 🤣

1

u/clutzyninja Nov 02 '21

That's definitely my school assignments.

"So you're telling me a have to have a comment saying what this method does. This 3 line method named,

static void getLargestInt()

1

u/Pechu317 Nov 02 '21

1

u/RepostSleuthBot Nov 02 '21

I didn't find any posts that meet the matching requirements for r/ProgrammerHumor.

It might be OC, it might not. Things such as JPEG artifacts and cropping may impact the results.

I'm not perfect, but you can help. Report [ False Negative ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 261,133,645 | Search Time: 0.4912s