Feed aggregator
Oracle Engineers Caused Days-Long Software Outage at US Hospitals
Read more of this story at Slashdot.
Duolingo Will Replace Contract Workers With AI
Read more of this story at Slashdot.
Digital Photo Frame Company Nixplay Slashes Free Cloud Storage From 10GB To 500MB
Read more of this story at Slashdot.
OpenAI Upgrades ChatGPT Search With Shopping Features
Read more of this story at Slashdot.
Soft Vine-Like Robot Helps Rescuers Find Survivors In Disaster Zones
Read more of this story at Slashdot.
Milwaukee Police Consider Trading Millions of Mugshots For Free Facial Recognition Access
Read more of this story at Slashdot.
Monero Likely Pumped 50% Due To Suspected $330 Million Bitcoin Theft
Read more of this story at Slashdot.
Neurotech Companies Are Selling Brain Data, Senators Warn
Read more of this story at Slashdot.
23andMe Requiring Potential Bidders To Affirm They Will Uphold Data Privacy
Read more of this story at Slashdot.
Kickstarter Introduces 'Tariff Manager Tool' To Add Charges To Already Fully Funded Projects
Read more of this story at Slashdot.
China's Huawei Develops New AI Chip, Seeking To Match Nvidia
Read more of this story at Slashdot.
Unauthorized AI Bot Experiment Infiltrated Reddit To Test Persuasion Capabilities
Read more of this story at Slashdot.
Dyson Founder Says He Has Lived a 'Life of Failure'
Read more of this story at Slashdot.
IBM Pledges $150 Billion US Investment
Read more of this story at Slashdot.
'Don't Make Google Sell Chrome'
Read more of this story at Slashdot.
Widespread Power Outage Is Reported in Spain, France and Portugal
Read more of this story at Slashdot.
America's Electric Vehicle Sales Have Jumped 10.6% Compared to 2024
Read more of this story at Slashdot.
AI Helps Unravel a Cause of Alzheimer's Disease and Identify a Therapeutic Candidate
Read more of this story at Slashdot.
CodeSOD: Objectifying Yourself
"Boy, stringly typed data is hard to work with. I wish there were some easier way to work with it!"
This, presumably, is what Gary's predecessor said. Followed by, "Wait, I have an idea!"
public static Object createValue(String string) { Object value = parseBoolean(string); if (value != null) { return value; } value = parseInteger(string); if (value != null) { return value; } value = parseDouble(string); if (value != null) { return value; } return string; }This takes a string, and then tries to parse it, first into a boolean, failing that into an integer, and failing that into a double. Otherwise, it returns the original string.
And it returns an object, which means you still get to guess what's in there even after this. You just get to guess what it returned, and hope you cast it to the correct type. Which means this almost certainly is called like this:
boolean myBoolField = (Boolean)createValue(someStringContainingABool);Which makes the whole thing useless, which is fun.
Gary found this code in a "long since abandoned" project, and I can't imagine why it ended up getting abandoned.
[Advertisement] Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.Learn more.Could a 'Math Genius' AI Co-author Proofs Within Three Years?
Read more of this story at Slashdot.