The Basics of Practical Optimization