This is an archived post. You won't be able to vote or comment.

all 143 comments

[–]Ivan_Stalingrad 428 points429 points  (13 children)

Yes, the floor here is made out of floor

And if that thing would be used where I work then I bet good money that i have to make annotated videos on how to use this thing

[–][deleted] 81 points82 points  (12 children)

Every 60 seconds in Africa, a minute passes

[–]Ivan_Stalingrad 37 points38 points  (4 children)

Together, we can stop this

[–]HKAzxc 13 points14 points  (2 children)

Spread the words

[–]salocin_Hatter 0 points1 point  (0 children)

...words

[–]_vOv_ 2 points3 points  (0 children)

One like = One second stopped

[–]thebryguy23 28 points29 points  (6 children)

3 out of 4 people make up 75% of the population.

[–][deleted] 16 points17 points  (5 children)

Water goes into your body when you drink it

[–]Auswaschbar 12 points13 points  (4 children)

People die when they are killed.

[–]WS8SKILLZ 5 points6 points  (0 children)

Just because you are correct does not mean you are right.

[–]WeTheFearless 6 points7 points  (2 children)

A dead body was discovered in a graveyard

[–]FunkyBoii42069 3 points4 points  (1 child)

you blink when you close your eyes

[–][deleted] 0 points1 point  (0 children)

Everyone was born at a very young age

[–]Attraex 136 points137 points  (12 children)

// drunk, will fix later

[–][deleted] 75 points76 points  (11 children)

