Scandalous moment Temptation Island cheats on his girlfriend with TWO women in tent - before she gets the ultimate revenge
'Latin Gang' who sliced off man's fingertips as they hacked him to death in London machete fight face life in jail
See the moment Prince Harry asked AFL stars a VERY Aussie question before they gave him a surprising rating for his skills at kicking a footy
How National Grid is helping young people launch a career in energy
Essex teen victim learned of attacker's mistaken prison release on social media
If I give £425k to my son to buy a house for me to live in rent free can I avoid inheritance tax AND care bills?
Lena Dunham's Girls' complicated legacy: From whitewashing and nepotism backlash, to THAT controversial 'rape' scene and intense body shaming as creator makes explosive claims about violent co-star Adam Driver
I've spoken to the world's top bankers, says City guru ALEX BRUMMER. The mood's bleaker than I've ever seen. It's about to all come down... I saw the last crash coming, now we should be terrified
How to up your chance of winning big in the new £1billion Powerball (and why you SHOULDN'T use your birthday as your lottery numbers)
Victoria Beckham 'dreading' birthday as she's 'set for fresh Brooklyn heartache'
UK Households To Be Urged To Use More Power This Summer As Renewables Soar
Read more of this story at Slashdot.
Kim Kardashian seems to be nesting with boyfriend Lewis Hamilton as they shop for home goods together
CodeSOD: We'll Hire Better Contractors Next Time, We Promise
Nona writes: "this is the beginning of a 2100 line function."
That's bad. Nona didn't send us the entire JavaScript function, but sent us just the three early lines, which definitely raise concerns:
if (res.length > 0) { await (function () { return new Promise((resolve, reject) => {We await a synchronous function which retuns a promise, passing a function to the promise. As a general rule, you don't construct promises directly, you let asynchronous code generate them and pass them around (or await them). It's not a thing you never do, but it's certainly suspicious. It gets more problematic when Nona adds:
This function happens to contain multiple code repetition snippets, including these three lines.
That's right, this little block appears multiple times in the function, inside of anonymous function getting passed to the Promise.
No, the code does not work in its current state. It's unclear what the 2100 line function was supposed to do. And yes, this was written by lowest-bidder third-party contractors.
Nona adds:
I am numb at this point and know I gotta fix it or we lose contracts
Management made the choice to "save money" by hiring third parties, and now Nona's team gets saddled with all the crunch to fix the problems created by the "savings".
[Advertisement] Plan Your .NET 9 Migration with ConfidenceYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!
Police investigate attempted rape after woman pulled off path on Essex border
Police to 'remain visible' after youngster 'frightened' by incident near Witham schools
Would you welcome Prince Harry and Meghan Markle back with open arms? Have your say in the Palace Confidential poll
I used to spend £120 on takeaways every WEEK... I was obese and miserable before I lost 5 stone without fat jabs
Video surfaces from the night Ruby Rose claims Katy Perry sexually assaulted her - as more details emerge of the evening amid police probe
Bullet train upgrade brings 5G windows and noise-cancelling cabins to Japan
Some Japanese bullet trains will soon be equipped with private suites that include windows with embedded 5G antennas and noise-cancelling technology that envelops passengers in a bubble of quiet.…