I just read this requirement in the job list:
Aware of the pitfalls of code like: User.find(:all).each
I immediately realized that I was unqualified for this job, because in my life I do not understand what the problem is. It...
- is the design connected? Should I store the database query in a variable and then iterate over it?
- dangerous?
- too verbose? Should I use
User.all.eachinstead? (-1 word! W00t!) - just poorly worded? If this is preceded by a "user table has 3 million rows"?
source
share