Nationwide customers should put £500 into one of these accounts NOW to qualify for any Fairer Share bonus this year
Cracking the Zodiac killer's last unsolved cipher Z32... and a stunning link to the Black Dahlia's gravesite
The Squad look ready to CRY and have their heckling drowned out by chants of U-S-A at Trump's State of the Union
Hockey legend who is dating Sarah Palin gets devastating cancer diagnosis
CodeSOD: Safegaurd Your Comments
I've had the misfortune of working in places which did source-control via comments. Like one place which required that, with each section of code changed, you needed to add a comment with your name, the ticket number, and the reason the change was made. You know, the kind of thing you can just get from your source control service.
In their defense, that policy was invented for mainframe developers and then extended to everyone else, and their source control system was in Visual Source Safe. VSS was a) terrible, and b) a perennial destroyer of history, so maybe they weren't entirely wrong and VSS was the real WTF. I still hated it.
In any case, Alice's team uses more modern source control than that, which is why she's able to explain to us the story of this function:
public function calculateMassGrossPay(array $employees, Payroll $payroll): array { // it shouldn't enter here, but if it does by any change, do nth return []; }Once upon a time, this function actually contained logic, a big pile of fairly complicated logic. Eventually, a different method was created which streamlined the functionality, but had a different signature and logic. All the callers were updated to use that method instead- by commenting out the line which called this one. This function had a comment added to the top: // it shouldn't enter here.
Then, the body of this function got commented out, and the return was turned into an empty array. The comment was expanded to what you see above. Then, eventually, the commented-out callers were all deleted. Years after that, the commented out body of this function was also deleted, leaving behind the skeleton you see here.
This function is not referenced anywhere else, not even in a comment. It's truly impossible for code to "enter here".
Alice writes: "Version control by commented out code does not work very well."
Indeed, it does not.
.comment { border: none; }1,340 home development could cause 'significant increase' in traffic
Threat intelligence supply chain is full of weak links, researchers find
Researchers from Georgia Tech have found that the supply chain for threat intelligence data is susceptible to adversarial action, and proposed a method to improve data sharing that they think will make it stronger.…
Here comes the sun (and 18C)... but blink and you'll miss it
New plans for almost 100 homes in Shenfield refused as developer set to appeal
Anger as Braintree sewage overflow lasts more than two weeks
Anger as Braintree sewage overflow lasts more than two weeks
Trump explodes at 'crazy' Democrats for 'destroying our country' and 'refusing' to protect Americans... as the Squad goes berserk and dozens storm out: Live updates
Rosie O'Donnell's daughter Chelsea O'Donnell accused of fondling man in car while she was driving
Epstein victim slams Kash Patel for 'partying like a college kid' while co-conspirators are ignored
Tiffany Trump flaunts her postpartum figure at State of the Union just nine months after giving birth
James Bond 'will start shooting new film by the end of the year' as insiders say 007 announcement is imminent
Young people should be offered heart screenings to prevent more deaths 'which come out of the blue with no symptoms', study finds
The US Had a Big Battery Boom Last Year
Read more of this story at Slashdot.