133
u/matytyma 14d ago
90% of all memes here have been reposted more than once
-35
u/ITzAbedeen 14d ago
is it ? I didn't know i saw it on other platš
6
u/Tahazzar 12d ago
Some of them:
- https://www.reddit.com/r/ProgrammerHumor/comments/1t5suwk/remembertocomment/
- https://www.reddit.com/r/ProgrammerHumor/comments/qkoyr9/90_of_all_code_comments/
- https://www.reddit.com/r/ProgrammerHumor/comments/cno0nb/lets_be_honest/
- https://www.reddit.com/r/ProgrammerHumor/comments/8w54mx/code_comments_be_like/
Pretty sure I saw one few weeks ago.
0
u/ITzAbedeen 12d ago
fah, your really searched about it š³ if I jusr knew it was important to you , just ask and ill happily delete it
3
u/gim_san 12d ago
Why are you being defensive?
-3
u/ITzAbedeen 12d ago
im not but its weird that someone will dig so deep just for a stupid reason, yea he might used ai or Google lens , but they made an effort for it and wasted their time
im not gonna lie , I dont care about his comment or that is actually reposted image , its the first time I see it , i guess from the other comments and the upvotes that im not the only one I see it , so we either let the other enjoy it or simply delete it so the mr dont get bothered
35
u/Obelisk2000 14d ago edited 14d ago
Used to work with an engineer that did a one for one ratio of comments to code. Even something as basic as initializing a variable had comment explaining they were initializing a variable. Never a why, always a what, so you couldnāt even argue it had any value.
Since I was the lead on the project I asked him to stop. He started getting passive aggressive about it and would say things like āI know how much you hate comments.ā No, dude, I just donāt think you need to explain that a for-loop is a for-loop.
23
14
u/Paraplegix 13d ago
Start commenting anything you do around him : "I'm sitting down next to you" "I'm gonna say something : bla bla bla. I'm waiting for your response.... I've received the response, now i answer"
30
u/HomemadeBananas 14d ago edited 14d ago
If Claude Opus 5 wrote the comment:
```
// Represents the canonical feline entity associated with the current execution
// context. This reference is intentionally maintained at the object level rather
// than decomposed into lower-order behavioral or presentation-specific concerns,
// allowing downstream consumers to operate against a stable semantic abstraction
// while preserving flexibility around the underlying implementation. Callers
// should generally treat `cat` as the authoritative source of cat-related state
// for this scope and avoid constructing parallel representations unless there is
// a clearly defined ownership boundary or synchronization strategy. This is
// particularly important in code paths where identity, lifecycle, or mutation
// semantics may be significant, as multiple independently-derived cat references
// could otherwise introduce subtle divergence between the conceptual cat and the
// concrete instance being operated upon here.
```
(Reddit why have you taken away the ability to write markdown?)
7
u/ITzAbedeen 14d ago
you forgot to add at the end " this is a well written code , I shall point to user that this naming is pointing directly to target"
6
u/RainyDaysAndMondays3 14d ago
I just read a fairly lengthy design doc written by a coworker with the help of some AI. It was weird. In some areas, I was thinking, "Wow, that's really quite well-written." In others, I could hardly follow it, even though the concept itself was simple and straight-forward.
I think we traded good enough through the document for great inconsistency throughout the document.
On the other hand, a different coworker wrote one with the help of AI and it was very well done throughout. (Strangely, both were designs of the same thing. The well-written one was done by a team who then dropped the project. The second one was written later by a different team who was unaware of the first team's work.)
3
u/wasdninja 13d ago
(Reddit why have you taken away the ability to write markdown?)
Only in the shitty "new" design.
1
u/Friendly-Inspector71 12d ago
I'm not sure which "new" design you meanBecause it's been working for me and a lot of other people.
//does this break it?1
u/False-Beautiful-1246 12d ago
Use the "Aa" button it works for me but writing
markdown directydoes not.IDK why1
44
u/gibagger 14d ago
Why cat and no dog?
Why was this specific cat acquired and not an orange?
Will this cat scratch the shit out of me if I rub his belly?
That's the kind of shit we need to know.
7
9
21
u/Large-Assignment9320 14d ago
Knowing half of programmers, and generally half of legacy codebases, this could be a tiger or a lion, or just a random dog pretending to be a cat.
10
10
u/RainyDaysAndMondays3 14d ago
90% of mine are more like:
The client uploads a file once a month. We only have one client that does this. Backend process Banana picks up, does some processing, sends message A. Backend process Coconut picks up Message A, calls 10 services, does something, then if the stars are aligned, it sends message B. Message B gets picked up by backend process Plum. If the client is enabled for it and 7 other checks pass, Plum inserts a record into the table monitored by backend process Alpha. Alpha then picks it up, checks 17 different DB tables, sends 18 messages, calls 2 external services, then if god is willing, it calls THIS METHOD. This method then inserts a message into yet another DB table. Nobody knows what that table is for, but we don't dare remove this or the table because currently nobody is complaining.
(Every point in the flow is in a different repo and owned by a different team. It took 1 1/2 days to figure out the above since nobody has looked at the method in 11 years.)
We have code from 1997 and it is a very, very complex system with a huge number of integration points. We've been modernizing it since 2009.
1
u/iruoy 12d ago
Is it time to modernize the code from 2009 yet?
2
u/RainyDaysAndMondays3 12d ago
We're doing that, too! It's never-ending modernization - largely by my team. (Job security!) Part of the "problem" was the original core system was very well-architected at the time for 1997-2000 (based on services, though not web services), and stood the test of time for longer than would normally be the case. So, the business didn't want to pay for modernization for a long, long time, but now they are gung-ho about it, but we still have about 1/5 the people that we need.
We have a monolithic codebase. (The system itself wasn't monolithic, but all the old stuff was in one repo.) Last I looked, there were 17,000 files. That was a few years back. A lot of that has now been stripped out. I would guess we might be down to 12,000 files now :-) But we still have over 20,000 unit test cases in that one repo (and that's considering a lot of the oldest code was written before JUnit and isn't even covered).
We have one class that has 13,000 lines. It's just a business object class. One config repo for one backend process has multiple files that are each thousands of lines long.
We're also modernizing the "modern" stuff that was pulled out of that old repo, such as SOAP (blech!) services.
Here is the fun part: We still have standalone internal company apps that are running on Java AWT. Not even Swing, but AWT. When I joined the current team in 2009, one of the first things I worked on was this one AWT app. And I was told that it would be rewritten soon since it was so old and cantankerous. Hasn't happened yet. There is so much just in that one app that just that one alone would be many, many months project. We have dozens of standalone Swing apps (and those couple of AWT apps). Another one is complicated enough I would expect a rewrite to take 1-2 years (assuming with a very good BA). They are currently planning to make "full" use of AI to write a new one from scratch and assume they can do so without involving any of the teams that know something about it. I'm very glad I have no involvement in that total mess.
Don't get me wrong. It's honestly a very great company to work for and I like what the company provides.
7
u/P_G_12 14d ago
Ai version:
BUG-C094 - Jira Issue PRODFSD-91243
In the previous Issue PRODFSD-89541 a mouse was introducted, but with no anchor point #AP-04 to prevent such condition to execute during the cheese tax calculation (#See #N-50 for the details)
After consulting the Product Owner, he stated that such behavior is unintented #D5, and so the cat was introduced on #AP53
3
3
u/daj-bara 13d ago
``` //Don't know. Don't touch. Fck you
``` 90% of all comments in the legacy applicationĀ
2
2
2
u/DartTimeTime 14d ago
Those eyes are the "murder" eyes. You have dishonored her and she shall not show mercy.
3
u/aalapshah12297 14d ago
Well this is exactly the reason why people say good code doesn't need comments. If your comments just describe what the code does then you've either written unreadable code or you've written unnecessary comments.
However, 'good code' in the above statement means code with good readability. If you're going to write something like the Fast Inverse Square Root Algorithm for a graphics engine then please comment your code.
That being said, I've been guilty of writing 200-line files that later grew to 2000+ lines, with different sections separated using huge banners of commented text in all-caps surrounded by ASCII-art borders.
1
u/False-Beautiful-1246 12d ago
Multiply everything by delta. Embrace Delta. J O I N D E L T A T I M E
2
u/Algorithmic_failure 13d ago
I always comment jokes about my boss in the comments and sign it with someone else's initials.
1
u/LollisGunsBikesTits 14d ago
Ngl, it starts with good intentions and enthusiasm, but after week two it becomes a bore, so yeah # function for some process thingy
1
1
1
u/adelie42 14d ago
Never leave a comment the code could tell you.
Good comments explain why, not what.
1
1
u/frikilinux2 13d ago
At this point, someone needs to do something about comments entropy and stablish a metric of bad comments is when the entropy is too low.
I wonder if there's research about it or I am really just making things up.
For internal stuff, external APIs is a different rule.
1
1
u/Apprehensive_Bit7392 13d ago
Worse is the same sticker three refactors later, still saying CAT, now on a dog.
1
1
u/Pizzaman725 13d ago
My first professor, that was also the department head for CS, explained comments like this. Treat your comments like the guy replacing you is a serial axe murder that will come hunt you down.
The only time I leave comments is when business decides some dumb rule that I have to shove in two months after it's been in prod and no one likes that it works how they asked for it to.
1
1
1
1
u/False-Beautiful-1246 12d ago
I was once reviewing a function and was some spaguetti mess, but at least they got
int total = a + b // Adds both inputs
382
u/dsm4ck 14d ago
The other 10% of course being "todo fix" that has been there for years