Skip to content

Comment on Friendly attributes pattern in Rubyparent

Comments

For instance you’re probably iterating over those six plans and inserting them individually in the DB. Another approach would’ve been to accumulate all of them in memory then build and perform a single query. That’s not something people really consider because it’s “micro” optimization and makes the code look worse.

This same pitfall exists in every language. This has nothing to do with Ruby.

eh. Ruby makes it easy to do the wrong thing. imo.

Maybe, but this isn’t one of the ways it does.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.