This paper provides a survey of the theory of patchy feedbacks, and its applications to asymptotic stabilization and optimal control. It also contains two new results, showing the robustness of sub-optimal patchy feedbacks both in the case of (internal and external) deterministic disturbances, and of random perturbations modelled by stochastic Brownian motion.