Wei Yuan (1794-1857), courtesy name Moshen, a native of Shaoyang, was a thinker and classicist of the late Qing. A fellow student of New Text learning with Gong Zizhen, the pair were known as 'Gong-Wei'; he failed the higher examinations repeatedly and studied practical affairs as a private secretary, compiling the Collected Writings on Statecraft of the reigning dynasty, the great anthology of applied learning, and writing the Sacred Record (Shengwu ji) on Qing military history. When the Opium War broke out, Lin Zexu entrusted him with the draft of the Sizhou zhi (Gazetteer of the Four Continents); Wei Yuan expanded it into the Haiguo tuzhi (Illustrated Treatise on the Maritime Kingdoms) in fifty juan in 1842, later one hundred: a survey of the geography, history, government and arms of the world's nations, urging 'learn the superior techniques of the barbarians to control the barbarians' — to master Western shipbuilding and gunnery to repel invasion, the first cry of modern China's opening of the eyes to the world. The book crossed to Japan, where late-Tokugawa reformers read it eagerly, coloring the Meiji Restoration. In later life he turned to Buddhism and died in a monk's lodging in Hangzhou. His 'know the barbarians' situation' and 'learn their techniques' fed directly into the Self-Strengthening Movement; before the Sino-Japanese War, no Chinese source offered a more systematic knowledge of the world.