SOAP bad boy Terry Duckworth was sitting on a bench at the corner of the country's most famous cobbled street with a bottle of beer in one hand and a mobile phone clasped to his ear. Nigel Pivaro, the actor Coronation Street viewers know and hate as Terry, was trying to escape the hubbub inside where Granada Television was holding open house to launch the celebrations marking Coronation Street's 40th birthday this week.

His unscheduled appearance was an added attraction for those of us touring the indoor and outdoor sets on the Manchester backlot. Rivals may come and stay (EastEnders, Emmerdale, Brookside), rivals may come and go (Eldorado anyone?) but Coronation Street goes on forever. The Granada publicity release still stubbornly persists in describing the programme as a drama serial, although everyone else calls it a soap. A superior one, but soap all the same.

Like William Roache's Ken Barlow - the only actor/character left from the original cast - the programme has survived a lot and not just the competition from other soaps, as TV schedulers cottoned on to the ratings-pull of such previously-derided dramas. There's also been the transition from black-and-white to colour, as well as the arrival of a multitude of channels of a terrestrial, cable, satellite and digital variety.

Forty years on and nearly 5,000 episodes later, the Street can claim to be the only programme ever to hold all top four positions in the BARB ratings. An average of 17 million viewers watch the show four times a week on British TV, with millions of additional fans watching Street life in 25 other countries.

Coronation Street began at the dawn of the Swinging Sixties, but if ever there was a programme stuck in a time warp this was it. It was a place where everybody knew everybody else and everybody else's business. The world outside Weatherfield was as remote and unattainable as the Antarctic. People rarely ventured outside the cosy confines of their homes, the Rovers or the corner shop.

Even today after major changes, this is still a place where nobody ever seems to watch TV or read a newspaper, unless Ken has written a particularly controversial column in the Weatherfield Gazette. As the entire community seems to spend half their waking lives in the Rovers, it's a wonder the pub isn't the most profitable hostelry in the country. It's a place where politics rarely intrude - and I don't think Audrey Roberts's role as a local councillor can really be counted - although Prime Ministers from Harold Wilson to Tony Blair haven't been slow to bask in the reflected glory of rubbing shoulders with some of TV's most famous faces.

The facts and figures are that, since the show began, we've watched the comings and goings of more than 3,500 characters. There have been 25 births, 82 deaths, 51 weddings (with Ken and Deirdre helping boost those figures no end) and 32 barmaids have served behind the bar of the Rovers.

But the Coronation Street that continues to top the ratings is vastly different from the first episode that was transmitted live at 7pm on December 9, 1960.

For years, the series coasted along oblivious to the altering world outside, before the realisation that things had to change. Most of the changes have happened over the past decade, with the introduction of more episodes per week and more younger characters and the extension of the Street's world beyond those cobbles. Storylines have grown more self-consciously audience-grabbing with a schoolgirl pregnancy, the arrival of Harold/Hayley the transsexual, the sudden appearance of various long-lost relatives and a sharp rise in bed-hopping (even sensible Toyah sleeps with a chap on a first date now). It's a wonder the prim and proper Emily Bishop hasn't turned into Weatherfield's equivalent of Mary Whitehouse to denounce all the filth and perversion happening on her doorstep.

The reason for all this fresh approach, although Granada is hardly likely to admit it, is the success of BBC's EastEnders and to a lesser degree Channel 4's Brookside. Both upped the stakes by being more gritty and realistic. Their characters, an ethnic and social mix, reflecting contemporary Britain, existed in the real modern world. They dealt with issues, everything from child abuse and wife-battering to homosexuality and murder, that were unknown and unmentioned among the sheltered Weatherfield community. Coronation Street would not necessarily have died if it had failed to bring itself in line with the times, but it would certainly have slipped down the soap charts.

Nowadays, you could argue that the series is indistinguishable from any of the other soaps, with its increasingly sensational storylines. But what has kept the Street above the rest is the Northern humour which was so much a part of the Street's early success. The chat of Ena, Minnie and Martha over a glass of milk stout in the Snug gave way to wonderful comic creations such as Alec Gilroy and Reg Holdsworth. It can be funny in a way that EastEnders, with its knees-up Cockney humour, and Brookside, where no one ever smiles, just can't match.

Once the Street loses its sense of humour, it loses its way.

Understandably, Granada wants to make the most of the 40th birthday, but the rapid succession of major plots in the lead-up to the celebrations have led to a sense of soap fatigue - what with the Freshco siege, Jim McDonald's wedding and imprisonment, the Duckworths' kidney transplant dilemma, Hayley and Roy's adoption bid and the proposal to rip up the Street's hallowed cobbles. The real life stabbing of actor John (Fred Elliott) Savident seems minor compared to what's been happening on screen.

It's not just the stories that have been getting bigger. So have the sets, although when you see them they seem so much smaller than they do on the TV. It's not only the actors who look bigger on the box. In the Rovers, there's hardly room to swing the cat that prowls around in the opening credits. Not that it's a real pub, as the walls are detachable to allow for the cameras to be moved around. And when the regulars order a pint of Newton and Ridleys best, they actually get an alcoholically-weak shandy.

The interior sets, with some homes boasting exactly the same furniture as when they were set up 15 years ago, are situated next to each other in a row, so viewing them is a bit like passing along a corridor in a stately home. Actors and technicians seeking a snack are advised not to sneak off with any goods in the corner shop as the shelves are stocked with products well past their sell-by dates.

The Kabin is one of the newer sets, done up when Rita opened a post office branch. Overnight, the Kabin took on a Tardis-like quality of looking so much bigger on the inside that it did from the outside. The post office itself was constructed by the Post Office itself, although studio fire regulations meant plain, not bullet-proof, glass had to be used.

By a viaduct, built only months ago but prematurely aged by the art department, is the Street's first doctor's surgery, the Rosamund Street Medical Centre.

The surprise as you pass through the doors is that there really is a fully-equipped, fully-furnished surgery inside. Scenes can actually be shot "on location" inside, instead of having to move to a different studio to film the interiors. Fred Elliott's new butcher's shop, too, has been built on the backlot with a fully-working interior, although the meat in the display cabinet is fake.

New sets are also built wider than before to take into account filming for the increasing availability of wide screen television. These days the soap is not slow at moving with the times, but the word on the Street today is a simple old-fashioned wish: Happy 40th.

l The first episode of Coronation Street is repeated at 7pm tonight with a special hour-long live episode at 8pm.

l Weatherfield on the web: www.coronationstreet.co.uk