The method of (not so) ordinary least squares: what can go wrong and how to fix them