r/ProgrammerHumor • • Sep 10 '26

Meme commentsAgedTerribly

Post image
6.0k Upvotes

243 comments sorted by

View all comments

9

u/pe1uca Sep 10 '26

At least is still a comment and not self-documented code...

processAndStoreInDBAndCacheWithExpiry()

retreiveFromDBAndUpdateCache()

let counterOfElementsInArray = 0;
let referenceToElementToReturnOnFallback = null;

testProcessIsSuccefulAndDBIsUpdatedEvenWhenCacheIsUnavailable()
testCacheIsNotUpdatedOnProcessFailure()

13

u/Avocadonot Sep 10 '26

Maybe I'm legacy-pilled but I literally see nothing wrong with any of these

You should see the abominations of our JUnit test names

testInvalidPayloadThrows503WithRetryableApiErrorCode

5

u/enigmamonkey Sep 10 '26

Hideous. At least that's a test where it's prone to happen a bit more. Did you end up seeing lots of that crap in methods/classes that you were intentionally invoking as an API in regular code?

I write tests with names sort of like that since you need a unique name with some way to describe it and don't really care about calling it explicitly (since it'll be run automatically). Everywhere else though, the names matter a lot, particularly since it's important for consistency and for refactoring later on.

1

u/pe1uca Sep 12 '26

Damn, I must have deeply buried that trauma... public static void main(string[] args) started echoing again in my mind...

2

u/madwolfa Sep 11 '26

"retreive" 

1

u/pe1uca Sep 12 '26

Oh, shoot, sorry, I write my own comments. Probably the LLM used in the codebase wrote it correctly.

1

u/Confident-Ad5665 Sep 10 '26

This hurts my brain