I was part of an education experiment Fife carried out in the 1960s. They took the top kids from all the primaries up to high school a year early and put us in a separate class. It was not an entirely helpful experience. When you are 13 or 14, a year makes a hell of a difference and we were always struggling to keep up with our peer group. But it was a good school if you were interested and bright.
Wilf Allsop arrived as head of English at Kirkcaldy High when I was going into fourth year, and because I was in the top English set he became my class teacher. He brought such passion to the subject, he really brought the text off the page and his excitement was readily communicated to the class.
On an individual level, he was also important to me. Where Wilf came to the fore was when I decided in my final year I wanted to apply for Oxford. The school was not at all encouraging of this and the general attitude was "you'll not get in and that will reflect badly on us". You have to remember how insular Fife was back then. If you were very bright, you went to Edinburgh or St Andrews, and if you were not quite so smart, you went to Dundee or Stirling.
I knew I wanted to spread my wings and explore more of the world. I felt different; I felt like an outsider. Part of that was I wanted to be a writer. The other thing - although there was no name to put to it in Fife in the 1960s - was that I was gay and I knew I needed to have broader horizons.
I had looked at the English syllabuses at Scottish universities and I didn't fancy them. I had read the Chalet school books and apparently Oxford was where you went if you were going to university in England, so that was the basis for my decision.
Back then what you had to do to get into Oxford was sit an entrance exam and go for an interview. The issue I had was that the entrance exam was based on the English A-level syllabus and there was a lot we did not cover.
Wilf gave up his free periods to give me personal tuition on the likes of Milton and Chaucer. That was just hugely helpful. Also, the fact he believed in me was hugely significant. At that point my parents were just baffled by the whole thing. They were ordinary working-class people and my generation was the first to go to university.
Wilf had been a professional footballer before he became a teacher and my father was involved as a football talent scout for Raith Rovers. That earned Wilf more respect in our house. He was someone my father was willing to listen to, because he was a proper man.
When I got into Oxford, Wilf pointed out I would have all these texts to buy and it would be really expensive, so he invited me round to his house to borrow what I needed. I raided his library.
Today we remain fast friends. He has never seemed to age. Now he's in his eighties, so he's a bit crippled and bent, but for years he always looked the same. He was always slightly stooped and his hair never went grey - it was Brylcreemy and brushed back and he wore glasses. He was like a big bird - quite quick-moving.
He is, I know, very proud of my work and that means a lot to me. He and his wife and a group of other teachers used to meet when they were working every Thursday. I was an honorary member of the Thursday club and they were all in their different ways very supportive of me. I dedicated The Distant Echo to them, because it was set in Fife.
Val McDermid's first picture book for children, My Granny is a Pirate, was published this year. Her latest novel, The Vanishing Point, is out now. She was speaking to Emma Seith.
Born: Kirkcaldy, 1955
Education: Fair Isle Primary and Dunnikier Primary, both Kirkcaldy; Kirkcaldy High; St Hilda's College, University of Oxford
Career: Journalist and author.