Five years ago New Zealand decided to give almost complete financial freedom to its schools to run themselves. Devolved management is a fact of life in New Zealand and since we are now travelling very fast down this road in Scotland, I was pleased to be given the opportunity to travel to New Zealand and visit schools there with the help of Lothian's Robert Reid Fellowship, which enabled me to take a 10-week sabbatical from school, and some additional funding.
I believe that, with the reform of local government, devolved management of schools will have a profound effect on Scottish education.
What, then, did I find? First, there was almost universal agreement among the school principals to whom I spoke that devolved financial management of schools meant underfunding of schools.
It was seen as a device by government, whether local or central, to cut education spending on schools. There is no logical reason for that but it was the reality of the situation. It is certainly a reality which many headteachers can recognise.
This year many of us have had to meet certain cash targets - a euphemism for cuts. I had to make cuts which would have meant a choice between another two teachers on the staff, a large part of the school being redecorated, or re-equipping our whole science floor.
But the second thing I found in New Zealand was that, because of underfunding, schools have to find extra money themselves. The sheer creativity and imagination that went into money-raising schemes were quite extraordinary. In many schools in New Zealand, for example, they were enrolling pupils from other countries and charging them fees. Most of their foreign pupils came from the Far East but they are now taking pupils from eastern Europe.
This whole concept does not sit very comfortably with the idea of a free state education. Nevertheless, school principals saw the raising of extra finance as not only a necessity but also a challenge. In a less affluent area of Auckland I visited a school which receives an annual budget of NZ$1.2 million (pound;2.76m) - the school itself raises another NZ$1.2m.
I hope that this is not the road we are going to travel in Scotland but I have more than a suspicion that the new local authorities will simply not be able to sustain the level of resourcing that the bigger authorities did.
Let me give you an example. To equip my own school technologically for the challenges of the 21st century will cost, at a minimum, pound;94,000. Just where do I find that money? I don't know. Yet I do know that I need the technology.
What also intrigued me was that, in order to survive, schools very quickly had to discover what they were good at. In particular, they had to discover the needs of their own communities and how best they could meet them.
This is a lesson we should heed. A substantial percentage of my pupil intake comes from outside our catchment area. These parents opt to send their children here and that is very encouraging for the school. But what it also means is that a sizable number of parents in our own catchment area do not send their children to this school. We should be targeting our own community much more aggressively. We should also ensure we meet local need as well as national demands in our planning.
Finally, I also discovered that not one headteacher whom I interviewed would go back to the old ways and the old days. Headteachers like the measure of control which devolved management has given them. Some have taken advantage of the system to the extent that they are almost autonomous institutions.
There are lessons here for the new local authorities. I think they must be careful to engage schools in discussion about educational policies. They must adopt a collaborative approach to educational discussion. Schools must have direct access not only to directors of education but also to the politicians who make the decisions.
Educational provision must not become a one-way process. There must be a dialogue. Otherwise schools will, as they have in New Zealand, take advantage of a system which gives them more freedom and more financial control.
Matthew MacIver is Rector of the Royal High School, Edinburgh.