News for hackers. Stuff that matters.
Re:Friendly Attributes Pattern in Ruby by boredtofears on Saturday November 08, 2025 @01:13PM (#45858683)
> 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.

Re:Friendly Attributes Pattern in Ruby by AlphaSite on Saturday November 08, 2025 @04:10PM (#45860007)
eh. Ruby makes it easy to do the wrong thing. imo.
Re:Friendly Attributes Pattern in Ruby by boredtofears on Saturday November 08, 2025 @04:29PM (#45860195)
Maybe, but this isn’t one of the ways it does.