Computer
Satya Nadella Argues AI's True Value Will Come When It Finds Killer App Akin To Email or Excel
Read more of this story at Slashdot.
Google Is Making It Easier To Remove Personal Info On Search
Read more of this story at Slashdot.
ExpressVPN Gets Faster and More Secure, Thanks To Rust
Read more of this story at Slashdot.
Cellebrite Suspends Serbia as Customer After Claims Police Used Firm's Tech To Plant Spyware
Read more of this story at Slashdot.
Who's Watching What on TV? Who's To Say?
Read more of this story at Slashdot.
YouTube Reaches 1 Billion Monthly Podcast Viewers
Read more of this story at Slashdot.
US Intelligence Chief Opposes UK Order for Apple Encryption Backdoor
Read more of this story at Slashdot.
A Disney Worker Downloaded an AI Tool. It Led To a Hack That Ruined His Life.
Read more of this story at Slashdot.
BP Shuns Renewables in Return To Oil and Gas
Read more of this story at Slashdot.
Amazon Revamps Alexa With Generative AI After Year-Long Delay
Read more of this story at Slashdot.
Surge in UK University Students Using AI To Complete Work
Read more of this story at Slashdot.
Indian Cinema Chain Sued By Film-goer Over Lengthy Pre-film Ads
Read more of this story at Slashdot.
UK Users Show Little Concern as Apple Removes iCloud Encryption
Read more of this story at Slashdot.
Meta In Talks For $200 Billion AI Data Center Project
Read more of this story at Slashdot.
North Korea's Unprecedented $1.5 Billion Crypto Heist Exploited Human Element, Not Code
Read more of this story at Slashdot.
Fruits and Flowers May Counteract Harmful Effects of Microplastics
Read more of this story at Slashdot.
Earth Safe From 'City-Killer' Asteroid 2024 YR4
Read more of this story at Slashdot.
CodeSOD: Allowed Savings
The CEO of Delia's company retired. They were an old hand in the industry, the kind of person who worked their way up and had an engineering background, and while the staff loved them, the shareholders were less than pleased, because the company was profitable, but not obscenely so. So the next CEO was a McKinsey-approved MBA who had one mission: cut costs.
Out went the senior devs, and much of the managers. Anyone who was product or customer focused followed quickly behind. What remained were a few managers handpicked by the new CEO and a slew of junior engineers- and Pierre.
Pierre was a contractor who followed the new CEO around from company to company. Pierre was there to ensure that nobody wasted any time on engineering that didn't directly impact features. Tests? Wastes of time. Module boundaries? Just slow you down. Move fast and break things, and don't worry about fixing anything because that's your successors' problem.
So let's take a look at how Pierre wrote code. This block of PHP code was simply copy/pasted everywhere it needed to be used, across multiple applications.
foreach($alphaCheck as $checkField) { if($paramsArray[$checkField['field']]) { if($paramsArray[$checkField['field']]) { $invalidChars = false; $checkValue = trim(strtoupper($paramsArray[$checkField['field']])); $allowedChars = explode('|',"A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|-| |.|'"); for($i=0; $i<strlen($checkValue); $i++) { if(!in_array($checkValue[$i],$allowedChars)) { $invalidChars = true; } } if($invalidChars) { $errorMsgs[] = $checkField['name'] . ' contains invalid characters'; } } } }This isn't the worst approach to this problem I've seen in PHP, but the fact that this is just a copy/pasted blob, and worse- the $allowedChars may vary a bit in each place it's copy/pasted is what makes it terrible.
Don't worry. The new CEO only stayed for 18 months, got a huge bonus thanks to all the cost-cutting, and then left, taking Pierre along to the next company.
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!To Identify Suspect In Idaho Killings, FBI Used Restricted Consumer DNA Data
Read more of this story at Slashdot.
World's First Front-Flippin' Humanoid Robot
Read more of this story at Slashdot.