Hi, silly question time

Whats the best way to fly with a laptop? Is it safer to pack it well and put it in a suitcase and brave the tender mercies of the baggage handlers?
Or is it better to have it in the hand luggage and carry it on yourself?
What about the xray machine at customs? Shouldn't affect the HDD, should it?
Answers on a postcard