Whenever there is a conditional branch with a logical disjunction or conjunction, reorder the terms so that all variables are evaluated first to hopefully short-circuit the expression and avoid any expensive method calls.
# bad
if costly_method? && local_var
...
end
# good
if local_var && costly_method?
...
end