I should be blogging about The Ocean at the End of the Lane, because it comes out in 9 days and the reviews and articles are starting, and right this minute I should be doing the writing I have to finish before I hit the road.

But I just learned that Iain Banks is dead, and I'm alone in this house, and I cope with things by writing about them.

I met Iain in late 1983 or early 1984. It was a Macmillan/Futura Books presentation to their sales force, and to a handful of journalists. I was one of the journalists. Editor Richard Evans told me that he was proud that they had found The Wasp Factory on the slush pile – it was an unsolicited manuscript. Iain was almost 30, and he got up and told stories about writing books, and sending them in to publishers, and how they came back, and how this one didn't come back. "You ask me what's The Wasp Factory about?" he said. "It's about 180 pages." He was brilliant and funny and smart.

He fitted right in. He was one of us, whatever that meant. He wrote really good books: The Wasp Factory, Walking on Glass and The Bridge all existed on the uneasy intersection of SF, Fantasy and mainstream literature (after those three he started drawing clearer distinctions between his SF and his mainstream work, not least by becoming Iain M. Banks in his SF). His work was mordant, surreal, and fiercely intelligent. In person, he was funny and cheerful and always easy to talk to. He became a convention bar friend, because we saw each other at conventions, and we would settle down in the bar and catch up. (A true story: In 1987 I was at a small party at the Brighton WorldCon in the wee hours, at which it was discovered that some jewellery belonging to the sleeping owner of the suite had been stolen. The police were called. A few minutes after the police arrived, so did Iain, on the balcony of the Metropole hotel: he'd been climbing the building from the outside. The police had to be persuaded that this was a respectable author who liked climbing things from the outside and not an inept cat burglar returning to the scene of his crime.)

We were never good friends, mostly because we were never in the right places long enough. We were pleased to see each other. We ate together. We talked. We liked each other's work. We always figured we'd have more time.

The last time I saw Iain was in Edinburgh, in August 2011. Amanda and I had taken a big house for the duration of the festival, and on the night that she did a gig in Glasgow, I invited over a bunch of writers and a bunch of actors and comedians who really liked writers. Because Iain was coming over and he had written Raw Spirit, a book about going around Scotland to find the perfect dram of whisky, I bought the most special and fancy bottle of whisky I could for the night, especially for him.

He arrived with a large bottle of red wine. "I don't really drink whisky any more," he admitted. "Not since the book." The ridiculously fancy bottle of whisky was tasted by everyone except Iain.

It was a fine and glorious night. There were fireworks, which didn't go off as expected, and the best conversation, and I was looking forward to repeating it this year.

In April I heard Iain had terminal cancer.

I didn't write to him. I froze. And then, a week later, with no warning, my friend Bob Morales died, and I was upset that I hadn't replied to Bob's last email, from a week or so before. So I replied to Bob's last email, although I knew he'd never read it. And then I wrote to Iain. I told him how much I'd loved knowing him, how much I'd enjoyed being his friend, even if we only saw each other in the flesh every few years.

I finished: "I think you're a brilliant and an honest writer, and much more importantly, because I've known lots of brilliant writers who were absolute arses, I think you're a really good bloke, and I've loved knowing you."

And he wrote back and said good, comforting, sensible things. Goodbyes are few enough, and we take them where we can.

I hoped that he'd get better. Or that he'd have time. He didn't. Hearing of his death hit me hard.

If you've never read any of his books, read one of his books. Then read another. Even the bad ones were good, and the good ones were astonishing.