Computer
Gen AI Is Not Replacing Jobs Or Hurting Wages At All, Say Economists
Read more of this story at Slashdot.
Firefly Aerospace's Alpha Rocket Fails, Sends Satellite Falling Into Ocean
Read more of this story at Slashdot.
After 53 Years, a Failed Soviet Venus Spacecraft Is Crashing Back to Earth
Read more of this story at Slashdot.
CodeSOD: Find the First Function to Cut
Sebastian is now maintaining a huge framework which, in his words, "could easily be reduced in size by 50%", especially because many of the methods in it are reinvented wheels that are already provided by .NET and specifically LINQ.
For example, if you want the first item in a collection, LINQ lets you call First() or FirstOrDefault() on any collection. The latter option makes handling empty collections easier. But someone decided to reinvent that wheel, and like so many reinvented wheels, it's worse.
public static LoggingRule FindFirst (this IEnumerable<LoggingRule> rules, Func<LoggingRule, bool> predicate) { foreach (LoggingRule rule in rules) { return rule; } return null; }This function takes a list of logging rules and a function to filter the logging rules, starts a for loop to iterate over the list, and then simply returns the first element in the list, thus exiting the for loop. If the loop doesn't contain any elements, we return null.
From the signature, I'd expect this function to do filtering, but it clearly doesn't. It just returns the first element, period. And again, there's already a built-in function for that. I don't know why this is exists, but I especially dislike that it's so misleading.
There's only one positive to say about this: if you did want to reduce the size of the framework by 50%, it's easy to see where I'd start.
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!Chemical In Plastics Linked To 350,000 Heart Disease Deaths
Read more of this story at Slashdot.
Google Play Sees 47% Decline In Apps Since Start of Last Year
Read more of this story at Slashdot.
Intel Says It's Rolling Out Laptop GPU Drivers With 10% To 25% Better Performance
Read more of this story at Slashdot.
New York Lawmakers Reach Deal On 'Bell-To-Bell' School Cellphone Ban
Read more of this story at Slashdot.
LG Will Shut Down Update Servers For Its Android Smartphones In June
Read more of this story at Slashdot.
OpenAI's o3 Model Beats Master-Level Geoguessr Player
Read more of this story at Slashdot.
OIN Marks 20 Years of Defending Linux and Open Source From Patent Trolls
Read more of this story at Slashdot.
Mastercard Gives AI Agents Ability To Shop Online for You
Read more of this story at Slashdot.
EA Lays Off Hundreds, Cancels 'Titanfall' Game
Read more of this story at Slashdot.
Firefox Finally Delivers Tab Groups Feature
Read more of this story at Slashdot.
AI-Generated Code Creates Major Security Risk Through 'Package Hallucinations'
Read more of this story at Slashdot.
SK Telecom Offers SIM Replacements After Major Data Breach
Read more of this story at Slashdot.
It Could Be a $250 Billion Market, But Almost No One Is Interested
Read more of this story at Slashdot.
India Court Orders Proton Mail Block On Security Grounds
Read more of this story at Slashdot.
Bitcoin Mining Costs Surge Beyond Profitability Threshold
Read more of this story at Slashdot.
Reddit Issuing 'Formal Legal Demands' Against Researchers Who Conducted Secret AI Experiment on Users
Read more of this story at Slashdot.