  Linear codes generated by component functions of perfect nonlinear (PN) and
almost perfect nonlinear (APN) functions and the first-order Reed-Muller codes
have been an object of intensive study in coding theory. The objective of this
paper is to investigate some binary shortened codes of two families of linear
codes from APN functions and some $p$-ary shortened codes associated with PN
functions. The weight distributions of these shortened codes and the parameters
of their duals are determined. The parameters of these binary codes and $p$-ary
codes are flexible. Many of the codes presented in this paper are optimal or
almost optimal. The results of this paper show that the shortening technique is
very promising for constructing good codes.
