Continuous approximations, codifferentiable functions and minimization methods