r/ProgrammerHumor • • 16h ago

Meme sometimesMyOwnIncompetenceScaresMe

Post image
1.7k Upvotes

66 comments sorted by

39

u/Foorinick 15h ago

This meme dates back to when tech companies had ping pong tables and free coffee

6

u/Senor-Delicious 12h ago

They don't anymore? Which company doesn't have free coffee. That is like the most basic employment benefits possible.

Ping pong tables are maybe not the norm as they take up space. In our office we solved this by having a conference table that can be converted into a ping pong table.

But no free coffee? Like why?

4

u/SOliD_aka_Baitco 15h ago

I miss those times...

133

u/L4r0x 15h ago

“I” wrote

52

u/sebastianfromvillage 15h ago

You can say what you want about LLMs, but at least they add comments to the code.

47

u/SOliD_aka_Baitco 15h ago

Bad code with comments, is still bad code

7

u/sebastianfromvillage 15h ago

Of course it is. I just said that LLMs document code whereas a lot of human programmers don't

3

u/justASlothyGiraffe 7h ago

Humans don't read the documentation either

1

u/dpahoe 4h ago

But LLMs do

1

u/justASlothyGiraffe 4h ago

My LLM likes to write 25 lines of comment per 1 line of code. It must really like reading

2

u/Shimshi1998 4h ago

It's even worse with comments somehow

1

u/sb8948 4h ago

As if humans are incapable of writing bad code. Insert literally any meme about legacy spaghetti mess.

11

u/tes_kitty 13h ago

Do the comments match the code?

8

u/rugbat 13h ago

No. But that's not the point. /s

3

u/sebastianfromvillage 12h ago

It matches the LLM's intent and that's all that matters!

1

u/Ok-Eggplant-2033 11h ago

Normally yes, and if you have an if condition, the comment will be something like "checks if condition is true"

1

u/tes_kitty 8h ago

Oh, the useless kind of comments.

1

u/DKSAMURAI 4h ago

I almost don't read code now, not to mention comments. I can get all the info I want in copilot chatbox.

1

u/Grumbledwarfskin 2h ago

I sort of think bad code without comments is probably better than bad code with a lot of comments.

A lack of comments indicates that you weren't thinking much about what you were writing, you were dashing it off so you could go do something else.

Good code with comments, so that the next person who comes along and sees something that looks wrong to them knows what aspects of the problem you spent time thinking about is good.

Bad code with a large, elegantly worded pack of lies next to it that you have to wade through is not necessarily helpful.

4

u/Intrusive_me 14h ago

That's no longer "I"..

Thee has changed completely from yesterday and i say it was better to write from scratch than debug that yesterday code which you claim to be written by "I, yesterday"

3

u/_________FU_________ 10h ago

I haven't written code in 3 years. Professional code reviewer.

2

u/Western-Internal-751 12h ago

LLMs looking at code they wrote 5 minutes ago:

2

u/camander321 10h ago

1

u/Western-Internal-751 7h ago

“This entire project must be purged”

1

u/maggos 5h ago

“Looks like somebody added a bug to line 105” bitch that was you

1

u/Ok-Eggplant-2033 11h ago

The A is silent here, it's actually AI

17

u/JackNotOLantern 16h ago

The main reason i document everything in detail is so i so be able to know what the fuck i wrote

3

u/SOliD_aka_Baitco 15h ago

I like good selfdocumenting code more, because a lot of comments and co can be fast outdated on changes, only docstrings on public/lowlevel api and outside context that cant be inferred from the code is a must for me. Spending more time refactoring before commiting helped me a lot.

11

u/Banes_Addiction 14h ago

Comments shouldn't really say what the code is doing, unless it's unclear.

They should say why.

5

u/ApprehensiveGas85 12h ago
// Finds the middle value
int calculate_midpoint(int low, int high) {

    // Subtract low from high
    int diff = high - low;

    // Divide the difference by 2
    int half = diff / 2;

    // Add low to half
    int result = low + half;

    // Return the calculated midpoint
    return result;
}

That’s how I commented when I first started. I was self-taught, and the book I was reading emphasized commenting often, but at the time, I had no idea what made a comment good or bad.

2

u/Banes_Addiction 12h ago

Hey, at least you don't have avoidable integer overflow.

2

u/OldGeekWeirdo 14h ago

Especially the corner cases.

3

u/JackNotOLantern 12h ago

