Computer
German Banks Halted 10 Billion Euros in PayPal Payments on Fraud Concerns, Says Newspaper
Read more of this story at Slashdot.
World's First 1-Step Method Turns Plastic Into Fuel At 95% Efficiency
Read more of this story at Slashdot.
Japan Launches its First Homegrown Quantum Computer
Read more of this story at Slashdot.
Representative Line: Springs are Optional
Optional types are an attempt to patch the "billion dollar mistake". When you don't know if you have a value or not, you wrap it in an Optional, which ensures that there is a value (the Optional itself), thus avoiding null reference exceptions. Then you can query the Optional to see if there is a real value or not.
This is all fine and good, and can cut down on some bugs. Good implementations are loaded with convenience methods which make it easy to work on the optionals.
But then, you get code like Burgers found. Which just leaves us scratching our heads:
private static final Optional<Boolean> TRUE = Optional.of(Boolean.TRUE); private static final Optional<Boolean> FALSE = Optional.of(Boolean.FALSE);Look, any time you're making constants for TRUE or FALSE, something has gone wrong, and yes, I'm including pre-1999 versions of C in this. It's especially telling when you do it in a language that already has such constants, though- at its core- these lines are saying TRUE = TRUE. Yes, we're wrapping the whole thing in an Optional here, which potentially is useful, but if it is useful, something else has gone wrong.
Burgers works for a large insurance company, and writes this about the code:
I was trying to track down a certain piece of code in a Spring web API application when I noticed something curious. It looked like there was a chunk of code implementing an application-specific request filter in business logic, totally ignoring the filter functions offered by the framework itself and while it was not related to the task I was working on, I followed the filter apply call to its declaration. While I cannot supply the entire custom request filter implementation, take these two static declarations as a demonstration of how awful the rest of the class is.
Ah, of course- deep down, someone saw a perfectly functional wheel and said, "I could make one of those myself!" and these lines are representative of the result.
[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.With Starship Flight 10, SpaceX Prioritized Resilience Over Perfection
Read more of this story at Slashdot.
Developer Unlocks Newly Enshittified Echelon Exercise Bikes But Can't Legally Release Software
Read more of this story at Slashdot.
Silver State Goes Dark as Cyberattack Knocks Nevada Websites Offline
Read more of this story at Slashdot.
Defense Department Reportedly Relies On Utility Written by Russian Dev
Read more of this story at Slashdot.
4chan and Kiwi Farms Sue the UK Over Its Age Verification Law
Read more of this story at Slashdot.
Word Documents Will Now Be Saved To the Cloud Automatically On Windows
Read more of this story at Slashdot.
Google Has Eliminated 35% of Managers Overseeing Small Teams in Past Year, Exec Says
Read more of this story at Slashdot.
A Proposal to Ban Ghost Jobs
Read more of this story at Slashdot.
Republicans Investigate Wikipedia Over Allegations of Organized Bias
Read more of this story at Slashdot.
One Long Sentence is All It Takes To Make LLMs Misbehave
Read more of this story at Slashdot.
Deforestation Has Killed Half a Million People in Past 20 Years, Study Finds
Read more of this story at Slashdot.
FBI Warns Chinese Hacking Campaign Has Expanded, Reaching 80 Countries
Read more of this story at Slashdot.
Nothing Caught Using Stock Photos as Phone 3 Camera Samples
Read more of this story at Slashdot.
South Korea Bans Phones in School Classrooms Nationwide
Read more of this story at Slashdot.
Wikipedia Editors Reject Founder's AI Review Proposal After ChatGPT Fails Basic Policy Test
Read more of this story at Slashdot.
Posthumous AI Avatars Shift From Memorial Tools To Revenue Generators
Read more of this story at Slashdot.