Feed aggregator
NASA's Jet Propulsion Lab Closed Due to Raging LA Fires
Read more of this story at Slashdot.
CodeSOD: Crossly Joined
Antonio's team hired some very expensive contractors and consultants to help them build a Java based application. These contractors were very demure, very mindful, about how using ORMs could kill performance.
So they implemented a tool that would let them know any time the Hibernate query generator attempted to perform a cross join.
public class DB2390Dialect extends org.hibernate.dialect.DB2390Dialect { private Logger logger = LoggerFactory.getLogger(DB2390Dialect.class); @Override public String getCrossJoinSeparator() { try { Exception e = new Exception(); throw e; } catch (Exception xe) { logger.warn("cross join ", xe.getMessage()); } return ", "; } }I'm going to call this one a near miss. I understand what they were trying to do.
Hibernate uses a set of "dialect"s to convert logical operations in a query to literal syntax- as you can see here, this function turns a cross join operation into a ", ".
What they wanted to do was detect where in the code this happened and log a message. They wanted the message to contain a stack trace, and that's why they threw an exception. Unfortunately, they logged, not the stack trace, but the message- a message which they're not actually setting. Thus, the logger would only ever log "cross join ", but with no information to track down when or why it happened.
That said, the standard way in Java of getting the stack trace skips the exception throwing: StackTraceElement[] st = new Throwable().getStackTrace(). Of course, that would have made them do some actual logging logic, and not just "I dunno, drop the message in the output?"
The only remaining question is how much did this feature cost? Since these were "expert consultants", we can ballpark it as somewhere between "a few thousand dollars" to "many thousands of dollars"..
[Advertisement] ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.'Omi' Wants To Boost Your Productivity Using AI and a 'Brain Interface'
Read more of this story at Slashdot.
Microsoft Rolls Back Its Bing Image Creator Model After Users Complain of Degraded Quality
Read more of this story at Slashdot.
TikTok Pushes Users To Lemon8 As Ban Looms
Read more of this story at Slashdot.
White House Launches 'Cyber Trust' Safety Label For Smart Devices
Read more of this story at Slashdot.
Meta Is Ushering In a 'World Without Facts,' Says Nobel Peace Prize Winner
Read more of this story at Slashdot.
Telegram Hands US Authorities Data On Thousands of Users
Read more of this story at Slashdot.
DEF CON's Hacker-In-Chief Faces Fortune In Medical Bills
Read more of this story at Slashdot.
AT&T Promises Bill Credits For Future Outages
Read more of this story at Slashdot.
Apple's $1 Billion Indonesia Investment Fails To Unlock iPhone 16 Sales Ban
Read more of this story at Slashdot.
Samsung is Rolling Out a Smartphone Subscription Next Month
Read more of this story at Slashdot.
Boxed Video Game Sales Collapse in UK as Digital Revenues Flatten
Read more of this story at Slashdot.
Microsoft Kills Free OneDrive Storage Loophole
Read more of this story at Slashdot.
Japan Says Chinese Hackers Targeted Its Government and Tech Companies For Years
Read more of this story at Slashdot.
Six Big US Banks Quit Net Zero Alliance
Read more of this story at Slashdot.
MoviePass Ex-Chief Pleads Guilty To Fraud Over 'Unlimited' Cinema Scheme
Read more of this story at Slashdot.
Nvidia's Huang Says His AI Chips Are Improving Faster Than Moore's Law
Read more of this story at Slashdot.
Nvidia's Huang Says 'Very Useful' Quantum Computers Likely Decades Away
Read more of this story at Slashdot.
Akamai To Quit Its CDN in China
Read more of this story at Slashdot.