I just read this as a requirement on a job listing:
- Aware of the pitfalls of code like: User.find(:all).each
and knew instantly I was unqualified for this job because for the life of me, I don't understand what the problem is . . .
Is it design related? Store the database request in a variable and THEN iterate over it?
Is it dangerous?
Is it wordy? You can do the same with User.all.each
? (-1 word! w00t!)
Is it simply poorly worded? Should it be prefaced with "The users table happens to have 3 million rows"
Any clarification is much appreciated!