Cristiano Ronaldo poses for White House selfie with Elon Musk and fiancee Georgina Rodriguez after dinner with Donald Trump
Michael Jackson's daughter Paris slams his estate's executors in new filing over $464m fortune
Essex actors on cast as hit crime thriller Line of Duty to return
Essex actors on cast as hit crime thriller Line of Duty to return
The couple that marches together! Lady Louise Windsor's boyfriend has joined her in their university's army reserve unit - as they're pictured on parade together for the first time
Vogue Williams reveals surprising reason she agreed to starring on I'm A Celebrity as she confirms role as late arrival - and admits she has done NOTHING to prepare for jungle stint
Billy Bob Thornton reveals the reason why his three-year marriage to Angelina Jolie ended
More than 100 medications found to disrupt gut health and raise the risk of colon cancer
Line Of Duty is back! Show creator Jed Mercurio CONFIRMS hit drama will return as all three members of AC-12 agree to reprise their roles and Martin Compston admits he 'can't wait to get the team back together'
Flights from Stansted Airport have third poorest punctuality in UK
'Northern lights' to arrive in Essex for free show at popular shopping centre
Mamdani inflames critics by backing hardline Muslim who blames 'white Americans' for 9/11
Whatever your job, mentoring is your job – and the one that matters most
Opinion When I started coding for a living 43 years ago, I didn't know shit from Shinola. I'd written a lot of BASIC, some Z80 assembler, and knew my way around floppy drives and a disk operating system. I knew nothing at all about how to operate as a junior engineer in a professional environment.…
QUENTIN LETTS: While Mrs Badenoch was speaking, Sir Mel sucked on his lips and gazed in delight
Scotland QUALIFY for the World Cup: Kenny McLean's stunning halfway-line strike seals thrilling victory over Denmark in clash featuring VAR controversy, a red card and Scott McTominay's overhead kick
Unattended candle leaves Essex flat damaged as fire service issues advice
Man Who Cryogenically Froze Late Wife Sparks Debate By Dating New Partner
Read more of this story at Slashdot.
The huge Essex farm shop among the best in the UK with popular food hall
Ecstatic Andy Murray leads reaction to Scotland's dramatic World Cup qualification as nation's stars revel in epic 4-2 win over Denmark
CodeSOD: Are You Mocking Me?
Today's representative line comes from Capybara James (most recently previously). It's representative, not just of the code base, but of Goodhart's Law: when a measure becomes a target, it ceases to be a good measure. Or, "you get what you measure".
If, for example, you decide that code coverage metrics are how you're going to judge developers, then your developers are going to ensure that the code coverage looks great. If you measure code coverage, then you will get code coverage- and nothing else.
That's how you get tests like this:
Mockito.verify(exportRequest, VerificationModeFactory.atLeast(0)).failedRequest(any(), any(), any());This test passes if the function exportRequest.failedRequest is called at least zero times, with any input parameters.
Which, as you might imagine, is a somewhat useless thing to test. But what's important is that there is a test. The standards for code coverage are met, the metric is satisfied, and Goodhart marks up another win on the board.