"Redshirts" is an excellent, thoughtful and funny novel. It's based on the old saw that in "Star Trek" if you were wearing a red shirt and was next to the Captain on some planet you were going to buy the farm. On the good ship Intrepid a bunch of new ensigns are confused and puzzle by the crew's reaction to senior staff and away trips. Soon they figure out that it's not just certain death that awaits them but a certain, stupid death.
The genius of Redshirts is not that the characters find themselves in television show but that they are in a badly written science fiction show with horrid pseudo science. Also they aren't always "on" that is they are controlled only when they are in an episode. When that's not happening they are free to act as they will. This freedom gives them hope. First they must understand the rules (even if they are dumb rules) and then try to figure out a way to leverage them to their advantage. Scalzi is very intelligent in dealing with stupid situations and his characters work out a way to attack the source of the problem.
This is a fun quick read two thirds of the way then something special happens. The novel becomes a more emotional read as it goes through three endings or codas. In each characters deal with the philosophical implications of what happened. It was definitely a surprise change of tone but it really worked and made what have just would have been a romp into something a tad more deeper.
Definitely read it!