I'm not entirely sure that we're all on the same page, as far as the meaning behind the advice to "write what you know". I feel like we all have different ideas about what it means, and who the advice is given for.
I'll try not to be too redundant with my first post, but I feel a need to clarify my understanding of it. And I'm not saying my understanding is the correct understanding, just saying that this is my impression I've gotten about the advice.
I've never heard anyone use this advice to apply to all writers. Is there anyone who thinks that all writers should write what they know? Perhaps I've gotten the wrong impression, but any time I've heard anyone give that advice, they were strictly directing it at inexperienced writers. And for that narrow audience, I do think there is some valid logic behind it.
Before I explain the reasoning behind it, as I understand it, let me first point out that my first feature was about a psychic superhero. Not only do I not know anything about that, but I don't believe in psychics. Prior to that, my most recent writing was a 20-page short about a pair of space-aliens scouting Earth for a future invasion. Obvsiously, I don't "know" that. So, I do think the phrase can be translated too literally. Forgot to mention -- I do consider myself a fairly inexperienced writer, so the advice would apply to me.
However, here's the logic behind it. Or, at least how I see it. Let me make an anology. Let's say you're a director. You've always had an affinity for Sci-Fi. It's the genre you get most excited about watching, and the genre that you have most of your filmmaking ideas in. So, over the course of your life, you're probably going to make a lot of Sci-Fi.
That doesn't mean you want to exclusively make Sci-Fi, forever. You might have plans to make an Historical Drama. You might have plans to make a Western. Maybe you want to make a Samurai Movie. Now, every movie is difficult to make, but I think it reasonable to assume that each of these non-Sci-Fi movies are going to be an added challenge, because you're outside of your comfort zone. It's probably going to require an even greater effort on your behalf.
So, all that being said, if you're choosing your very first feature, which potential project should you choose? I kind of think that it makes perfect sense to stay in your comfort-zone on your first feature (and maybe even your 2nd). This filmmaking thing has a pretty steep learning curve, might as well make things less difficult on yourself, in the beginning.
Later on, once your confidence has built, you feel more secure in what you're doing, then it's time to stretch your wings and make that Historical Drama.
Anyway, for me, "write what you know" embodies the same spirit. Though my first feature screenplay involved some outlandish stuff that I don't "know", the characters that inhabit it are very close to my life experiences. That doesn't mean that all of my movies are always going to be populated by the same schmucks, of course not. Heck, I plan on eventually writing a coming-of-age story, with a Japanese teennage lead, set during WWII. Uhh, I don't "know" that.
For my first feature, though, as much effort as was required to piece together a screenplay that would even remotely resemble a solid screenplay, I'm glad that I didn't have any grand over-reaching story or character elements.