On Friday, one Comic-Con panel took us inside The Big Bang Theory writers' room. The executive producers and 10 of the writers showed up to discuss what it's like to work on the Emmy-nominated series.

The first surprise came right away: Kunal Nayyar was the guest moderator. A couple minutes in, a fan asked a question about Amy, at which point Nayyar said, "Why don't we ask her?" Turns out Mayim Bialik also came to Comic-Con surprise the fans.

And those fans got some big news for the upcoming season: In the premiere, we're going to learn when Sheldon bought the engagement ring for Amy. Writer Eric Kaplan teased that we also eventually find out Amy had a "great-great-uncle who didn't always play by the rules."

But this panel wasn't about Season 9; it was about the eight that preceded it. A few highlights:

1. Having had have gone back to the futureIn one episode, Jim Parsons, Johnny Galecki and Simon Helberg debate whether Back to the Future has a major plot hole — and end up arguing over which grammar tense to use to indicate events that may have happened in the past in an alternate timeline. It was based on an actual debate that took place in the writer's room. Writer Eric Kaplan ultimately declared the proper tense "retroactively self-negating past perfect."

Nayyar said the whole thing "went over my head, but I just read the lines as usual."

2. Enter the droneIn another episode based on real life, Sheldon struggles to make a drone helicopter work. It all started with a gift that executive producer Chuck Lorre received.

"I got a drone for Christmas and I couldn't make it work, and I knew the writers from Two and Half Men wouldn't be able to fix it," Lorre said. He brought it into the Big Bang Theory writers' room to have co-executive producer Bill Prady, a former software engineer, and writer Saladin Patterson, an engineer, take a look at it. "They were able to figure out that it was broken," Lorre said.

For the episode, the producers brought in a drone piloting expert, who apparently had let his expertise go to his head. "It was a 17-year-old kid," Nayyar explained. "We've had a lot of big stars on the show, and he was the biggest diva of them all. I was like, 'Nice flight' and he was all like, 'Thanks, bro.'"

3. Is it fan fic if you write the show?After discovering the enormous volume of fan fiction online about their show, the writers decided to read one in the writers' room, about what happened to Amy on her prom night.

"We got really into the story and what was happening," said executive producer Steve Holland. They got so engrossed in it that they wrote their own fan fiction, which they had Nayyar and Bialik read to the audience. An excerpt:

"Have you ever read 50 Shades of Grey?" Nayyar asked. "I'm about to introduce you to 50 Shades of Brown."

"That doesn't make sense," Bialik responded, in a perfect Amy tone of voice. "Grey was the character's name."

"That kind of semantic nitpicking is going to get you a spanking," Nayyar said.

After reading the script, Nayyar pointed out to Bialik that "for two characters who haven't kissed much, [Sheldon] sure has spanked you a lot."

4. Sheldon the almost-felonOne memorable episode from last season was when Sheldon and Leonard visited Skywalker Ranch. Apparently, after shooting the ending, Lorre made them go back and write a different one.

"Can we talk a little bit about that?" Nayyar asked.

"Oh, you want to discuss the ending that didn't air?" Lorre responded.

"Uh, I'm just reading from the page you gave me," Nayyar said, holding up the sheet of paper on the podium. So, yes, he did want to discuss it. Basically, Lorre explained, he didn't think it was realistic for the character.

"It turned out [in the original ending] Sheldon had stolen a lightsaber from Skywalker Ranch, and I couldn't reconcile that he had done something that was basically a felony," Lorre said. "It troubled me. That character couldn't commit a crime like that."

Another writer pointed out that a few seasons ago, Sheldon stole a print of Raiders of the Lost Ark from a movie theater.

"Well, we have to go back and rewrite that too," Lorre joked.

5. The show that almost wasn'tA fan asked the writers whether, when they wrote the pilot nearly a decade ago, they had already figured out what the long-term arcs were for the characters and where they would all be at this point. In a word, no.

"We honestly didn't know what we were doing at all," Lorre said.

They shot a pilot, which bombed in testing and never made it to air. Fortunately, they were allowed to write and shoot another one, which ultimately became the first episode of the series.

The very last question was from an adorable little boy, who wanted to know why "Soft Kitty" was about a kitty and not any other soft animal. The writers didn't have an answer, but led the entire crowd in a rendition of the song to close out the panel.

Season 9 of The Big Bang Theory returns Monday, Sept. 21 at 8/7c on CBS.

(Full disclosure: TVGuide.com is owned by CBS.)

TODAY'S VIDEO: Wookiees and 11 other things we're psyched for at Comic-Con