Sam isn't a goody-two-shoes, like some of Horatio Alger's heroes. He even tries to rob his roommate. Then he moves to Boston for a new start and decides to try to become respectable. He walks up Tremont street in perhaps the 1850s, stopping in all the stores looking for work, visits the Parker House and rooms on Harrison Ave. Alger, being from Revere originally, and having gone to Harvard, knows Boston (Kyle, Goodreads). His adventures continue as he tries, honestly, to earn his fortune.
Horatio Alger, Jr. (January 13, 1832 July 18, 1899) was a prolific 19th-century American author, best known for his many formulaic juvenile novels about impoverished boys and their rise from humble backgrounds to lives of middle-class security and comfort through hard work, determination, courage, and honesty. His writings were characterized by the "rags-to-riches" narrative, which had a formative effect on America during the Gilded Age.