"The Song of the Cheerful (but slightly Sarcastic) Jesus" is a poem by Oliver St. John Gogarty. It was written around Christmas of 1904 and was later published in modified form as "The Ballad of Joking Jesus" in James Joyce's Ulysses.
The poem, like many of Oliver St. John Gogarty's humorous verses, was written for the private amusement of his friends. In the summer of 1905, he sent a copy to James Joyce, then living in Trieste, via their common acquaintance Vincent Cosgrave. Joyce and Gogarty had quarreled the previous autumn, and Cosgrave presented the poem as a peace offering, writing Joyce that "the appended song of J is of course Gogarty's. He bids me send it. He desires you back in Dublin. ... It seems G desires reconciliation so that if you write to me be unequivocal."
<blockquote></blockquote>
Always on the lookout for engaging quotations, Joyce decided to incorporate Gogarty's poem into his work. An early manuscript fragment loosely connected with Stephen Hero places the first two stanzas in the mouth of Doherty, an early prototype of Buck Mulligan. Joyce later abridged and modified the poem for inclusion in the opening chapter of Ulysses, where it is sung by Mulligan, a character largely modeled on Gogarty.
<blockquote></blockquote>
An apparition of Edward VII also recites a couplet from one of the unused stanzas ("My methods are new and are causing surprise. To make the blind see I throw dust in their eyes") during the chapter "Circe".
Asked about his authorship of the poem later in life, Gogarty said, "Yes I am guilty; but it shows Joyce's mastery that nobody attributed the verses to me even though he quotes them almost accurately."