So Long, and Thanks for All the Fish is the fourth book of the Hitchhiker's Guide to the Galaxy 'cycle' written by Douglas Adams. Its title is the message left by the dolphins when they departed Planet Earth just before it was demolished to make way for a hyperspace bypass, as described in The Hitchhiker's Guide to the Galaxy. The phrase has since been adopted by some science fiction fans as a humorous way to say "goodbye" and a song of the same name was featured in the 2005 film adaptation of The Hitchhiker's Guide to the Galaxy.
While hitchhiking through the galaxy, Arthur Dent is dropped off on a planet in a rainstorm. He appears to be in England on Earth, even though he saw the planet destroyed by the Vogons. He has been gone for several years, but only a few months have passed on Earth. He hitches a lift with a man named Russell and his sister Fenchurch (nicknamed "Fenny"). Russell explains that Fenny became delusional after worldwide mass hysteria, in which everyone hallucinated "big yellow spaceships" (the Vogon destructor ships that "demolished" the Earth). Arthur becomes curious about Fenchurch, but they reach his home before he can ask more questions. Inside his still-standing home, Arthur finds a gift-wrapped bowl inscribed with the words "So long and thanks", which he uses for his Babel Fish. Arthur considers that Fenchurch is somehow connected to him and to the Earth's destruction. He still has the ability to fly whenever he lets his thoughts wander.
Arthur puts his life in order, and then tries to find out more about Fenchurch. He accidentally finds her hitchhiking and picks her up. He obtains her phone number but loses it. He haphazardly discovers her home when he searches for the cave he had lived in on prehistoric Earth; her flat is built on the same spot. They find more circumstances connecting them. Fenchurch reveals that, moments before her "hallucinations", she had an epiphany about how to make everything right, but then blacked out. She has not been able to recall the substance of the epiphany. Noticing that Fenchurch's feet do not touch the ground, Arthur teaches her how to fly. They have sex in the skies over London.
In a conversation with Fenchurch, Fenchurch learns from Arthur about hitchhiking across the galaxy and Arthur learns that all the dolphins disappeared shortly after the world hallucinations. He and Fenchurch travel to California to see John Watson, an enigmatic scientist who claims to know why the dolphins disappeared. He has abandoned his original name in favour of "Wonko the Sane", because he believes that the rest of the world's population has gone mad. Watson shows them another bowl with the words "So long and thanks for all the fish" inscribed on it, and encourages them to listen to it. The bowl explains audibly that the dolphins, aware of the planet's coming destruction, left Earth for an alternate dimension. Before leaving, they created a new Earth and transported everything from the original to the new one. After the meeting, Fenchurch tells Arthur that while he lost something and found it, she had found something and lost it. She desires that they travel to space together, and reach the site where God's Final Message to His Creation is written.
Ford Prefect discovers that the Hitchhiker's Guide entry for Earth consists of the volumes of text he originally wrote, instead of the previous truncated entry, "Mostly harmless". Curious, Ford hitchhikes across the galaxy to reach Earth. Eventually he uses the ship of a giant robot to land in the centre of London, causing a panic. In the chaos, Ford reunites with Arthur and Fenchurch, and they commandeer the robot's ship. Arthur takes Fenchurch to the planet where God's Final Message to His Creation is written, where they discover Marvin. Due to previous events, Marvin is now approximately 37 times older than the known age of the universe and is barely functional. With Arthur and Fenchurch's help, Marvin reads the Message ("We apologise for the inconvenience"), smiles, utters the final words "I think... I feel good about it," and dies happily.
The novel has a very different tone from the previous books in the series. This is partly because it is a romance, and partly because the book bounces around in time more erratically than its predecessors. Adams even injects a humorous sub-plot. There is less space than in the previous books; Arthur leaves the new Earth only in the final chapters. The different tone also reflects the rushed nature of the writing; Adams' editor Sonny Mehta moved in with the author to ensure that the book met its (extended) deadline. As a result, Adams later stated that he was not entirely happy with the book, which includes several jarring authorial intrusions, which fellow author and Adams' biographer Neil Gaiman described as "patronising and unfair".
The book also reflects a significant shift in Adams's view of computers. In the previous books, computers had been portrayed quite negatively, reflecting Adams' views on the subject at the time. However, between the writing of Life, The Universe and Everything and So Long and Thanks for all the Fish, his attitude toward technology changed considerably. Having been taken along to a computer fair, he became enamored of the first model of the Macintosh, the start of a long love affair with the brand (he claimed to have bought two of the first three Macs in the UK — the other was bought by his friend Stephen Fry). In So Long And Thanks For All The Fish, Arthur Dent purchases an Apple computer for the purpose of star mapping in order to pinpoint the location of the cave he lived in on prehistoric Earth, and although Adams briefly mocks Arthur's methodology (noting that Arthur really has no idea how to go about such a task), the computer itself is not disparaged, and even somehow produces the correct result. In a later essay, Adams noted that some people had accused him of being a "turncoat" because of this change in his attitudes.
In 1993 the Library Journal said that So Long and Thanks for all the Fish was "filled with loopy humor and pretzel logic that makes Adams' writing so delightful".
Betsy Shorb reviewing for the School Library Journal said that "the humor is still off-the-wall but more gentle than the other books. The plot is more straight forward and slightly less bizarre than its predecessors".
There have been three audiobook recordings of the novel. The first was an abridged edition, recorded in the mid-1980s by Stephen Moore, best known for playing the voice of Marvin the Paranoid Android in the radio series, LP adaptations and in the TV series. In 1990, Adams himself recorded an unabridged edition, later re-released by New Millennium Audio in the United States and available from BBC Audiobooks in the United Kingdom. In 2006, actor Martin Freeman, who had played Arthur Dent in the 2005 movie, recorded a new unabridged edition of the audiobook.
The Quandary Phase of the radio series is drawn from So Long and Thanks for All the Fish, but is not a direct audiobook reading.
The dedication thanks among others "Mogens and Andy and all at Huntsham Court for a number of unstable events". This refers to the then country hotel in Devon where Adams retreated in the summer of 1984 to work on the book but instead enjoyed drinking wine with the owners and Steve Meretzky who had joined him to work on the Hitchhiker's video game.