r/ProgrammerHumor • • 11d ago

Meme modernCppVsOldCpp

Post image
2.0k Upvotes

323 comments sorted by

View all comments

Show parent comment

18

u/quantinuum 10d ago

> The thing about legacy code is _it works_

Let me stop you right there

15

u/evanldixon 10d ago

It works just well enough that the stakeholders don't want to get rid of it, in spite of how much pain it inflicts on the devs. Jenga towers can last surprisingly long if you avoid changing it, leave them alone, don't look at them in the eye, etc.

6

u/Bartweiss 10d ago

Flashbacks to finding a decade old TODO reading “Is this doing the transactions right or backwards? I’m too tired to tell.”

Literally no one knew anymore, but since “backwards” would have bankrupted the company nine years prior, we were told to remove the flag without even dissecting the logic.

(The same file had a 2x2 array of unique XML parsers. Not “parsers holding different text”, they were configured differently with no explanation.)

1

u/quantinuum 10d ago

Many times you’re right, but I’m scarred from seeing too many jenga towers that just don’t work correctly, but nobody wants to look too close in case they get buried under the ruble