Chapter 2 of Hartl's tutorial