It all boils down to pre-dive planning. Take in account the type of dive, shore, boat or surf. Add to that the conditions, depths, diver skill levels and purpose of the dive (Just looking around, training photo ect.).
Rule of thumb, plan your dive.
There are numerous thread on gas and dive planning, many are very good reads.