It’d take far too much space to list every classic “Simpsons” episode which Swartzwelder wrote. However, some Homer-centric ones on his resume include “Homer The Vigilante,” where Homer leads a task force to stop a cat burglar plaguing Springfield, and “Homer The Smithers,” where Homer becomes Mr. Burns’ new personal assistant. He even wrote “Homer’s Enemy,” aka the one with Frank Grimes, which deconstructs Homer’s ability to bumble his way to success.
Per Swartzwelder, and repeated by former “Simpsons” showrunner Mike Reiss, the secret to writing Homer is that he has the attention span of a dog. As Swartzwelder explained to the New Yorker:
“Yes, he is a big talking dog. One moment he’s the saddest man in the world, because he’s just lost his job, or dropped his sandwich, or accidentally killed his family. Then, the next moment, he’s the happiest man in the world, because he’s just found a penny — maybe under one of his dead family members. He’s not actually a dog, of course — he’s smarter than that — but if you write him as a dog you’ll never go wrong.”
During the early years of “The Simpsons,” Bart was seen by the writers as the main character; Bart gets the most focus in season 1, being at the center of five episodes out of 13. However, by season 3 Homer had eclipsed his son in this role. His short attention span simply lent itself better to the show’s rapid-fire comedy than Bart’s trouble-making did.
Source : https://www.slashfilm.com/964071/theres-a-simple-trick-to-writing-a-good-homer-simpson-script/