An algorithmic guide for finite-dimensional optimal control problems (Handbook of numerical analysis)