Computer
Boeing Is Pushing To Withdraw Guilty Plea Agreement
Read more of this story at Slashdot.
Signal Head Defends Messaging App's Security After US War Plan Leak
Read more of this story at Slashdot.
Apple Says It'll Use Apple Maps Look Around Photos To Train AI
Read more of this story at Slashdot.
Ticketmaster May Have Violated Consumer Protection Laws
Read more of this story at Slashdot.
Alibaba's Tsai Warns of 'Bubble' in AI Data Center Buildout
Read more of this story at Slashdot.
OpenAI CEO Altman Says AI Will Lead To Fewer Software Engineers
Read more of this story at Slashdot.
Music Pioneer Napster Sells For $207 Million
Read more of this story at Slashdot.
AlexNet, the AI Model That Started It All, Released In Source Code Form
Read more of this story at Slashdot.
Firefly Aerospace Selects Blue Origin Unit To Explore Volcanic Formations On Moon
Read more of this story at Slashdot.
NASA's Curiosity Rover Detects Largest Organic Molecules Yet Found on Mars
Read more of this story at Slashdot.
Representative Line: Tern Down a Date
Today's anonymous submitter has managed to find a way to do date formatting wrong that I don't think I've seen yet. That's always remarkable. Like most such bad code, it checks string lengths and then adds a leading zero, if needed. It's not surprising, but again, it's all in the details:
// convert date string to yyyy/MM/DD return dtmValue.Year + "-" + ((dtmValue.Month.ToString().Length == 1)? ("0" + dtmValue.Month.ToString()): dtmValue.Month.ToString()) + "-" + ((dtmValue.Day.ToString().Length == 1)? ("0" + dtmValue.Day.ToString()): dtmValue.Day.ToString());This is only one line, but it has it all, doesn't it. First, we've got good ol' Hungarian notation, which conveys no useful information here. We've got a comment which tells us the code outputs /es, but the code actually outputs -. We've got ternaries that are definitely not helping readability here, plus repeated calls to ToString() instead of maybe just storing the result in a variable.
And, for the record, dtmValue.ToString("yyyy-MM-dd") would have done the correct thing.
.comment { border: none; } [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.Software Maker SAP Becomes Europe's Largest Company
Read more of this story at Slashdot.
Meta Considers Charging For Ad-Free Facebook and Instagram In the UK
Read more of this story at Slashdot.
Samsung CEO Han Jong-hee Passes Away At 63
Read more of this story at Slashdot.
2 In 5 Tech Workers Quit Over Inflexible Workspace Policies
Read more of this story at Slashdot.
Software Engineer Runs Generative AI On 20-Year-Old PowerBook G4
Read more of this story at Slashdot.
Jack Ma-Backed Ant Touts AI Breakthrough Using Chinese Chips
Read more of this story at Slashdot.
Microsoft Announces Security AI Agents To Help Overwhelmed Humans
Read more of this story at Slashdot.
'China's Engineer Dividend Is Paying Off Big Time'
Read more of this story at Slashdot.
FaunaDB Shuts Down But Hints At Open Source Future
Read more of this story at Slashdot.