The geometry of the plan of order seventeen and its application to error-correcting codes