Robert A. Heinlein was one of the "grand-daddy's" of science fiction. He lived from 1907 to 1988. In that time, he had a prolific writing career, with one of his most well-known works being Starship Troopers.
When someone like Heinlein gives writing advice, one should listen. While many others have called out these rules, I thought I'd list them here for my own benefit if nothing else. Here they are.
1.) You must write.
I'm reminded of similar advice given by Mur Lafferty of the I Should Be Writing podcast. Her first rule is "Butt in chair." It's as simple as that. Getting your butt in the chair is the first step to writing. Another way to look at it is that you must write if you want to be a writer.
2.) You must finish what you write.
If you don't, you're wasting time and effort. Sure, some writing is practice. The general rule on first novels is to shove it in a drawer and forget about it; most first novels are crap, so consider it practice and move on to the next one. However, if you never finish that first novel you'll never get to the second. It's not done until it's done, and you can't do anything with it until you've finished it.
3.) You must refrain from rewriting, except to editorial order.
This one is tough. I aspire to greatness. You probably do, too. My editing process involves several passes of the entire novel, then a chapter-by-chapter review. I hammer away at each and every chapter for as long as it takes. I risk exhaustion with this process, but it's what works for me. But at some point you have say, "I'm done", and resist all further temptations to re-write any more. If you think about it, a piece of writing is never really "done". There's always something to change or add or remove. But if you aspire to becoming a professional writer, then at some point you have to get your writing in front of someone who will pay you for it. That's not going to happen if you enter into a never ending rewrite cycle.
4.) You must put the work on the market.
You have to get your writing in front of someone who will pay you for it. Don't fear rejection. Embrace it and make yourself stronger from it. Or something like that. Bottom line: when you finish something, send it out.
5.) You must keep the work on the market until it is sold.
Once something is finished, send it out. If (or when) it comes back rejected, already have your next destination for it in mind. Only when all possible outlets have been exhausted should you consider stuffing it into a drawer or, if you're sure it's of high quality and representative of the kind of work you want people to read, put it on your web site or blog as a freebie.
Those are Heinlein's Rules of Writing. Robert J. Sawyer, author of Flash Forward and many other science fiction novels, adds a sixth rule to Heinlein's five:
6.) Start Working on Something Else
Once something is shipped, start working on the next story or novel. Not always easy, but it is essential to always have something in the pipeline. You might even find yourself juggling multiple, simultaneous projects. Some writers do this to keep from getting "stuck" when working on just a single project. The change in story or characters can really help keep the writing process flowing.