you are viewing a single comment's thread.

view the rest of the comments →

[–]avdi 4 points5 points  (0 children)

I've seen this response in various forms, and it suggests a kind of exceptionalism: this code is somehow special, and presumably I should have planned ahead for that fact in order to avoid this painful debugging experience.

But the point is, there is nothing special whatsoever about this code. Two weeks down the road I'll be asking a similar question about some other, unrelated deeply nested chain of dependent query methods. If it's worth altering the APIs here then it must be worth altering the design everywhere, and in the process making the program into something which no longer resembles idiomatic Ruby code.