Starship Troopers by Robert A. Heinlein
A guy joins the army on a whim and becomes an infantryman. Eventually he also signs up to be an officer in a similarly spontaneous fashion. They fight space bugs and we hear multiple lectures about psychology and society that are clearly just the author preaching to his captive audience. Good writing, but the story doesn't really go anywhere.