Computer
Fedora Linux 43 Beta Released
Read more of this story at Slashdot.
Taliban Leader Bans Wi-Fi In an Afghan Province To 'Prevent Immorality'
Read more of this story at Slashdot.
Consumer Reports Asks Microsoft To Keep Supporting Windows 10
Read more of this story at Slashdot.
Another Lawsuit Blames an AI Company of Complicity In a Teenager's Suicide
Read more of this story at Slashdot.
Verizon To Offer $20 Broadband In California To Obtain Merger Approval
Read more of this story at Slashdot.
Waymo Gets Green Light For Airport Service in San Francisco
Read more of this story at Slashdot.
Nature Editorial Calls for Rail Renaissance as Networks Mark 200 Years
Read more of this story at Slashdot.
Gearbox CEO Randy Pitchford Tells Borderlands 4 Critics To 'Code Your Own Engine,' Calls It a Game For 'Premium Gamers'
Read more of this story at Slashdot.
Perceived Importance of College Hits New Low
Read more of this story at Slashdot.
Apollo Explores Sale of Internet Pioneer AOL
Read more of this story at Slashdot.
Zoom CEO Latest Executive To Forecast Shortened Workweeks From AI Adoption
Read more of this story at Slashdot.
MBAs Cost More and Are Less Profitable as ROI Falls
Read more of this story at Slashdot.
The Mac App Flea Market
Read more of this story at Slashdot.
An Unresponsive Public Is Undermining Government Economic Data
Read more of this story at Slashdot.
Google Releases VaultGemma, Its First Privacy-Preserving LLM
Read more of this story at Slashdot.
UK's MI5 'Unlawfully' Obtained Data From Former BBC Journalist
Read more of this story at Slashdot.
Online Marketplace Fiverr To Lay Off 30% of Workforce In AI Push
Read more of this story at Slashdot.
Representative Line: Reduced to a Union
The code Clemens M supported worked just fine for ages. And then one day, it broke. It didn't break after a deployment, which implied some other sort of bug. So Clemens dug in, playing the game of "what specific data rows are breaking the UI, and why?"
One of the organizational elements of their system was the idea of "zones". I don't know the specifics of the application as a whole, but we can broadly describe it thus:
The application oversaw the making of widgets. Widgets could be assigned to one or more zones. A finished product requires a set of widgets. Thus, the finished product has a number of zones that's the union of all of the zones of its component widgets.
Which someone decided to handle this way:
zones.reduce((accumulator, currentValue) => accumulator = _.union(currentValue))So, we reduce across zones (which is an array of arrays, where the innermost arrays contain zone names, like zone-0, zone-1). In each step we union it with… nothing. The LoDash union function expects an array of arrays, and returns an array that's the union of all its inputs. This isn't how that function is meant to be used, but the behavior from this incorrect usage was that accumulator would end up holding the last element in zones. Which actually worked until recently, because until recently no one was splitting products across zones. When all the inputs were in the same zone, grabbing the last one was just fine.
The code had been like this for years. It was only just recently, as the company expanded, that it became problematic. The fix, at least, was easy- drop the reduce and just union correctly.
[Advertisement] ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.OpenAI's First Study On ChatGPT Usage
Read more of this story at Slashdot.
FTC Probes Whether Ticketmaster Does Enough To Stop Resale Bots
Read more of this story at Slashdot.