Use `size` over `length` in example code.

The guide suggests preferring the use of `size` over `length`, but one of the code snippets doesn't follow this rule.