Constant weight codes: An approach based on Knuth's balancing method