Paddy Works on the Railway is a heaving shanty with the unique technique of counting by the years. Despite describing railway construction, it was also used around docks and aboard ships. Some versions center around the California gold rush while others describe America in the 1860s, just prior to the first transcontinental railway. The use of years to tell a story is also found in the folk song Peg and Awl.
This shanty relates to the great Irish emigration to America, with Paddy as a generic name for an Irishman. It may have found its way from music halls, but Sir Richard Runciman Terry argues that his great-uncle used to sing an earlier version:
When I was a little tiny boy
I went to sea in Stormy's employ,
I sailed way across the sea
When I was just a shaver.
It's I was weary of the sea
When I was just a shaver.