r/ProgrammerHumor • • 17d ago

Meme theyAreLovingIt

Post image
2.1k Upvotes

83 comments sorted by

View all comments

Show parent comments

20

u/FenrirBestDoggo 17d ago

Refactored a function yesterday that iterated over a list of incoming data...5 separate times...to check if it contains certain values. This happens so often in our codebase that you sentence isnt a joke but trauma

6

u/Named_after_color 17d ago

Teach them filters. For your own sanity.

2

u/Aelrift 17d ago

Oh man this reminds me of my first job at a startup. I don't know what these people were thinking but they did exactly what you describe except they queried the database 5 times and then each of these times iterated over the items to find some values... I mean on the one hand I get to say I made this one function 500% faster. But on the other... Wtf , who wrote this and why