In his youth, Zhuge Liang studied under Sima Hui, also known as Shuijing. He was a diligent student who applied himself to deep thought, earning the appreciation of Sima Hui and the respect of Sima's wife, who admired his industriousness and intellect. In an era before clocks, people relied on sundials to tell time, which was difficult on cloudy or rainy days. To keep time, Sima Hui trained a rooster to crow at specific intervals by feeding it regularly. Desiring more time to learn, Zhuge Liang hoped to extend the lessons, but Sima Hui always used the rooster's crow as a signal to end the session. Thus, he devised a plan: if he could delay the rooster's crow, the lesson would last longer. He began carrying some grain in his pocket and fed the rooster just before it was scheduled to crow, causing it to stay quiet while eating.
After some time, Sima Hui noticed the rooster's crowing was no longer punctual. Upon closer inspection, he discovered Zhuge Liang's clever method. Although initially annoyed, Sima Hui was soon moved by Zhuge Liang's intense passion for learning. He began to care for him more deeply and shared his knowledge without reservation. Encouraged, Zhuge Liang worked even harder, eventually becoming a learned scholar who understood both astronomy and geography.