The bit about Scotty being fired was pretty good gallows humor. It was clear that failure meant death anyway, so being fired would be trivial by comparison, and thus the joke.
Oh, I get the gallows-humor part. It just should have been written with a more military flavor, something like this deleted exchange between Cmdr. J.J. Adams and Lt. Jerry Farman in Forbidden Planet
ADAMS: Some day you're going to bring us out right inside some star!
FARMAN: Yeah, and you'll probably court-martial me for it.