MYKOLA RIDNIY is a young video artist in Kharkiv, the second-largest city in Ukraine, just forty kilometres from the Russian border. His latest video, featuring peaceful street scenes set to a soundtrack of riots, recalls the events of two years ago, when the city nearly fell to the Russian-backed separatists who now control other cities in the south-east, Donetsk and Luhansk. Today, Kharkiv remains a litmus test for whether Ukraine can satisfy its Russian-speaking people and turn itself into a functional country.

Opinions differ on how close Kharkiv came to become another breakaway “people’s republic”. Most residents like to think the violence was imposed from outside, by whoever paid for the thugs who arrived in buses from over the Russian border to attack supporters of the pro-European Maidan. Others, like Mr Rydniy, point out that plenty of locals backed Russia too. “People know that their neighbours were supporting the Russian side,” he says.

Kharkiv has always been a bit grander than its coal-dusted neighbours. In the late 1800s, local coal magnates built flamboyant mansions here. Under the Soviet Union the city became a centre for advanced engineering. A proud little museum within the Kharkiv Aviation Institute shows photographs of the KhAI-1, the first European passenger plane with retractable landing gear, and of Valentina Grizodubeva, a pioneer aviatrix who broke world records in the 1930s, and led an all-women Red Air Force squadron during the war.

Today, though the Institute’s well-kept campus bustles with students (a quarter of them from overseas), the attached aircraft factory stands silent. Production halted several years ago. The loss of the Russian market has dealt a near death-blow to state-owned monoliths that were in need of modernisation anyway. The Kharkiv Tractor Plant has virtually ceased production; Turboatom, a maker of turbines for nuclear power stations, has lost the bulk of its sales, as has Malyshev, a tank manufacturer. It is hard to see where new investment might come from. Foreigners are frightened off by Kharkiv’s proximity to the front line, and the Ukrainian new rich prefer to make quicker bucks in property or commodities.

For the young engineers still pouring out of the city’s institutes, the big new industry is information technology. More than 200 IT firms employ some 14,000 software developers, and boast a roster of big-name American and European clients. A co-working space for start-ups in the dilapidated town centre ticks all the boxes: exposed brickwork, board games, a man with pink hair strumming a ukulele. Pavel Naumenko, former director of the aviation plant who now produces electronics for drones, sees Kharkiv as a technological magnet city for the whole country, promising Ukraine “a bright future”.

The main roadblock is bad government, and the mayor, Gennady Kernes, is a prime example. Convicted of fraud in the early 1990s, Mr Kernes now commands a murky fortune in television, telecoms and real estate. He enjoys putting photos of himself cuddling puppies and blondes on social media, and he has local politics sewn up. Thanks in part to splashy spending—a glittering new Orthodox cathedral and a lavish children’s amusement park—he won 66% of the vote at last October’s local elections. His rivals, opposition activist Dmitri Drobot says, were “technical candidates” put up to divide the vote, apart from one genuine but little-known opponent who took just 12%.

The real politics takes place behind the scenes, and becomes visible only when it leads to violence. During the crisis two years ago Mr Kernes initially backed the Russians before switching sides. Soon after, he was shot while jogging. He now uses a wheelchair. In February of this year one of his oldest friends, reputedly his money manager, was shot dead in a local cemetery.

As throughout the country, reform initiatives are hampered by corruption. Staff at the Kharkiv Human Rights Protection Group, an NGO that provides legal aid, says that at least half of all judges should be replaced, and even more prosecutors. The director of a German-funded programme for refugees (there are 111,000 in the city) says her elderly clients are preyed upon by bribe-taking doctors, and there is little she can do: if she exposes corruption, “maybe our client won’t get treatment in the future.” A Western-funded anti-corruption watchdog says it is playing a constant game of catch-up: “We expose one scheme, and they think up a new, more elaborate one.”

Nobody thinks a Kharkiv “people’s republic” is in the offing. The separatists’ war has destroyed the economies of Donetsk and Lugansk; as Mr Drobot says, “People know there’s no future there.” On the other hand, Kharkiv has never been as idealistic as Kiev about the bold promises of the Maidan revolution. It now sees its scepticism vindicated. Disillusioned, full of potential but held back by bad leaders, Kharkiv is in many ways Ukraine in miniature. In 2014, cheering crowds used a crane to pull down its giant central Lenin statue, leaving only his broken-off feet. Kiev’s new revolutionaries will need to do better if they want to escape the same sort of contempt.