If you have been programming in Ruby for awhile now, you have likely already used built-in methods such as #each, #select, and #map. Despite of what everyone says about Ruby magic, there’s nothing special with the way those methods work.
The N + 1 query problem is a common performance bottleneck found in queries that are written using an ORM (Object-Relational Mapping) tool, such as ActiveRecord.
On this post we will build a calculator that adds two integers, where our development will be driven by the tests we write using RSpec as our test library.
TDD (Test Driven Development) is a software development process where your code is driven by tests. It follows the red-green refactor cycle, which has the following standards: