It's where we spend a terrifying proportion of our lives - a home from home, whether we like it or not. But how much do we really know about office life? Here the author Michael Bracewell, who spent years in a subterranean City office, decodes its hidden meanings and rituals

When people make the bright pronouncement that we spend a third of our lives asleep, they might want to work out what fraction of our lives we spend at the office. Some demographer has probably worked it out (the same one, perhaps, who discovered that an office worker's lowest spirits, statistically, occur at 4.30pm on Tuesdays) but the bottom line is that the office becomes a second home for the people who work there.

When people make the bright pronouncement that we spend a third of our lives asleep, they might want to work out what fraction of our lives we spend at the office. Some demographer has probably worked it out (the same one, perhaps, who discovered that an office worker's lowest spirits, statistically, occur at 4.30pm on Tuesdays) but the bottom line is that the office becomes a second home for the people who work there.

Allotted our chunk of floor space on an open-plan, partition-cubed, air-conditioned prairie of grey carpet squares, we take our place in a whole new food chain. Carving out territory and battling for status, we graze on egg-salad sandwiches, muesli bars and that vending-machine coffee which gives off an odour, as Tom Wolfe once pointed out, of incinerated PVC cables.

As a second home, the world of work - office world - is a kind of alternative reality. Once through the looking glass of Reception you enter a strange dimension of arcane etiquette and curious characters. Considered as a piece of performance art, the average day at the office would be an epic of complexity and endurance. In fact, you can only manage to negotiate the role because you learn how to do it without thinking. We become enveloped by the office, domesticating its functional world by acknowledging the temper of its peculiarities with our fellow workers: the location of the only photocopier that works, the knack of how to transfer an internal call on somebody else's phone, the nasty habits of the man on the third floor whose vest you can see through his shirt. Such is the Esperanto of office world.

With its contrived ordering of human behaviour, and its pitting of the individual against the strength of the organisation (to say nothing of the odd dose of pure boredom) there has always been, for a fair portion of office workers, a vague whiff of sulphur coming off the world of the office. Deep in the thickets of coffee-proof house plants, struggling to ionise recycled air between filing cabinets the colour of cold veal, an ancient sense of unease has its home, which no amount of funky corporate styling and clap-the-circle training courses can totally dispel. And this sense of unease is nothing more sinister than the monolithic artificiality of office life; as a tribe, we office workers have never quite settled down, always pulling against the harness of the desk.

This is an old problem, however. Despite the advances in new media, information technology, "hot-desking" (that's sitting anywhere and using a mobile phone) and the corporate push for cost-cutting, job-sharing, and working from home, the majority of modern office workers still inhabit the same volatile universe which their office world ancestors of a hundred years ago might recognise. To this end, culturally (but maybe unfairly) the office has tended to be demonised - right up there with the pessimism of Thomas Hardy's peasants as regards its place in literature.

In Flaubert's novel Bouvard et Pécuchet, for example, published back in 1881, the crabby boss, the territorial hostility towards infuriating co-workers and the slightly awkward leaving party were already fixed features on the world of work landscape. Then it got worse. European modernists from Kafka, through Italo Svevo to TS Eliot and Orwell presented the office as a nightmare universe which became to existential crises what a cool dark cellar is to the successful growth of button mushrooms.

This idea of the office as a neurasthenic theatre of cruelty, mirroring the rise of technological materialism in an Escheresque pattern of grinding repetition and soulless drudgery, kicked around until the late 1950s. Then, across the Atlantic, cosy American comedies such as Billy Wilder's The Apartment, or sitcoms like Bewitched posed the office as a playpen rather than a dungeon.

True, there were still some warning voices. William H Whyte's classic of office sociology, The Organisation Man (1957) put the corporate ethos of IBM Man in the dock and asked (again) how the individual could survive within the Organisation. A decade later, in The Graduate, Benjamin rejected the offer of a future in plastics in such a way you just knew that he would never wear a suit to work.

Throughout the Sixties, counter-cultural hostility towards any manifestation of the capitalist-militarist-industrial complex kept the office on the wrong side of fashionable. (Warhol, however, with his customary candour, always referred to his entourage as "the kids from the office", no matter how titled, monied or totally whacked out they were.) But no longer wholly demonised, during the 1970s, the world of office work was evolving into its contemporary form, and with new ways of coping with the vague whiff of sulphur - should you ever look up from your desk and catch its scent on the currents of air-conditioned air.

It must have been around 1982 when a television advertisement for an office employment agency seemed to mark a real phase of reinvention for the world of office work. Filmed in the style of Fritz Lang's classic fantasy of a futuristic urban dystopia, Metropolis, where the workers are little more than slaves, it showed a shuffling procession of grey-smocked office workers, heads bowed, making their way towards the dark maw of a horrible tunnel. Then, with a sudden burst of inspiration, one of the workers (a chirpy temp type) shouted, "I know! Let's go to Kelly Girl!" And before you could say "She's not at her desk right now," the whole world of work had been recast as a fizzed-up, switched on, actually enjoyable sub-strand of a fashionable urban lifestyle.

This coincided, vitally, with the rise of gyms and the birth of the Marks & Spencer sandwich. Suddenly, the idea of the office was being pumped up on the helium of the enterprise economy to suggest itself as the yellow brick road to the loft conversion. The world of office work was suddenly hip and happening - as an idea, at any rate.

When Apple launched their first TV commercial in 1984, the Orwellian theme was played to the hilt: dreary old work was represented by a fascistic dictator, lecturing the workforce from a flickering black and white cinema screen, whose demonic image was smashed by a lithe young woman, toned and tanned in running vest and shorts, who threw a hammer into the screen. As Liberty has usually been depicted by an eroticised woman, so the goddess of the New Office was sexy, too.

But how does all of this prehistory relate to our current experience of the office? In the midst of frenetic change, the office remains as constant as the North Star. Like the cast of a disaster movie, the office always seems to have the same stock characters: the tubby and dependable all round nice guy, the hard-nosed fast-track careerist with titanium-framed glasses, the sexy blonde who's a bit of a laugh, the reclusive weirdo who seldom makes eye contact with anyone, the chirpy boy who works in the post room, the man who frankly smells of drink. Somehow, they're always all there, cloned into many representatives of each type in a way which seems to question individualism itself. And yet, of course, these are all individuals, with their own vastly differing identities.

This, perhaps, is the ultimate source of the sulphurous pong: it is the office which translates us into types, simply for ease of classification. It's a sociologist's paradise, as John Cooper Clarke once said of Salford. As types, we inhabit the office through venerable rituals - updating the details here and there, but still stuck with the same karma when it comes to what those rituals represent.

There is the ritual of departure, for instance, in which a co-worker's imminent escape is first signified by the circulation of a brown internal mailing envelope, the contents of which could tell them a lot about their popularity. This is followed, more often than not, by the furtive circulation of a card - Paperchase tasteful or a bit rude, depending on the recipient - the signatures in which will vary in handwriting styles from a rounded schoolboy hand to a psychopathic scrawl. In many offices, one member of staff will have been elected to think up something funny. After which it's the salmon mousse morsels and the triangles of cheesecake, traditionally served on sheets of A4 laser-copy paper.

Further rituals include the etiquette of in-office lunching. "You'll never guess what I've got down here," said a matronly woman in a sketch by Victoria Wood, gesturing towards a neatly-knotted plastic bag in her desk drawer, "My yoghurt". I once heard of a man who calculated that he would have eaten a tuna fish sandwich the size of a small caravan by the time he retired, because he always went to the same shop and bought the same sandwich.

Whichever way you massage the facts, it is impossible to assume an attitude which strives to be superior to the office. The office, in many ways, is a great leveller, despite its intricate hierarchies of post and personality. When people depart from that democracy - "split from the whole programme" as Captain Willard said of the renegade military commander Kurtz in Apocalypse Now - they tend to crack up or just somehow disappear.

The office remains bearable by our collective faith in its comforting familiarity; once an individual sets their mind to disrupting that faith, it's usually just a matter of time before their electronic pass is taken into custody. Because whatever might lie beyond the office, from goat-farming in Snowdonia to having that one idea which will make you worth more than Ikea, there is always that membrane of fear which keeps the bulk of us at our desks. In Matt Groening's comic-book guide to the office, Work Is Hell, the situation was summed up by the firm's motto: "Back to work, you".

'Perfect Tense' by Michael Bracewell is published by Cape at £10