It means: Prepare everything in advance, like repairing the house before it rains, and don't improvise, like digging a well when you are thirsty.
Source: "Zhu Zi's Family Instructions" by Zhu Yongchun of the Ming Dynasty
Original text (excerpt):
One porridge and one meal, when you think about where you came from, it is not easy. Half a thread and half a strand, Heng Nian is struggling with material resources. It is better to prepare before it rains and not to dig a well when thirsty.
Translation:
For a piece of porridge or a meal, we should think about the hard-won; for half a thread or half a thread of clothes, we should always think about it. The production of these materials is very difficult. You must prepare in advance, like repairing the house before it rains, and don't "just improvise" like digging a well when you are thirsty.
Extended information:
The entire text of "Zhu Xi's Family Instructions" is intended to persuade people to be diligent and thrifty, manage their homes, and be lawful and self-disciplined. The moral education thoughts that have been formed in China for thousands of years are expressed in the form of famous sayings and aphorisms, which can be passed down orally or written as couplets and banners to hang on doors, halls and living rooms as mottos for managing families and educating children.
Therefore, it is very popular among officials, gentry and scholarly families. It has been widely circulated since its inception. It has been respected by the literati and officials of all ages as "the book of family management". It once became a must-read textbook for children and adolescents from the Qing Dynasty to the Republic of China. one.
"Zhu Xi's Family Instructions" is only 522 words, and it is a masterpiece of family education that incisively explains the way of self-cultivation and family management. Among them, many contents inherit the excellent characteristics of traditional Chinese culture, such as respecting teachers, being diligent and thrifty, and living in harmony with neighbors, etc., which still have practical significance today.
Of course, the feudal dross such as certain prejudices against women, superstitious retribution, complacency and conservatism are the historical limitations of that era, and we cannot be too demanding on our predecessors.