Sometime in the fall of 2014, Scotland will hold a referendum on independence from the United Kingdom. The outcome is far from certain, but whatever happens, Scotland will certainly gain further powers of self-determination.

Its capital city, Edinburgh (population 500,000), has been the site of the Scottish Parliament since 1999 and has been, most think, the chief beneficiary of the ongoing devolution of power from London. Its future, unlike that of any other Scottish city, seems assured.

And by most objective measures it's an exceedingly fortunate place. It hosts the world's largest arts festival, it's rightly celebrated for its culture, and it scores consistently well on quality-of-life indices. Its employment levels have even held up well after the 2008 financial-services crash, to which the city was well exposed.

Yet Edinburgh suffers a weird urban malaise. Rather than a city whose time has finally come, it can feel more like Venice, a once-great city now in abject decline. If the city is a glimpse of Scotland's future as an independent - or somewhat more independent - nation, Scots may have some cause for alarm.

Deplaning at Edinburgh's airport, you pass a series of new mural-scale photographs celebrating one of the world's most dramatic urban landscapes. They're emblazoned with quotations from celebrated Edinburgh writers - David Hume, Walter Scott, Robert Louis Stevenson. What the panels extol are achievements of the now-distant past, and the visual image of the city presented in the photographs is dominated by the castle, a largely 18th-century creation.

Leaving the airport, you do wonder whether the city isn't actually reverting to its 18th-century condition. The spectacularly potholed roads, the decay of buildings in the central area, and the remarkable absence of new construction suggest the city council wishes to return to the era of Hume and Stevenson.

I took American urban sociologist Sharon Zukin around Edinburgh in the summer of 2012. She found it a hard city to read. The UNESCO-listed central area looked run-down, she thought; the upscale neighborhood of Stockbridge seemed "poor." I had to agree, looking at all the thrift stores and shabby street frontage.

And the problems were more than surface impressions. Consider Princes Street, Edinburgh's Fifth Avenue, a straight mile of retail set below the great volcanic plug of the Castle Rock. It would be hard to find a more spectacular place to shop, and it ought to be one of the world's great avenues. But nearly 30 percent of the units are vacant here, and many of the occupied units are short-term lets selling tourist knickknacks. Lift your eyes upward, and many buildings at the second-floor level and above are empty.

Princes Street has been subjected to numerous partial regeneration schemes over the years, each of which has left a mark (look up, for example, and you see the remnants of a 1960s scheme to put the sidewalk up in the sky, overlooking a six-lane freeway). These failures pale by comparison with the chaos wrought by the Edinburgh Trams project, which is intended to bring street-running light rail to the city, but is already six times over budget at $1.5 billion three years late. Originally a three-line, 20-mile network, the project has been cut to a single line from the center to the airport, duplicating an already efficient and much-liked bus service. Nobody much wants the trams now, least of all Princes Street merchants who have seen business decline markedly over the five years of the scheme's construction. The Liberal Democrat party, which as leader of the City of Edinburgh Council initiated the project, saw its share of the vote cut to just 5 percent in 2012 city elections.

Perhaps it was a blip? Think again. Due north of Princes Street, along the Firth of Forth, is Edinburgh Waterfront, a project to rebuild the city's industrial ocean frontage. It starts promisingly enough in Leith with warehouse conversions and funky bars, but head a quarter-mile east and you find yourself in a dystopian wasteland of vacant lots worthy of a J.G. Ballard novel. The waterfront reaches its peak of despair at Granton Harbour where a handful of shoddy buildings emerge from a giant mud pool, the inadvertent result of stalled construction. Wrecked bicycles and shopping carts litter the scene. So poor are these buildings, they're already - after five years - falling down. The owners paid up to $600,000 for apartments here at the height of the boom; they would be worth barely half that now.

