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.…
US military obliterates vessel in Pacific Ocean and kills three 'narco-terrorists' as part of Operation Southern Spear
Iconic Baywatch babe to reprise role in reboot with Brooks Nader and Livvy Dunne 34 years after leaving series
Indian government investigating TCS after police sting finds sexual harassment
Police in the Indian city of Nashik conducted a sting operation at Tata Consultancy Services and allegedly found instances of sexual harassment and other revolting behavior.…