Just as he put Gogarty into the novel in the fictional person of Buck Mulligan, Joyce included himself as "Stephen Dedalus," an autobiographical persona whom he had introduced in his first published novel, A Portrait of the Artist as a Young Man.
A Portrait finally appeared in 1916, after countless abortive drafts as Stephen Hero and serial appearances in the magazine The Egoist. It is a bildungsroman (a coming-of-age novel) or Künstlerroman (an artist's version of the same). When Joyce began writing Ulysses in 1914, he decided to continue the story of Stephen Dedalus. He wrote to Ezra Pound in 1915 that his new book "is a continuation of A Portrait of the Artist as a Young Man after three years' interval blended with many of the persons of Dubliners" (Ellmann, 383).
After two pages representing very early childhood, A Portrait follows Stephen’s development from the time of his first entering Clongowes Wood College (which Joyce did at age 6) through his university days (Joyce attended University College Dublin from 1898 to 1902, ages 16 to 20). Although the novel follows the general outlines of some significant events in Joyce’s life, it is never specific as to dates.
Ulysses is highly specific in most things, and on this day, June 16, 1904, Stephen is 22 years old (as Joyce himself had been). Like Joyce in the years 1902-1904, Stephen has decided to become a writer; he has introduced himself to many of the leading figures on the Dublin literary scene; he has moved to Paris to escape Irish provincialism; and, after receiving news that his mother is dying, he has returned home to a life of less glamorous poverty and very uncertain prospects. The companions with whom he conducted long peripatetic conversations at the end of A Portrait—Cranly, Lynch, Davin (themselves modeled loosely on some of Joyce’s university friends)—have been replaced by Buck Mulligan, and after this day Stephen will need a replacement for Mulligan.