Feed aggregator
Climate Change Target of 2C Is 'Dead'
Read more of this story at Slashdot.
Meta CTO: 2025 Make or Break Year for Metaverse
Read more of this story at Slashdot.
Physicists Confirm The Existence of a Third Form of Magnetism
Read more of this story at Slashdot.
Representative Line: Whitespace: A Frontier
Tim has been working on a large C++ project which has been around for many, many years. It's a tool built for, in Tim's words, "an esoteric field", and most of the developers over the past 30 years have been PhD students.
This particular representative line is present with its original whitespace, and the original variable names. It has been in the code base since 2010.
Assignment::Ptr ra = Assignment::makeAssignment(I, addr, func, block, RA);The extra bonus is that Assignment::Ptr is actually an alias for boost::shared_ptr<Assignment>. As you might gather from the name shared_ptr, that's a reference-counted way to manage pointers to memory, and thus avoid memory leaks.
The developers just couldn't tolerate using the names provided by their widely used library solving a widely understood problem, and needed to invent their own names, which made the code less clear. The same is true for makeAssignment. And this pattern is used for nearly every class, because the developers involved didn't understand object lifetimes, when to allow things to be stack allocated, or how ownership should really work in an application.
This is hardly the only WTF in the code, but Tim says:
Preceding the 98 standard, there is a LOT of C-with-classes code. But this representative line speaks to the complete lack of thought that has gone into much of codebase. That whitespace is as-is from the source.
[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!USPS Halts All Packages From China, Sending the Ecommerce Industry Into Chaos
Read more of this story at Slashdot.
UK Team Invents Self-Healing Road Surface To Prevent Potholes
Read more of this story at Slashdot.
OpenAI Partners With California State University System
Read more of this story at Slashdot.
Apple Announces 'Invites' App, Raises AppleCare+ Subscription Prices For iPhone
Read more of this story at Slashdot.
Google Removes Pledge To Not Use AI For Weapons From Website
Read more of this story at Slashdot.
AI-Generated Slop Is Already In Your Public Library
Read more of this story at Slashdot.
RISC-V Mainboard For the Framework Laptop 13 Is Now Available
Read more of this story at Slashdot.
$42 Billion Broadband Grant Program May Scrap Biden Admin's Preference For Fiber
Read more of this story at Slashdot.
Red Hat Plans to Add AI to Fedora and GNOME
Read more of this story at Slashdot.
Amazon, King of Online Retail, Can't Seem To Make Its Physical Stores Work
Read more of this story at Slashdot.
Cruise To Slash Workforce By Nearly 50% After GM Cuts Funding To Robotaxi Operations
Read more of this story at Slashdot.
Panasonic To Cut Costs To Support Shift Into AI
Read more of this story at Slashdot.
Americans Kiss Job Hopping Goodbye
Read more of this story at Slashdot.
Microsoft Quietly Makes It Harder To Install Windows 11 on Old PCs Ahead of Windows 10's End of Support
Read more of this story at Slashdot.
Lung Cancer Diagnoses On the Rise Among Never-Smokers Worldwide
Read more of this story at Slashdot.
Chris Anderson Is Giving TED Away To Whoever Has the Best Idea for Its Future
Read more of this story at Slashdot.