Literate Programming would arguably be that. It's unfortunate it's not more widely known/used.