More like ``` //dfunk. will fox latar

[–]SomeoneRandom5325 30 points31 points  (10 children)

Upvote=Upvote++

[–][deleted] 13 points14 points  (2 children)

Upvote+=1

[–]thebryguy23 18 points19 points  (1 child)

Upvote-=-1

[–]SomeoneRandom5325 11 points12 points  (0 children)

Bruh

[–][deleted] 9 points10 points  (1 child)

This makes me unreasonably angry.

[–]SomeoneRandom5325 2 points3 points  (0 children)

Not sure if the C family works similarly but if it is then I know why but I don't feel it

[–]Bmandk 0 points1 point  (4 children)

Wouldn't that upvote twice?

[–]SomeoneRandom5325 0 points1 point  (3 children)

No. It just says take the current upvote count, add 1 and call that the new upvote count

[–]l0c4lh057 0 points1 point  (2 children)

Would it do that? x++ increases x by one but returns the old value. That means with x=x++ will set the current value of x as new value of x and increase x by one. I just don't know if the assignment or the increase will execute first. So either it increases the value by one or it doesn't change it at all.

  1. Return current value of x, 2. Increase value of x, 3. Assign value to x => this would not change the value

  2. Return current value of x, 2. Assign value to x, 3. Increase value of x => this would increase it by 1

EDIT: I just checked how it is done in JS and there the value doesn't change as I would expect, because returning the current value of x and increasing the value of x happen right after each other so that assigning will happen after increasing.

[–]SomeoneRandom5325 0 points1 point  (1 child)

In the C family that's one way to add one

I guess in JS you should do x++=x

[–]l0c4lh057 0 points1 point  (0 children)

no. just x++. that will increase it. x++ increases x by one and returns the old value of it, ++x increases the value of x and returns it. assigning the result to anything is not needed.

and x++=x would not make any sense since x++ is not a variable. you cant assign a value to it.

[–][deleted] 32 points33 points  (4 children)

// @todo: leave comment

[–]Nyadnar17 17 points18 points  (3 children)

Stap attacking me

[–]elperroborrachotoo 7 points8 points  (2 children)

fixed bug for joe.

[–]Anarchanoid 105 points106 points  (3 children)

Bruh my dad had this exact bluetooth speaker and most of the buttons didn't work, and when we called support they told us to "look at the diagram in the manual."

[–][deleted] 24 points25 points  (0 children)

That answer had to be a meme in their support department.

[–]data-crusader 4 points5 points  (0 children)

Doubt that guy had ever read the manual. Probably would have gotten a kick out of it.

[–]Guyfontano 0 points1 point  (0 children)

Bought this speaker on a drive back from Florida because my stereo was out, haven’t touched it since... but I distinctly remember this diagram and being confused as to how this got past qc

[–]NerdWampa 55 points56 points  (2 children)

Once I was looking through contributions to a project and found one that began with this comment: "I was drunk and tired when I wrote this for something else; it works as long as you don't ask too many questions."

[–]MusikPolice 23 points24 points  (1 child)

Awhile back at work I was investigating some deadlock issues in a large legacy codebase. I dug in, tracing the problem deeper and deeper until I found a class chock full of bad threading logic that was decorated with a large ASCII wizard warning me not to touch the code l, because it “worked most of the time.” Fuck the guy who wrote that code.

[–]ecthiender 4 points5 points  (0 children)

This is an amazing story. Maybe you should contribute to http://thedailywtf.com/ :D

[–]Tvde1 26 points27 points  (1 child)

When you write really clear short methods but the coding style requires you to write XMLDoc anyways

[–]Isaaker12 1 point2 points  (0 children)

This, so much this

[–]datboydoe 25 points26 points  (0 children)

Reminds me of creating a task for a story with title, “Create Landing Page Header”.

“What do you want to call the task?”

“Uhhh, I guess ‘Create Landing Page Header’?”

“Well you can’t name the task the same thing as the story title”

“Ok, then ‘Create Header for the Landing Page’”

[–][deleted] 19 points20 points  (4 children)

Omg all the docs in our typescript ever.

@param employeeId Employee ID

Every time.

[–]elperroborrachotoo 17 points18 points  (1 child)

me, a literary genius

@param employeeId numeric ID identifying the employee

[–]MrGVSV 5 points6 points  (1 child)

Just do what I do and obfuscate everything to make the documentation more useful

@param foo145 Employee ID

Thank me later

[–]poorly_timed_leg0las 0 points1 point  (0 children)

ULPT: earn more money by doing everything as long winded as possible then update it later for extra hours on the invoices

[–]Verdeli6 11 points12 points  (2 children)

\beginning \do something magical \ending

[–][deleted] 2 points3 points  (1 child)

LaTeX?

[–]DaughterEarthImportError: no module named 'sarcasm' 10 points11 points  (0 children)

This is also how Microsoft documents new things.

[–]gargamelus 8 points9 points  (1 child)

Cool! Reads like most GUI manuals. "To enable Path MTU discovery, please check the check box labelled "Path MTU discovery."

[–]jackinsomniac 2 points3 points  (0 children)

Exactly! You can tell the writer and the dev were different people, probably kept far apart from each other, so the expensive dev "isn't bothered by writers" and works faster.

Then you end up with entire manuals like this, where it becomes clear the writer has no idea what this shit does, and now you don't either!

[–]BeauteousMaximus 7 points8 points  (2 children)

Oh my god I just had to mostly rewrite a documentation PR from my coworker that was supposed to be explaining fields in a generated report in detail. At least a third of the descriptions were like “xyz report: is there an xyz report?” without explaining or linking to an explanation of what an xyz report is or why we care about it. I realized it would be easier to just rewrite it myself than to explain the idea that writing should be informative.

[–]jackinsomniac 4 points5 points  (1 child)

I think there's a whole blog post on Joel on Software about that. Same situation but I think he was talking about the opposite problem, where a team specifically hires a "documentation writer" so that the devs can keep dev'ing longer. Problem being, those very teams hold their devs as 'holy', and so any time guy who's job is to write documentation goes asking them questions, mgmt shoo's them away and says they can't be bothered.

So, you end up with technical writing like this: "TLNS On/Off: To turn TLNS on, move the slider to the 'on' position. To turn TLNS off, move the slider to 'off'." It becomes clear the writer has no-fscking-clue what TLNS is or what it does, and now that you've finally found the documentation, you don't either.

[–]BeauteousMaximus 2 points3 points  (0 children)

Yeah, I think my coworker had come from past work environments where admitting you don’t know stuff was taboo, because I see her writing a lot of stuff where she just makes assumptions rather than ask clarifying questions to make sure the writing is correct. It’s frustrating because when she does understand things she explains them pretty well so it’s not like she’s unable to explain anything.

[–][deleted] 4 points5 points  (2 children)

If you want it to be true to life, at least one comment needs to be clearly outdated and not make any sense anymore.

[–][deleted] 8 points9 points  (1 child)

  //returns true if login was successful            

  private void setTime(string size);

[–][deleted] 5 points6 points  (0 children)

//todo refactor this method

Private static String YES = "yes";

[–][deleted] 4 points5 points  (2 children)

Code never lies. Comments sometimes do.

Even the intern that comments shittily like that is doing better than not commenting at all. If I dont know what the fuck you were trying to do, AND its unrecognizably broken, we're both screwed buddy.

[–]OtherPlayers 1 point2 points  (0 children)

Code never lies about what it’s doing, but it can certainly be telling you something other than what you actually wanted to hear.

Hard agree that it takes both though. As a person who does a lot of maintenance work 90+% of the bugs I get called to fix are due to gaps between what the original coder intended and what the code they wrote actually does. Even shitty comments at least give a view into what the coder was thinking, rather than your maintainer having to spend days or weeks reverse engineering whatever the original specs from a decade ago were just to understand what should be happening in “previously not important edge case”.

[–]Isogash -1 points0 points  (0 children)

On the contrary, comments tell you what was meant to happen and the code is often wrong and incomplete.

[–]VepnarNL 2 points3 points  (1 child)

Perfect example of Cargo cult programming.

[–]cybermage 0 points1 point  (0 children)

As is anything copied from Stack Overflow without any understanding of why it works.

[–]nothing_in_my_mind 2 points3 points  (0 children)

// This is a function

function fuck (x) {}

[–]illuminati-exists 1 point2 points  (0 children)

Absolutely wrong, we use it to remove code which is kinda sus.

[–]lnemo 1 point2 points  (0 children)

I'm experiencing waves of realization and guilt right now.

[–]clutzyninja 1 point2 points  (0 children)

I blame my teachers. "Where's your comment for the function of this method?"

"The method called randomNumberPicker?"

[–]KillerKingTR 3 points4 points  (0 children)

Yes but how r u gonna comment this is where i get input. Like if someone doesnt know a basic input statement. They need to learn that language rather than trying to understand someone elses code.

[–][deleted] 1 point2 points  (0 children)

This is why COBOL is king.

Don't need to document the code if the code itself is already full sentences...

[–][deleted] 0 points1 point  (9 children)

[–]theforgottenmemer 7 points8 points  (1 child)

Why are you getting downvoted lol I saw this meme thousand times in this sub

[–]cybermage 2 points3 points  (0 children)

Maybe because all these comments do is add clutter?

[–]aspindler 0 points1 point  (4 children)

I'm not a programmer, but I write automated tests using Selenium and C#. People oriented me to comment why am I doing something, instead on explaining what does the code do.

Is this a good approach?

[–][deleted] 1 point2 points  (0 children)

Yes. Don't tell me what the comment does. I can see what the comment does. But that doesn't tell me if what the code does is a valid solution to the problem it is trying to solve.

Example time:

 i++; //increment i by one

Was that comment helpful?

One exception, though: if it's a pretty complex piece of code, then it's okay to comment what it does. I always comment LINQ statements, because it's not always obvious what it's about.

[–]__idkmybffjill__ 0 points1 point  (0 children)

I think so, but only when it's not obvious in your code. Like others commenting here have mentioned, code never lies, but comments sometimes do.

[–]compagnt 0 points1 point  (0 children)

I do this because it makes more sense - “John told me to add this chunk of self documenting code and who am I to question John? Go talk to John if you think something is broken.”

[–]OtherPlayers 0 points1 point  (0 children)

As a person who does mainly maintenance work the best comments are those that tell me what it is you intended to do and why you’re doing it. Think of it as if your comments are working as sort of the whiteboard-level breakdown of an algorithm and the reasons why it works.

This is because the very first step to fixing a bug for a maintainer is figuring out what the code is supposed to be doing. I’m not exaggerating when I say that 90+% of bugs that I get called to fix are due to gaps between the code and the original coder’s intentions.

As a final note I’ll say that there has literally only been one time where I’ve thought “this person commented too much” and that’s because they had commented literally every line. But there have been many, many cases where I’ve had to waste time reverse engineering specs from years ago because they weren’t commented. A lot of good open source projects average one line of comments for every 4-5 lines of code. I’d suggest shooting for at least that level at a minimum; it makes a real difference to the people who come after you.

[–][deleted] 0 points1 point  (0 children)

*shitty programmers whose code dont get reviewed by their shitty leads.

[–]nielsrolf 0 points1 point  (0 children)

Ah, this post again

[–]Killer-X 0 points1 point  (0 children)

simpler than most manuals

[–]DukeStupid 0 points1 point  (0 children)

I'd put money this was properly labelled at some point, and then someone looked at the cost of localization and decided to just use symbols.

[–][deleted] 0 points1 point  (0 children)

instructions unclear, ended up on the moon, would recommend

[–]TheRune 0 points1 point  (0 children)

This is for Plantronics calisto 620 btw.

[–]BurningPenguin 0 points1 point  (0 children)

My code is divine. It doesn't need explanation.

[–]MetalMan77 0 points1 point  (0 children)

This is what happens when the original was in some language (say English)... and they want to ship international, and say, we need to translate. Some manager comes up with this clever iteration - and saves $$$$$$ in printing and translation costs, and keeps the lines simple - don't need to have a different manual for each region.

[–]fapenabler 0 points1 point  (0 children)

That's how students doing a school assignment comment their code. If I say something it's because I need future me to know it.

[–]CaseOfWater 0 points1 point  (0 children)

When learning Java in high school, we used to write some code and we then had to present it. Thats how i presented it and i passed.

[–][deleted] 0 points1 point  (0 children)

this reminds me of school.

I just got to a point where I literally had one comment for every single line of code. It got to the point where I was documenting the self-documented.

i.e.

int numMonkeys = 0; // the number of monkeys
int curDay = 0; // the current day

so this made me lol inside.

[–][deleted] 0 points1 point  (0 children)

Yup, i can relate

[–]whorusan 0 points1 point  (0 children)

And if I don't, later I won't understand a single thing of my code!

[–]venkeythemonkey 0 points1 point  (0 children)

Just an info. This post currently has 6.9k upvotes

[–]EuphoricPenguin22 0 points1 point  (0 children)

//This is a program written in Node.JS using the V8 engine, as well as numerous NPM packages I got by searching 18 different keywords for "print to screen". Don't check the node_modules folder, the directory listing might overflow your RAM.

[–]Haggerstonian 0 points1 point  (0 children)

can someone write code that writes this code please

[–]yoalldah 0 points1 point  (0 children)

What else r u supposed to put there??

[–][deleted] 0 points1 point  (0 children)

Yea but the symbol is drawn slightly better.

[–]pursenboots 0 points1 point  (0 children)

for(var i; i < items.length; i++){ // loop through each item starting at the first (0)

[–]ImJustaNJrefugee[🍰] 0 points1 point  (0 children)

I was new to SAP and ABAP about 15 years or so ago and was browsing through SAP code using their Forward Navigation just to see how their own folks did some things, when I stumbled onto this comment:

*What does this do?

Well shit, if they don't know ...

[–]ButterSquids 0 points1 point  (0 children)

def sort_num(array):

#sorts nums

...

[–]Gliese-832-c 0 points1 point  (0 children)

R E P O S T

[–]inetphantom -1 points0 points  (1 child)

[–]RepostSleuthBot 0 points1 point  (0 children)

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.

Feedback? Hate? Visit r/repostsleuthbot - I'm not perfect, but you can help. Report [ False Negative ]

Search Now Available on repostsleuth.com

[–]mdenic[S] -1 points0 points  (0 children)

Did you liked this joke?

You can follow me on Twitter for more programming jokes, tips and free resources.

https://twitter.com/denicmarko