When his disciple Zai Yu slept during the day, Confucius said: “Rotten wood cannot be carved. A wall of dung cannot be plastered.” (朽木不可雕也,粪土之墙不可杇也) The Ji family was richer than the Duke of Zhou, and his disciple Ran Qiu collected taxes to make it richer still. Confucius told his students: “He is no follower of mine. Little ones, beat the drums and attack him. It is permitted.” (非吾徒也,小子鸣鼓而攻之,可也)
Both lines are in the Analects, and both became set phrases. Dictionaries define 朽木不可雕 as a person who cannot be trained, or a matter ruined beyond rescue, and 鸣鼓而攻之 as to announce someone’s faults and denounce them.