It all adds up to one inescapable conclusion: Edinburgh has some of Europe's shoddiest attempts at urban regeneration. Regeneration is risky, but for mistakes like these to occur in such a wealthy place at the height of an economic boom is, as British architectural critic Owen Hatherley put it, simply a scandal.

Perhaps Edinburgh just doesn't do modern anymore? It's easy to reach that conclusion. The city had a collective nervous breakdown over development in the mid-1960s. The University of Edinburgh's attempted demolition of 18th-century George Square met ferocious, and ultimately successful, resistance from the Cockburn Association and the Georgian Group of Edinburgh, conservation groups with the support of the city's indomitable middle class. The city has been terrified of modernization ever since.

But Edinburgh has its difficulties with historical buildings too. In the middle of 2012, a corruption scandal emerged involving council officials colluding with local builders to impose unnecessary repair orders on buildings.

Edinburgh's power to impose such orders was unparalleled in Britain as a result of the city's desire to protect its UNESCO World Heritage status. The statutory notice system that resulted was a license to abuse, however. The council could, and did, impose repairs where none were needed.

The system was rightly feared by residents, who had no control over costs once the council was involved. Those costs could run into hundreds of thousands of dollars. The council's entire historical-property department was suspended in 2012, and at the time of this writing, 17 members of the department are expected to face criminal charges.

Edinburgh struggles with the past as much as it struggles with the future. The result is a curious paralysis and a paradoxical sense of decline. That's fine for aesthetes in search of photogenic ruins, less so for the majority population who regard the city as a living entity, not a museum. How has it come to this, at a moment when conceivably from 2014 Edinburgh might regain its status as capital of an independent nation?

Malcolm Fraser, a highly regarded local architect, was outspoken on the question when I interviewed him at the end of 2012. It's a failure of leadership, he thinks. The city government lacks both a plan and the ability to stick to it. In one looks at the city council's website, it's hard to disagree. The council's priorities for development are extremely hard to discern, apart from limiting human activity wherever possible. Its plan, "Sustainable Edinburgh 2020," is shot through with anxieties about the heritage lobby and middle-class opinion - a NIMBY's charter.

Edinburgh's uncertainties are in some ways a representation of its political turmoil. Since May 2012, it has been led by an uneasy coalition of leftist (Labour Party) and nationalist (Scottish National Party - SNP) interests, whose primary concern has been to restore stability and trust after a febrile period under the previous centrist (Liberal Democrat) administration. The city has an uneasy relationship with the SNP-led Scottish government, which is single-mindedly focused on independence - Edinburgh's Labour majority is staunchly pro-United Kingdom. This is no context for grand urban visions.

Still, there is a sense of opportunity lost. So what would Fraser do differently? He speaks passionately about infrastructure, lots of it, including - unfashionably - completing and extending the tram project, as well as large-scale projects to improve walking, cycling and the public realm.

His model would be Copenhagen, which routinely invites foreign architects to collaborate on urban projects. Fraser's vision is unusual, and infectious, and he has enough friends in government to have been named as chair of a task force on the future of urban streets.

That is a good sign. Fraser also thinks the city has clients who understand the value of good buildings. The University of Edinburgh has become one of them, lately being much bolder with its estate. It's rightly proud of its airy new informatics facility and its refurbished library, the latter designed by Basil Spence in 1968.

Once hated, Spence's building has become one of the sights of the city, like a great ocean liner moored in picturesque 18th-century George Square. Each August, these buildings form one of the Edinburgh Festival Fringe's main backdrops, and for a brief period they help give the impression of a city at ease with its future.

But for the other 11 months, Edinburgh's urban stagnation is real. It seems unable to move forward, yet its stewardship of the past has led to corruption on a grand scale. And the city's difficulties are perhaps in microcosm those of a nation uncertain about its future. Before Scotland can be a country, its capital needs to get its house in order.

---

Richard Williams is professor of contemporary visual cultures at the University of Edinburgh. His book "Sex and Buildings" will be published in May 2013.