AI Ignores Limits When Generating Permutation Code In Vibecoding Session
Turns out there was no free lunch in this case: Either an exact quadratic-time solution or an approximate linear-time solution, which was originally implemented. Yet, I think this kind of trade off should have been a discussion point. That an agent just goes ahead and implement something silently with a nasty worst-case complexity is quite bad. "Yeah, your concern is valid. Average fast is not enough if one pathological prediction can pin evaluation for ages. A quadratic fallback over a huge result set is exactly the kind of thing that feels fine until it very much doesn’t."
Some recent vibecoding outcomes: 🔹 18! permutations is no biggie (one place) 🔹 Quadratic cost comparison function is implemented (in another place). What's interesting, in case 1, AI was basically copying an existing function, which already limited the number of permutations to make things manageable. It still ignored this limit.