Sitting with a coffee in the bustle of Charlotte Square during the Edinburgh Book Festival, it occurred to me that many of my favourite writers had been teachers at one stage or other.

Alan Bleasdale of Boys from the Blackstuff began writing to provide material for his pupils;  Roddy Doyle similarly toiled to interest his classes and found a talent to amuse; Roger McGough taught in a Liverpool county secondary; John McGahern worked in a primary school until a combination of his divorce and censored content in his stories caused  him to fall foul of contemporary Irish regulations. Even Wilfred Owen found time when at Craiglockhart War Hospital to teach some English at Tynecastle School.

When they became full-time writers, many continued to be generous with their time and return to schools to work with young people and encourage their writing and literacy. Roddy Doyle is a mainstay of Fighting Words, an organisation which has encouraged thousands of young people, as well as the marginalised and vulnerable, to try their hand at creative writing, to dare to use words to express themselves.

Willy Russell started out as a hairdresser rather than a teacher, but even he took on the importance of education, and its pitfalls, in his breakthrough work Educating Rita.

When you meet these writers in schools, or hear them interviewed, more often than not it seems they succeeded as writers despite their education not because of it. Though this seems harsh and clearly dismisses the effect of their schooling overall, it does reflect a certain risk aversion among English teachers in days gone by.

Roddy Doyle made the point well in Edinburgh when he claimed that over emphasising the importance of planning before writing can be inimical to a child's natural imaginative approach. "It's like being at a dance and saying to a girl 'how do you feel about three kids and a mortgage?'  before you ask her up on the floor.". Ian Rankin similarly pointed out that much of the factual input to his novels comes after the first draft: imagination trumps fact in the creative process, at least initially.

It's an aspect of literacy, and indeed art, which challenges the education establishment: the need to provide measurable qualifications versus the imperative to encourage creativity and recognise individuality.

It always seemed to me when I taught English that the job involved opening doors, providing maps and advice for the route ahead, and sharing examples of roads well travelled. Teach the basics well and pupils will have the knowledge and confidence  to find their own side roads without ever forgetting the effectiveness of the original main road.

You can't 'teach' creativity, but you can provide the conditions in which it will flourish; you can't really 'measure' talent, but you can build the confidence to let it be effectively employed.

It must be the wish of all parents and teachers that pupils are inspired and taught in equal measure; a child not inspired by his English teacher will find all subjects harder to assimilate than they might otherwise have been; it's a huge responsibility.

Kofi Annan made the point succinctly when he said: "Literacy is a bridge from misery to hope." He might equally well have said from ignorance to knowledge or confusion to confidence.

As our pupils return to school, we can only trust they will be met with teachers in all subjects who measure with equal importance the need for examination passes with the necessity for inspiration and the freedom to create.

As John F Kennedy said: "Conformity is the jailer of freedom and the enemy of growth."