Middlesex sat down, as most sports teams do, at the start of the season. They discussed cricket, of course they did. But they also picked through how they wanted to be viewed, and how they were going to go about their business in 2016 and beyond. The results were written down, and pinned to the home dressing room wall at Lord's. The All Blacks call it the "no dickheads" policy. At Lord's, it is the Middlesex DNA.

Team spirit is a tenuous and fragile notion, but the Middlesex DNA can be tangible and visible. It defines director of cricket Angus Fraser's recruitment - based as much on personality as playing prowess - and has ensured it is an easy team to come in to, with a series of youngsters slipping in seamlessly as injuries and international call-ups are juggled.

It is the Middlesex DNA that makes them riotous celebrators of each other's successes; wickets taken, centuries scored, matches won (each greeted with a trip to the Lord's Tavern). Thus the team has no social divide, as batsmen mix with bowlers, the newest signing with the oldest lag. It is no coincidence; there is science to their chemistry. "Everyone is mates, whether you're 22 or 36," Nick Gubbins, a batsman at the bottom end of that spectrum, says. "We want to work hard for each other, and for the next man in to see that everyone is united."

By the time they left The Oval after the final day of their fifth game of the season was washed out for a fifth draw, Middlesex's belief that they could win the title - written into the Middlesex DNA - was being tested. The batsman had been scoring runs, and the bowlers taking wickets, yet they were winless and exasperated. There was mitigation: two of those five draws had come on the deadest of Lord's pitches - and a sixth would follow there a week later, against Somerset, by which point they had lost 618 overs to bad weather. That Lord's pitch would become such a problem that when they drew again there against Lancashire, captain James Franklin said that they would officially complain to their landlords, the MCC.

That game at The Oval was Gubbins' 22nd first-class match, and he crossed the Thames more frustrated than most. The baby of a seasoned side, he had looked a class apart in coasting to 91, before a leading edge popped to mid-off. Still without a ton, three of his eight half-centuries had ended in the nineties, and it was becoming a problem. At The Oval, he had bottled a 'gimme', and he knew it. Toby Roland-Jones, one of the team's japesters-in-chief and a centurion himself, took to gently ribbing Gubbins; hands up, he would joke, if you've scored a ton.

"I had been lying in bed wondering. Once I got there, I can't describe the feeling, and since then I haven't worried about hundreds"

Gubbins is playing his 30th first-class game this week. He now has three centuries, including an unbeaten double. He was the first man to 999 Championship runs this season, has passed 50 nine times and averages more than 60. The first of the three tons, in that draw against Somerset, was watched in secret by his nervous parents and Gubbins admits he may have shed a tear. A weight had been lifted.

"I had been lying in bed wondering," he says. "Once I got there, I can't describe the feeling, and since then I haven't worried about hundreds. I probably got into a selfish mindset, as our psychologist would call it, thinking about the hundred not the team, whereas now it's all about the team. What can I do for them? Can I get us off to a good start? My outlook's changed."

Middlesex have mirrored Gubbins' newfound appetite for conversion, winning four of their last six to top the table. There have been remarkable victories at Scarborough (all three of Yorkshire's losses since the start of 2014, each as extraordinary as the last, have come to Middlesex) and Taunton. They even won at Lord's, in three days against Durham.

Others have helped to build on last season's second place. John Simpson, the pugnacious, punchy wicketkeeper, has taken his all-round excellence to a new level, just like Roland-Jones, part of a revolving door seam attack (the win at Taunton came without Tim Murtagh, Roland-Jones or Steven Finn). Ollie Rayner's offbreaks, meanwhile, have brought 35 wickets and a new contract. Rayner's role was once merely to keep the over rate down, as well as provide a few runs and bucket hands at second slip. Now, though, liberated by the captaincy of Adam Voges and Franklin, he is, put simply, trying to get batsmen out. Pitches have been more helpful, but Rayner has helped himself, too; it has been conspicuous that he has spent the summer chatting to opposition spinners about how they go about their shared craft.

But it is Gubbins, with more than 900 of his Championship runs in coming in the first innings, who has helped to decisively shape games.

This is quite a contrast. Before, he was the original wide-eyed junior pro, known as much for playing the fool as hitting the ball. In 2015, he tripped celebrating a catch during a T20 at Lord's; at a pre-season photoshoot he again went viral as Murtagh tricked him into imitating DJ Bravo's "Champion" dance. Both incidents - as well as a cheery disposition and a tongue-out smile when he bats - have made him an easy target for a sledge.

His glut of runs has spoken for itself, though. Throughout, he has been brutal on either side of the wicket to anything short, driven elegantly down the ground, and had sound judgement outside off. While he is constantly compared - for a shared school, county, role in the side and left-handedness - to Andrew Strauss (with whom he chats "occasionally"), it was a chance pre-season conversation with Alastair Cook, and constant dialogue with his team-mates Nick Compton and Sam Robson, that inspired his breakout year.

"Compo's a massive help," he says. "We live close by, and we go for coffee and just chat batting. We set targets together before the season, and he helped hone my process at the crease, and how I'm building my innings. I set myself a modest amount to reach, and then I build from there. Robbo, too. The way he started the season was massive for me, because it gave me time to just work out my game. I also chatted to Cook. He said how he doesn't have a huge number of shots, but when the ball is in his area, he punishes bowlers. That made me really consider my strengths, then work hard on them."

Unsurprisingly, the ECB's lead batting coach Graham Thorpe has been in touch and, while he plans to spend his winter playing for Subiaco in Perth (where work with Justin Langer has already been lined up), it seems likely he will tour with England Lions; a full international tour would be premature, even if those close to him are convinced the Strauss connection will eventually go one step further. "Perhaps the most important thing is that I've just learnt from experience to stay level and in the moment," he says. "I've had a good year, but that doesn't guarantee a good end to it, or a good one next year. That said it's definitely nice to talk about something I've achieved, not the silly stuff."

Gubbins believes it is the Middlesex DNA that has underpinned their unbeaten run to the top of Division One. With three games to go, including a potential decider against this great Yorkshire side (another team with a distinct identity) at Lord's, Middlesex are in position to win the Championship for the first time in 23 years. In the 17 years before that, they had won it six times. A barren run, they feel, that needs ending; now that really would be achieving something.

Will Macpherson writes on cricket for the Guardian, ESPNcricinfo and All Out Cricket. @willis_macp