He wrote this in his magnum opus, General Theory of Employment, Interest, and Money (1936).
"Ancient Egypt was doubly fortunate, and doubtless owed to this its fabled wealth, in that it possessed two activities, namely, pyramid-building as well as the search for precious metals, the fruits of which, since they could not serve the needs of many by being consumed, did not stale with abundance. The Middle Ages built cathedrals and sang dirges. Two pyramids, two masses for the dead, are twice as good as one; but not so two railways from London to York." (p. 131)
He was a defender of government make-work projects. When we were children, teachers assigned us busy work to keep us occupied. Eventually, we caught on: the work was not meaningful. It was wasting our time. Keynes advised the governments of his era to imitate our teachers.
"If the Treasury were to fill old bottles with banknotes, bury them at suitable depths in disused coal mines which are then filled up to the surface with town rubbish, and leave it to private enterprise on well tried principles of laissez-faire to dig the notes up again." (Ibid., p. 129)
While Keynesian economics textbooks rarely quote his words, which are too embarrassing, they present equations that show – or seem to show – that the solution to unemployment is government spending. The government can spend its money on projects that will create demand for labor.