Convex Optimization As A Building Block For Difficult Problems In Machine Learning