I once spent the night on the stern of a sailboat with 6 cans of Red Bull, debugging a Mac driver for a piece of hardware that may end up being used by Foxconn to test iPhones.
I would have been much more comfortable in the cabin but the marina WiFi network didn't reach that far.
Why burn the midnight oil? It was either that or no sailing out next morning to spend a week at sea.