section_path: Life/Official career
section_name: Official career
paragraph_text: Official career
  
  In 1063 Shen Kuo successfully passed the imperial examinations, the difficult national-level standard test that every high official was required to pass in order to enter the governmental system. He not only passed the exam however, but was placed into the higher category of the best and brightest students. While serving at Yangzhou, Shen's brilliance and dutiful character caught the attention of Zhang Chu (張蒭; 1015–1080), the Fiscal Intendant of the region. Shen made a lasting impression upon Zhang, who recommended Shen for a court appointment in the financial administration of the central court. Shen would also eventually marry Zhang's daughter, who became his second wife.
  
  In his career as a scholar-official for the central government, Shen Kuo was also an ambassador to the Western Xia dynasty and Liao dynasty, a military commander, a director of hydraulic works, and the leading chancellor of the Hanlin Academy. By 1072, Shen was appointed as the head official of the Bureau of Astronomy. With his leadership position in the bureau, Shen was responsible for projects in improving calendrical science, and proposed many reforms to the Chinese calendar alongside the work of his colleague Wei Pu. With his impressive skills and aptitude for matters of economy and finance, Shen was appointed as the Finance Commissioner at the central court.
  
  As written by Li Zhiyi, a man married to Hu Wenrou (granddaughter of Hu Su, a famous minister of the Song dynasty), Shen Kuo was Li's mentor while Shen served as an official. According to Li's epitaph for his wife, Shen would sometimes relay questions via Li to Hu when he needed clarification for his mathematical work, as Hu Wenrou was esteemed by Shen as a remarkable female mathematician. Shen lamented: "If only she were a man, Wenrou would be my friend."
  
  While employed by the central government, Shen Kuo was also sent out with others to inspect the granary system of the empire, investigating problems of illegal tax-collection, negligence, ineffective disaster relief, and inadequate water-conservancy projects. While Shen was appointed as the regional inspector of Zhejiang in 1073, the Emperor requested that Shen pay a visit to the famous poet Su Shi (1037–1101), then an administrator in Hangzhou. Shen took advantage of this meeting to copy some of Su's poetry, which he presented to the Emperor indicating that it expressed "abusive and hateful" speech against the Song court; these poems were later politicized by Li Ding and Shu Dan in order to level a court case against Su. (The Crow Terrace Poetry Trial, of 1079.) With his demonstrations of loyalty and ability, Shen Kuo was awarded the honorary title of a State Foundation Viscount by Emperor Shenzong of Song (r. 1067–1085), who placed a great amount of trust in Shen Kuo. He was even made 'companion to the heir apparent' (太子中允; 'Taizi zhongyun').
  
  At court Shen was a political favorite of the Chancellor Wang Anshi (1021–1086), who was the leader of the political faction of Reformers, also known as the New Policies Group (新法, Xin Fa). Shen Kuo had a previous history with Wang Anshi, since it was Wang who had composed the funerary epitaph for Shen's father, Zhou. Shen Kuo soon impressed Wang Anshi with his skills and abilities as an administrator and government agent. In 1072, Shen was sent to supervise Wang's program of surveying the building of silt deposits in the Bian Canal outside the capital city. Using an original technique, Shen successfully dredged the canal and demonstrated the formidable value of the silt gathered as a fertilizer. He gained further reputation at court once he was dispatched as an envoy to the Khitan Liao dynasty in the summer of 1075. The Khitans had made several aggressive negotiations of pushing their borders south, while manipulating several incompetent Song ambassadors who conceded to the Liao Kingdom's demands. In a brilliant display of diplomacy, Shen Kuo came to the camp of the Khitan monarch at Mt. Yongan (near modern Pingquan, Hebei), armed with copies of previously archived diplomatic negotiations between the Song and Liao dynasties. Shen Kuo refuted Emperor Daozong's bluffs point for point, while the Song reestablished their rightful border line. In regard to the Lý dynasty of Đại Việt (in modern northern Vietnam), Shen demonstrated in his Dream Pool Essays that he was familiar with the key players (on the Vietnamese side) in the prelude to the Sino-Vietnamese War of 1075–1077. With his reputable achievements, Shen became a trusted member of Wang Anshi's elite circle of eighteen unofficial core political loyalists to the New Policies Group.
  
  Although much of Wang Anshi's reforms outlined in the New Policies centered on state finance, land tax reform, and the Imperial examinations, there were also military concerns. This included policies of raising militias to lessen the expense of upholding a million soldiers, putting government monopolies on saltpetre and sulphur production and distribution in 1076 (to ensure that gunpowder solutions would not fall into the hands of enemies), and aggressive military policy towards Song's northern rivals of the Western Xia and Liao dynasties. A few years after Song dynasty military forces had made victorious territorial gains against the Tanguts of the Western Xia, in 1080 Shen Kuo was entrusted as a military officer in defense of Yanzhou (modern-day Yan'an, Shaanxi province). During the autumn months of 1081, Shen was successful in defending Song dynasty territory while capturing several fortified towns of the Western Xia. The Emperor Shenzong of Song rewarded Shen with numerous titles for his merit in these battles, and in the sixteen months of Shen's military campaign, he received 273 letters from the Emperor. However, Emperor Shenzong trusted an arrogant military officer who disobeyed the emperor and Shen's proposal for strategic fortifications, instead fortifying what Shen considered useless strategic locations. Furthermore, this officer expelled Shen from his commanding post at the main citadel, so as to deny him any glory in chance of victory. The result of this was nearly catastrophic, as the forces of the arrogant officer were decimated; Xinzhong Yao states that the death toll was 60,000. Nonetheless, Shen was successful in defending his fortifications and the only possible Tangut invasion-route to Yanzhou.