I spent my first 10 years on the west coast of Lewis, where my father was the Free Presbyterian minister.

The bleak but beautiful landscape had a long-term effect on my imagination. I still come back to it in dreams.

Usually people get hooked on science fiction in their early teens, and like most SF fans I had this idea that I wanted to write it. Every few years I would send a story to a magazine. I never got anywhere. Just as well; the stories were awful.

I studied zoology. I thought a scientist was the most important thing you could be.

When I moved to London to do a post-graduate degree I got involved in the International Marxist Group. At Brunel University we had an occupation of the admin block, where I lived on pork pies, Mars bars and cola for longer than was healthy to protest against higher fees for international students.

I was involved in protests in Lewisham – against a National Front march which turned into a fracas with the police – and in Southall in 1979, when the NF hired the town hall to hold an election meeting and the local population all turned out. An almost paramilitary police unit was deployed and a young teacher called Blair Peach was killed by a blow to the head.

After I had finished my post-grad, by which time I had a job as a computer programmer, a wife and two kids, I wrote my first book. Iain Banks, whom I'd known since school, told a mutual friend he was getting fed up of hearing about all these novels I might write some day. So I thought I would sit down and see if I could write a novel.

The first time I went into a shop and saw my book on the shelf I felt slightly shaky at the knees. It was out there and there was nothing I could do about it.

SF offers you freedom to speculate. It lets you look at things developing in the present and project them forward.

It can be a challenge to keep ahead of technology. One thing I had projected in my novels was that we would have the internet on our glasses and one application was being able to see where the stars and satellites are. A few months later a friend showed me the app on his phone.

If you are writing in the near future, you have to think about: did the war with Iran happen? Did the euro meltdown happen? Does the UK still exist? Something which happens next week could make your story instantly out of date. It's a little awkward.

The way to become a writer is to write, write and keep writing. Nobody becomes a writer without writing a million words of unpublishable crap. n

Ken MacLeod is the new writer in residence on the MA Creative Writing course at Edinburgh Napier University. He was pictured at Transreal Books, Edinburgh.