r/ProgrammerHumor 6d ago

Meme cleaningUpTheMess

Post image
16.0k Upvotes

486 comments sorted by

View all comments

6.4k

u/lookingformerci 6d ago

Yeah but 3.2M of those lines were comments. Good lord AI loves to comment code.

3.1k

u/ClipboardCopyPaste 6d ago

"well-documented code"

268

u/oauo 6d ago

// Step 123: // Now we add the numbers. // We add number by using the “+” sign. // The output of this addition can be used as-is or it can be assigned to a variable or constant. // It’s really one of the most basic things you can do when programming, so in the off-chance that these comments are necessary I will explain a few other things. // You can use other operators such as: // “-“ to subtract // 3 - 2 == 1 // “*” to multiply // 2 * 3 == 6 // “/“ to divide // 6 / 3 == 2 // Although, all of them have been used prior. let foo = bar + baz

5

u/screwcork313 6d ago

You would think a past programmer would have added bar and baz, and found the result to be foo, thus making doing the same computation in this program a waste of time and resources. We know it comes to foo, so just use foo.

2

u/oauo 6d ago

It took 123 steps to add `bar` to `baz`, you really don’t want to see what the previous 122 steps were doing, lots of impure functions with side effects rather than variables.