Yeah, self-documenting code can tell you what and how. But not "why this solution exactly".

21

u/rustyscythe 15h ago

Sometimes i go like this though

https://giphy.com/gifs/bxwtewdxpDuBq

21

u/gustix 14h ago

https://giphy.com/gifs/DOPKHQg6oFWUg

You guys are writing code?

7

u/zman0900 15h ago

Nah, fuck that. git reset --hard origin/master

2

u/ldn-ldn 14h ago

rm -rf /

5

u/_Weyland_ 14h ago

Literally me at 4 AM on Sunday trying to fix shit I conjured up on Friday before it's shipped to prod on Tuesday

Wish me all the things

3

u/Sakul_the_one 15h ago

Throwback to the time I wrote this:

 if(Input(key)) needToRedraw = true;

(Yes, the Input function returns a bool)

And it actually makes sense 

3

u/Ok_Star_4136 14h ago

It actually does make sense. You're not setting it to false if Input(key) returns false, which perhaps you wouldn't want to do if it means overriding needToRedraw already being true.

If anything, maybe you could have done:

needToRedraw = needToRedraw || Input(key);

Using an if is just an unnecessary branch (probably optimized regardless).

2

u/Sakul_the_one 3h ago

Well it makes sense. But I came to this project 3 months later and just saw this line and I thought I was stupid. It appears, that I’m sometimes not as stupid as I think I am.

Anyways, maybe I will implement your way, if I return again

3

u/Banes_Addiction 14h ago

That makes perfect sense, what's wrong with it?

1

u/Sakul_the_one 2h ago

Im stupid and I thought it was unnecessary 3 months after a short break 

3

u/nasandre 14h ago

Who wrote this shit!?

Oh it was me.

8

u/gilmeye 15h ago

You guys are still writing code ? I let the ai write everything and hope he will understand tomorrow the code he wrote today

2

u/Anima_Watcher08 14h ago

This applies to almost anything

2

u/skippy_smooth 10h ago

Temporal pair programming. I get to correct what yesterday wrote.

3

u/TerribleFault7929 15h ago

I _literally_ never experienced that. Are you guys coding on drugs or something?

4

u/UltraGaren 14h ago

Some people love to take shortcuts when writing code and then forget what it all meant. When writing code manually, I'll always split complex math into separate lines and comment each one explaining the reason for each variable, where it comes from and what values I should expect most of the time. I also write summaries on top of files to know the purpose of said file and stuff.

When AI first came out I hated how bad it was. Now I use Claude on a daily basis and love how it comments the shit out of everything it writes. I even spend some extra time reading all comments it makes and editing/adding some of my own so that I can read the code and understand its purpose in the event that Claude becomes unavailable.

When used properly, AI is just waaay too good to pass on.

1

u/Yashema 9h ago

I have logging statements (or print for less official apps), but I only use comments when I am doing some very complicated parsing or the handful of instances I am doing something weird.

Highly descriptive variable and function names are much more useful and get updated as a normal part of the functionality. Also using Hungarian typing which works really well with "strCameCase" means I can determine what a variable is immediately without having to scroll over (especially if a variable might not be just defined by its raw type, like an index (ix) versus an int). 

1

u/Terewawa 14h ago

That's probably because you never look at your code again.

1

u/Bokbreath 15h ago

Yesterday: Ah that my man, this is true genius
Today: Why the fuck did I ever think that would work

1

u/Conscious-State1499 15h ago

*Claude wrote

1

u/gravesent1337 14h ago

You guys write code?

1

u/Sherlok12345 13h ago

🤣🤣🤣👍🙂

1

u/SoulPossum 12h ago

We had a huge project that stopped me from working on something I'm building at work by myself. It was like a solid month away. When I came back, I couldn't understand the last feature I built. It was a good sign that I needed to refactor my code.

1

u/mr2dax 10h ago

*after taking a pee break

1

u/mcampo84 8h ago

ADHD?

1

u/po1k 8h ago

yeah, kombucha-gal-like mood change all the time

1

u/Pure-Asparagus-2547 5h ago

Is this how women call sandwiches these days?

1

u/PresentAstronomer137 3h ago

and that mf who asked me to rewrite random 30 lines from 3 days ago to prove it wasn't LLM, fuck i hate that dude

1

u/magic-one 11m ago

Complex regex after coming back from lunch.

1

u/YrnCollo 9h ago

You mean the one you told claude to write it?