Computer
Major US Grocery Distributor Warns of Disruption After Cyberattack
Read more of this story at Slashdot.
Sea Acidity Has Reached Critical Levels, Threatening Entire Ecosystem
Read more of this story at Slashdot.
A Researcher Figured Out How To Reveal Any Phone Number Linked To a Google Account
Read more of this story at Slashdot.
Meta in Talks for Scale AI Investment That Could Top $10 Billion
Read more of this story at Slashdot.
Apple Researchers Challenge AI Reasoning Claims With Controlled Puzzle Tests
Read more of this story at Slashdot.
The Medical Revolutions That Prevented Millions of Cancer Deaths
Read more of this story at Slashdot.
'AI Is Not Intelligent': The Atlantic Criticizes 'Scam' Underlying the AI Industry
Read more of this story at Slashdot.
CodeSOD: A Real POS Report
Eddie's company hired a Highly Paid Consultant to help them retool their systems for a major upgrade. Of course, the HPC needed more and more time, and the project ran later and later and ended up wildly over budget, so the HPC had to be released, and Eddie inherited the code.
What followed was a massive crunch to try and hit absolutely hard delivery dates. Management didn't want their team "rewriting" the expensive code they'd already paid for, they just wanted "quick fixes" to get it live. Obviously, the HPC's code must be better than theirs, right?
After release, a problem appeared in one of their sales related reports. The point-of-sale report was meant to deliver a report about which items were available at any given retail outlet, in addition to sales figures. Because their business dealt in a high volume of seasonal items, every quarter the list of items was expected to change regularly.
The users weren't seeing the new items appear in the report. This didn't make very much sense- it was a report. The data was in the database. The report was driven by a view, also in the database, which clearly was returning the correct values? So the bug must be in the code which generated the report…
If POSItemDesc = "Large Sign" Then grdResults.Columns.FromKey("FColumn12").Header.Caption = "Large Sign" End If If POSItemDesc = "Small Sign" Then grdResults.Columns.FromKey("FColumn12").Header.Caption = "Small Sign" End If If POSItemDesc = "2x2 Hanging Sign" Then grdResults.Columns.FromKey("FColumn12").Header.Caption = "2x2 Hanging Sign" End If If POSItemDesc = "1x1 Sign" Then grdResults.Columns.FromKey("FColumn12").Header.Caption = "1x1 Sign" End If '.........Snipping more of these........ If POSItemDesc = "Light Thief" Then grdResults.Columns.FromKey("FColumn12").Header.Caption = "Light Thief" End If If POSItemDesc = "Door Strike" Then grdResults.Columns.FromKey("FColumn12").Header.Caption = "Door Strike" End IfFirst, it's worth noting that inside of the results grid display item, the HPC named the field FColumn12, which is such a wonderfully self documenting name, I'm surprised we aren't all using that everywhere. But the more obvious problem is that the list of possible items is hard-coded into the report; items which don't fit one of these if statements don't get displayed.
At no point, did the person writing this see the pattern of "I check if a field equals a string, and then set another field equal to that string," and say, "maybe there's a better way?" At no point, in the testing process, did anyone try this report with a new item?
It was easy enough for Eddie to change the name of the column in the results grid, and replace all this code with a simpler: grdResults.Columns.FromKey("POSItem").Header.Caption = POSItemDesc, which also had the benefit of actually working, but we're all left puzzling over why this happened in the first place. It's not like the HPC was getting paid per line of code. Right? Right?
Of course not- no HPC would willingly be paid based on any metric that has an objective standard, even if the metric is dumb.
[Advertisement] ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.Scientists Show Reforestation Helps Cool the Planet Even More Than Thought
Read more of this story at Slashdot.
Caffeine Has a Weird Effect On Your Brain While You're Asleep
Read more of this story at Slashdot.
UK Renewable Energy Firms are Being Paid Huge Sums to Not Provide Power
Read more of this story at Slashdot.
Microsoft Announces Upcoming Windows-Powered Handheld Xbox Device: the 'ROG Xbox Ally'
Read more of this story at Slashdot.
NASA Pulls the Plug on Jupiter-Moon Lander, So Scientists Propose Landing It on Saturn
Read more of this story at Slashdot.
Mozilla Criticizes Meta's 'Invasive' Feed of Users' AI Prompts, Demands Its Shutdown
Read more of this story at Slashdot.
After 'AI-First' Promise, Duolingo CEO Admits 'I Did Not Expect the Blowback'
Read more of this story at Slashdot.
'Welcome to Campus. Here's Your ChatGPT.'
Read more of this story at Slashdot.
'We Finally May Be Able to Rid the World of Mosquitoes. But Should We?'
Read more of this story at Slashdot.
Could UK Lawyers Face Life in Prison for Citing Fake AI-Generated Cases?
Read more of this story at Slashdot.
How False UFO Stories Were Created - Sometimes Deliberately - by the US Military
Read more of this story at Slashdot.
Russian Spies Are Analyzing Data From China's WeChat App
Read more of this story at Slashdot.