I've finished shopping for Christmas and Halloween in August - trolls think I'm missing the point but they're the ones losing out
How two best friends are fighting horrifying injuries after being hit by a speeding taxi in Ibiza - and the fight to get them home to their children
Airgun attack on Jewish teenager and swastikas daubed on Rabbi's homes put Bournemouth police on alert
MAUREEN CALLAHAN: Meghan's latest feat of failure is basic, humorless and so nauseatingly fake. But was this 'sick burn' the moment she finally admitted defeat?
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.
REBECCA ENGLISH reveals the withering comment a royal insider secretly made about Meghan Markle's new Netflix show in the Palace Confidential newsletter
Inside Prince Harry and Prince William's surprise reunion for Diana's brother-in-law's funeral... and the courtier complex relationship with the Firm, according to royal author
Missing 12-year-old autistic boy believed to be killed in alligator attack near New Orleans home
What a difference 2 years makes: MariaDB buys back SkySQL
It's less than two years since MariaDB spun out SkySQL, but it's already unspinning the database-as-a-service outfit, which has since been marinated in AI sauce.…
Brittany Ferries won't refund my dead husband's £883 ticket saying I have the WRONG type of death certificate: CRANE ON THE CASE
Plans set to be approved for 140 new homes on farmland beside Essex village
Queen Mary's flirty comment to husband Frederik during cheeky (and very casual) day out: 'Shall we...?'
Everything you need to know about the Dartford Crossing charge increasing to £3.50 from Monday
5 adorable pets at RSPCA Essex centres looking for their forever homes
MP visits Witham manufacturing firm to learn about challenges to industry
Braintree Town FC's mascot in annual mascot race for children's charity
5 adorable pets at RSPCA Essex centres looking for their forever homes
Isle of Rum's Kinlock Castle could be yours as historic Highland property put on market for offers over £750,000
With Starship Flight 10, SpaceX Prioritized Resilience Over Perfection
Read more of this story at Slashdot.