Only 3% Got It Right: 5 Dangerous Ruby on Rails Code Patterns from RubyKaigi

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

A RubyKaigi quiz revealed that only 3% of ~100 developers correctly identified five common Rails anti-patterns. The mistakes include loading records into Ruby instead of using database queries, performing aggregations in application code rather than SQL, calling external APIs inside transactions, triggering background jobs

4m read timeFrom rubystacknews.com
Post cover image
Table of contents
1. Loading Records Instead of Asking the DatabaseThe mistakeWhy it’s dangerousThe fix2. Doing Aggregation in Ruby Instead of SQLThe mistakeWhy it’s dangerousThe fix3. Calling External APIs Inside TransactionsThe mistakeWhy it’s dangerousThe fix4. Triggering Background Jobs Before CommitThe mistakeWhy it’s dangerousThe fix5. Rescuing StandardError EverywhereThe mistakeWhy it’s dangerousThe fixWhy Only 3% Got Everything RightFinal ThoughtsShare this:Related

Sort: