Robert Anson Heinlein (; July 7, 1907 - May 8, 1988) was an American science fiction writer. Often called the "dean of science fiction writers", his sometimes controversial works continue to have an influential effect on the genre, and on modern culture more generally. Heinlein became one of the first American science fiction writers to break into mainstream magazines such as The Saturday Evening Post in the late 1940s. He was one of the best-selling science fiction novelists for many decades, and he, Isaac Asimov, and Arthur C. Clarke are often considered the "Big Three" of English-language science fiction authors.

Heinlein's experience in the U.S. Navy exerted a strong influence on his character and writing. He graduated from the U.S. Naval Academy in Annapolis, Maryland with the class of 1929 and went on to serve as an officer in the Navy. He was assigned to the new aircraft carrier USS Lexington in 1931, where he worked in radio communications, then in its earlier phases, with the carrier's aircraft. The captain of this carrier was Ernest J. King, who later served as the Chief of Naval Operations and Commander-in-Chief, U.S. Fleet during World War II. Heinlein was frequently interviewed during his later years by military historians who asked him about Captain King and his service as the commander of the U.S. Navy's first modern aircraft carrier.  Heinlein also served aboard the destroyer USS Roper in 1933 and 1934, reaching the rank of lieutenant. His brother, Lawrence Heinlein, served in the U.S. Army, the U.S. Air Force, and the Missouri National Guard, and he rose to the rank of major general in the National Guard.  In 1929, Heinlein married Elinor Curry of Kansas City in Los Angeles, and their marriage lasted about a year. His second marriage in 1932 to Leslyn MacDonald (1904-1981) lasted for 15 years. MacDonald was, according to the testimony of Heinlein's Navy buddy, Rear Admiral Cal Laning, "astonishingly intelligent, widely read, and extremely liberal, though a registered Republican," while Isaac Asimov later recalled that Heinlein was, at the time, "a flaming liberal". (See section: Politics of Robert Heinlein.)  Heinlein decisively ended his juvenile novels with Starship Troopers (1959), a controversial work and his personal riposte to leftists calling for President Dwight D. Eisenhower to stop nuclear testing in 1958. "The "Patrick Henry" ad shocked 'em," he wrote many years later. "Starship Troopers outraged 'em." Starship Troopers is a coming-of-age story about duty, citizenship, and the role of the military in society. The book portrays a society in which suffrage is earned by demonstrated willingness to place society's interests before one's own, at least for a short time and often under onerous circumstances, in government service; in the case of the protagonist, this was military service.  Later, in Expanded Universe, Heinlein said that it was his intention in the novel that service could include positions outside strictly military functions such as teachers, police officers, and other government positions. This is presented in the novel as an outgrowth of the failure of unearned suffrage government and as a very successful arrangement. In addition, the franchise was only awarded after leaving the assigned service, thus those serving their terms--in the military, or any other service--were excluded from exercising any franchise. Career military were completely disenfranchised until retirement.  The name Starship Troopers was licensed for an unrelated, B movie script called Bug Hunt at Outpost Nine, which was then retitled to benefit from the book's credibility. The resulting film, entitled Starship Troopers (1997), which was written by Ed Neumeier and directed by Paul Verhoeven, had little relationship to the book, beyond the inclusion of character names, the depiction of space marines, and the concept of suffrage earned by military service. Fans of Heinlein were critical of the movie, which they considered a betrayal of Heinlein's philosophy, presenting the society in which the story takes place as fascist.  Likewise, the powered armor technology that is not only central to the book, but became a standard subgenre of science fiction thereafter, is completely absent in the movie, where the characters use World War II-technology weapons and wear light combat gear little more advanced than that. In Verhoeven's movie of the same name, there is no battle armor. Verhoeven commented that he had tried to read the book after he had bought the rights to it, in order to add it to his existing movie. However he read only the first two chapters, finding it too boring to continue. He thought it was a bad book and asked Ed Neumeier to tell him the story because he couldn't read it.  From about 1961 (Stranger in a Strange Land) to 1973 (Time Enough for Love), Heinlein explored some of his most important themes, such as individualism, libertarianism, and free expression of physical and emotional love. Three novels from this period, Stranger in a Strange Land, The Moon Is a Harsh Mistress, and Time Enough for Love, won the Libertarian Futurist Society's Prometheus Hall of Fame Award, designed to honor classic libertarian fiction. Jeff Riggenbach described The Moon Is a Harsh Mistress as "unquestionably one of the three or four most influential libertarian novels of the last century".  Heinlein did not publish Stranger in a Strange Land until some time after it was written, and the themes of free love and radical individualism are prominently featured in his long-unpublished first novel, For Us, The Living: A Comedy of Customs.  The Moon Is a Harsh Mistress tells of a war of independence waged by the Lunar penal colonies, with significant comments from a major character, Professor La Paz, regarding the threat posed by government to individual freedom.  Although Heinlein had previously written a few short stories in the fantasy genre, during this period he wrote his first fantasy novel, Glory Road, and in Stranger in a Strange Land and I Will Fear No Evil, he began to mix hard science with fantasy, mysticism, and satire of organized religion. Critics William H. Patterson, Jr., and Andrew Thornton believe that this is simply an expression of Heinlein's longstanding philosophical opposition to positivism. Heinlein stated that he was influenced by James Branch Cabell in taking this new literary direction. The penultimate novel of this period, I Will Fear No Evil, is according to critic James Gifford "almost universally regarded as a literary failure" and he attributes its shortcomings to Heinlein's near-death from peritonitis.

what was some of his work from the middle period?
Heinlein also served aboard the destroyer USS Roper in 1933 and 1934, reaching the rank of lieutenant.