CODE SMOOTHING, UNIFORM DISTRIBUTIONS, AND APPLICATIONS