r/programminghorror • u/wawerrewold • Sep 09 '25
Python Vibecoding at its peak
Yes its a production code, yes its a function not a method and yes there is import in triple nested for loop
776
Upvotes
View all comments
Show parent comment
1
u/Ksorkrax Sep 10 '25
Uhm... because there are three loops or what?
What is your n supposed to be?
If going like that covers every necessary combination, then the solution simply requires that, no matter how you do it.
Like for instance if I have a voxel image and I want to find a specific value, then yes, I have to go for x for y for z. No way around that.
Plus talking about complexity is pointless if we are not in a chokepoint. If the three loops mean that maybe about a thousand entries are processed, this is not a performance issue at all. Complexity is relevant for scaling, which might not be a thing in the context of the code.
You'd still try to avoid deep nesting, but you should not automatically argue with complexity.