When I come to something I don't know, I have to stop everything until I learn about it. Even then, I find that I don't really KNOW my subject, so once the first cut is written I find an expert to read over it and offer suggestions. Fortunately, what I'm writing is modern and experts abound once you start looking.
So far, I've learned about cancer and treatments...and met an oncologist who was able to point out big flaws in my made up treatment.
Learned about genetic research, then got pointers from a geneticist to make it more believable.
Dug up my book on police procedure, then talked to a real detective.
Read up on the basics of flying--and crash landing--a helicopter, then hooked up with a couple of pilots who helped me make it more real.
If I'd "kept writing" when I was out of my element instead of doing some research, I'd have had to start over, probably, instead of just cleaning up after I found my experts. I'd strongly recommend, as others have, that you find out what you need to know before continuing.
Trying to write my first book has been a humbling experience. I can relate 100% to the idea of being aware of my stupidity as mentioned in the thread title. You think you're pretty smart, until you start trying to write about stuff you know nothing about.
