When the book came out, it was the first sci-fi book in years that I couldn't put down.
And the film stayed fairly true to the book, which is also uncommon.
Technically, you could say that the Martian is more *engineering*-fiction; it's not about discovering new principles, but making stuff work. Even in ways it was never meant to, and without the proper means. In that aspect is also great *hacking* fiction.
As an engineer myself I loved it. Especially the book. Stuff going wrong is very recognizable in engineering practice. Every experienced engineer has had their "oh, shit" moments.